Skip to content
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

ACPI: Fix the order of column 2 and 3 for bitfields of GTDT (Bugzilla Bug 4841) #10536

Open
tianocore-issues opened this issue Sep 3, 2024 · 2 comments
Labels
priority:low Little to no impact. No urgency to fix. type:documentation-request Improvements or additions to documentation

Comments

@tianocore-issues
Copy link

This issue was created automatically with bugzilla2github

Bugzilla Bug 4841

Date: 2024-09-03T16:43:06+00:00
From: Edhay <<edhaya.chandran>>
To: Edhay <<edhaya.chandran>>
CC: @lgao4

Last updated: 2024-09-04T20:35:53+00:00

@tianocore-issues
Copy link
Author

Comment 23360

Date: 2024-09-03 16:43:06 +0000
From: Edhay <<edhaya.chandran>>

  • Industry Specification: ACPI Specification
  • Target OS: ---
  • Bugzilla Assignee(s): Edhay <<edhaya.chandran>>

The ACPI specification has the following pattern for the columns of the bitfield tables:
Col 1 | Col 2 | Col 3 | Col 4
"Flag" | "Bit length" | "Bit offset" | "Description"

The bitfields defined in the GTDT have the following columns:
Col 1 | Col 2 | Col 3 | Col 4
"Flag" | "Bit offset" | "Number of bits" | "Description"

The ordering of columns is generally irrelevant for human consumption.
However, for the ACPIView (ACPI_PARSER) assumes that the table is defined as "Bit len" followed by "Bit offset".
When copying the table definition from the spec it's simpler if the columns are in the order that the tool requires.
Otherwise, a manual (and error prone) column reordering is required.

https://github.com/tianocore/edk2/blob/master/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h#L268-L280
https://github.com/tianocore/edk2/blob/master/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.c#L90-L114

This is a simple erratum to correct the order of “Number of bits” (must be the 2nd column) and “Bit offset” (must be the 3rd column) in the affected tables

Affected tables:

https://uefi.org/specs/ACPI/6.5/05_ACPI_Software_Programming_Model.html#flag-definitions-secure-el1-timer-non-secure-el1-timer-el2-timer-virtual-el1-timer-and-virtual-el2-timer

https://uefi.org/specs/ACPI/6.5/05_ACPI_Software_Programming_Model.html#flag-definitions-gt-block-physical-timers-and-virtual-timers

https://uefi.org/specs/ACPI/6.5/05_ACPI_Software_Programming_Model.html#flag-definitions-common-flags

https://uefi.org/specs/ACPI/6.5/05_ACPI_Software_Programming_Model.html#flag-definitions-arm-generic-watchdog-timer

@tianocore-issues
Copy link
Author

Comment 23363

Date: 2024-09-04 20:35:53 +0000
From: @lgao4

[email protected]: please work on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:low Little to no impact. No urgency to fix. type:documentation-request Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant