From 9a4025874f62637b384dc4628eeabced98cde476 Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Wed, 26 Nov 2014 20:06:54 +0000 Subject: 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@ --- sys/arch/sparc64/include/boot_flag.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'sys/arch/sparc64/include') 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_ */ -- cgit v1.2.3