From: Evan Lloyd <Evan.Lloyd@arm.com>
To: "Yao, Jiewen" <jiewen.yao@intel.com>,
"Ni, Ruiyu" <ruiyu.ni@intel.com>,
"Carsey, Jaben" <jaben.carsey@intel.com>,
Sami Mujawar <Sami.Mujawar@arm.com>
Cc: "Carsey, Jaben" <jaben.carsey@intel.com>,
"edk2-devel@ml01.01.org" <edk2-devel@ml01.01.org>,
Leif Lindholm <leif.lindholm@linaro.org>,
"ard.biesheuvel@linaro.org" <ard.biesheuvel@linaro.org>
Subject: Re: [PATCH] ShellPkg: Add acpiview tool to dump ACPI tables
Date: Tue, 20 Dec 2016 13:20:54 +0000 [thread overview]
Message-ID: <AM5PR0801MB1762ED3B1DE5E30BAD1267838B900@AM5PR0801MB1762.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <74D8A39837DF1E4DA445A8C0B3885C503A8C6CBD@shsmsx102.ccr.corp.intel.com>
Hi Jiewen.
Some responses inline below:
> From: Yao, Jiewen [mailto:jiewen.yao@intel.com]
> Sent: 20 December 2016 05:54
> To: Ni, Ruiyu; Carsey, Jaben; Evan Lloyd
> Cc: Carsey, Jaben; edk2-devel@ml01.01.org; Leif Lindholm; ard.biesheuvel@linaro.org
> Subject: RE: [edk2] [PATCH] ShellPkg: Add acpiview tool to dump ACPI tables
>
> I like this idea - Shell.efi should only support commands defined by Shell spec.
> Then we should not port code to be a shell library.
>
> I have concern on ShellPkg\Library\UefiDpLib, because DP depends on TimerLib and TimerLib is a platform specific library.
> I do not object the idea to move DP from performancepkg to shellPkg.
> I would suggest DP had better be a standard shell application, rather than a shell lib and included in a shell bin.
>
>
> Now back to acpiview:
> First, it is great to have such tool in UEFI shell.
Thanks. We hoped people would see the benefit.
>
> Second, I found the function is incomplete.
> 1) Some ACPI defined tables are not complete. Take MADT as example, it only supports EFI_ACPI_6_1_GIC/EFI_ACPI_6_1_GICD/EFI_ACPI_6_1_GIC_MSI_FRAME/EFI_ACPI_6_1_GICR/EFI_ACPI_6_1_GIC_ITS.
> 2) Some ACPI defined tables are missing. Such as BGRT, FPDT.
At this stage we have only added tables for which we had an immediate use, as available effort is limited.
In addition, we did not want to submit code we were not able to test. Clearly, our platforms use GIC, not APIC.
Also we are not well placed to judge the best representation for some fields, e.g. are APIC interrupt numbers normally decimal or hex?
> 3) I found some ACPI reserved tables are added here. Such as DBG2, IORT.
Is there any problem with dumping the reserved tables?
> 4) But not all ACPI reserved tables are added. Such as HPET, TPM2.
We only wrote code for tables we could test. We have no example hardware/firmware with those tables.
> May I know what criteria we are using to select which feature is supported or not supported?
As stated above, we only provided the tables/sections that we needed to dump and could test.
>From the commit message:
"""
Many tables are not explicitly handled, in part because no examples are available for our testing.
The program is designed to be extended to new tables with minimal effort, and contributions are invited.
"""
> Or it is just something from start and still need some work to make it complete?
Yes, this is just a starting point and very far from complete.
We found it detected a number of problems for us, so we felt it worth contributing.
If we can get people to use it, that may mean fewer problems for us to debug. ;-)
>
> Third, I found we need a long ? ?switch (*AcpiTableSignature) case? to dump/parse ACPI table specific function.
> Do you think it will be better, that we provide a register function to let each ACPI table register a parser?
> For example: RegisterDumpAcpiTable (EFI_ACPI_1_0_APIC_SIGNATURE, DumpAcpiMADT);
> Then the core logic just need use a table-driven way to find out the corresponding parser function by a SIGNATURE.
You are right, that would be a much better abstract design, and would make adding a table simpler.
We discussed this in our pre-release review.
The trade-off is that you need to maintain a dynamic registry of handlers, and write your own lookup code.
Using a switch eliminates the registry, and relies on the compiler for efficient look up.
We would be very happy with this change, should someone have the time available to contribute it.
Our review also suggested changing the switch to just set a function pointer, with a single call at the end.
That would make each switch case much simpler. Would that be an acceptable "half-way house"?
>
> Finally, I agree with Ruiyu that a standalone tool might be more proper.
Agreed in other response.
>
> Thank you
> Yao Jiewen
>> > > ...
> > > >> Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
next prev parent reply other threads:[~2016-12-20 13:20 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-16 18:25 [PATCH] ShellPkg: Add acpiview tool to dump ACPI tables evan.lloyd
2016-12-19 9:48 ` Ni, Ruiyu
2016-12-19 15:57 ` Evan Lloyd
2016-12-19 18:01 ` Carsey, Jaben
2016-12-20 2:59 ` Ni, Ruiyu
2016-12-20 3:56 ` Carsey, Jaben
2016-12-20 4:49 ` Yao, Jiewen
2016-12-20 5:18 ` Ni, Ruiyu
2016-12-20 5:54 ` Yao, Jiewen
2016-12-20 13:20 ` Evan Lloyd [this message]
2016-12-20 16:35 ` Yao, Jiewen
2016-12-22 18:25 ` Evan Lloyd
2016-12-23 1:31 ` Yao, Jiewen
2017-01-13 8:10 ` Bhupesh SHARMA
2017-01-13 13:26 ` Yao, Jiewen
2016-12-23 3:35 ` How to build commonlib of Basetools in x64 mode wang xiaofeng
[not found] ` <CE7102C6-78B7-4631-8641-AF27FFAB52FE@apple.com>
2016-12-23 4:15 ` wang xiaofeng
[not found] ` <4A89E2EF3DFEDB4C8BFDE51014F606A14D6C3866@shsmsx102.ccr.corp.intel.com>
2016-12-23 4:54 ` Andrew Fish
2016-12-23 5:02 ` wang xiaofeng
2016-12-23 5:09 ` Gao, Liming
2016-12-20 12:22 ` [PATCH] ShellPkg: Add acpiview tool to dump ACPI tables Evan Lloyd
-- strict thread matches above, loose matches on Subject: below --
2017-12-15 19:28 evan.lloyd
2017-12-15 19:37 ` Evan Lloyd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AM5PR0801MB1762ED3B1DE5E30BAD1267838B900@AM5PR0801MB1762.eurprd08.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox