
On 6/23/19 11:47 PM, Alexander Graf wrote:
Am 23.06.2019 um 17:08 schrieb Heinrich Schuchardt xypron.glpk@gmx.de:
Hello Alex,
on the i.MX6 Wandboard the Kernel crashes when booting via GRUB at least since U-Boot v2019.01. See below.
In the code for SetVirtualAddressMap I saw the that the pointer to the list of configuration tables is adjusted:
if ((map_start <= (uintptr_t)systab.tables) && (map_end >= (uintptr_t)systab.tables)) { char *ptr = (char *)systab.tables; ptr += off; systab.tables = (struct efi_configuration_table *)ptr; }
Shouldn't the pointers to the individual configuration tables be adjusted too? I found no such code.
We have to adapt the systable, because RT code may use it. However, I thought tables are not guaranteed to be around after SVAM? Ard?
I tend to agree that in that case, adjusting the table pointer does not sound very useful either. Can we legally just set the table count to 0 there?
If however they are indeed legal to access via virtual addresses afterwards, I do agree that we should patch the individual table pointers too, yes.
The UEFI 2.8 has this sentence:
"All the addresses reported in these table entries will be referenced as physical and will not be fixed up when transition from preboot to runtime phase."
It is unclear to me if this refers to the addresses inside the individual tables or the addresses pointing to the tables.
But it is evident that tables must survive into runtime.
Regards
Heinrich
Alex