1 /* 2 * Copyright (C) 2018-2022 Intel Corporation. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef ZEROPAGE_H 8 #define ZEROPAGE_H 9 #include <asm/e820.h> 10 #include <efi.h> 11 12 struct zero_page { 13 uint8_t pad0[0x1c0]; /* 0x000 */ 14 15 struct efi_info boot_efi_info; 16 17 uint8_t pad1[0x8]; /* 0x1e0 */ 18 uint8_t e820_nentries; /* 0x1e8 */ 19 uint8_t pad2[0x8]; /* 0x1e9 */ 20 21 struct { 22 uint8_t setup_sects; /* 0x1f1 */ 23 uint8_t hdr_pad1[0x1e]; /* 0x1f2 */ 24 uint8_t loader_type; /* 0x210 */ 25 uint8_t load_flags; /* 0x211 */ 26 uint8_t hdr_pad2[0x6]; /* 0x212 */ 27 uint32_t ramdisk_addr; /* 0x218 */ 28 uint32_t ramdisk_size; /* 0x21c */ 29 uint8_t hdr_pad3[0x8]; /* 0x220 */ 30 uint32_t bootargs_addr; /* 0x228 */ 31 uint32_t initrd_addr_max; /* 0x22c */ 32 uint32_t kernel_alignment; /* 0x230 */ 33 uint8_t relocatable_kernel; /* 0x234 */ 34 uint8_t hdr_pad5[0x13]; /* 0x235 */ 35 uint32_t payload_offset;/* 0x248 */ 36 uint32_t payload_length;/* 0x24c */ 37 uint8_t hdr_pad6[0x8]; /* 0x250 */ 38 uint64_t pref_addr; /* 0x258 */ 39 uint32_t init_size; /* 0x260 */ 40 uint8_t hdr_pad7[4]; /* 0x264 */ 41 } __packed hdr; 42 43 uint8_t pad3[0x68]; /* 0x268 */ 44 struct e820_entry entries[0x80]; /* 0x2d0 */ 45 uint8_t pad4[0x330]; /* 0xcd0 */ 46 } __packed; 47 48 #endif 49