i386/linux: Add support for ext_lfb_base
The EFI Graphics Output Protocol can return a 64-bit linear frame buffer address in some firmware/BIOS implementations. We currently only store the lower 32-bits in the lfb_base. This will eventually be passed to Linux kernel and the efifb driver will incorrectly interpret the framebuffer address as 32-bit address. The Linux kernel has already added support to handle 64-bit linear framebuffer address in the efifb driver since quite some time now. This patch adds the support for 64-bit linear frame buffer address in GRUB to address the above mentioned scenario. Signed-off-by: Arindam Nath <arindam.nath@amd.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
0abda83427
commit
8db0a305e4
2 changed files with 11 additions and 1 deletions
|
@ -309,6 +309,12 @@ grub_linux_setup_video (struct linux_kernel_params *params)
|
|||
params->lfb_line_len = mode_info.pitch;
|
||||
|
||||
params->lfb_base = (grub_size_t) framebuffer;
|
||||
|
||||
#if defined (GRUB_MACHINE_EFI) && defined (__x86_64__)
|
||||
params->ext_lfb_base = (grub_size_t) (((grub_uint64_t)(grub_size_t) framebuffer) >> 32);
|
||||
params->capabilities |= VIDEO_CAPABILITY_64BIT_BASE;
|
||||
#endif
|
||||
|
||||
params->lfb_size = ALIGN_UP (params->lfb_line_len * params->lfb_height, 65536);
|
||||
|
||||
params->red_mask_size = mode_info.red_mask_size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue