]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: Update the bootparam header
authorSimon Glass <sjg@chromium.org>
Sat, 5 Sep 2020 20:50:37 +0000 (14:50 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Fri, 25 Sep 2020 03:27:06 +0000 (11:27 +0800)
This header is missing a few of the newer features from the specification.
Add these as well as a link to the spec. Also use the BIT() macros where
appropriate.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/include/asm/bootparam.h

index d961dddc9e17ef67b947496c776afc066f52cd44..7a3c1f515544dd1e50eaa816396a98c2f62de9a8 100644 (file)
@@ -24,6 +24,11 @@ struct setup_data {
        __u8 data[0];
 };
 
+/**
+ * struct setup_header - Information needed by Linux to boot
+ *
+ * See https://www.kernel.org/doc/html/latest/x86/boot.html
+ */
 struct setup_header {
        __u8    setup_sects;
        __u16   root_flags;
@@ -43,15 +48,16 @@ struct setup_header {
        __u16   kernel_version;
        __u8    type_of_loader;
        __u8    loadflags;
-#define LOADED_HIGH    (1<<0)
-#define QUIET_FLAG     (1<<5)
-#define KEEP_SEGMENTS  (1<<6)
-#define CAN_USE_HEAP   (1<<7)
+#define LOADED_HIGH    BIT(0)
+#define KASLR_FLAG     BIT(1)
+#define QUIET_FLAG     BIT(5)
+#define KEEP_SEGMENTS  BIT(6)          /* Obsolete */
+#define CAN_USE_HEAP   BIT(7)
        __u16   setup_move_size;
        __u32   code32_start;
        __u32   ramdisk_image;
        __u32   ramdisk_size;
-       __u32   bootsect_kludge;
+       __u32   bootsect_kludge;        /* Obsolete */
        __u16   heap_end_ptr;
        __u8    ext_loader_ver;
        __u8    ext_loader_type;
@@ -59,7 +65,13 @@ struct setup_header {
        __u32   initrd_addr_max;
        __u32   kernel_alignment;
        __u8    relocatable_kernel;
-       __u8    _pad2[3];
+       u8      min_alignment;
+#define XLF_KERNEL_64                  BIT(0)
+#define XLF_CAN_BE_LOADED_ABOVE_4G     BIT(1)
+#define XLF_EFI_HANDOVER_32            BIT(2)
+#define XLF_EFI_HANDOVER_64            BIT(3)
+#define XLF_EFI_KEXEC                  BIT(4)
+       u16     xloadflags;
        __u32   cmdline_size;
        __u32   hardware_subarch;
        __u64   hardware_subarch_data;
@@ -69,6 +81,7 @@ struct setup_header {
        __u64   pref_address;
        __u32   init_size;
        __u32   handover_offset;
+       u32     kernel_info_offset;
 } __attribute__((packed));
 
 struct sys_desc_table {