"Michael S. Tsirkin" <[email protected]> wrote on 07/30/2014 11:07:28 AM:
> > >If you need bios to allocate this memory, then we will
> > >need a new allocation type for this, add it to linker
> > >in bios and qemu.
> >
> > Why does the BIOS 'need' to allocate it? Why can it not just use the
memory
> > that QEMU allocates? Obviously I am using the 'pointer relocation'
feature
> > of the BIOS to bend the pointer in the TCPA table to this log area.
>
> You tell me - your patches make BIOS allocate it.
No, the BIOS does not allocate it, it merely relocates the pointer.
One example here:
fadt->firmware_ctrl = cpu_to_le32(facs);
/* FACS address to be filled by Guest linker */
bios_linker_loader_add_pointer(linker, ACPI_BUILD_TABLE_FILE,
ACPI_BUILD_TABLE_FILE,
table_data, &fadt->firmware_ctrl,
sizeof fadt->firmware_ctrl);
similar example here:
log_area_start_address = table_data->len + sizeof(*tcpa);
[...]
tcpa->log_area_start_address = cpu_to_le64(log_area_start_address);
/* LASA address to be filled by Guest linker */
bios_linker_loader_add_pointer(linker, ACPI_BUILD_TABLE_FILE,
ACPI_BUILD_TABLE_FILE,
table_data,
&tcpa->log_area_start_address,
sizeof(tcpa->log_area_start_address));
Stefan