66 CHAR8 AslName[AML_NAME_SEG_SIZE + 1];
70 ASSERT (PciNode !=
NULL);
73 CopyMem (AslName,
"Dxx_", AML_NAME_SEG_SIZE + 1);
78 if (LastIndex >= 32) {
80 return EFI_INVALID_PARAMETER;
83 for (Index = 0; Index < LastIndex; Index++) {
85 AslName[AML_NAME_SEG_SIZE - 3] =
AsciiFromHex (DeviceId & 0xF);
86 AslName[AML_NAME_SEG_SIZE - 2] =
AsciiFromHex ((DeviceId >> 4) & 0xF);
93 if (EFI_ERROR (Status)) {
105 (DeviceId << 16) | 0xFFFF,
109 if (EFI_ERROR (Status)) {
145 ASSERT (PciNode !=
NULL);
152 OscTemplateRoot =
NULL;
157 if (EFI_ERROR (Status)) {
160 "ERROR: SSDT-PCI-OSC: Failed to parse SSDT PCI OSC Template."
167 Status =
AmlFindNode (OscTemplateRoot,
"\\_OSC", &OscNode);
168 if (EFI_ERROR (Status)) {
173 if (EFI_ERROR (Status)) {
178 if (EFI_ERROR (Status)) {
187 if (EFI_ERROR (Status1)) {
190 "ERROR: SSDT-PCI-OSC: Failed to cleanup AML tree."
196 if (!EFI_ERROR (Status)) {
UINT8 EFIAPI AsciiFromHex(IN UINT8 Hex)
void * AML_ROOT_NODE_HANDLE
EFI_STATUS EFIAPI AmlCodeGenDevice(IN CONST CHAR8 *NameString, IN AML_NODE_HANDLE ParentNode OPTIONAL, OUT AML_OBJECT_NODE_HANDLE *NewObjectNode OPTIONAL)
EFI_STATUS EFIAPI AmlCodeGenNameInteger(IN CONST CHAR8 *NameString, IN UINT64 Integer, IN AML_NODE_HANDLE ParentNode OPTIONAL, OUT AML_OBJECT_NODE_HANDLE *NewObjectNode OPTIONAL)
EFI_STATUS EFIAPI AmlAttachNode(IN AML_NODE_HANDLE ParentNode, IN AML_NODE_HANDLE NewNode)
void * AML_OBJECT_NODE_HANDLE
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
#define DEBUG(Expression)
EFI_STATUS EFIAPI GeneratePciSlots(IN CONST CM_ARCH_COMMON_PCI_CONFIG_SPACE_INFO *PciInfo, IN CONST MAPPING_TABLE *MappingTable, IN UINT32 Uid, IN OUT AML_OBJECT_NODE_HANDLE PciNode)
EFI_STATUS EFIAPI AddOscMethod(IN CONST CM_ARCH_COMMON_PCI_CONFIG_SPACE_INFO *PciInfo, IN OUT AML_OBJECT_NODE_HANDLE PciNode)
CHAR8 ssdtpcieosctemplate_aml_code[]
EFI_STATUS EFIAPI AmlFindNode(IN AML_NODE_HANDLE ReferenceNode, IN CONST CHAR8 *AslPath, OUT AML_NODE_HANDLE *OutNode)
EFI_STATUS EFIAPI AmlDeleteTree(IN AML_NODE_HANDLE Node)
EFI_STATUS EFIAPI AmlParseDefinitionBlock(IN CONST EFI_ACPI_DESCRIPTION_HEADER *DefinitionBlock, OUT AML_ROOT_NODE_HANDLE *RootPtr)
EFI_STATUS EFIAPI AmlDetachNode(IN AML_NODE_HANDLE Node)