Merge remote-tracking branch 'lsk/v3.10/topic/gator' into linux-linaro-lsk
[firefly-linux-kernel-4.4.55.git] / arch / x86 / boot / compressed / eboot.h
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 #define EFI_READ_CHUNK_SIZE     (1024 * 1024)
14
15 #define EFI_CONSOLE_OUT_DEVICE_GUID    \
16         EFI_GUID(0xd3b36f2c, 0xd551, 0x11d4, 0x9a, 0x46, 0x0, 0x90, 0x27, \
17                   0x3f, 0xc1, 0x4d)
18
19 #define PIXEL_RGB_RESERVED_8BIT_PER_COLOR               0
20 #define PIXEL_BGR_RESERVED_8BIT_PER_COLOR               1
21 #define PIXEL_BIT_MASK                                  2
22 #define PIXEL_BLT_ONLY                                  3
23 #define PIXEL_FORMAT_MAX                                4
24
25 struct efi_pixel_bitmask {
26         u32 red_mask;
27         u32 green_mask;
28         u32 blue_mask;
29         u32 reserved_mask;
30 };
31
32 struct efi_graphics_output_mode_info {
33         u32 version;
34         u32 horizontal_resolution;
35         u32 vertical_resolution;
36         int pixel_format;
37         struct efi_pixel_bitmask pixel_information;
38         u32 pixels_per_scan_line;
39 } __packed;
40
41 struct efi_graphics_output_protocol_mode_32 {
42         u32 max_mode;
43         u32 mode;
44         u32 info;
45         u32 size_of_info;
46         u64 frame_buffer_base;
47         u32 frame_buffer_size;
48 } __packed;
49
50 struct efi_graphics_output_protocol_mode_64 {
51         u32 max_mode;
52         u32 mode;
53         u64 info;
54         u64 size_of_info;
55         u64 frame_buffer_base;
56         u64 frame_buffer_size;
57 } __packed;
58
59 struct efi_graphics_output_protocol_mode {
60         u32 max_mode;
61         u32 mode;
62         unsigned long info;
63         unsigned long size_of_info;
64         u64 frame_buffer_base;
65         unsigned long frame_buffer_size;
66 } __packed;
67
68 struct efi_graphics_output_protocol_32 {
69         u32 query_mode;
70         u32 set_mode;
71         u32 blt;
72         u32 mode;
73 };
74
75 struct efi_graphics_output_protocol_64 {
76         u64 query_mode;
77         u64 set_mode;
78         u64 blt;
79         u64 mode;
80 };
81
82 struct efi_graphics_output_protocol {
83         void *query_mode;
84         unsigned long set_mode;
85         unsigned long blt;
86         struct efi_graphics_output_protocol_mode *mode;
87 };
88
89 struct efi_uga_draw_protocol_32 {
90         u32 get_mode;
91         u32 set_mode;
92         u32 blt;
93 };
94
95 struct efi_uga_draw_protocol_64 {
96         u64 get_mode;
97         u64 set_mode;
98         u64 blt;
99 };
100
101 struct efi_uga_draw_protocol {
102         void *get_mode;
103         void *set_mode;
104         void *blt;
105 };
106
107 #endif /* BOOT_COMPRESSED_EBOOT_H */