* [PATCH] x86/efi: earlyprintk - Add 64bit efi fb address support
@ 2018-09-08 16:23 Aaron Ma
2018-09-10 7:20 ` Ingo Molnar
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Aaron Ma @ 2018-09-08 16:23 UTC (permalink / raw)
To: ard.biesheuvel, tglx, x86, linux-efi, linux-kernel, aaron.ma
EFI GOP uses 64-bit frame buffer address in some BIOS.
Add 64bit address support in efi earlyprintk.
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
---
arch/x86/platform/efi/early_printk.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/x86/platform/efi/early_printk.c b/arch/x86/platform/efi/early_printk.c
index 5fdacb322ceb..c0ae25f59acd 100644
--- a/arch/x86/platform/efi/early_printk.c
+++ b/arch/x86/platform/efi/early_printk.c
@@ -32,6 +32,8 @@ static __init int early_efi_map_fb(void)
return 0;
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;
efi_fb = ioremap(base, size);
@@ -49,6 +51,8 @@ static __ref void *early_efi_map(unsigned long start, unsigned long len)
unsigned long 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)
return (efi_fb + start);
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] x86/efi: earlyprintk - Add 64bit efi fb address support
2018-09-08 16:23 [PATCH] x86/efi: earlyprintk - Add 64bit efi fb address support Aaron Ma
@ 2018-09-10 7:20 ` Ingo Molnar
2018-09-12 15:00 ` Ard Biesheuvel
2018-09-12 18:00 ` [PATCH v2] " Aaron Ma
2 siblings, 0 replies; 6+ messages in thread
From: Ingo Molnar @ 2018-09-10 7:20 UTC (permalink / raw)
To: Aaron Ma; +Cc: ard.biesheuvel, tglx, x86, linux-efi, linux-kernel
* Aaron Ma <aaron.ma@canonical.com> wrote:
> if (efi_fb)
> return (efi_fb + start);
Just noticed this detail unrelated to your patch: return is not a function.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] x86/efi: earlyprintk - Add 64bit efi fb address support
2018-09-08 16:23 [PATCH] x86/efi: earlyprintk - Add 64bit efi fb address support Aaron Ma
2018-09-10 7:20 ` Ingo Molnar
@ 2018-09-12 15:00 ` Ard Biesheuvel
2018-09-12 15:09 ` Aaron Ma
2018-09-12 18:00 ` [PATCH v2] " Aaron Ma
2 siblings, 1 reply; 6+ messages in thread
From: Ard Biesheuvel @ 2018-09-12 15:00 UTC (permalink / raw)
To: Aaron Ma
Cc: Thomas Gleixner, the arch/x86 maintainers, linux-efi,
Linux Kernel Mailing List
On 8 September 2018 at 18:23, Aaron Ma <aaron.ma@canonical.com> wrote:
> EFI GOP uses 64-bit frame buffer address in some BIOS.
> Add 64bit address support in efi earlyprintk.
>
> Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
> ---
> arch/x86/platform/efi/early_printk.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/x86/platform/efi/early_printk.c b/arch/x86/platform/efi/early_printk.c
> index 5fdacb322ceb..c0ae25f59acd 100644
> --- a/arch/x86/platform/efi/early_printk.c
> +++ b/arch/x86/platform/efi/early_printk.c
> @@ -32,6 +32,8 @@ static __init int early_efi_map_fb(void)
> return 0;
>
> 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;
> efi_fb = ioremap(base, size);
>
> @@ -49,6 +51,8 @@ static __ref void *early_efi_map(unsigned long start, unsigned long len)
> unsigned long 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)
> return (efi_fb + start);
Please fix this in a way that works on 32-bit x86/PAE as well (i.e.,
use a suitable type for base)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] x86/efi: earlyprintk - Add 64bit efi fb address support
2018-09-12 15:00 ` Ard Biesheuvel
@ 2018-09-12 15:09 ` Aaron Ma
0 siblings, 0 replies; 6+ messages in thread
From: Aaron Ma @ 2018-09-12 15:09 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: Thomas Gleixner, the arch/x86 maintainers, linux-efi,
Linux Kernel Mailing List
On 09/12/2018 11:00 PM, Ard Biesheuvel wrote:
> On 8 September 2018 at 18:23, Aaron Ma <aaron.ma@canonical.com> wrote:
>> EFI GOP uses 64-bit frame buffer address in some BIOS.
>> Add 64bit address support in efi earlyprintk.
>>
>> Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
>> ---
>> arch/x86/platform/efi/early_printk.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/arch/x86/platform/efi/early_printk.c b/arch/x86/platform/efi/early_printk.c
>> index 5fdacb322ceb..c0ae25f59acd 100644
>> --- a/arch/x86/platform/efi/early_printk.c
>> +++ b/arch/x86/platform/efi/early_printk.c
>> @@ -32,6 +32,8 @@ static __init int early_efi_map_fb(void)
>> return 0;
>>
>> 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;
>> efi_fb = ioremap(base, size);
>>
>> @@ -49,6 +51,8 @@ static __ref void *early_efi_map(unsigned long start, unsigned long len)
>> unsigned long 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)
>> return (efi_fb + start);
> Please fix this in a way that works on 32-bit x86/PAE as well (i.e.,
> use a suitable type for base)
>
Right, I will send a v2 patch.
Thanks,
Aaron
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] x86/efi: earlyprintk - Add 64bit efi fb address support
2018-09-08 16:23 [PATCH] x86/efi: earlyprintk - Add 64bit efi fb address support Aaron Ma
2018-09-10 7:20 ` Ingo Molnar
2018-09-12 15:00 ` Ard Biesheuvel
@ 2018-09-12 18:00 ` Aaron Ma
2018-09-12 18:39 ` Ard Biesheuvel
2 siblings, 1 reply; 6+ messages in thread
From: Aaron Ma @ 2018-09-12 18:00 UTC (permalink / raw)
To: ard.biesheuvel, tglx, x86, linux-efi, linux-kernel, aaron.ma
EFI GOP uses 64-bit frame buffer address in some BIOS.
Add 64bit address support in efi earlyprintk.
V2:
Fix type of address.
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
---
arch/x86/platform/efi/early_printk.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/x86/platform/efi/early_printk.c b/arch/x86/platform/efi/early_printk.c
index 5fdacb322ceb..7476b3b097e1 100644
--- a/arch/x86/platform/efi/early_printk.c
+++ b/arch/x86/platform/efi/early_printk.c
@@ -26,12 +26,14 @@ static bool early_efi_keep;
*/
static __init int early_efi_map_fb(void)
{
- unsigned long base, size;
+ u64 base, size;
if (!early_efi_keep)
return 0;
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;
efi_fb = ioremap(base, size);
@@ -46,9 +48,11 @@ early_initcall(early_efi_map_fb);
*/
static __ref void *early_efi_map(unsigned long start, unsigned long len)
{
- unsigned long base;
+ u64 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)
return (efi_fb + start);
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] x86/efi: earlyprintk - Add 64bit efi fb address support
2018-09-12 18:00 ` [PATCH v2] " Aaron Ma
@ 2018-09-12 18:39 ` Ard Biesheuvel
0 siblings, 0 replies; 6+ messages in thread
From: Ard Biesheuvel @ 2018-09-12 18:39 UTC (permalink / raw)
To: Aaron Ma
Cc: Thomas Gleixner, the arch/x86 maintainers, linux-efi,
Linux Kernel Mailing List
On 12 September 2018 at 20:00, Aaron Ma <aaron.ma@canonical.com> wrote:
> EFI GOP uses 64-bit frame buffer address in some BIOS.
> Add 64bit address support in efi earlyprintk.
>
> V2:
> Fix type of address.
>
> Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Thanks. Queued in efi/next.
> ---
> arch/x86/platform/efi/early_printk.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/platform/efi/early_printk.c b/arch/x86/platform/efi/early_printk.c
> index 5fdacb322ceb..7476b3b097e1 100644
> --- a/arch/x86/platform/efi/early_printk.c
> +++ b/arch/x86/platform/efi/early_printk.c
> @@ -26,12 +26,14 @@ static bool early_efi_keep;
> */
> static __init int early_efi_map_fb(void)
> {
> - unsigned long base, size;
> + u64 base, size;
>
> if (!early_efi_keep)
> return 0;
>
> 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;
> efi_fb = ioremap(base, size);
>
> @@ -46,9 +48,11 @@ early_initcall(early_efi_map_fb);
> */
> static __ref void *early_efi_map(unsigned long start, unsigned long len)
> {
> - unsigned long base;
> + u64 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)
> return (efi_fb + start);
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-09-12 18:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-08 16:23 [PATCH] x86/efi: earlyprintk - Add 64bit efi fb address support Aaron Ma
2018-09-10 7:20 ` Ingo Molnar
2018-09-12 15:00 ` Ard Biesheuvel
2018-09-12 15:09 ` Aaron Ma
2018-09-12 18:00 ` [PATCH v2] " Aaron Ma
2018-09-12 18:39 ` Ard Biesheuvel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).