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

From: Borislav Petkov
Date: Mon Feb 11 2019 - 05:43:03 EST


On Mon, Feb 11, 2019 at 11:24:26AM +0100, Borislav Petkov wrote:
> It is only an observation for now though...

Ok, now I did this:

for (i = 0; i < systab->nr_tables; i++) {
acpi_physical_address table;
void *config_tables;
efi_guid_t guid;

if ((unsigned long)systab->tables >> 32) <---
asm volatile("1:\n jmp 1b");

config_tables = (void *)(systab->tables + size * i);

It did stop at the endless loop there which would mean that
systab->tables is simply pointing somewhere into the weeds.

Asm is:

---
# arch/x86/boot/compressed/acpi.c:96: asm volatile("1:\n jmp 1b");
#APP
# 96 "arch/x86/boot/compressed/acpi.c" 1
1:
jmp 1b
# 0 "" 2
#NO_APP
movq 112(%rcx), %rdi # systab_147->tables, _31
.L29:
# arch/x86/boot/compressed/acpi.c:98: config_tables = (void *)(systab->tables + size * i);
addq %r9, %rdi # ivtmp.64, config_tables
# arch/x86/boot/compressed/acpi.c:104: guid = tmp_table->guid;
---

and RDI is

rdi 0x630646870

in gdb.

systab itself gets computed to something low: 0x3fedb010.

Hmmm. Could it be that that EDK BIOS image is buggy?

[ 0.000000] efi: EFI v2.70 by EDK II
[ 0.000000] efi: SMBIOS=0x3feb9000 ACPI=0x3fee7000 ACPI 2.0=0x3fee7014 MEMATTR=0x3f524110

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.