Commit b8b39bff authored by Aaron Ma's avatar Aaron Ma Committed by Ard Biesheuvel

efi/x86: earlyprintk - Add 64bit efi fb address support

EFI GOP uses 64-bit frame buffer address in some BIOS.
Add 64bit address support in efi earlyprintk.
Signed-off-by: default avatarAaron Ma <aaron.ma@canonical.com>
Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
parent 4eda1117
...@@ -26,12 +26,14 @@ static bool early_efi_keep; ...@@ -26,12 +26,14 @@ static bool early_efi_keep;
*/ */
static __init int early_efi_map_fb(void) static __init int early_efi_map_fb(void)
{ {
unsigned long base, size; u64 base, size;
if (!early_efi_keep) if (!early_efi_keep)
return 0; return 0;
base = boot_params.screen_info.lfb_base; base = boot_params.screen_info.lfb_base;
if (boot_params.screen_info.capabilities & VIDEO_CAPABILITY_64BIT_BASE)
base |= (u64)boot_params.screen_info.ext_lfb_base << 32;
size = boot_params.screen_info.lfb_size; size = boot_params.screen_info.lfb_size;
efi_fb = ioremap(base, size); efi_fb = ioremap(base, size);
...@@ -46,9 +48,11 @@ early_initcall(early_efi_map_fb); ...@@ -46,9 +48,11 @@ early_initcall(early_efi_map_fb);
*/ */
static __ref void *early_efi_map(unsigned long start, unsigned long len) static __ref void *early_efi_map(unsigned long start, unsigned long len)
{ {
unsigned long base; u64 base;
base = boot_params.screen_info.lfb_base; base = boot_params.screen_info.lfb_base;
if (boot_params.screen_info.capabilities & VIDEO_CAPABILITY_64BIT_BASE)
base |= (u64)boot_params.screen_info.ext_lfb_base << 32;
if (efi_fb) if (efi_fb)
return (efi_fb + start); return (efi_fb + start);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment