TianoCore EDK2 master
|
#include <AmlNodeDefines.h>
#include <CodeGen/AmlResourceDataCodeGen.h>
#include <AmlCoreInterface.h>
#include <AmlDefines.h>
#include <Api/AmlApiHelper.h>
#include <Tree/AmlNode.h>
#include <ResourceData/AmlResourceData.h>
Go to the source code of this file.
Functions | |
STATIC EFI_STATUS EFIAPI | LinkRdNode (IN AML_DATA_NODE *RdNode, IN AML_OBJECT_NODE *ParentNode, OUT AML_DATA_NODE **NewRdNode) |
STATIC UINT8 EFIAPI | RdIoRangeSpecificFlags (IN UINT8 IsaRanges, IN BOOLEAN IsDenseTranslation, IN BOOLEAN IsTypeStatic) |
STATIC UINT8 EFIAPI | MemoryRangeSpecificFlags (IN UINT8 Cacheable, IN BOOLEAN IsReadWrite, IN UINT8 MemoryRangeType, IN BOOLEAN IsTypeStatic) |
STATIC UINT8 EFIAPI | AddressSpaceGeneralFlags (IN BOOLEAN IsPosDecode, IN BOOLEAN IsMinFixed, IN BOOLEAN IsMaxFixed) |
STATIC EFI_STATUS EFIAPI | CheckAddressSpaceFields (IN BOOLEAN IsMinFixed, IN BOOLEAN IsMaxFixed, IN UINT64 AddressGranularity, IN UINT64 AddressMinimum, IN UINT64 AddressMaximum, IN UINT64 AddressTranslation, IN UINT64 RangeLength) |
STATIC EFI_STATUS EFIAPI | AmlCodeGenRdDWordSpace (IN UINT8 ResourceType, IN BOOLEAN IsResourceConsumer, IN BOOLEAN IsPosDecode, IN BOOLEAN IsMinFixed, IN BOOLEAN IsMaxFixed, IN UINT8 TypeSpecificFlags, IN UINT32 AddressGranularity, IN UINT32 AddressMinimum, IN UINT32 AddressMaximum, IN UINT32 AddressTranslation, IN UINT32 RangeLength, IN UINT8 ResourceSourceIndex, IN CONST CHAR8 *ResourceSource, IN AML_OBJECT_NODE_HANDLE NameOpNode, OPTIONAL OUT AML_DATA_NODE_HANDLE *NewRdNode OPTIONAL) |
EFI_STATUS EFIAPI | AmlCodeGenRdDWordIo (IN BOOLEAN IsResourceConsumer, IN BOOLEAN IsMinFixed, IN BOOLEAN IsMaxFixed, IN BOOLEAN IsPosDecode, IN UINT8 IsaRanges, IN UINT32 AddressGranularity, IN UINT32 AddressMinimum, IN UINT32 AddressMaximum, IN UINT32 AddressTranslation, IN UINT32 RangeLength, IN UINT8 ResourceSourceIndex, IN CONST CHAR8 *ResourceSource, IN BOOLEAN IsDenseTranslation, IN BOOLEAN IsTypeStatic, IN AML_OBJECT_NODE_HANDLE NameOpNode, OPTIONAL OUT AML_DATA_NODE_HANDLE *NewRdNode OPTIONAL) |
EFI_STATUS EFIAPI | AmlCodeGenRdDWordMemory (IN BOOLEAN IsResourceConsumer, IN BOOLEAN IsPosDecode, IN BOOLEAN IsMinFixed, IN BOOLEAN IsMaxFixed, IN AML_MEMORY_ATTRIBUTES_MEM Cacheable, IN BOOLEAN IsReadWrite, IN UINT32 AddressGranularity, IN UINT32 AddressMinimum, IN UINT32 AddressMaximum, IN UINT32 AddressTranslation, IN UINT32 RangeLength, IN UINT8 ResourceSourceIndex, IN CONST CHAR8 *ResourceSource, IN AML_MEMORY_ATTRIBUTES_MTP MemoryRangeType, IN BOOLEAN IsTypeStatic, IN AML_OBJECT_NODE_HANDLE NameOpNode, OPTIONAL OUT AML_DATA_NODE_HANDLE *NewRdNode OPTIONAL) |
EFI_STATUS EFIAPI | AmlCodeGenRdMemory32Fixed (BOOLEAN IsReadWrite, UINT32 Address, UINT32 RangeLength, AML_OBJECT_NODE_HANDLE NameOpNode, AML_DATA_NODE_HANDLE *NewMemNode) |
STATIC EFI_STATUS EFIAPI | AmlCodeGenRdWordSpace (IN UINT8 ResourceType, IN BOOLEAN IsResourceConsumer, IN BOOLEAN IsPosDecode, IN BOOLEAN IsMinFixed, IN BOOLEAN IsMaxFixed, IN UINT8 TypeSpecificFlags, IN UINT16 AddressGranularity, IN UINT16 AddressMinimum, IN UINT16 AddressMaximum, IN UINT16 AddressTranslation, IN UINT16 RangeLength, IN UINT8 ResourceSourceIndex, IN CONST CHAR8 *ResourceSource, IN AML_OBJECT_NODE_HANDLE NameOpNode, OPTIONAL OUT AML_DATA_NODE_HANDLE *NewRdNode OPTIONAL) |
EFI_STATUS EFIAPI | AmlCodeGenRdWordBusNumber (IN BOOLEAN IsResourceConsumer, IN BOOLEAN IsMinFixed, IN BOOLEAN IsMaxFixed, IN BOOLEAN IsPosDecode, IN UINT16 AddressGranularity, IN UINT16 AddressMinimum, IN UINT16 AddressMaximum, IN UINT16 AddressTranslation, IN UINT16 RangeLength, IN UINT8 ResourceSourceIndex, IN CONST CHAR8 *ResourceSource, IN AML_OBJECT_NODE_HANDLE NameOpNode, OPTIONAL OUT AML_DATA_NODE_HANDLE *NewRdNode OPTIONAL) |
EFI_STATUS EFIAPI | AmlCodeGenRdWordIo (IN BOOLEAN IsResourceConsumer, IN BOOLEAN IsMinFixed, IN BOOLEAN IsMaxFixed, IN BOOLEAN IsPosDecode, IN UINT8 IsaRanges, IN UINT16 AddressGranularity, IN UINT16 AddressMinimum, IN UINT16 AddressMaximum, IN UINT16 AddressTranslation, IN UINT16 RangeLength, IN UINT8 ResourceSourceIndex, IN CONST CHAR8 *ResourceSource, IN BOOLEAN IsDenseTranslation, IN BOOLEAN IsTypeStatic, IN AML_OBJECT_NODE_HANDLE NameOpNode, OPTIONAL OUT AML_DATA_NODE_HANDLE *NewRdNode OPTIONAL) |
STATIC EFI_STATUS EFIAPI | AmlCodeGenRdQWordSpace (IN UINT8 ResourceType, IN BOOLEAN IsResourceConsumer, IN BOOLEAN IsPosDecode, IN BOOLEAN IsMinFixed, IN BOOLEAN IsMaxFixed, IN UINT8 TypeSpecificFlags, IN UINT64 AddressGranularity, IN UINT64 AddressMinimum, IN UINT64 AddressMaximum, IN UINT64 AddressTranslation, IN UINT64 RangeLength, IN UINT8 ResourceSourceIndex, IN CONST CHAR8 *ResourceSource, IN AML_OBJECT_NODE_HANDLE NameOpNode, OPTIONAL OUT AML_DATA_NODE_HANDLE *NewRdNode OPTIONAL) |
EFI_STATUS EFIAPI | AmlCodeGenRdQWordIo (IN BOOLEAN IsResourceConsumer, IN BOOLEAN IsMinFixed, IN BOOLEAN IsMaxFixed, IN BOOLEAN IsPosDecode, IN UINT8 IsaRanges, IN UINT64 AddressGranularity, IN UINT64 AddressMinimum, IN UINT64 AddressMaximum, IN UINT64 AddressTranslation, IN UINT64 RangeLength, IN UINT8 ResourceSourceIndex, IN CONST CHAR8 *ResourceSource, IN BOOLEAN IsDenseTranslation, IN BOOLEAN IsTypeStatic, IN AML_OBJECT_NODE_HANDLE NameOpNode, OPTIONAL OUT AML_DATA_NODE_HANDLE *NewRdNode OPTIONAL) |
EFI_STATUS EFIAPI | AmlCodeGenRdQWordMemory (IN BOOLEAN IsResourceConsumer, IN BOOLEAN IsPosDecode, IN BOOLEAN IsMinFixed, IN BOOLEAN IsMaxFixed, IN AML_MEMORY_ATTRIBUTES_MEM Cacheable, IN BOOLEAN IsReadWrite, IN UINT64 AddressGranularity, IN UINT64 AddressMinimum, IN UINT64 AddressMaximum, IN UINT64 AddressTranslation, IN UINT64 RangeLength, IN UINT8 ResourceSourceIndex, IN CONST CHAR8 *ResourceSource, IN AML_MEMORY_ATTRIBUTES_MTP MemoryRangeType, IN BOOLEAN IsTypeStatic, IN AML_OBJECT_NODE_HANDLE NameOpNode, OPTIONAL OUT AML_DATA_NODE_HANDLE *NewRdNode OPTIONAL) |
EFI_STATUS EFIAPI | AmlCodeGenRdInterrupt (IN BOOLEAN ResourceConsumer, IN BOOLEAN EdgeTriggered, IN BOOLEAN ActiveLow, IN BOOLEAN Shared, IN UINT32 *IrqList, IN UINT8 IrqCount, IN AML_OBJECT_NODE_HANDLE NameOpNode OPTIONAL, OUT AML_DATA_NODE_HANDLE *NewRdNode OPTIONAL) |
EFI_STATUS EFIAPI | AmlCodeGenRdRegister (IN UINT8 AddressSpace, IN UINT8 BitWidth, IN UINT8 BitOffset, IN UINT64 Address, IN UINT8 AccessSize, IN AML_OBJECT_NODE_HANDLE NameOpNode OPTIONAL, OUT AML_DATA_NODE_HANDLE *NewRdNode OPTIONAL) |
EFI_STATUS EFIAPI | AmlCodeGenRdIo (IN BOOLEAN IsDecoder16, IN UINT16 AddressMinimum, IN UINT16 AddressMaximum, IN UINT8 Alignment, IN UINT8 RangeLength, IN AML_OBJECT_NODE_HANDLE NameOpNode, OPTIONAL OUT AML_DATA_NODE_HANDLE *NewRdNode OPTIONAL) |
EFI_STATUS EFIAPI | AmlCodeGenEndTag (IN UINT8 CheckSum OPTIONAL, IN AML_OBJECT_NODE *ParentNode OPTIONAL, OUT AML_DATA_NODE **NewRdNode OPTIONAL) |
AML Resource Data Code Generation.
Copyright (c) 2020 - 2021, Arm Limited. All rights reserved.
Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file AmlResourceDataCodeGen.c.
STATIC UINT8 EFIAPI AddressSpaceGeneralFlags | ( | IN BOOLEAN | IsPosDecode, |
IN BOOLEAN | IsMinFixed, | ||
IN BOOLEAN | IsMaxFixed | ||
) |
Construct the GeneralFlags field of any Address Space Resource Descriptors.
E.g.: ACPI 6.4 specification, s6.4.3.5.1 "QWord Address Space Descriptor" for QWord
See ACPI 6.4 spec, s19.6.36 for more.
[in] | IsPosDecode | Decode parameter |
[in] | IsMinFixed | Minimum address is fixed. |
[in] | IsMaxFixed | Maximum address is fixed. |
Definition at line 208 of file AmlResourceDataCodeGen.c.
EFI_STATUS EFIAPI AmlCodeGenEndTag | ( | IN UINT8 CheckSum | OPTIONAL, |
IN AML_OBJECT_NODE *ParentNode | OPTIONAL, | ||
OUT AML_DATA_NODE **NewRdNode | OPTIONAL | ||
) |
Code generation for the EndTag resource data.
The EndTag resource data is automatically generated by the ASL compiler at the end of a list of resource data elements. Thus, it doesn't have a corresponding ASL function.
This function allocates memory to create a data node. It is the caller's responsibility to either:
ACPI 6.4, s6.4.2.9 "End Tag": "This checksum is generated such that adding it to the sum of all the data bytes will produce a zero sum." "If the checksum field is zero, the resource data is treated as if the checksum operation succeeded. Configuration proceeds normally."
To avoid re-computing checksums, if a new resource data elements is added/removed/modified in a list of resource data elements, the AmlLib resets the checksum to 0.
[in] | CheckSum | CheckSum to store in the EndTag. To ignore/avoid computing the checksum, give 0. |
[in] | ParentNode | If not NULL, add the generated node to the end of the variable list of argument of the ParentNode. The ParentNode must not initially contain an EndTag resource data element. |
[out] | NewRdNode | If success, contains the generated node. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | Could not allocate memory. |
Definition at line 1596 of file AmlResourceDataCodeGen.c.
EFI_STATUS EFIAPI AmlCodeGenRdDWordIo | ( | IN BOOLEAN | IsResourceConsumer, |
IN BOOLEAN | IsMinFixed, | ||
IN BOOLEAN | IsMaxFixed, | ||
IN BOOLEAN | IsPosDecode, | ||
IN UINT8 | IsaRanges, | ||
IN UINT32 | AddressGranularity, | ||
IN UINT32 | AddressMinimum, | ||
IN UINT32 | AddressMaximum, | ||
IN UINT32 | AddressTranslation, | ||
IN UINT32 | RangeLength, | ||
IN UINT8 | ResourceSourceIndex, | ||
IN CONST CHAR8 * | ResourceSource, | ||
IN BOOLEAN | IsDenseTranslation, | ||
IN BOOLEAN | IsTypeStatic, | ||
IN AML_OBJECT_NODE_HANDLE | NameOpNode, | ||
OPTIONAL OUT AML_DATA_NODE_HANDLE *NewRdNode | OPTIONAL | ||
) |
Code generation for the "DWordIO ()" ASL function.
The Resource Data effectively created is a DWord Address Space Resource Data. Cf ACPI 6.4:
The created resource data node can be:
See ACPI 6.4 spec, s19.6.34 for more.
[in] | IsResourceConsumer | ResourceUsage parameter. |
[in] | IsMinFixed | Minimum address is fixed. |
[in] | IsMaxFixed | Maximum address is fixed. |
[in] | IsPosDecode | Decode parameter |
[in] | IsaRanges | Possible values are: 0-Reserved 1-NonISAOnly 2-ISAOnly 3-EntireRange |
[in] | AddressGranularity | Address granularity. |
[in] | AddressMinimum | Minimum address. |
[in] | AddressMaximum | Maximum address. |
[in] | AddressTranslation | Address translation. |
[in] | RangeLength | Range length. |
[in] | ResourceSourceIndex | Resource Source index. Unused. Must be 0. |
[in] | ResourceSource | Resource Source. Unused. Must be NULL. |
[in] | IsDenseTranslation | TranslationDensity parameter. |
[in] | IsTypeStatic | TranslationType parameter. |
[in] | NameOpNode | NameOp object node defining a named object. If provided, append the new resource data node to the list of resource data elements of this node. |
[out] | NewRdNode | If provided and success, contain the created node. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | Could not allocate memory. |
Definition at line 473 of file AmlResourceDataCodeGen.c.
EFI_STATUS EFIAPI AmlCodeGenRdDWordMemory | ( | IN BOOLEAN | IsResourceConsumer, |
IN BOOLEAN | IsPosDecode, | ||
IN BOOLEAN | IsMinFixed, | ||
IN BOOLEAN | IsMaxFixed, | ||
IN AML_MEMORY_ATTRIBUTES_MEM | Cacheable, | ||
IN BOOLEAN | IsReadWrite, | ||
IN UINT32 | AddressGranularity, | ||
IN UINT32 | AddressMinimum, | ||
IN UINT32 | AddressMaximum, | ||
IN UINT32 | AddressTranslation, | ||
IN UINT32 | RangeLength, | ||
IN UINT8 | ResourceSourceIndex, | ||
IN CONST CHAR8 * | ResourceSource, | ||
IN AML_MEMORY_ATTRIBUTES_MTP | MemoryRangeType, | ||
IN BOOLEAN | IsTypeStatic, | ||
IN AML_OBJECT_NODE_HANDLE | NameOpNode, | ||
OPTIONAL OUT AML_DATA_NODE_HANDLE *NewRdNode | OPTIONAL | ||
) |
Code generation for the "DWordMemory ()" ASL function.
The Resource Data effectively created is a DWord Address Space Resource Data. Cf ACPI 6.4:
The created resource data node can be:
See ACPI 6.4 spec, s19.6.35 for more.
[in] | IsResourceConsumer | ResourceUsage parameter. |
[in] | IsPosDecode | Decode parameter |
[in] | IsMinFixed | Minimum address is fixed. |
[in] | IsMaxFixed | Maximum address is fixed. |
[in] | Cacheable | Possible values are: 0-The memory is non-cacheable 1-The memory is cacheable 2-The memory is cacheable and supports write combining 3-The memory is cacheable and prefetchable |
[in] | IsReadWrite | ReadAndWrite parameter. |
[in] | AddressGranularity | Address granularity. |
[in] | AddressMinimum | Minimum address. |
[in] | AddressMaximum | Maximum address. |
[in] | AddressTranslation | Address translation. |
[in] | RangeLength | Range length. |
[in] | ResourceSourceIndex | Resource Source index. Unused. Must be 0. |
[in] | ResourceSource | Resource Source. Unused. Must be NULL. |
[in] | MemoryRangeType | Possible values are: 0-AddressRangeMemory 1-AddressRangeReserved 2-AddressRangeACPI 3-AddressRangeNVS |
[in] | IsTypeStatic | TranslationType parameter. |
[in] | NameOpNode | NameOp object node defining a named object. If provided, append the new resource data node to the list of resource data elements of this node. |
[out] | NewRdNode | If provided and success, contain the created node. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | Could not allocate memory. |
Definition at line 569 of file AmlResourceDataCodeGen.c.
STATIC EFI_STATUS EFIAPI AmlCodeGenRdDWordSpace | ( | IN UINT8 | ResourceType, |
IN BOOLEAN | IsResourceConsumer, | ||
IN BOOLEAN | IsPosDecode, | ||
IN BOOLEAN | IsMinFixed, | ||
IN BOOLEAN | IsMaxFixed, | ||
IN UINT8 | TypeSpecificFlags, | ||
IN UINT32 | AddressGranularity, | ||
IN UINT32 | AddressMinimum, | ||
IN UINT32 | AddressMaximum, | ||
IN UINT32 | AddressTranslation, | ||
IN UINT32 | RangeLength, | ||
IN UINT8 | ResourceSourceIndex, | ||
IN CONST CHAR8 * | ResourceSource, | ||
IN AML_OBJECT_NODE_HANDLE | NameOpNode, | ||
OPTIONAL OUT AML_DATA_NODE_HANDLE *NewRdNode | OPTIONAL | ||
) |
Code generation for the "DWordSpace ()" ASL function.
The Resource Data effectively created is a DWord Address Space Resource Data. Cf ACPI 6.4:
The created resource data node can be:
See ACPI 6.4 spec, s19.6.36 for more.
[in] | ResourceType | Resource type. Possible values are: 0: Memory range 1: I/O range 2: Bus number range 3-191: Reserved 192-255: Hardware Vendor Defined See ACPI 6.4 spec, s6.4.3.5.2 for more. |
[in] | IsResourceConsumer | ResourceUsage parameter. |
[in] | IsPosDecode | Decode parameter |
[in] | IsMinFixed | Minimum address is fixed. |
[in] | IsMaxFixed | Maximum address is fixed. |
[in] | TypeSpecificFlags | Type specific flags. See ACPI 6.4 spec, s6.4.3.5.5 "Resource Type Specific Flags". |
[in] | AddressGranularity | Address granularity. |
[in] | AddressMinimum | Minimum address. |
[in] | AddressMaximum | Maximum address. |
[in] | AddressTranslation | Address translation. |
[in] | RangeLength | Range length. |
[in] | ResourceSourceIndex | Resource Source index. Unused. Must be 0. |
[in] | ResourceSource | Resource Source. Unused. Must be NULL. |
[in] | NameOpNode | NameOp object node defining a named object. If provided, append the new resource data node to the list of resource data elements of this node. |
[out] | NewRdNode | If provided and success, contain the created node. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | Could not allocate memory. |
Definition at line 344 of file AmlResourceDataCodeGen.c.
EFI_STATUS EFIAPI AmlCodeGenRdInterrupt | ( | IN BOOLEAN | ResourceConsumer, |
IN BOOLEAN | EdgeTriggered, | ||
IN BOOLEAN | ActiveLow, | ||
IN BOOLEAN | Shared, | ||
IN UINT32 * | IrqList, | ||
IN UINT8 | IrqCount, | ||
IN AML_OBJECT_NODE_HANDLE NameOpNode | OPTIONAL, | ||
OUT AML_DATA_NODE_HANDLE *NewRdNode | OPTIONAL | ||
) |
Code generation for the "Interrupt ()" ASL function.
The Resource Data effectively created is an Extended Interrupt Resource Data. Cf ACPI 6.4:
The created resource data node can be:
[in] | ResourceConsumer | The device consumes the specified interrupt or produces it for use by a child device. |
[in] | EdgeTriggered | The interrupt is edge triggered or level triggered. |
[in] | ActiveLow | The interrupt is active-high or active-low. |
[in] | Shared | The interrupt can be shared with other devices or not (Exclusive). |
[in] | IrqList | Interrupt list. Must be non-NULL. |
[in] | IrqCount | Interrupt count. Must be non-zero. |
[in] | NameOpNode | NameOp object node defining a named object. If provided, append the new resource data node to the list of resource data elements of this node. |
[out] | NewRdNode | If provided and success, contain the created node. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | Could not allocate memory. |
Definition at line 1326 of file AmlResourceDataCodeGen.c.
EFI_STATUS EFIAPI AmlCodeGenRdIo | ( | IN BOOLEAN | IsDecoder16, |
IN UINT16 | AddressMinimum, | ||
IN UINT16 | AddressMaximum, | ||
IN UINT8 | Alignment, | ||
IN UINT8 | RangeLength, | ||
IN AML_OBJECT_NODE_HANDLE | NameOpNode, | ||
OPTIONAL OUT AML_DATA_NODE_HANDLE *NewRdNode | OPTIONAL | ||
) |
Code generation for the "IO ()" ASL function.
The Resource Data effectively created is a IO Resource Data. Cf ACPI 6.5:
The created resource data node can be:
[in] | IsDecoder16 | Decoder parameter. TRUE if 16-bit decoder. FALSE if 10-bit decoder. |
[in] | AddressMinimum | Minimum address. |
[in] | AddressMaximum | Maximum address. |
[in] | Alignment | Alignment. |
[in] | RangeLength | Range length. |
[in] | NameOpNode | NameOp object node defining a named object. If provided, append the new resource data node to the list of resource data elements of this node. |
[out] | NewRdNode | If provided and success, contain the created node. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
check the alignment
Definition at line 1508 of file AmlResourceDataCodeGen.c.
EFI_STATUS EFIAPI AmlCodeGenRdMemory32Fixed | ( | BOOLEAN | IsReadWrite, |
UINT32 | Address, | ||
UINT32 | RangeLength, | ||
AML_OBJECT_NODE_HANDLE | NameOpNode, | ||
AML_DATA_NODE_HANDLE * | NewMemNode | ||
) |
Code generation for the "Memory32Fixed ()" ASL macro.
The Resource Data effectively created is a 32-bit Memory Resource Data. Cf ACPI 6.4:
See ACPI 6.4 spec, s19.2.8 for more.
[in] | IsReadWrite | ReadAndWrite parameter. |
[in] | Address | AddressBase parameter. |
[in] | RangeLength | Range length. |
[in] | NameOpNode | NameOp object node defining a named object. If provided, append the new resource data node to the list of resource data elements of this node. |
[out] | NewMemNode | If provided and success, contain the created node. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | Could not allocate memory. |
Definition at line 638 of file AmlResourceDataCodeGen.c.
EFI_STATUS EFIAPI AmlCodeGenRdQWordIo | ( | IN BOOLEAN | IsResourceConsumer, |
IN BOOLEAN | IsMinFixed, | ||
IN BOOLEAN | IsMaxFixed, | ||
IN BOOLEAN | IsPosDecode, | ||
IN UINT8 | IsaRanges, | ||
IN UINT64 | AddressGranularity, | ||
IN UINT64 | AddressMinimum, | ||
IN UINT64 | AddressMaximum, | ||
IN UINT64 | AddressTranslation, | ||
IN UINT64 | RangeLength, | ||
IN UINT8 | ResourceSourceIndex, | ||
IN CONST CHAR8 * | ResourceSource, | ||
IN BOOLEAN | IsDenseTranslation, | ||
IN BOOLEAN | IsTypeStatic, | ||
IN AML_OBJECT_NODE_HANDLE | NameOpNode, | ||
OPTIONAL OUT AML_DATA_NODE_HANDLE *NewRdNode | OPTIONAL | ||
) |
Code generation for the "QWordIO ()" ASL function.
The Resource Data effectively created is a QWord Address Space Resource Data. Cf ACPI 6.4:
The created resource data node can be:
See ACPI 6.4 spec, s19.6.109 for more.
[in] | IsResourceConsumer | ResourceUsage parameter. |
[in] | IsMinFixed | Minimum address is fixed. |
[in] | IsMaxFixed | Maximum address is fixed. |
[in] | IsPosDecode | Decode parameter |
[in] | IsaRanges | Possible values are: 0-Reserved 1-NonISAOnly 2-ISAOnly 3-EntireRange |
[in] | AddressGranularity | Address granularity. |
[in] | AddressMinimum | Minimum address. |
[in] | AddressMaximum | Maximum address. |
[in] | AddressTranslation | Address translation. |
[in] | RangeLength | Range length. |
[in] | ResourceSourceIndex | Resource Source index. Unused. Must be 0. |
[in] | ResourceSource | Resource Source. Unused. Must be NULL. |
[in] | IsDenseTranslation | TranslationDensity parameter. |
[in] | IsTypeStatic | TranslationType parameter. |
[in] | NameOpNode | NameOp object node defining a named object. If provided, append the new resource data node to the list of resource data elements of this node. |
[out] | NewRdNode | If provided and success, contain the created node. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | Could not allocate memory. |
Definition at line 1151 of file AmlResourceDataCodeGen.c.
EFI_STATUS EFIAPI AmlCodeGenRdQWordMemory | ( | IN BOOLEAN | IsResourceConsumer, |
IN BOOLEAN | IsPosDecode, | ||
IN BOOLEAN | IsMinFixed, | ||
IN BOOLEAN | IsMaxFixed, | ||
IN AML_MEMORY_ATTRIBUTES_MEM | Cacheable, | ||
IN BOOLEAN | IsReadWrite, | ||
IN UINT64 | AddressGranularity, | ||
IN UINT64 | AddressMinimum, | ||
IN UINT64 | AddressMaximum, | ||
IN UINT64 | AddressTranslation, | ||
IN UINT64 | RangeLength, | ||
IN UINT8 | ResourceSourceIndex, | ||
IN CONST CHAR8 * | ResourceSource, | ||
IN AML_MEMORY_ATTRIBUTES_MTP | MemoryRangeType, | ||
IN BOOLEAN | IsTypeStatic, | ||
IN AML_OBJECT_NODE_HANDLE | NameOpNode, | ||
OPTIONAL OUT AML_DATA_NODE_HANDLE *NewRdNode | OPTIONAL | ||
) |
Code generation for the "QWordMemory ()" ASL function.
The Resource Data effectively created is a QWord Address Space Resource Data. Cf ACPI 6.4:
The created resource data node can be:
See ACPI 6.4 spec, s19.6.110 for more.
[in] | IsResourceConsumer | ResourceUsage parameter. |
[in] | IsPosDecode | Decode parameter. |
[in] | IsMinFixed | Minimum address is fixed. |
[in] | IsMaxFixed | Maximum address is fixed. |
[in] | Cacheable | Possible values are: 0-The memory is non-cacheable 1-The memory is cacheable 2-The memory is cacheable and supports write combining 3-The memory is cacheable and prefetchable |
[in] | IsReadWrite | ReadAndWrite parameter. |
[in] | AddressGranularity | Address granularity. |
[in] | AddressMinimum | Minimum address. |
[in] | AddressMaximum | Maximum address. |
[in] | AddressTranslation | Address translation. |
[in] | RangeLength | Range length. |
[in] | ResourceSourceIndex | Resource Source index. Unused. Must be 0. |
[in] | ResourceSource | Resource Source. Unused. Must be NULL. |
[in] | MemoryRangeType | Possible values are: 0-AddressRangeMemory 1-AddressRangeReserved 2-AddressRangeACPI 3-AddressRangeNVS |
[in] | IsTypeStatic | TranslationType parameter. |
[in] | NameOpNode | NameOp object node defining a named object. If provided, append the new resource data node to the list of resource data elements of this node. |
[out] | NewRdNode | If provided and success, contain the created node. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | Could not allocate memory. |
Definition at line 1247 of file AmlResourceDataCodeGen.c.
STATIC EFI_STATUS EFIAPI AmlCodeGenRdQWordSpace | ( | IN UINT8 | ResourceType, |
IN BOOLEAN | IsResourceConsumer, | ||
IN BOOLEAN | IsPosDecode, | ||
IN BOOLEAN | IsMinFixed, | ||
IN BOOLEAN | IsMaxFixed, | ||
IN UINT8 | TypeSpecificFlags, | ||
IN UINT64 | AddressGranularity, | ||
IN UINT64 | AddressMinimum, | ||
IN UINT64 | AddressMaximum, | ||
IN UINT64 | AddressTranslation, | ||
IN UINT64 | RangeLength, | ||
IN UINT8 | ResourceSourceIndex, | ||
IN CONST CHAR8 * | ResourceSource, | ||
IN AML_OBJECT_NODE_HANDLE | NameOpNode, | ||
OPTIONAL OUT AML_DATA_NODE_HANDLE *NewRdNode | OPTIONAL | ||
) |
Code generation for the "QWordSpace ()" ASL function.
The Resource Data effectively created is a QWord Address Space Resource Data. Cf ACPI 6.4:
The created resource data node can be:
See ACPI 6.4 spec, s19.6.111 for more.
[in] | ResourceType | Resource type. Possible values are: 0: Memory range 1: I/O range 2: Bus number range 3-191: Reserved 192-255: Hardware Vendor Defined See ACPI 6.4 spec, s6.4.3.5.1 for more. |
[in] | IsResourceConsumer | ResourceUsage parameter. |
[in] | IsPosDecode | Decode parameter |
[in] | IsMinFixed | Minimum address is fixed. |
[in] | IsMaxFixed | Maximum address is fixed. |
[in] | TypeSpecificFlags | Type specific flags. See ACPI 6.4 spec, s6.4.3.5.5 "Resource Type Specific Flags". |
[in] | AddressGranularity | Address granularity. |
[in] | AddressMinimum | Minimum address. |
[in] | AddressMaximum | Maximum address. |
[in] | AddressTranslation | Address translation. |
[in] | RangeLength | Range length. |
[in] | ResourceSourceIndex | Resource Source index. Unused. Must be 0. |
[in] | ResourceSource | Resource Source. Unused. Must be NULL. |
[in] | NameOpNode | NameOp object node defining a named object. If provided, append the new resource data node to the list of resource data elements of this node. |
[out] | NewRdNode | If provided and success, contain the created node. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | Could not allocate memory. |
Definition at line 1022 of file AmlResourceDataCodeGen.c.
EFI_STATUS EFIAPI AmlCodeGenRdRegister | ( | IN UINT8 | AddressSpace, |
IN UINT8 | BitWidth, | ||
IN UINT8 | BitOffset, | ||
IN UINT64 | Address, | ||
IN UINT8 | AccessSize, | ||
IN AML_OBJECT_NODE_HANDLE NameOpNode | OPTIONAL, | ||
OUT AML_DATA_NODE_HANDLE *NewRdNode | OPTIONAL | ||
) |
Code generation for the "Register ()" ASL function.
The Resource Data effectively created is a Generic Register Descriptor. Data. Cf ACPI 6.4:
The created resource data node can be:
[in] | AddressSpace | Address space where the register exists. Can be one of I/O space, System Memory, etc. |
[in] | BitWidth | Number of bits in the register. |
[in] | BitOffset | Offset in bits from the start of the register indicated by the Address. |
[in] | Address | Register address. |
[in] | AccessSize | Size of data values used when accessing the address space. Can be one of: 0 - Undefined, legacy (EFI_ACPI_6_4_UNDEFINED) 1 - Byte access (EFI_ACPI_6_4_BYTE) 2 - Word access (EFI_ACPI_6_4_WORD) 3 - DWord access (EFI_ACPI_6_4_DWORD) 4 - QWord access (EFI_ACPI_6_4_QWORD) |
[in] | NameOpNode | NameOp object node defining a named object. If provided, append the new resource data node to the list of resource data elements of this node. |
[out] | NewRdNode | If provided and success, contain the created node. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | Could not allocate memory. |
Definition at line 1424 of file AmlResourceDataCodeGen.c.
EFI_STATUS EFIAPI AmlCodeGenRdWordBusNumber | ( | IN BOOLEAN | IsResourceConsumer, |
IN BOOLEAN | IsMinFixed, | ||
IN BOOLEAN | IsMaxFixed, | ||
IN BOOLEAN | IsPosDecode, | ||
IN UINT16 | AddressGranularity, | ||
IN UINT16 | AddressMinimum, | ||
IN UINT16 | AddressMaximum, | ||
IN UINT16 | AddressTranslation, | ||
IN UINT16 | RangeLength, | ||
IN UINT8 | ResourceSourceIndex, | ||
IN CONST CHAR8 * | ResourceSource, | ||
IN AML_OBJECT_NODE_HANDLE | NameOpNode, | ||
OPTIONAL OUT AML_DATA_NODE_HANDLE *NewRdNode | OPTIONAL | ||
) |
Code generation for the "WordBusNumber ()" ASL function.
The Resource Data effectively created is a Word Address Space Resource Data. Cf ACPI 6.4:
The created resource data node can be:
See ACPI 6.4 spec, s19.6.149 for more.
[in] | IsResourceConsumer | ResourceUsage parameter. |
[in] | IsMinFixed | Minimum address is fixed. |
[in] | IsMaxFixed | Maximum address is fixed. |
[in] | IsPosDecode | Decode parameter |
[in] | AddressGranularity | Address granularity. |
[in] | AddressMinimum | Minimum address. |
[in] | AddressMaximum | Maximum address. |
[in] | AddressTranslation | Address translation. |
[in] | RangeLength | Range length. |
[in] | ResourceSourceIndex | Resource Source index. Unused. Must be 0. |
[in] | ResourceSource | Resource Source. Unused. Must be NULL. |
[in] | NameOpNode | NameOp object node defining a named object. If provided, append the new resource data node to the list of resource data elements of this node. |
[out] | NewRdNode | If provided and success, contain the created node. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | Could not allocate memory. |
Definition at line 846 of file AmlResourceDataCodeGen.c.
EFI_STATUS EFIAPI AmlCodeGenRdWordIo | ( | IN BOOLEAN | IsResourceConsumer, |
IN BOOLEAN | IsMinFixed, | ||
IN BOOLEAN | IsMaxFixed, | ||
IN BOOLEAN | IsPosDecode, | ||
IN UINT8 | IsaRanges, | ||
IN UINT16 | AddressGranularity, | ||
IN UINT16 | AddressMinimum, | ||
IN UINT16 | AddressMaximum, | ||
IN UINT16 | AddressTranslation, | ||
IN UINT16 | RangeLength, | ||
IN UINT8 | ResourceSourceIndex, | ||
IN CONST CHAR8 * | ResourceSource, | ||
IN BOOLEAN | IsDenseTranslation, | ||
IN BOOLEAN | IsTypeStatic, | ||
IN AML_OBJECT_NODE_HANDLE | NameOpNode, | ||
OPTIONAL OUT AML_DATA_NODE_HANDLE *NewRdNode | OPTIONAL | ||
) |
Code generation for the "WordIO ()" ASL function.
The Resource Data effectively created is a Word Address Space Resource Data. Cf ACPI 6.5:
The created resource data node can be:
[in] | IsResourceConsumer | ResourceUsage parameter. |
[in] | IsMinFixed | Minimum address is fixed. |
[in] | IsMaxFixed | Maximum address is fixed. |
[in] | IsPosDecode | Decode parameter |
[in] | IsaRanges | Possible values are: 0-Reserved 1-NonISAOnly 2-ISAOnly 3-EntireRange |
[in] | AddressGranularity | Address granularity. |
[in] | AddressMinimum | Minimum address. |
[in] | AddressMaximum | Maximum address. |
[in] | AddressTranslation | Address translation. |
[in] | RangeLength | Range length. |
[in] | ResourceSourceIndex | Resource Source index. Not supported. Must be 0. |
[in] | ResourceSource | Resource Source. Not supported. Must be NULL. |
[in] | IsDenseTranslation | TranslationDensity parameter. |
[in] | IsTypeStatic | TranslationType parameter. |
[in] | NameOpNode | NameOp object node defining a named object. If provided, append the new resource data node to the list of resource data elements of this node. |
[out] | NewRdNode | If provided and success, contain the created node. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | Could not allocate memory. |
Definition at line 927 of file AmlResourceDataCodeGen.c.
STATIC EFI_STATUS EFIAPI AmlCodeGenRdWordSpace | ( | IN UINT8 | ResourceType, |
IN BOOLEAN | IsResourceConsumer, | ||
IN BOOLEAN | IsPosDecode, | ||
IN BOOLEAN | IsMinFixed, | ||
IN BOOLEAN | IsMaxFixed, | ||
IN UINT8 | TypeSpecificFlags, | ||
IN UINT16 | AddressGranularity, | ||
IN UINT16 | AddressMinimum, | ||
IN UINT16 | AddressMaximum, | ||
IN UINT16 | AddressTranslation, | ||
IN UINT16 | RangeLength, | ||
IN UINT8 | ResourceSourceIndex, | ||
IN CONST CHAR8 * | ResourceSource, | ||
IN AML_OBJECT_NODE_HANDLE | NameOpNode, | ||
OPTIONAL OUT AML_DATA_NODE_HANDLE *NewRdNode | OPTIONAL | ||
) |
Code generation for the "WordSpace ()" ASL function.
The Resource Data effectively created is a Word Address Space Resource Data. Cf ACPI 6.4:
The created resource data node can be:
See ACPI 6.4 spec, s19.6.151 for more.
[in] | ResourceType | Resource type. Possible values are: 0: Memory range 1: I/O range 2: Bus number range 3-191: Reserved 192-255: Hardware Vendor Defined See ACPI 6.4 spec, s6.4.3.5.3 for more. |
[in] | IsResourceConsumer | ResourceUsage parameter. |
[in] | IsPosDecode | Decode parameter |
[in] | IsMinFixed | Minimum address is fixed. |
[in] | IsMaxFixed | Maximum address is fixed. |
[in] | TypeSpecificFlags | Type specific flags. See ACPI 6.4 spec, s6.4.3.5.5 "Resource Type Specific Flags". |
[in] | AddressGranularity | Address granularity. |
[in] | AddressMinimum | Minimum address. |
[in] | AddressMaximum | Maximum address. |
[in] | AddressTranslation | Address translation. |
[in] | RangeLength | Range length. |
[in] | ResourceSourceIndex | Resource Source index. Unused. Must be 0. |
[in] | ResourceSource | Resource Source. Unused. Must be NULL. |
[in] | NameOpNode | NameOp object node defining a named object. If provided, append the new resource data node to the list of resource data elements of this node. |
[out] | NewRdNode | If provided and success, contain the created node. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | Could not allocate memory. |
Definition at line 724 of file AmlResourceDataCodeGen.c.
STATIC EFI_STATUS EFIAPI CheckAddressSpaceFields | ( | IN BOOLEAN | IsMinFixed, |
IN BOOLEAN | IsMaxFixed, | ||
IN UINT64 | AddressGranularity, | ||
IN UINT64 | AddressMinimum, | ||
IN UINT64 | AddressMaximum, | ||
IN UINT64 | AddressTranslation, | ||
IN UINT64 | RangeLength | ||
) |
Check Address Space Descriptor Fields.
Cf. ACPI 6.4 Table 6.44: "Valid Combination of Address Space Descriptor Fields"
See ACPI 6.4 spec, s19.6.36 for more.
[in] | IsMinFixed | Minimum address is fixed. |
[in] | IsMaxFixed | Maximum address is fixed. |
[in] | AddressGranularity | Address granularity. |
[in] | AddressMinimum | Minimum address. |
[in] | AddressMaximum | Maximum address. |
[in] | AddressTranslation | Address translation. |
[in] | RangeLength | Range length. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
Definition at line 240 of file AmlResourceDataCodeGen.c.
STATIC EFI_STATUS EFIAPI LinkRdNode | ( | IN AML_DATA_NODE * | RdNode, |
IN AML_OBJECT_NODE * | ParentNode, | ||
OUT AML_DATA_NODE ** | NewRdNode | ||
) |
If ParentNode is not NULL, append RdNode. If NewRdNode is not NULL, update its value to RdNode.
[in] | RdNode | Newly created Resource Data node. RdNode is deleted if an error occurs. |
[in] | ParentNode | If not NULL, ParentNode must:
|
[out] | NewRdNode | If not NULL:
|
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
Definition at line 47 of file AmlResourceDataCodeGen.c.
STATIC UINT8 EFIAPI MemoryRangeSpecificFlags | ( | IN UINT8 | Cacheable, |
IN BOOLEAN | IsReadWrite, | ||
IN UINT8 | MemoryRangeType, | ||
IN BOOLEAN | IsTypeStatic | ||
) |
Construct the TypeSpecificFlags field for Memory ranges.
[in] | Cacheable | Possible values are: 0-The memory is non-cacheable 1-The memory is cacheable 2-The memory is cacheable and supports write combining 3-The memory is cacheable and prefetchable |
[in] | IsReadWrite | ReadAndWrite parameter. |
[in] | MemoryRangeType | Possible values are: 0-AddressRangeMemory 1-AddressRangeReserved 2-AddressRangeACPI 3-AddressRangeNVS See ACPI 6.4 spec, s19.6.35 for more. |
[in] | IsTypeStatic | TranslationType parameter. |
Definition at line 167 of file AmlResourceDataCodeGen.c.
STATIC UINT8 EFIAPI RdIoRangeSpecificFlags | ( | IN UINT8 | IsaRanges, |
IN BOOLEAN | IsDenseTranslation, | ||
IN BOOLEAN | IsTypeStatic | ||
) |
Construct the TypeSpecificFlags field for IO ranges.
See ACPI 6.4 spec, s19.6.34 for more.
[in] | IsaRanges | Possible values are: 0-Reserved 1-NonISAOnly 2-ISAOnly 3-EntireRange See ACPI 6.4 spec, s19.6.34 for more. |
[in] | IsDenseTranslation | TranslationDensity parameter. |
[in] | IsTypeStatic | TranslationType parameter. |
Definition at line 124 of file AmlResourceDataCodeGen.c.