diff options
| author | Simon Glass <[email protected]> | 2023-07-15 21:39:10 -0600 |
|---|---|---|
| committer | Bin Meng <[email protected]> | 2023-07-17 17:23:08 +0800 |
| commit | 6a324897825acdd54f31aeebfe0d29b7f6ab4d86 (patch) | |
| tree | f4911918084d148b6df2ec8f57034cf64d23ea33 /drivers/misc | |
| parent | 8856d613cb79876e1b1e1ef01b7507725810b7c5 (diff) | |
x86: Record the start and end of the tables
The ACPI tables are special in that they are passed to EFI as a separate
piece, independent of other tables.
Also they can be spread over two areas of memory, e.g. with QEMU we end
up with tables kept in high memory as well.
Add new global_data fields to hold this information and update the bdinfo
command to show the table areas.
Move the rom_table_end variable into the loop that uses it.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Diffstat (limited to 'drivers/misc')
| -rw-r--r-- | drivers/misc/qfw.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/misc/qfw.c b/drivers/misc/qfw.c index 0a93feeb4b2..7c01bf23d53 100644 --- a/drivers/misc/qfw.c +++ b/drivers/misc/qfw.c @@ -65,6 +65,11 @@ static int bios_linker_allocate(struct udevice *dev, printf("error: allocating resource\n"); return -ENOMEM; } + if (aligned_addr < gd->arch.table_start_high) + gd->arch.table_start_high = aligned_addr; + if (aligned_addr + size > gd->arch.table_end_high) + gd->arch.table_end_high = aligned_addr + size; + } else if (entry->alloc.zone == BIOS_LINKER_LOADER_ALLOC_ZONE_FSEG) { aligned_addr = ALIGN(*addr, align); } else { @@ -189,6 +194,10 @@ ulong write_acpi_tables(ulong addr) return addr; } + /* QFW always puts tables at high addresses */ + gd->arch.table_start_high = (ulong)table_loader; + gd->arch.table_end_high = (ulong)table_loader; + qfw_read_entry(dev, be16_to_cpu(file->cfg.select), size, table_loader); for (i = 0; i < (size / sizeof(*entry)); i++) { |
