@@ -827,6 +827,47 @@ Protocol: 2.09+
827827 sure to consider the case where the linked list already contains
828828 entries.
829829
830+ The setup_data is a bit awkward to use for extremely large data objects,
831+ both because the setup_data header has to be adjacent to the data object
832+ and because it has a 32-bit length field. However, it is important that
833+ intermediate stages of the boot process have a way to identify which
834+ chunks of memory are occupied by kernel data.
835+
836+ Thus setup_indirect struct and SETUP_INDIRECT type were introduced in
837+ protocol 2.15.
838+
839+ struct setup_indirect {
840+ __u32 type;
841+ __u32 reserved; /* Reserved, must be set to zero. */
842+ __u64 len;
843+ __u64 addr;
844+ };
845+
846+ The type member is a SETUP_INDIRECT | SETUP_* type. However, it cannot be
847+ SETUP_INDIRECT itself since making the setup_indirect a tree structure
848+ could require a lot of stack space in something that needs to parse it
849+ and stack space can be limited in boot contexts.
850+
851+ Let's give an example how to point to SETUP_E820_EXT data using setup_indirect.
852+ In this case setup_data and setup_indirect will look like this:
853+
854+ struct setup_data {
855+ __u64 next = 0 or <addr_of_next_setup_data_struct>;
856+ __u32 type = SETUP_INDIRECT;
857+ __u32 len = sizeof(setup_data);
858+ __u8 data[sizeof(setup_indirect)] = struct setup_indirect {
859+ __u32 type = SETUP_INDIRECT | SETUP_E820_EXT;
860+ __u32 reserved = 0;
861+ __u64 len = <len_of_SETUP_E820_EXT_data>;
862+ __u64 addr = <addr_of_SETUP_E820_EXT_data>;
863+ }
864+ }
865+
866+ .. note ::
867+ SETUP_INDIRECT | SETUP_NONE objects cannot be properly distinguished
868+ from SETUP_INDIRECT itself. So, this kind of objects cannot be provided
869+ by the bootloaders.
870+
830871============ ============
831872Field name: pref_address
832873Type: read (reloc)
@@ -986,7 +1027,7 @@ Field name: setup_type_max
9861027Offset/size: 0x000c/4
9871028============ ==============
9881029
989- This field contains maximal allowed type for setup_data.
1030+ This field contains maximal allowed type for setup_data and setup_indirect structs .
9901031
9911032
9921033The Image Checksum
0 commit comments