diff options
author | Matt Fleming <matt.fleming@intel.com> | 2014-01-10 08:47:37 -0500 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2014-03-04 16:25:02 -0500 |
commit | 677703cef0a148ba07d37ced649ad25b1cda2f78 (patch) | |
tree | ca0167133614d879ec0c0f97c390e0073c925870 /arch/x86/boot/compressed | |
parent | 099240ac111aac454962e6399c0cc51d1511504a (diff) |
efi: Add separate 32-bit/64-bit definitions
The traditional approach of using machine-specific types such as
'unsigned long' does not allow the kernel to interact with firmware
running in a different CPU mode, e.g. 64-bit kernel with 32-bit EFI.
Add distinct EFI structure definitions for both 32-bit and 64-bit so
that we can use them in the 32-bit and 64-bit code paths.
Acked-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'arch/x86/boot/compressed')
-rw-r--r-- | arch/x86/boot/compressed/eboot.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/arch/x86/boot/compressed/eboot.h b/arch/x86/boot/compressed/eboot.h index 81b6b652b46a..d487e727f1ec 100644 --- a/arch/x86/boot/compressed/eboot.h +++ b/arch/x86/boot/compressed/eboot.h | |||
@@ -37,6 +37,24 @@ struct efi_graphics_output_mode_info { | |||
37 | u32 pixels_per_scan_line; | 37 | u32 pixels_per_scan_line; |
38 | } __packed; | 38 | } __packed; |
39 | 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 | |||
40 | struct efi_graphics_output_protocol_mode { | 58 | struct efi_graphics_output_protocol_mode { |
41 | u32 max_mode; | 59 | u32 max_mode; |
42 | u32 mode; | 60 | u32 mode; |
@@ -46,6 +64,20 @@ struct efi_graphics_output_protocol_mode { | |||
46 | unsigned long frame_buffer_size; | 64 | unsigned long frame_buffer_size; |
47 | } __packed; | 65 | } __packed; |
48 | 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 | |||
49 | struct efi_graphics_output_protocol { | 81 | struct efi_graphics_output_protocol { |
50 | void *query_mode; | 82 | void *query_mode; |
51 | unsigned long set_mode; | 83 | unsigned long set_mode; |
@@ -53,6 +85,18 @@ struct efi_graphics_output_protocol { | |||
53 | struct efi_graphics_output_protocol_mode *mode; | 85 | struct efi_graphics_output_protocol_mode *mode; |
54 | }; | 86 | }; |
55 | 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 | |||
56 | struct efi_uga_draw_protocol { | 100 | struct efi_uga_draw_protocol { |
57 | void *get_mode; | 101 | void *get_mode; |
58 | void *set_mode; | 102 | void *set_mode; |