aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/include/uapi
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-06-26 13:15:09 +0200
committerGeert Uytterhoeven <geert@linux-m68k.org>2022-07-06 14:07:04 +0200
commita1ee38ab1a75ee20e4aad232894db3ea45d3ce4f (patch)
tree2e79e381bdcfcb9e35d53e1b1357a3b53ea7eee8 /arch/m68k/include/uapi
parentm68k: bitops: Change __fls to return and accept unsigned long (diff)
downloadlinux-dev-a1ee38ab1a75ee20e4aad232894db3ea45d3ce4f.tar.xz
linux-dev-a1ee38ab1a75ee20e4aad232894db3ea45d3ce4f.zip
m68k: virt: Use RNG seed from bootinfo block
Other virt VMs can pass RNG seeds via the "rng-seed" device tree property or via UEFI, but m68k doesn't have either. Instead it has its own bootinfo protocol. So this commit adds support for receiving a RNG seed from it, which will be used at the earliest possible time in boot, just like device tree. Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Link: https://lore.kernel.org/r/20220626111509.330159-1-Jason@zx2c4.com Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/include/uapi')
-rw-r--r--arch/m68k/include/uapi/asm/bootinfo-virt.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/m68k/include/uapi/asm/bootinfo-virt.h b/arch/m68k/include/uapi/asm/bootinfo-virt.h
index e4db7e2213ab..b091ee9b06e0 100644
--- a/arch/m68k/include/uapi/asm/bootinfo-virt.h
+++ b/arch/m68k/include/uapi/asm/bootinfo-virt.h
@@ -13,6 +13,14 @@
#define BI_VIRT_VIRTIO_BASE 0x8004
#define BI_VIRT_CTRL_BASE 0x8005
+/*
+ * A random seed used to initialize the RNG. Record format:
+ *
+ * - length [ 2 bytes, 16-bit big endian ]
+ * - seed data [ `length` bytes, padded to preserve 2-byte alignment ]
+ */
+#define BI_VIRT_RNG_SEED 0x8006
+
#define VIRT_BOOTI_VERSION MK_BI_VERSION(2, 0)
#endif /* _UAPI_ASM_M68K_BOOTINFO_MAC_H */