diff options
author | Pierre Gondois <Pierre.Gondois@arm.com> | 2021-09-30 08:48:21 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-10-01 10:57:43 +0000 |
commit | 22873f58c40c496d59a0553bee1c720192ac35c9 (patch) | |
tree | 74627aa7e3b36acad9048f00b7ccc5b587fca302 /DynamicTablesPkg/Library/Acpi/Arm | |
parent | 691c5f776274d88b13113f67d8dbac0a3298150c (diff) | |
download | edk2-22873f58c40c496d59a0553bee1c720192ac35c9.tar.gz edk2-22873f58c40c496d59a0553bee1c720192ac35c9.tar.bz2 edk2-22873f58c40c496d59a0553bee1c720192ac35c9.zip |
DynamicTablesPkg: Rework AmlResourceDataCodegen.c/h
Rework all the functions to to have a generic prototype:
- First take take the resource data specific arguments.
E.g.: for a Register(): the AddressSpace, BitWidth, ...
- The penultimate parameter is a NameOpNode. The resource data
created is appended to the ResourceTemplate() contained in the
NameOpNode.
- The last parameter is a pointer holding the created resource data.
A least one of the two last parameter must be provided. One of them can
be omitted. This generic interface allows to either:
- Add the resource data to a NameOpNode. This is a common case for the
Ssdt tables generator.
- Get the created resource data and let the caller place it in an AML
tree.
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Diffstat (limited to 'DynamicTablesPkg/Library/Acpi/Arm')
-rw-r--r-- | DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c index fb93a5d2e7..19b7b128a0 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c @@ -338,8 +338,8 @@ FixupCmn600Info ( // Resource Data nodes.
for (Index = 0; Index < Cmn600Info->DtcCount; Index++) {
DtcInt = &Cmn600Info->DtcInterrupt[Index];
- Status = AmlCodeGenAddRdInterrupt (
- NameOpCrsNode,
+
+ Status = AmlCodeGenRdInterrupt (
((DtcInt->Flags &
EFI_ACPI_EXTENDED_INTERRUPT_FLAG_PRODUCER_CONSUMER_MASK) != 0),
((DtcInt->Flags &
@@ -349,7 +349,9 @@ FixupCmn600Info ( ((DtcInt->Flags &
EFI_ACPI_EXTENDED_INTERRUPT_FLAG_SHARABLE_MASK) != 0),
(UINT32*)&DtcInt->Interrupt,
- 1
+ 1,
+ NameOpCrsNode,
+ NULL
);
if (EFI_ERROR (Status)) {
goto error_handler;
|