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 <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user