-
Notifications
You must be signed in to change notification settings - Fork 3k
ShellPkg/AcpiView: Adds FPDT Parser #11774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Add a new parser for the Firmware Performance Data Table (FPDT), as per the ACPI6.5 specification. Signed-off-by: Abdul Lateef Attar <[email protected]>
6b25cc1 to
5a0eb9d
Compare
pierregondois
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello Abdul,
Thanks for the new parser. I added some comments
| #include "AcpiViewConfig.h" | ||
|
|
||
| // Local Variables | ||
| STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be mAcpiHdrInfo for static structures
| { L"Length", 1, 2, L"0x%x", NULL, NULL, NULL, NULL }, | ||
| { L"Revision", 1, 3, L"0x%x", NULL, NULL, NULL, NULL }, | ||
| { L"Reserved", 4, 4, L"0x%x", NULL, NULL, NULL, NULL }, | ||
| { L"BootPerformanceTablePointer", 8, 8, L"0x%lx", NULL, NULL, NULL, NULL } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: personal preference, but I think it might be easier to read the acronyms instead when reading the table:
BootPerformanceTablePointer->FBPTS3PerformanceTablePointer- >S3PT- etc.
| { L"Length", 1, 2, L"0x%x", NULL, NULL, NULL, NULL }, | ||
| { L"Revision", 1, 3, L"0x%x", NULL, NULL, NULL, NULL }, | ||
| { L"Reserved", 4, 4, L"0x%x", NULL, NULL, NULL, NULL }, | ||
| { L"BootPerformanceTablePointer", 8, 8, L"0x%lx", NULL, NULL, NULL, NULL } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, would it be possible to check if this is possible to parse the structure pointed by BootPerformanceTablePointer by providing a ACPI_PARSER.PrintFormatter ?
It seems the DumpSmmuNode is doing that for instance.
It would allow to simplify the logic in ParseAcpiFpdt()
| FpdtBasicBootPtr->Header.Length, | ||
| PARSER_PARAMS (FpdtBootPerfPointerParser) | ||
| ); | ||
| // Parse the header AcpiFpdtHdrParser |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: I think it should be ok to remove these comments
| FpdtS3ResumeRec->Header.Length, | ||
| PARSER_PARAMS (FpdtS3ResumeRecordParser) | ||
| ); | ||
| } else if (FpdtRecHdr->Type == EFI_ACPI_6_5_FPDT_RUNTIME_RECORD_TYPE_S3_SUSPEND) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT:
I think there are new structures defined in ACPI 6.6.
If you have some time feel free to add support for them. Otherwise it s already nice to have this parser!
Add a new parser for the Firmware Performance Data Table (FPDT), as per the ACPI6.5 specification.
How This Was Tested
Tested on AMD platform by running "acpiview -S FPDT" from UEFI shell.
Integration Instructions
N/A