[U-Boot] [U-BOOT PATCH v3 2/4] x86: Added support for ACPI table generation at the generic layer.

Bin Meng bmeng.cn at gmail.com
Tue Aug 18 06:15:30 CEST 2015


+ML

Hi Saket,

On Sun, Aug 16, 2015 at 5:39 AM, Saket Sinha <saket.sinha89 at gmail.com> wrote:
> Hi Bin,
>
> Please find my response inline.
>
> On Thu, Aug 13, 2015 at 3:31 PM, Bin Meng <bmeng.cn at gmail.com> wrote:
>> Hi Saket,
>>
>> On Thu, Aug 13, 2015 at 11:01 AM, Saket Sinha <saket.sinha89 at gmail.com> wrote:
>>
>> Please see my comments in your [1/4] patch regarding to patch title
>> and commit message.
>>
>
> Addressed in patchset series v4.
>
>>> Signed-off-by: Saket Sinha <saket.sinha89 at gmail.com>
>>> ---
>>>
>>>  arch/x86/include/asm/acpi_table.h | 387 +++++++++++++++++++++++++++++++++++
>>>  arch/x86/lib/Makefile             |   1 +
>>>  arch/x86/lib/acpi_table.c         | 413 ++++++++++++++++++++++++++++++++++++++
>>>  arch/x86/lib/tables.c             |   5 +
>>>  scripts/Makefile.lib              |  11 +
>>>  5 files changed, 817 insertions(+)
>>>  create mode 100644 arch/x86/include/asm/acpi_table.h
>>>  create mode 100644 arch/x86/lib/acpi_table.c
>>>

[snip]

>
>>> +
>>> diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
>>> index dcfe9ee..6ecd6db 100644
>>> --- a/arch/x86/lib/Makefile
>>> +++ b/arch/x86/lib/Makefile
>>> @@ -30,6 +30,7 @@ obj-y += physmem.o
>>>  obj-$(CONFIG_X86_RAMTEST) += ramtest.o
>>>  obj-y += sfi.o
>>>  obj-y  += string.o
>>> +obj-$(CONFIG_GENERATE_ACPI_TABLE) += acpi_table.o
>>>  obj-y  += tables.o
>>>  obj-$(CONFIG_SYS_X86_TSC_TIMER)        += tsc_timer.o
>>>  obj-$(CONFIG_CMD_ZBOOT)        += zimage.o
>>> diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c
>>> new file mode 100644
>>> index 0000000..2e20317
>>> --- /dev/null
>>> +++ b/arch/x86/lib/acpi_table.c
>>> @@ -0,0 +1,413 @@
>>> +/*
>>> + * Copyright (C) 2015, Saket Sinha <saket.sinha89 at gmail.com>
>>> + *
>>
>> Please add comments to give others some hints on where this file is ported from.
>>
>
> Yes. Addressed in patchset series v4.
>
>>> + * SPDX-License-Identifier:   GPL-2.0+
>>> + */
>>> +
>>> +#include <asm/acpi_table.h>
>>> +#include <asm/cpu.h>
>>> +#include <asm/ioapic.h>
>>> +#include <asm/lapic.h>
>>> +#include <asm/tables.h>
>>> +#include <asm/pci.h>
>>> +#include <cpu.h>
>>> +#include <dm.h>
>>> +#include <dm/uclass-internal.h>
>>> +#include <dm/lists.h>
>>> +
>>> +extern const unsigned char AmlCode[];
>>
>> Can we avoid using CamelCase here?
>>
>
> No.
>  iasl -tc dumps the aamlcode into an array called AmlCode[]. I do not
> see any option to change that.
>
> Kindly refer official iasl documntation at below link -
> https://github.com/disdi/ACPI/blob/master/aslcompiler.pdf - Section
> 6.4.2 Output of –tc (make C hex table) Option
>

Please add a comment block to explain this is required by the IASL and
we cannot rename it to conform U-Boot coding convention.

[snip]

Regards,
Bin


More information about the U-Boot mailing list