-
Notifications
You must be signed in to change notification settings - Fork 36
CfgMgrACPI
Feature Name: Configuration Manager and ACPI Table Generation
PI Phase supported: DXE
SMM Required: No
https://en.wikipedia.org/wiki/Advanced_Configuration_and_Power_Interface https://uefi.org/specs/ACPI/6.4/03_ACPI_Concepts/ACPI_Concepts.html
ACPI tables provide a standard way of describing the platform to the operating system which are used during boot. These allow the OS to discover and configure the hardware in the system.
Configuration Manager module within the UEFI code parses the Device Tree and adds all the hardware components that are enabled to the ACPI Tables.
UEFI maintains a Device Tree file that lists all the hardware components or devices present in the platform as various nodes. Each node has a compatibility string, status of the device and various properties associated to the device.
The configuration Manager parses the flattened device tree nodes for various devices present and gathers its properties. The devices are identified using their compatibility string. The 'status' property could be used to identify if the device is present or enabled in the system.
A system could have multiple devices with the same compatibility string and they will be stored as the same object.
Each device and its properties are stored in the Platform Repository as a unique object with a unique object ID. The number of instances present is also recorded.
For eg. Cache properties include size, attributes, line-length etc
This is an example of how an entry is created in the Platform Repository
Repo->CmObjectId = CREATE_CM_ARM_OBJECT_ID (Object);
Repo->CmObjectToken = Object_Token;
Repo->CmObjectSize = sizeof (Object);
Repo->CmObjectCount = ARRAY_SIZE (Object);
Repo->CmObjectPtr = &Object;
These structures stored in the Platform Repository are looked up and used by ACPI Table generators.
Future plans include making the Configuration Manager module, platform independent. Currently some config info is also collected within individual device drivers and there is an effort to consolidate this collection. WIP.
This library parses the device tree and collect configuration info for various HW devices. It generates structures and add them to Platform Repository
This driver provides the Xavier (T194) specific configuration data used to generate ACPI
This driver provides the Orin (T234) specific configuration data used to generate ACPI
This library has the ACPI Table generators
ACPI Data tables contain simple data and no AML byte code. These tables include MADT, IORT, PPTT, SRAT etc.
Some ACPI tables include AML code produced from the ACPI Source Language (ASL). These include the DSDT or any SSDTs.
Table generation mechanism looks for various objects using their object IDs. Different tables list different devices or components and they are looked up using the object IDs and put together into a table.
For eg. the PPTT table looks for Cache and Core configuration and lists the Processor hierarchy nodes for all the Caches and cores that are enabled in the system.
UEFI Shell can be used to view the generated ACPI Tables using 'acpiview' cmd.
TODO