[U-Boot] [PATCH 4/4] x86: qemu: loading ACPI table from QEMU
Miao Yan
yanmiaobest at gmail.com
Tue Jan 19 03:48:04 CET 2016
Hi Bin,
2016-01-16 21:24 GMT+08:00 Bin Meng <bmeng.cn at gmail.com>:
> Hi Miao,
>
> On Fri, Jan 15, 2016 at 11:12 AM, Miao Yan <yanmiaobest at gmail.com> wrote:
>> If CONFIG_GENERATE_ACPI_TABLE is not defined, then use ACPI table created
>> by QEMU.
>>
>> Signed-off-by: Miao Yan <yanmiaobest at gmail.com>
>> ---
>> arch/x86/lib/tables.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/x86/lib/tables.c b/arch/x86/lib/tables.c
>> index 14b15cf..1671385 100644
>> --- a/arch/x86/lib/tables.c
>> +++ b/arch/x86/lib/tables.c
>> @@ -10,6 +10,7 @@
>> #include <asm/smbios.h>
>> #include <asm/tables.h>
>> #include <asm/acpi_table.h>
>> +#include <asm/fw_cfg.h>
>>
>> u8 table_compute_checksum(void *v, int len)
>> {
>> @@ -55,8 +56,10 @@ void write_tables(void)
>> #endif
>> #ifdef CONFIG_GENERATE_ACPI_TABLE
>> rom_table_end = write_acpi_tables(rom_table_end);
>> - rom_table_end = ALIGN(rom_table_end, 1024);
>> +#else
>> + rom_table_end = qemu_fwcfg_write_acpi_tables(rom_table_end);
>
> This breaks other x86 boards.Can we hide this changes in acpi_table.c
> with proper #ifdef and some comments?
>
> For QEMU ACPI, how about:
>
> - GENERATE_ACPI_TABLE is the overall switch to turn on ACPI table by U-Boot
> - Introduce another Kconfig option for QEMU to generate ACPI tables
> from firmware interface. If this is turned on, the original method
> provided in acpi_tables.c will not be used.
Sounds OK, I'll drop this one. Thanks.
>
>> #endif
>> + rom_table_end = ALIGN(rom_table_end, 1024);
>> #ifdef CONFIG_GENERATE_SMBIOS_TABLE
>> rom_table_end = write_smbios_table(rom_table_end);
>> rom_table_end = ALIGN(rom_table_end, 1024);
>> --
>
> Regards,
> Bin
More information about the U-Boot
mailing list