]>
Commit | Line | Data |
---|---|---|
dacba2b2 SM |
1 | Dynamic Tables Framework\r |
2 | ------------------------\r | |
3 | \r | |
4 | Dynamic Tables Framework provides mechanisms to reduce the amount\r | |
5 | of effort required in porting firmware to new platforms. The aim is\r | |
6 | to provide an implementation capable of generating the firmware\r | |
7 | tables from an external source. This is potentially a management\r | |
8 | node, either local or remote, or, where suitable, a file that might\r | |
9 | be generated from the system construction. This initial release\r | |
10 | does not fully implement that - the configuration is held in local\r | |
11 | UEFI modules.\r | |
12 | \r | |
13 | Feature Summary\r | |
14 | ---------------\r | |
15 | The dynamic tables framework is designed to generate standardised\r | |
16 | firmware tables that describe the hardware information at\r | |
17 | run-time. A goal of standardised firmware is to have a common\r | |
18 | firmware for a platform capable of booting both Windows and Linux\r | |
19 | operating systems.\r | |
20 | \r | |
21 | Traditionally the firmware tables are handcrafted using ACPI\r | |
22 | Source Language (ASL), Table Definition Language (TDL) and\r | |
23 | C-code. This approach can be error prone and involves time\r | |
24 | consuming debugging. In addition, it may be desirable to configure\r | |
25 | platform hardware at runtime such as: configuring the number of\r | |
26 | cores available for use by the OS, or turning SoC features ON or\r | |
27 | OFF.\r | |
28 | \r | |
29 | The dynamic tables framework simplifies this by providing a set\r | |
30 | of standard table generators, that are implemented as libraries.\r | |
31 | These generators query a platform specific component, the\r | |
32 | 'Configuration Manager', to collate the information required\r | |
33 | for generating the tables at run-time.\r | |
34 | \r | |
35 | The framework also provides the ability to implement custom/OEM\r | |
36 | generators; thereby facilitating support for custom tables. The\r | |
37 | custom generators can also utilize the existing standard generators\r | |
38 | and override any functionality if needed.\r | |
39 | \r | |
40 | The framework currently implements a set of standard ACPI table\r | |
41 | generators for ARM architecture, that can generate Server Base Boot\r | |
42 | Requirement (SBBR) compliant tables. Although, the set of standard\r | |
43 | generators implement the functionality required for ARM architecture;\r | |
44 | the framework is extensible, and support for other architectures can\r | |
45 | be added easily.\r | |
46 | \r | |
47 | The framework currently supports the following table generators for ARM:\r | |
48 | * DBG2 - Debug Port Table 2\r | |
49 | * DSDT - Differentiated system description table. This is essentially\r | |
50 | a RAW table generator.\r | |
51 | * FADT - Fixed ACPI Description Table\r | |
52 | * GTDT - Generic Timer Description Table\r | |
53 | * IORT - IO Remapping Table\r | |
54 | * MADT - Multiple APIC Description Table\r | |
55 | * MCFG - PCI Express memory mapped configuration space base address\r | |
56 | Description Table\r | |
57 | * SPCR - Serial Port Console Redirection Table\r | |
58 | * SSDT - Secondary System Description Table. This is essentially\r | |
59 | a RAW table generator.\r | |
60 | \r | |
61 | Roadmap\r | |
62 | -------\r | |
63 | The current implementation of the Configuration Manager populates the\r | |
64 | platform information statically as a C structure. Further enhancements\r | |
65 | to introduce runtime loading of platform information from a platform\r | |
66 | information file is planned.\r | |
67 | \r | |
68 | Also support for generating SMBIOS tables is planned and will be added\r | |
69 | subsequently.\r | |
70 | \r | |
71 | Related Modules\r | |
72 | ---------------\r | |
73 | \r | |
74 | ### ACPICA iASL compiler\r | |
75 | The RAW table generator, used to process the DSDT/SSDT files depends on\r | |
76 | the iASL compiler to convert the DSDT/SSDT ASL files to a C array containing\r | |
77 | the hex AML code. The "-tc" option of the iASL compiler has been enhanced to\r | |
78 | support generation of an AML hex file (C header) with a unique symbol name\r | |
79 | so that it is suitable for inclusion from a C source file.\r | |
80 | \r | |
81 | Related Links\r | |
82 | --------------\r | |
83 | \r | |
84 | <https://github.com/acpica/acpica.git>\r | |
85 | \r | |
86 | \r | |
87 | Supported Platforms\r | |
88 | -------------------\r | |
89 | 1. Juno\r | |
90 | 2. FVP Models\r | |
91 | \r | |
92 | Build Instructions\r | |
93 | ------------------\r | |
94 | 1. Set path for the iASL compiler with support for generating a C header\r | |
95 | file as output.\r | |
96 | \r | |
97 | 2. Set PACKAGES_PATH to point to the locations of the following repositories:\r | |
98 | \r | |
99 | Example:\r | |
100 | \r | |
101 | > set PACKAGES_PATH=%CD%\edk2;%CD%\edk2-platforms;\r | |
102 | \r | |
103 | or\r | |
104 | \r | |
105 | > export PACKAGES_PATH=$PWD/edk2:$PWD/edk2-platforms\r | |
106 | \r | |
107 | 3. To enable Dynamic tables framework the *'DYNAMIC_TABLES_FRAMEWORK'*\r | |
108 | option must be defined. This can be passed as a command line\r | |
109 | parameter to the edk2 build system.\r | |
110 | \r | |
111 | Example:\r | |
112 | \r | |
113 | >build -a AARCH64 -p Platform\ARM\JunoPkg\ArmJuno.dsc\r | |
114 | -t GCC5 **-D DYNAMIC_TABLES_FRAMEWORK**\r | |
115 | \r | |
116 | or\r | |
117 | \r | |
118 | >build -a AARCH64 -p Platform\ARM\VExpressPkg\ArmVExpress-FVP-AArch64.dsc\r | |
119 | -t GCC5 **-D DYNAMIC_TABLES_FRAMEWORK**\r | |
120 | \r | |
121 | Prerequisites\r | |
122 | -------------\r | |
123 | ACPICA iASL compiler with the enhanced "-tc" option to support generation of\r | |
124 | AML hex (C header) files with unique symbol names.\r | |
125 | \r | |
126 | A patch *'[iASL: Enhance the -tc option (create AML hex file in C)](https://github.com/acpica/acpica/commit/f9a88a4c1cd020b6a5475d63b29626852a0b5f37)'*, dated 16 March 2018 (2018-03-16),\r | |
127 | to enable this support has been integrated to the ACPICA source repository.\r | |
128 | \r | |
129 | Ensure that the iASL compiler used for building *Dynamic Tables Framework* has this feature enabled.\r | |
130 | \r | |
131 | This feature was made available in the *ACPICA Compiler update\r | |
132 | [Version 20180508](https://www.acpica.org/node/156)*, dated 8 May 2018 (2018-05-08).\r | |
133 | \r | |
134 | Documentation\r | |
135 | -------------\r | |
136 | \r | |
137 | Refer to the following presentation from *UEFI Plugfest Seattle 2018*:\r | |
138 | \r | |
139 | [Dynamic Tables Framework: A Step Towards Automatic Generation of Advanced Configuration and Power Interface (ACPI) & System Management BIOS (SMBIOS) Tables – Sami Mujawar (Arm).](http://www.uefi.org/sites/default/files/resources/Arm_Dynamic%20Tables%20Framework%20A%20Step%20Towards%20Automatic%20Generation%20of%20Advanced%20Configuration%20and%20Power%20Interface%20%28ACPI%29%20%26%20System%20Management%20BIOS%20%28SMBIOS%29%20Tables%20_0.pdf)\r |