diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2014-11-26 20:06:54 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2014-11-26 20:06:54 +0000 |
commit | 9a4025874f62637b384dc4628eeabced98cde476 (patch) | |
tree | 2483735f52fb98e4de15a00eecda97e512f2a3fb /sys/arch/sparc64/include | |
parent | 17c633333b6043c9435a2e6ed1d7efaec130cf00 (diff) |
Add a new ELF segment .openbsd.bootdata to the sparc64 kernel.
This can be used to pass boot parameters to the kernel which can't be passed
safely via the Open Firmware interface, such as softraid volume IDs and keys.
The kernel already reads the arguments if available but ofwboot won't provide
them until further changes are committed there.
With support from deraadt, kettenis and matthew.
ok deraadt@
Diffstat (limited to 'sys/arch/sparc64/include')
-rw-r--r-- | sys/arch/sparc64/include/boot_flag.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/arch/sparc64/include/boot_flag.h b/sys/arch/sparc64/include/boot_flag.h index 77518f1861d..67ddbbbe064 100644 --- a/sys/arch/sparc64/include/boot_flag.h +++ b/sys/arch/sparc64/include/boot_flag.h @@ -1,4 +1,4 @@ -/* $OpenBSD: boot_flag.h,v 1.4 2014/07/20 18:24:34 deraadt Exp $ */ +/* $OpenBSD: boot_flag.h,v 1.5 2014/11/26 20:06:53 stsp Exp $ */ /* $NetBSD: boot_flag.h,v 1.3 2001/07/01 02:56:21 gmcgarry Exp $ */ /*- @@ -62,4 +62,20 @@ \ } while (/* CONSTCOND */ 0) + +/* softraid boot information */ +#define BOOTSR_UUID_MAX 16 +#define BOOTSR_CRYPTO_MAXKEYBYTES 32 + +/* MD boot data in .openbsd.bootdata ELF segment */ +struct openbsd_bootdata { + u_int64_t version; + u_int64_t len; /* of structure */ + + u_int8_t sr_uuid[BOOTSR_UUID_MAX]; + u_int8_t sr_maskkey[BOOTSR_CRYPTO_MAXKEYBYTES]; +} __packed; + +#define BOOTDATA_VERSION 1 + #endif /* _MACHINE_BOOT_FLAG_H_ */ |