Re: [U-Boot] [PATCH 4/4] x86: qemu: loading ACPI table from QEMU
Hi Bin, 2016-01-16 21:24 GMT+08:00 Bin Meng: > Hi Miao, > > On Fri, Jan 15, 2016 at 11:12 AM, Miao Yan wrote: >> If CONFIG_GENERATE_ACPI_TABLE is not defined, then use ACPI table created >> by QEMU. >> >> Signed-off-by: Miao Yan >> --- >> 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 >> #include >> #include >> +#include >> >> 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 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 4/4] x86: qemu: loading ACPI table from QEMU
Hi Miao, On Fri, Jan 15, 2016 at 11:12 AM, Miao Yanwrote: > If CONFIG_GENERATE_ACPI_TABLE is not defined, then use ACPI table created > by QEMU. > > Signed-off-by: Miao Yan > --- > 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 > #include > #include > +#include > > 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. > #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 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 4/4] x86: qemu: loading ACPI table from QEMU
If CONFIG_GENERATE_ACPI_TABLE is not defined, then use ACPI table created by QEMU. Signed-off-by: Miao Yan--- 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 #include #include +#include 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); #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); -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot