[U-Boot] [UBOOT PATCH v6 2/3] x86: Add ACPI table support to QEMU

Saket Sinha saket.sinha89 at gmail.com
Sun Aug 23 13:33:59 CEST 2015


Hi Bin,


On Sun, Aug 23, 2015 at 3:03 PM, Bin Meng <bmeng.cn at gmail.com> wrote:
> Hi Saket,
>
> On Sat, Aug 22, 2015 at 2:50 PM, Saket Sinha <saket.sinha89 at gmail.com> wrote:
>> This patch mainly adds ACPI support to QEMU.
>> Verified by booting Linux kernel on QEMU i440FX and Q35.
>
> I don't think ACPI is for i440FX. Although it boots, but that does not
> mean ACPI really works. These ASL files describing Q35 platform, not
> i440FX.
>
>>
>> Signed-off-by: Saket Sinha <saket.sinha89 at gmail.com>
>> ---
>>
>>  arch/x86/cpu/qemu/Makefile |   1 +
>>  arch/x86/cpu/qemu/acpi.c   | 179 +++++++++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 180 insertions(+)
>>  create mode 100644 arch/x86/cpu/qemu/acpi.c
>>
>> diff --git a/arch/x86/cpu/qemu/Makefile b/arch/x86/cpu/qemu/Makefile
>> index 9a66b16..8c3884c 100644
>> --- a/arch/x86/cpu/qemu/Makefile
>> +++ b/arch/x86/cpu/qemu/Makefile
>> @@ -8,4 +8,5 @@ ifndef CONFIG_EFI_STUB
>>  obj-y += car.o dram.o
>>  endif
>>  obj-y += qemu.o
>> +obj-$(CONFIG_GENERATE_ACPI_TABLE) += acpi.o
>>  obj-$(CONFIG_PCI) += pci.o
>> diff --git a/arch/x86/cpu/qemu/acpi.c b/arch/x86/cpu/qemu/acpi.c
>> new file mode 100644
>> index 0000000..2496da7
>> --- /dev/null
>> +++ b/arch/x86/cpu/qemu/acpi.c
>> @@ -0,0 +1,179 @@
>> +/*
>> + * Copyright (C) 2015, Saket Sinha <saket.sinha89 at gmail.com>
>> + *
>> + * SPDX-License-Identifier:   GPL-2.0+
>> + */
>> +
>> +#include <common.h>
>> +#include <asm/acpi_table.h>
>> +#include <asm/ioapic.h>
>> +#include <asm/tables.h>
>> +
>> +void acpi_create_fadt(struct acpi_fadt *fadt, struct acpi_facs *facs,
>> +               void *dsdt)
>> +{
>> +       acpi_header_t *header = &(fadt->header);
>> +       u16 pmbase;
>> +
>> +       pci_dev_t bdf = PCI_BDF(0, 0x1f, 0);
>> +       pci_read_config_word(bdf, 0x40, &pmbase);
>> +
>> +     /*
>
> Nits: misaligned
>
>> +        * TODO(saket.sinha89 at gmail.com): wrong value
>> +        * of pmbase by above function. Harcoding it to
>
> Typo: Hardcoding
>
>> +        * correct value. Since no PCI register is
>> +        * programmed Power Management Interface is
>> +        * not working
>> +        */
>> +
>
> You still did not address this issue before sending v6. I don't
> understand why don't you just prepare a separate patch to program this
> PMBASE register by yourself. Are you waiting for me or Simon to do
> this, or are you looking for something else?
>

As discussed with Simon, he wants me to come up with ACPI support on Minnowmax
first and look up for QEMU fixes later before the deadline of this
program(GSOC) ends.

Currently, I have been working on Minnowmax ACPI support and post a
workable patch for the same on mailing list ASAP.

If you want me to currently stop on this activity and work on the Qemu
patch which programs PMBASE register first,
let us discuss it with Simon and plan accordingly.


Regards,
Saket Sinha


More information about the U-Boot mailing list