1*e653d891Skn /* $OpenBSD: boot_flag.h,v 1.8 2023/11/09 14:26:34 kn Exp $ */ 2908fd733Sjason /* $NetBSD: boot_flag.h,v 1.3 2001/07/01 02:56:21 gmcgarry Exp $ */ 3908fd733Sjason 4908fd733Sjason /*- 5908fd733Sjason * Copyright (c) 2000 The NetBSD Foundation, Inc. 6908fd733Sjason * All rights reserved. 7908fd733Sjason * 8908fd733Sjason * Redistribution and use in source and binary forms, with or without 9908fd733Sjason * modification, are permitted provided that the following conditions 10908fd733Sjason * are met: 11908fd733Sjason * 1. Redistributions of source code must retain the above copyright 12908fd733Sjason * notice, this list of conditions and the following disclaimer. 13908fd733Sjason * 2. Redistributions in binary form must reproduce the above copyright 14908fd733Sjason * notice, this list of conditions and the following disclaimer in the 15908fd733Sjason * documentation and/or other materials provided with the distribution. 16908fd733Sjason * 17908fd733Sjason * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 18908fd733Sjason * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19908fd733Sjason * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20908fd733Sjason * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 21908fd733Sjason * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22908fd733Sjason * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23908fd733Sjason * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24908fd733Sjason * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25908fd733Sjason * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26908fd733Sjason * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27908fd733Sjason * POSSIBILITY OF SUCH DAMAGE. 28908fd733Sjason */ 29908fd733Sjason 302fa72412Spirofti #ifndef _MACHINE_BOOT_FLAG_H_ 312fa72412Spirofti #define _MACHINE_BOOT_FLAG_H_ 32908fd733Sjason 33237fd37fSstsp /* softraid boot information */ 34237fd37fSstsp #define BOOTSR_UUID_MAX 16 35237fd37fSstsp #define BOOTSR_CRYPTO_MAXKEYBYTES 32 36237fd37fSstsp 37237fd37fSstsp /* MD boot data in .openbsd.bootdata ELF segment */ 38237fd37fSstsp struct openbsd_bootdata { 39237fd37fSstsp u_int64_t version; 40237fd37fSstsp u_int64_t len; /* of structure */ 41237fd37fSstsp 42237fd37fSstsp u_int8_t sr_uuid[BOOTSR_UUID_MAX]; 43237fd37fSstsp u_int8_t sr_maskkey[BOOTSR_CRYPTO_MAXKEYBYTES]; 446a5bfaa2Skettenis u_int32_t boothowto; 45237fd37fSstsp } __packed; 46237fd37fSstsp 47237fd37fSstsp #define BOOTDATA_VERSION 1 486a5bfaa2Skettenis #define BOOTDATA_LEN_BOOTHOWTO 68 49237fd37fSstsp 502fa72412Spirofti #endif /* _MACHINE_BOOT_FLAG_H_ */ 51