• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef BOOT_COMPRESSED_EBOOT_H
2 #define BOOT_COMPRESSED_EBOOT_H
3 
4 #define SEG_TYPE_DATA		(0 << 3)
5 #define SEG_TYPE_READ_WRITE	(1 << 1)
6 #define SEG_TYPE_CODE		(1 << 3)
7 #define SEG_TYPE_EXEC_READ	(1 << 1)
8 #define SEG_TYPE_TSS		((1 << 3) | (1 << 0))
9 #define SEG_OP_SIZE_32BIT	(1 << 0)
10 #define SEG_GRANULARITY_4KB	(1 << 0)
11 
12 #define DESC_TYPE_CODE_DATA	(1 << 0)
13 
14 #define EFI_CONSOLE_OUT_DEVICE_GUID    \
15 	EFI_GUID(0xd3b36f2c, 0xd551, 0x11d4, 0x9a, 0x46, 0x0, 0x90, 0x27, \
16 		  0x3f, 0xc1, 0x4d)
17 
18 #define PIXEL_RGB_RESERVED_8BIT_PER_COLOR		0
19 #define PIXEL_BGR_RESERVED_8BIT_PER_COLOR		1
20 #define PIXEL_BIT_MASK					2
21 #define PIXEL_BLT_ONLY					3
22 #define PIXEL_FORMAT_MAX				4
23 
24 struct efi_pixel_bitmask {
25 	u32 red_mask;
26 	u32 green_mask;
27 	u32 blue_mask;
28 	u32 reserved_mask;
29 };
30 
31 struct efi_graphics_output_mode_info {
32 	u32 version;
33 	u32 horizontal_resolution;
34 	u32 vertical_resolution;
35 	int pixel_format;
36 	struct efi_pixel_bitmask pixel_information;
37 	u32 pixels_per_scan_line;
38 } __packed;
39 
40 struct efi_graphics_output_protocol_mode_32 {
41 	u32 max_mode;
42 	u32 mode;
43 	u32 info;
44 	u32 size_of_info;
45 	u64 frame_buffer_base;
46 	u32 frame_buffer_size;
47 } __packed;
48 
49 struct efi_graphics_output_protocol_mode_64 {
50 	u32 max_mode;
51 	u32 mode;
52 	u64 info;
53 	u64 size_of_info;
54 	u64 frame_buffer_base;
55 	u64 frame_buffer_size;
56 } __packed;
57 
58 struct efi_graphics_output_protocol_mode {
59 	u32 max_mode;
60 	u32 mode;
61 	unsigned long info;
62 	unsigned long size_of_info;
63 	u64 frame_buffer_base;
64 	unsigned long frame_buffer_size;
65 } __packed;
66 
67 struct efi_graphics_output_protocol_32 {
68 	u32 query_mode;
69 	u32 set_mode;
70 	u32 blt;
71 	u32 mode;
72 };
73 
74 struct efi_graphics_output_protocol_64 {
75 	u64 query_mode;
76 	u64 set_mode;
77 	u64 blt;
78 	u64 mode;
79 };
80 
81 struct efi_graphics_output_protocol {
82 	void *query_mode;
83 	unsigned long set_mode;
84 	unsigned long blt;
85 	struct efi_graphics_output_protocol_mode *mode;
86 };
87 
88 struct efi_uga_draw_protocol_32 {
89 	u32 get_mode;
90 	u32 set_mode;
91 	u32 blt;
92 };
93 
94 struct efi_uga_draw_protocol_64 {
95 	u64 get_mode;
96 	u64 set_mode;
97 	u64 blt;
98 };
99 
100 struct efi_uga_draw_protocol {
101 	void *get_mode;
102 	void *set_mode;
103 	void *blt;
104 };
105 
106 struct efi_config {
107 	u64 image_handle;
108 	u64 table;
109 	u64 allocate_pool;
110 	u64 allocate_pages;
111 	u64 get_memory_map;
112 	u64 free_pool;
113 	u64 free_pages;
114 	u64 locate_handle;
115 	u64 handle_protocol;
116 	u64 exit_boot_services;
117 	u64 text_output;
118 	efi_status_t (*call)(unsigned long, ...);
119 	bool is64;
120 } __packed;
121 
122 #endif /* BOOT_COMPRESSED_EBOOT_H */
123