summaryrefslogtreecommitdiffstats
path: root/ArmVirtPkg/ArmVirtPkg.dec
diff options
context:
space:
mode:
authorPierre Gondois <pierre.gondois@arm.com>2020-08-05 11:26:01 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-08-13 18:00:06 +0000
commitbb4e93925333625cdcd97f6f174f79e7ed48afa7 (patch)
treef9f48a8f27f883d4012867914659951940fb98f9 /ArmVirtPkg/ArmVirtPkg.dec
parentfeea6514486f9dbf6a657e25dd32035d997560de (diff)
downloadedk2-bb4e93925333625cdcd97f6f174f79e7ed48afa7.tar.gz
edk2-bb4e93925333625cdcd97f6f174f79e7ed48afa7.tar.bz2
edk2-bb4e93925333625cdcd97f6f174f79e7ed48afa7.zip
DynamicTablesPkg: AML Method parser
The AML language allows a Definition Block to implement methods that an Operating System can invoke at runtime. Although Dynamic AML does not provide interfaces to modify AML methods; an AML template code may contain methods and/or method invocations. Method definitions have an opcode defined in the AML encoding and can be easily parsed. However, the language does not define an opcode for method invocation. Method invocations are represented as a NameString followed by the arguments to the method. This poses a significant challenge for the AML parser as it has to determine if a NameString appearing in the AML byte stream is a method invocation and if it is a method invocation, then how many arguments follow. This also means the Method definition must occur prior to the method invocation in the AML byte stream. This is a hard requirement for the AML parser. The AML method parser maintains a NameSpaceRefList that keeps a track of every namespace node and its raw AML absolute path. The AmlIsMethodInvocation() searches the NameSpaceRefList to determine if a NameString matches a Method definition. A pseudo opcode has been defined in the AML encoding to represent the Method invocation in the AML tree. The AML encoding for method invocations in the ACPI specification 6.3 is: MethodInvocation := NameString TermArgList The AmlLib library redefines this as: MethodInvocation := MethodInvocationOp NameString ArgumentCount TermArgList ArgumentCount := ByteData Where MethodInvocationOp is the pseudo opcode and ArgumentCount is the number of arguments passed to the method. NOTE: The AmlLib library's definition for a method invocation only applies to the representation of method invocation node in the AML tree. When computing the size of a tree or serialising it, the additional data is not taken into account i.e. the MethodInvocationOp and the ArgumentCount are stripped before serialising. Method invocation nodes have the AML_METHOD_INVOVATION attribute set in the AmlLib library's representation of the AML encoding. 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 'ArmVirtPkg/ArmVirtPkg.dec')
0 files changed, 0 insertions, 0 deletions