Re: [tip:x86/boot] x86/boot: Early parse RSDP and save it in boot_params

From: Ard Biesheuvel
Date: Mon Feb 11 2019 - 06:55:42 EST

On Mon, 11 Feb 2019 at 12:04, Borislav Petkov <bp@xxxxxxxxx> wrote:
> On Mon, Feb 11, 2019 at 10:46:18AM +0000, Ard Biesheuvel wrote:
> > As I pointed out in my previous reply, systab will be the wrong type
> > on 32-bit firmware, it needs to be efi_system_table_32_t
> Yeah, that seems to work. It boots now and it says:
> [ 0.000000] efi: No EFI runtime due to 32/64-bit mismatch with kernel
> Do you think we should mirror that behavoir early too, so that people
> don't get any ideas?

It you have CONFIG_EFI_MIXED enabled, you can in fact use 32-bit UEFI
runtime services from 64-bit Linux, so just using the tables should be
fine as well, and I don't think we should hide that behind a Kconfig
option. (Note that ACPI defines its table layouts without regard for
architecture bitness, so this is just about the minimal EFI table
parsing that is required to get at the RDSP)

> Or should we limit that only to the RDSP address computation and
> anything else where kernel and EFI bitness mismatch should be disabled?
> Thanks Ard!
> --
> Regards/Gruss,
> Boris.
> Good mailing practices for 400: avoid top-posting and trim the reply.