TianoCore EDK2 master
Loading...
Searching...
No Matches
LinuxBzimage.h
Go to the documentation of this file.
1
8#ifndef __LINUX_BZIMAGE_H__
9#define __LINUX_BZIMAGE_H__
10
11#define BOOTSIG 0x1FE
12#define SETUP_HDR 0x53726448 /* 0x53726448 == "HdrS" */
13
14#define E820_RAM 1
15#define E820_RESERVED 2
16#define E820_ACPI 3
17#define E820_NVS 4
18#define E820_UNUSABLE 5
19
20#pragma pack(1)
21
23 UINT8 setup_secs; /* Sectors for setup code */
24 UINT16 root_flags;
25 UINT32 sys_size;
26 UINT16 ram_size;
27 UINT16 video_mode;
28 UINT16 root_dev;
29 UINT16 signature; /* Boot signature */
30 UINT16 jump;
31 UINT32 header;
32 UINT16 version;
33 UINT16 su_switch;
34 UINT16 setup_seg;
35 UINT16 start_sys;
36 UINT16 kernel_ver;
37 UINT8 loader_id;
38 UINT8 load_flags;
39 UINT16 movesize;
40 UINT32 code32_start; /* Start of code loaded high */
41 UINT32 ramdisk_start; /* Start of initial ramdisk */
42 UINT32 ramdisk_len; /* Length of initial ramdisk */
43 UINT32 bootsect_kludge;
44 UINT16 heap_end;
45 UINT8 ext_loader_ver; /* Extended boot loader version */
46 UINT8 ext_loader_type; /* Extended boot loader ID */
47 UINT32 cmd_line_ptr; /* 32-bit pointer to the kernel command line */
48 UINT32 ramdisk_max; /* Highest legal initrd address */
49 UINT32 kernel_alignment; /* Physical addr alignment required for kernel */
50 UINT8 relocatable_kernel; /* Whether kernel is relocatable or not */
51 UINT8 min_alignment;
52 UINT16 xloadflags;
53 UINT32 cmdline_size;
54 UINT32 hardware_subarch;
55 UINT64 hardware_subarch_data;
56 UINT32 payload_offset;
57 UINT32 payload_length;
58 UINT64 setup_data;
59 UINT64 pref_address;
60 UINT32 init_size;
61 UINT32 handover_offset;
62};
63
64struct efi_info {
65 UINT32 efi_loader_signature;
66 UINT32 efi_systab;
67 UINT32 efi_memdesc_size;
68 UINT32 efi_memdesc_version;
69 UINT32 efi_memmap;
70 UINT32 efi_memmap_size;
71 UINT32 efi_systab_hi;
72 UINT32 efi_memmap_hi;
73};
74
75struct e820_entry {
76 UINT64 addr; /* start of memory segment */
77 UINT64 size; /* size of memory segment */
78 UINT32 type; /* type of memory segment */
79};
80
82 UINT8 orig_x; /* 0x00 */
83 UINT8 orig_y; /* 0x01 */
84 UINT16 ext_mem_k; /* 0x02 */
85 UINT16 orig_video_page; /* 0x04 */
86 UINT8 orig_video_mode; /* 0x06 */
87 UINT8 orig_video_cols; /* 0x07 */
88 UINT8 flags; /* 0x08 */
89 UINT8 unused2; /* 0x09 */
90 UINT16 orig_video_ega_bx; /* 0x0a */
91 UINT16 unused3; /* 0x0c */
92 UINT8 orig_video_lines; /* 0x0e */
93 UINT8 orig_video_isVGA; /* 0x0f */
94 UINT16 orig_video_points; /* 0x10 */
95
96 /* VESA graphic mode -- linear frame buffer */
97 UINT16 lfb_width; /* 0x12 */
98 UINT16 lfb_height; /* 0x14 */
99 UINT16 lfb_depth; /* 0x16 */
100 UINT32 lfb_base; /* 0x18 */
101 UINT32 lfb_size; /* 0x1c */
102 UINT16 cl_magic, cl_offset; /* 0x20 */
103 UINT16 lfb_linelength; /* 0x24 */
104 UINT8 red_size; /* 0x26 */
105 UINT8 red_pos; /* 0x27 */
106 UINT8 green_size; /* 0x28 */
107 UINT8 green_pos; /* 0x29 */
108 UINT8 blue_size; /* 0x2a */
109 UINT8 blue_pos; /* 0x2b */
110 UINT8 rsvd_size; /* 0x2c */
111 UINT8 rsvd_pos; /* 0x2d */
112 UINT16 vesapm_seg; /* 0x2e */
113 UINT16 vesapm_off; /* 0x30 */
114 UINT16 pages; /* 0x32 */
115 UINT16 vesa_attributes; /* 0x34 */
116 UINT32 capabilities; /* 0x36 */
117 UINT8 _reserved[6]; /* 0x3a */
118};
119
122 UINT8 apm_bios_info[0x14];
123 UINT8 _pad2[4];
124 UINT64 tboot_addr;
125 UINT8 ist_info[0x10];
126 UINT8 _pad3[16];
127 UINT8 hd0_info[16];
128 UINT8 hd1_info[16];
129 UINT8 sys_desc_table[0x10];
130 UINT8 olpc_ofw_header[0x10];
131 UINT8 _pad4[128];
132 UINT8 edid_info[0x80];
133 struct efi_info efi_info;
134 UINT32 alt_mem_k;
135 UINT32 scratch;
136 UINT8 e820_entries;
137 UINT8 eddbuf_entries;
138 UINT8 edd_mbr_sig_buf_entries;
139 UINT8 _pad6[6];
140 struct setup_header hdr;
141 UINT8 _pad7[0x290-0x1f1-sizeof (struct setup_header)];
142 UINT32 edd_mbr_sig_buffer[16];
143 struct e820_entry e820_map[128];
144 UINT8 _pad8[48];
145 UINT8 eddbuf[0x1ec];
146 UINT8 _pad9[276];
147};
148
149typedef struct {
150 UINT16 limit;
151 UINT64 *base;
152} dt_addr_t;
153
154#pragma pack()
155
156extern EFI_STATUS
157setup_graphics (
158 struct boot_params *buf
159 );
160
161#endif /* __LINUX_BZIMAGE_H__ */
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
Definition: LinuxBzimage.h:75