summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKairui Song <kasong@redhat.com>2018-12-05 17:21:01 +0800
committerSimon Horman <horms@verge.net.au>2019-01-28 11:51:24 +0100
commita98b4da4fd4f1c7ad9a47ade17f377b833e5c9ae (patch)
treedb1403d4e66b8f58f1f85796d9a7af615aa70211 /include
parent002b608f36693665f7e5326449bb646101713e81 (diff)
downloadkexec-tools-a98b4da4fd4f1c7ad9a47ade17f377b833e5c9ae.tar.gz
x86: Handle 64bit framebuffer memory address properly
In a EFI system, the frame buffer address is 64bit, so currently if the address is beyound 4G, kexec will set wrong address due to truncate. Linux kernel commit ae2ee627dc87 ('efifb: Add support for 64-bit frame buffer addresses') added support for 64bit frame buffer address, an 'ext_lfb_base' field is added as the upper 32-bits of the frame buffer, and introduced a new capability flag 'VIDEO_TYPE_CAPABILITY_64BIT_BASE' to indicate if the extend field is used. This patch adopts this change, set proper extent address and capability flag when the address is beyound 4G. Signed-off-by: Kairui Song <kasong@redhat.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'include')
-rw-r--r--include/x86/x86-linux.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/x86/x86-linux.h b/include/x86/x86-linux.h
index 78347514..352ea02b 100644
--- a/include/x86/x86-linux.h
+++ b/include/x86/x86-linux.h
@@ -107,7 +107,10 @@ struct x86_linux_param_header {
uint16_t vesapm_seg; /* 0x2e */
uint16_t vesapm_off; /* 0x30 */
uint16_t pages; /* 0x32 */
- uint8_t reserved4[12]; /* 0x34 -- 0x3f reserved for future expansion */
+ uint16_t vesa_attributes; /* 0x34 */
+ uint32_t capabilities; /* 0x36 */
+ uint32_t ext_lfb_base; /* 0x3a */
+ uint8_t reserved4[2]; /* 0x3e -- 0x3f reserved for future expansion */
struct apm_bios_info apm_bios_info; /* 0x40 */
struct drive_info_struct drive_info; /* 0x80 */
@@ -199,7 +202,7 @@ struct x86_linux_param_header {
struct edd_info eddbuf[EDDMAXNR]; /* 0xd00 */
/* 0xeec */
#define COMMAND_LINE_SIZE 2048
-};
+} __attribute__((packed));
struct x86_linux_faked_param_header {
struct x86_linux_param_header hdr; /* 0x00 */