summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Common/GlobalData.py
diff options
context:
space:
mode:
authorPierre Gondois <pierre.gondois@arm.com>2020-08-05 12:35:56 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-08-13 18:00:06 +0000
commite8db4f9c53b1f7a3094a64ea27e92224623a6a3b (patch)
tree8bad3eba5b02ba88460e3e2e3ddf2a55bda3adf2 /BaseTools/Source/Python/Common/GlobalData.py
parentbb4e93925333625cdcd97f6f174f79e7ed48afa7 (diff)
downloadedk2-e8db4f9c53b1f7a3094a64ea27e92224623a6a3b.tar.gz
edk2-e8db4f9c53b1f7a3094a64ea27e92224623a6a3b.tar.bz2
edk2-e8db4f9c53b1f7a3094a64ea27e92224623a6a3b.zip
DynamicTablesPkg: AML Field list parser
The AML language allows defining field lists in a Definition Block. Although Dynamic AML does not provide interfaces to modify Field Lists; an AML template code may contain Field lists and the AML parser must be capable of parsing and representing the Field lists in the AML tree. The AML parser creates an Object node that represents the 'Field Node'. The AML Field list parser creates an object node for each field element parsed in the AML byte stream, and adds them to the variable list of arguments of the 'Field Node'. Nodes that can have a field list are referred as 'Field nodes'. They have the AML_HAS_FIELD_LIST attribute set in the AML encoding. According to the ACPI 6.3 specification, s20.2.5.2 "Named Objects Encoding", field elements can be: - NamedField := NameSeg PkgLength; - ReservedField := 0x00 PkgLength; - AccessField := 0x01 AccessType AccessAttrib; - ConnectField := <0x02 NameString> | <0x02 BufferData>; - ExtendedAccessField := 0x03 AccessType ExtendedAccessAttrib AccessLength. A small set of opcodes describes the field elements. They are referred as field opcodes. An AML_BYTE_ENCODING table has been created for field OpCodes. Field elements: - don't have a SubOpCode; - have at most 3 fixed arguments (as opposed to 6 for standard AML objects); - don't have a variable list of arguments; - only the NamedField field element is part of the AML namespace. ConnectField's BufferData is a buffer node containing a single resource data element. NamedField field elements do not have an AML OpCode. NameSeg starts with a Char type and can thus be differentiated from the Opcodes for other fields. A pseudo OpCode has been created to simplify the parser. Following is a representation of a field node in an AML tree: (FieldNode) \ |- [0][1][3] # Fixed Arguments |- {(FldEl0)->(FldEl1)->...)} # Variable Arguments Where FldEl[n] is one of NamedField, ReservedField, AccessField, ConnectField, ExtendedAccessField. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Diffstat (limited to 'BaseTools/Source/Python/Common/GlobalData.py')
0 files changed, 0 insertions, 0 deletions