47 if (NewObjectNode !=
NULL) {
48 *NewObjectNode =
NULL;
52 if (ParentNode !=
NULL) {
54 if (EFI_ERROR (Status)) {
60 if (NewObjectNode !=
NULL) {
61 *NewObjectNode = Node;
97 IN UINT32 OemRevision,
104 if ((TableSignature ==
NULL) ||
106 (OemTableId ==
NULL) ||
107 (NewRootNode ==
NULL))
110 return EFI_INVALID_PARAMETER;
113 CopyMem (&AcpiHeader.Signature, TableSignature, 4);
115 AcpiHeader.Revision = 2;
116 CopyMem (&AcpiHeader.OemId, OemId, 6);
117 CopyMem (&AcpiHeader.OemTableId, OemTableId, 8);
118 AcpiHeader.OemRevision = OemRevision;
150 if ((String ==
NULL) ||
151 (NewObjectNode ==
NULL))
154 return EFI_INVALID_PARAMETER;
164 if (EFI_ERROR (Status)) {
175 if (EFI_ERROR (Status)) {
185 if (EFI_ERROR (Status)) {
191 *NewObjectNode = ObjectNode;
220 if (NewObjectNode ==
NULL) {
222 return EFI_INVALID_PARAMETER;
231 if (EFI_ERROR (Status)) {
238 if (EFI_ERROR (Status)) {
269 if (NewObjectNode ==
NULL) {
271 return EFI_INVALID_PARAMETER;
288 if (EFI_ERROR (Status)) {
300 if (EFI_ERROR (Status)) {
310 if (EFI_ERROR (Status)) {
319 if (DataNode !=
NULL) {
349 IN CONST UINT8 *Buffer OPTIONAL,
350 IN UINT32 BufferSize OPTIONAL,
357 UINT32 BufferSizeNodeSize;
362 if ((NewObjectNode ==
NULL) ||
363 ((Buffer ==
NULL) != (BufferSize == 0)))
366 return EFI_INVALID_PARAMETER;
378 if (EFI_ERROR (Status)) {
388 if (EFI_ERROR (Status)) {
395 if (EFI_ERROR (Status)) {
406 if (EFI_ERROR (Status)) {
417 if (EFI_ERROR (Status)) {
423 BufferSizeNode =
NULL;
426 if (Buffer !=
NULL) {
433 if (EFI_ERROR (Status)) {
442 if (EFI_ERROR (Status)) {
448 *NewObjectNode = BufferNode;
452 if (BufferSizeNode !=
NULL) {
456 if (BufferNode !=
NULL) {
460 if (DataNode !=
NULL) {
495 if (NewObjectNode ==
NULL) {
497 return EFI_INVALID_PARAMETER;
502 if (EFI_ERROR (Status)) {
509 if (EFI_ERROR (Status)) {
515 *NewObjectNode = BufferNode;
547 CHAR8 *AmlNameString;
548 UINT32 AmlNameStringSize;
550 if ((NameString ==
NULL) ||
552 ((ParentNode ==
NULL) && (NewObjectNode ==
NULL)))
555 return EFI_INVALID_PARAMETER;
560 AmlNameString =
NULL;
563 if (EFI_ERROR (Status)) {
569 if (EFI_ERROR (Status)) {
579 if (EFI_ERROR (Status)) {
586 (UINT8 *)AmlNameString,
590 if (EFI_ERROR (Status)) {
600 if (EFI_ERROR (Status)) {
611 if (EFI_ERROR (Status)) {
621 if (EFI_ERROR (Status)) {
631 if (ObjectNode !=
NULL) {
636 if (AmlNameString !=
NULL) {
675 if ((NameString ==
NULL) ||
677 ((ParentNode ==
NULL) && (NewObjectNode ==
NULL)))
680 return EFI_INVALID_PARAMETER;
684 if (EFI_ERROR (Status)) {
695 if (EFI_ERROR (Status)) {
734 if ((NameString ==
NULL) ||
735 ((ParentNode ==
NULL) && (NewObjectNode ==
NULL)))
738 return EFI_INVALID_PARAMETER;
742 if (EFI_ERROR (Status)) {
753 if (EFI_ERROR (Status)) {
790 if ((NameString ==
NULL) ||
791 ((ParentNode ==
NULL) && (NewObjectNode ==
NULL)))
794 return EFI_INVALID_PARAMETER;
798 if (EFI_ERROR (Status)) {
809 if (EFI_ERROR (Status)) {
846 if ((NameString ==
NULL) ||
847 ((ParentNode ==
NULL) && (NewObjectNode ==
NULL)))
850 return EFI_INVALID_PARAMETER;
854 if (EFI_ERROR (Status)) {
861 ResourceTemplateNode,
865 if (EFI_ERROR (Status)) {
908 if ((NameString ==
NULL) ||
910 ((ParentNode ==
NULL) && (NewObjectNode ==
NULL)))
913 return EFI_INVALID_PARAMETER;
917 if (EFI_ERROR (Status)) {
924 (
CONST UINT8 *)String,
928 if (EFI_ERROR (Status)) {
938 if (EFI_ERROR (Status)) {
951 if (EFI_ERROR (Status)) {
1012 IN UINT32 SourceIndex,
1021 CHAR8 *AmlNameString;
1022 UINT32 AmlNameStringSize;
1026 (PrtNameNode ==
NULL) ||
1032 return EFI_INVALID_PARAMETER;
1035 NewElementNode =
NULL;
1036 AmlNameString =
NULL;
1045 if ((PrtEntryList ==
NULL) ||
1050 return EFI_INVALID_PARAMETER;
1055 if (EFI_ERROR (Status)) {
1061 if (EFI_ERROR (Status)) {
1070 if (EFI_ERROR (Status)) {
1075 NewElementNode =
NULL;
1078 if (EFI_ERROR (Status)) {
1087 if (EFI_ERROR (Status)) {
1092 NewElementNode =
NULL;
1094 if (LinkName !=
NULL) {
1096 if (EFI_ERROR (Status)) {
1102 if (EFI_ERROR (Status)) {
1109 (UINT8 *)AmlNameString,
1113 if (EFI_ERROR (Status)) {
1124 if (EFI_ERROR (Status)) {
1132 if (EFI_ERROR (Status)) {
1141 if (EFI_ERROR (Status)) {
1148 if (EFI_ERROR (Status)) {
1157 if (EFI_ERROR (Status)) {
1167 if (EFI_ERROR (Status)) {
1178 if (NewElementNode !=
NULL) {
1182 if (DataNode !=
NULL) {
1187 if (AmlNameString !=
NULL) {
1223 CHAR8 *AmlNameString;
1224 UINT32 AmlNameStringSize;
1226 if ((NameString ==
NULL) ||
1227 ((ParentNode ==
NULL) && (NewObjectNode ==
NULL)))
1230 return EFI_INVALID_PARAMETER;
1235 AmlNameString =
NULL;
1238 if (EFI_ERROR (Status)) {
1244 if (EFI_ERROR (Status)) {
1246 goto error_handler1;
1254 if (EFI_ERROR (Status)) {
1256 goto error_handler1;
1261 (UINT8 *)AmlNameString,
1265 if (EFI_ERROR (Status)) {
1267 goto error_handler2;
1275 if (EFI_ERROR (Status)) {
1278 goto error_handler2;
1286 if (EFI_ERROR (Status)) {
1288 goto error_handler2;
1293 goto error_handler1;
1296 if (ObjectNode !=
NULL) {
1301 if (AmlNameString !=
NULL) {
1339 CHAR8 *AmlNameString;
1340 UINT32 AmlNameStringSize;
1342 if ((NameString ==
NULL) ||
1343 ((ParentNode ==
NULL) && (NewObjectNode ==
NULL)))
1346 return EFI_INVALID_PARAMETER;
1351 AmlNameString =
NULL;
1354 if (EFI_ERROR (Status)) {
1360 if (EFI_ERROR (Status)) {
1362 goto error_handler1;
1370 if (EFI_ERROR (Status)) {
1372 goto error_handler1;
1377 (UINT8 *)AmlNameString,
1381 if (EFI_ERROR (Status)) {
1383 goto error_handler2;
1391 if (EFI_ERROR (Status)) {
1394 goto error_handler2;
1402 if (EFI_ERROR (Status)) {
1404 goto error_handler2;
1409 goto error_handler1;
1412 if (ObjectNode !=
NULL) {
1417 if (AmlNameString !=
NULL) {
1453 CHAR8 *AmlNameString;
1454 UINT32 AmlNameStringSize;
1456 if ((NameString ==
NULL) ||
1457 ((ParentNode ==
NULL) && (NewObjectNode ==
NULL)))
1460 return EFI_INVALID_PARAMETER;
1465 AmlNameString =
NULL;
1468 if (EFI_ERROR (Status)) {
1474 if (EFI_ERROR (Status)) {
1476 goto error_handler1;
1484 if (EFI_ERROR (Status)) {
1486 goto error_handler1;
1491 (UINT8 *)AmlNameString,
1495 if (EFI_ERROR (Status)) {
1497 goto error_handler2;
1505 if (EFI_ERROR (Status)) {
1508 goto error_handler2;
1516 if (EFI_ERROR (Status)) {
1518 goto error_handler2;
1523 goto error_handler1;
1526 if (ObjectNode !=
NULL) {
1531 if (AmlNameString !=
NULL) {
1577 IN BOOLEAN IsSerialized,
1588 CHAR8 *AmlNameString;
1589 UINT32 AmlNameStringSize;
1591 if ((NameString ==
NULL) ||
1594 ((ParentNode ==
NULL) && (NewObjectNode ==
NULL)))
1597 return EFI_INVALID_PARAMETER;
1615 if (EFI_ERROR (Status)) {
1621 if (EFI_ERROR (Status)) {
1623 goto error_handler1;
1629 if (EFI_ERROR (Status)) {
1631 goto error_handler1;
1640 if (EFI_ERROR (Status)) {
1642 goto error_handler1;
1647 (UINT8 *)AmlNameString,
1651 if (EFI_ERROR (Status)) {
1653 goto error_handler2;
1662 if (EFI_ERROR (Status)) {
1664 goto error_handler2;
1671 (IsSerialized ? BIT3 : 0) |
1675 if (EFI_ERROR (Status)) {
1677 goto error_handler2;
1685 if (EFI_ERROR (Status)) {
1687 goto error_handler2;
1699 if (EFI_ERROR (Status)) {
1701 goto error_handler2;
1706 goto error_handler1;
1709 if (ObjectNode !=
NULL) {
1713 if (DataNode !=
NULL) {
1718 if (AmlNameString !=
NULL) {
1766 if ((ReturnNode ==
NULL) ||
1767 ((ParentNode ==
NULL) && (NewObjectNode ==
NULL)) ||
1768 ((ParentNode !=
NULL) &&
1776 return EFI_INVALID_PARAMETER;
1784 if (EFI_ERROR (Status)) {
1794 if (EFI_ERROR (Status)) {
1806 if (EFI_ERROR (Status)) {
1814 if (ReturnNode !=
NULL) {
1818 if (ObjectNode !=
NULL) {
1869 CHAR8 *AmlNameString;
1870 UINT32 AmlNameStringSize;
1875 if (EFI_ERROR (Status)) {
1881 if (EFI_ERROR (Status)) {
1888 (UINT8 *)AmlNameString,
1892 if (EFI_ERROR (Status)) {
1906 if (AmlNameString !=
NULL) {
1955 if (EFI_ERROR (Status)) {
2018 CHAR8 *AmlNameString;
2019 UINT32 AmlNameStringSize;
2027 if (EFI_ERROR (Status)) {
2033 if (EFI_ERROR (Status)) {
2039 if (EFI_ERROR (Status)) {
2046 (UINT8 *)AmlNameString,
2050 if (EFI_ERROR (Status)) {
2061 if (EFI_ERROR (Status)) {
2070 if (EFI_ERROR (Status)) {
2078 if (NewObjectNode != 0) {
2079 *NewObjectNode = ObjectNode;
2085 if (IntNode !=
NULL) {
2090 if (AmlNameString !=
NULL) {
2139 IN CONST CHAR8 *MethodNameString,
2140 IN CONST CHAR8 *ReturnedNameString OPTIONAL,
2142 IN BOOLEAN IsSerialized,
2151 if ((MethodNameString ==
NULL) ||
2152 ((ParentNode ==
NULL) && (NewObjectNode ==
NULL)))
2155 return EFI_INVALID_PARAMETER;
2167 if (EFI_ERROR (Status)) {
2173 if (ReturnedNameString !=
NULL) {
2179 if (EFI_ERROR (Status)) {
2190 if (EFI_ERROR (Status)) {
2198 if (MethodNode !=
NULL) {
2249 IN CONST CHAR8 *MethodNameString,
2250 IN CONST CHAR8 *ReturnedNameString OPTIONAL,
2252 IN BOOLEAN IsSerialized,
2254 IN UINT64 IntegerArgument,
2262 if ((MethodNameString ==
NULL) ||
2263 ((ParentNode ==
NULL) && (NewObjectNode ==
NULL)))
2266 return EFI_INVALID_PARAMETER;
2278 if (EFI_ERROR (Status)) {
2284 if (ReturnedNameString !=
NULL) {
2291 if (EFI_ERROR (Status)) {
2302 if (EFI_ERROR (Status)) {
2310 if (MethodNode !=
NULL) {
2355 IN CONST CHAR8 *MethodNameString,
2356 IN UINT64 ReturnedInteger,
2358 IN BOOLEAN IsSerialized,
2367 if ((MethodNameString ==
NULL) ||
2368 ((ParentNode ==
NULL) && (NewObjectNode ==
NULL)))
2371 return EFI_INVALID_PARAMETER;
2383 if (EFI_ERROR (Status)) {
2393 if (EFI_ERROR (Status)) {
2403 if (EFI_ERROR (Status)) {
2411 if (MethodNode !=
NULL) {
2453 IN CONST CHAR8 *LpiNameString,
2464 if ((LpiNameString ==
NULL) ||
2465 ((ParentNode ==
NULL) && (NewLpiNode ==
NULL)))
2468 return EFI_INVALID_PARAMETER;
2474 if (EFI_ERROR (Status)) {
2481 if (EFI_ERROR (Status)) {
2491 if (EFI_ERROR (Status)) {
2500 if (EFI_ERROR (Status)) {
2510 if (EFI_ERROR (Status)) {
2519 if (EFI_ERROR (Status)) {
2529 if (EFI_ERROR (Status)) {
2536 Status =
AmlCodeGenName (LpiNameString, PackageNode, ParentNode, NewLpiNode);
2537 if (EFI_ERROR (Status)) {
2546 if (IntegerNode !=
NULL) {
2608 IN UINT32 MinResidency,
2609 IN UINT32 WorstCaseWakeLatency,
2611 IN UINT32 ArchFlags,
2612 IN UINT32 ResCntFreq,
2613 IN UINT32 EnableParentState,
2615 IN UINT64 Integer OPTIONAL,
2618 IN CONST CHAR8 *StateName OPTIONAL,
2634 if ((LpiNode ==
NULL) ||
2639 return EFI_INVALID_PARAMETER;
2645 ResourceTemplateNode =
NULL;
2659 if ((PackageNode ==
NULL) ||
2664 return EFI_INVALID_PARAMETER;
2669 for (Index = 0; Index < 3; Index++) {
2674 if (CountNode ==
NULL) {
2676 return EFI_INVALID_PARAMETER;
2681 if (EFI_ERROR (Status)) {
2687 if (EFI_ERROR (Status)) {
2693 if (EFI_ERROR (Status)) {
2700 if (EFI_ERROR (Status)) {
2710 if (EFI_ERROR (Status)) {
2719 if (EFI_ERROR (Status)) {
2729 if (EFI_ERROR (Status)) {
2738 if (EFI_ERROR (Status)) {
2748 if (EFI_ERROR (Status)) {
2757 if (EFI_ERROR (Status)) {
2767 if (EFI_ERROR (Status)) {
2776 if (EFI_ERROR (Status)) {
2786 if (EFI_ERROR (Status)) {
2795 if (EFI_ERROR (Status)) {
2805 if (EFI_ERROR (Status)) {
2813 if (GenericRegisterDescriptor !=
NULL) {
2816 if (EFI_ERROR (Status)) {
2818 ResourceTemplateNode =
NULL;
2823 GenericRegisterDescriptor->AddressSpaceId,
2824 GenericRegisterDescriptor->RegisterBitWidth,
2825 GenericRegisterDescriptor->RegisterBitOffset,
2826 GenericRegisterDescriptor->Address,
2827 GenericRegisterDescriptor->AccessSize,
2831 if (EFI_ERROR (Status)) {
2838 if (EFI_ERROR (Status)) {
2849 if (EFI_ERROR (Status)) {
2854 ResourceTemplateNode =
NULL;
2858 if (EFI_ERROR (Status)) {
2868 if (EFI_ERROR (Status)) {
2878 if (EFI_ERROR (Status)) {
2880 ResourceTemplateNode =
NULL;
2884 if (ResidencyCounterRegister !=
NULL) {
2886 ResidencyCounterRegister->AddressSpaceId,
2887 ResidencyCounterRegister->RegisterBitWidth,
2888 ResidencyCounterRegister->RegisterBitOffset,
2889 ResidencyCounterRegister->Address,
2890 ResidencyCounterRegister->AccessSize,
2896 EFI_ACPI_6_4_SYSTEM_MEMORY,
2906 if (EFI_ERROR (Status)) {
2913 if (EFI_ERROR (Status)) {
2924 if (EFI_ERROR (Status)) {
2929 ResourceTemplateNode =
NULL;
2933 if (EFI_ERROR (Status)) {
2935 ResourceTemplateNode =
NULL;
2939 if (UsageCounterRegister !=
NULL) {
2941 UsageCounterRegister->AddressSpaceId,
2942 UsageCounterRegister->RegisterBitWidth,
2943 UsageCounterRegister->RegisterBitOffset,
2944 UsageCounterRegister->Address,
2945 UsageCounterRegister->AccessSize,
2951 EFI_ACPI_6_4_SYSTEM_MEMORY,
2961 if (EFI_ERROR (Status)) {
2968 if (EFI_ERROR (Status)) {
2979 if (EFI_ERROR (Status)) {
2984 ResourceTemplateNode =
NULL;
2987 if (UsageCounterRegister !=
NULL) {
2993 if (EFI_ERROR (Status)) {
3003 if (EFI_ERROR (Status)) {
3015 if (EFI_ERROR (Status)) {
3023 if (RdNode !=
NULL) {
3027 if (NewLpiPackageNode !=
NULL) {
3031 if (StringNode !=
NULL) {
3035 if (IntegerNode !=
NULL) {
3039 if (ResourceTemplateNode !=
NULL) {
3081 if ((Uuid ==
NULL) ||
3082 (PackageNode ==
NULL) ||
3088 return EFI_INVALID_PARAMETER;
3097 if ((DsdEntryList ==
NULL) ||
3102 return EFI_INVALID_PARAMETER;
3105 *PackageNode =
NULL;
3106 UuidDataNode =
NULL;
3109 if (EFI_ERROR (Status)) {
3116 (
CONST UINT8 *)Uuid,
3120 if (EFI_ERROR (Status)) {
3129 if (EFI_ERROR (Status)) {
3134 UuidDataNode =
NULL;
3141 if (EFI_ERROR (Status)) {
3147 if (EFI_ERROR (Status)) {
3149 goto error_handler_detach;
3157 if (EFI_ERROR (Status)) {
3159 goto error_handler_detach;
3164error_handler_detach:
3165 if (UuidNode !=
NULL) {
3170 if (UuidNode !=
NULL) {
3174 if (*PackageNode !=
NULL) {
3176 *PackageNode =
NULL;
3179 if (UuidDataNode !=
NULL) {
3217 if ((Name ==
NULL) ||
3222 return EFI_INVALID_PARAMETER;
3230 if (EFI_ERROR (Status)) {
3236 if (EFI_ERROR (Status)) {
3245 if (EFI_ERROR (Status)) {
3253 if (EFI_ERROR (Status)) {
3262 if (EFI_ERROR (Status)) {
3273 if (EFI_ERROR (Status)) {
3281 if (NewPackageNode !=
NULL) {
3285 if (NameNode !=
NULL) {
3289 if (ValueNode !=
NULL) {
3323 if (EFI_ERROR (Status)) {
3340 EFI_ACPI_6_4_SYSTEM_MEMORY,
3350 if (EFI_ERROR (Status)) {
3356 if (EFI_ERROR (Status)) {
3367 if (EFI_ERROR (Status)) {
3375 if (RdNode !=
NULL) {
3379 if (ResourceTemplateNode !=
NULL) {
3400 if ((Address ==
NULL) ||
3401 ((Address->AddressSpaceId == EFI_ACPI_6_4_SYSTEM_MEMORY) &&
3402 (Address->Address == 0x0)))
3440 if (EFI_ERROR (Status)) {
3451 if (EFI_ERROR (Status)) {
3453 if (IntegerNode !=
NULL) {
3517 UINT32 NumberOfEntries;
3519 if ((CpcInfo ==
NULL) ||
3520 ((ParentNode ==
NULL) && (NewCpcNode ==
NULL)))
3523 return EFI_INVALID_PARAMETER;
3529 NumberOfEntries = 23;
3532 return EFI_INVALID_PARAMETER;
3546 if ((
PcdGet64 (PcdDevelopmentPlatformRelaxations) & BIT0) != 0) {
3549 "Missing PerformanceLimited|ReferencePerformanceCounter|"
3550 "DeliveredPerformanceCounter field in _CPC object\n"
3554 return EFI_INVALID_PARAMETER;
3559 (CpcInfo->HighestPerformanceInteger == 0)) ||
3561 (CpcInfo->NominalPerformanceInteger == 0)) ||
3563 (CpcInfo->LowestNonlinearPerformanceInteger == 0)) ||
3565 (CpcInfo->LowestPerformanceInteger == 0)) ||
3569 return EFI_INVALID_PARAMETER;
3575 if (EFI_ERROR (Status)) {
3586 if ((CpcPackage ==
NULL) ||
3591 Status = EFI_INVALID_PARAMETER;
3600 if (EFI_ERROR (Status)) {
3610 if (EFI_ERROR (Status)) {
3616 &CpcInfo->HighestPerformanceBuffer,
3617 CpcInfo->HighestPerformanceInteger,
3620 if (EFI_ERROR (Status)) {
3626 &CpcInfo->NominalPerformanceBuffer,
3627 CpcInfo->NominalPerformanceInteger,
3630 if (EFI_ERROR (Status)) {
3636 &CpcInfo->LowestNonlinearPerformanceBuffer,
3637 CpcInfo->LowestNonlinearPerformanceInteger,
3640 if (EFI_ERROR (Status)) {
3646 &CpcInfo->LowestPerformanceBuffer,
3647 CpcInfo->LowestPerformanceInteger,
3650 if (EFI_ERROR (Status)) {
3656 if (EFI_ERROR (Status)) {
3662 if (EFI_ERROR (Status)) {
3668 if (EFI_ERROR (Status)) {
3674 if (EFI_ERROR (Status)) {
3680 if (EFI_ERROR (Status)) {
3686 if (EFI_ERROR (Status)) {
3692 &CpcInfo->CounterWraparoundTimeBuffer,
3693 CpcInfo->CounterWraparoundTimeInteger,
3696 if (EFI_ERROR (Status)) {
3702 if (EFI_ERROR (Status)) {
3708 if (EFI_ERROR (Status)) {
3714 if (EFI_ERROR (Status)) {
3720 if (EFI_ERROR (Status)) {
3726 &CpcInfo->AutonomousSelectionEnableBuffer,
3727 CpcInfo->AutonomousSelectionEnableInteger,
3730 if (EFI_ERROR (Status)) {
3736 if (EFI_ERROR (Status)) {
3742 if (EFI_ERROR (Status)) {
3748 &CpcInfo->ReferencePerformanceBuffer,
3749 CpcInfo->ReferencePerformanceInteger,
3752 if (EFI_ERROR (Status)) {
3758 &CpcInfo->LowestFrequencyBuffer,
3759 CpcInfo->LowestFrequencyInteger,
3762 if (EFI_ERROR (Status)) {
3768 &CpcInfo->NominalFrequencyBuffer,
3769 CpcInfo->NominalFrequencyInteger,
3772 if (EFI_ERROR (Status)) {
3777 Status =
LinkNode (CpcNode, ParentNode, NewCpcNode);
3778 if (EFI_ERROR (Status)) {
3809 CHAR8 *AmlNameString;
3810 UINT32 AmlNameStringSize;
3815 if ((NamedNode ==
NULL) ||
3820 return EFI_INVALID_PARAMETER;
3827 if ((PackageNode ==
NULL) ||
3832 return EFI_INVALID_PARAMETER;
3836 if (EFI_ERROR (Status)) {
3842 if (EFI_ERROR (Status)) {
3849 (UINT8 *)AmlNameString,
3853 if (EFI_ERROR (Status)) {
3862 if (EFI_ERROR (Status)) {
3867 if (AmlNameString !=
NULL) {
3916 if (NameNode ==
NULL) {
3918 return EFI_INVALID_PARAMETER;
3925 if ((PackageNode ==
NULL) ||
3930 return EFI_INVALID_PARAMETER;
3934 if (EFI_ERROR (Status)) {
3998 IN CONST CHAR8 *MethodNameString,
4006 CHAR8 *AmlNameString;
4007 UINT32 AmlNameStringSize;
4012 if ((MethodNameString ==
NULL) || (ParentNode ==
NULL)) {
4014 return EFI_INVALID_PARAMETER;
4017 if ((NumArgs > 7) ||
4018 ((Parameters ==
NULL) && (NumArgs > 0)))
4021 return EFI_INVALID_PARAMETER;
4026 if (NodeStream ==
NULL) {
4028 return EFI_OUT_OF_RESOURCES;
4033 if (EFI_ERROR (Status)) {
4039 if (EFI_ERROR (Status)) {
4048 (UINT8 *)AmlNameString,
4053 if (EFI_ERROR (Status)) {
4060 if (Parameters !=
NULL) {
4062 for (Index = 0; Index < NumArgs; Index++) {
4064 switch (Parameters[Index].Type) {
4065 case AmlMethodParamTypeInteger:
4067 Parameters[Index].Data.Integer,
4070 if (EFI_ERROR (Status)) {
4076 case AmlMethodParamTypeString:
4077 if (Parameters[Index].Data.Buffer ==
NULL) {
4079 Status = EFI_INVALID_PARAMETER;
4084 Parameters[Index].Data.Buffer,
4087 if (EFI_ERROR (Status)) {
4093 case AmlMethodParamTypeArg:
4094 if (Parameters[Index].Data.Arg > (UINT8)(AML_ARG6 - AML_ARG0)) {
4096 Status = EFI_INVALID_PARAMETER;
4102 AML_ARG0 + Parameters[Index].Data.Arg,
4108 if (EFI_ERROR (Status)) {
4114 case AmlMethodParamTypeLocal:
4115 if (Parameters[Index].Data.Local > (UINT8)(AML_LOCAL7 - AML_LOCAL0)) {
4117 Status = EFI_INVALID_PARAMETER;
4123 AML_LOCAL0 + Parameters[Index].Data.Local,
4129 if (EFI_ERROR (Status)) {
4137 Status = EFI_INVALID_PARAMETER;
4147 for (Index = 0; Index <= NumArgs; Index++) {
4152 if (EFI_ERROR (Status)) {
4154 goto exit_handler_detach;
4163 for ( ; Index > 0; Index--) {
4171 for (Index = 0; Index <= NumArgs; Index++) {
4172 if (NodeStream[Index] != 0) {
4221 UINT32 NumberOfEntries;
4223 PsdParentPackage =
NULL;
4226 if ((PsdInfo ==
NULL) ||
4227 ((ParentNode ==
NULL) && (NewPsdNode ==
NULL)))
4229 Status = EFI_INVALID_PARAMETER;
4237 NumberOfEntries = 5;
4239 Status = EFI_INVALID_PARAMETER;
4245 (PsdInfo->CoordType != ACPI_AML_COORD_TYPE_SW_ANY) &&
4246 (PsdInfo->CoordType != ACPI_AML_COORD_TYPE_HW_ALL)) ||
4247 (PsdInfo->NumProc == 0))
4249 Status = EFI_INVALID_PARAMETER;
4255 if (EFI_ERROR (Status)) {
4266 if ((PsdParentPackage ==
NULL) ||
4270 Status = EFI_INVALID_PARAMETER;
4276 if (EFI_ERROR (Status)) {
4283 if (EFI_ERROR (Status)) {
4292 if (EFI_ERROR (Status)) {
4300 if (EFI_ERROR (Status)) {
4309 if (EFI_ERROR (Status)) {
4317 if (EFI_ERROR (Status)) {
4326 if (EFI_ERROR (Status)) {
4334 if (EFI_ERROR (Status)) {
4343 if (EFI_ERROR (Status)) {
4351 if (EFI_ERROR (Status)) {
4360 if (EFI_ERROR (Status)) {
4370 if (EFI_ERROR (Status)) {
4377 Status =
LinkNode (PsdNode, ParentNode, NewPsdNode);
4378 if (EFI_ERROR (Status)) {
4386 if (PsdPackage !=
NULL) {
4390 if (PsdParentPackage !=
NULL) {
#define ACPI_AML_COORD_TYPE_SW_ALL
#define EFI_ACPI_6_5_AML_CPC_REVISION
#define EFI_ACPI_6_5_AML_PSD_REVISION
#define TABLE_GENERATOR_CREATOR_ID
BOOLEAN EFIAPI AmlNameOpCompareName(IN AML_OBJECT_NODE_HANDLE NameOpNode, IN CHAR8 *AslName)
BOOLEAN EFIAPI AmlNodeHasOpCode(IN AML_OBJECT_NODE_HANDLE ObjectNode, IN UINT8 OpCode, IN UINT8 SubOpCode)
EFI_STATUS EFIAPI AmlCodeGenThermalZone(IN CONST CHAR8 *NameString, IN AML_NODE_HANDLE ParentNode OPTIONAL, OUT AML_OBJECT_NODE_HANDLE *NewObjectNode OPTIONAL)
EFI_STATUS EFIAPI AmlCreateCpcNode(IN AML_CPC_INFO *CpcInfo, IN AML_NODE_HANDLE ParentNode OPTIONAL, OUT AML_OBJECT_NODE_HANDLE *NewCpcNode OPTIONAL)
EFI_STATUS EFIAPI AmlCodeGenDefinitionBlock(IN CONST CHAR8 *TableSignature, IN CONST CHAR8 *OemId, IN CONST CHAR8 *OemTableId, IN UINT32 OemRevision, OUT AML_ROOT_NODE **NewRootNode)
EFI_STATUS EFIAPI AmlAddNameIntegerPackage(IN CONST CHAR8 *Name, IN UINT64 Value, IN AML_OBJECT_NODE_HANDLE PackageNode)
EFI_STATUS EFIAPI AmlAddIntegerToNamedPackage(IN UINT32 Integer, IN OUT AML_OBJECT_NODE_HANDLE NameNode)
EFI_STATUS EFIAPI AmlAddLpiState(IN UINT32 MinResidency, IN UINT32 WorstCaseWakeLatency, IN UINT32 Flags, IN UINT32 ArchFlags, IN UINT32 ResCntFreq, IN UINT32 EnableParentState, IN EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE *GenericRegisterDescriptor OPTIONAL, IN UINT64 Integer OPTIONAL, IN EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE *ResidencyCounterRegister OPTIONAL, IN EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE *UsageCounterRegister OPTIONAL, IN CONST CHAR8 *StateName OPTIONAL, IN AML_OBJECT_NODE_HANDLE LpiNode)
STATIC EFI_STATUS EFIAPI LinkNode(IN AML_OBJECT_NODE *Node, IN AML_NODE_HEADER *ParentNode, OUT AML_OBJECT_NODE **NewObjectNode)
EFI_STATUS EFIAPI AmlCreatePsdNode(IN AML_PSD_INFO *PsdInfo, IN AML_NODE_HANDLE ParentNode OPTIONAL, OUT AML_OBJECT_NODE_HANDLE *NewPsdNode OPTIONAL)
STATIC EFI_STATUS EFIAPI AmlCodeGenPackage(OUT AML_OBJECT_NODE **NewObjectNode)
EFI_STATUS EFIAPI AmlAddPrtEntry(IN UINT32 Address, IN UINT8 Pin, IN CONST CHAR8 *LinkName, IN UINT32 SourceIndex, IN AML_OBJECT_NODE_HANDLE PrtNameNode)
STATIC EFI_STATUS EFIAPI AmlCodeGenName(IN CONST CHAR8 *NameString, IN AML_OBJECT_NODE *Object, IN AML_NODE_HEADER *ParentNode OPTIONAL, OUT AML_OBJECT_NODE **NewObjectNode OPTIONAL)
EFI_STATUS EFIAPI AmlCodeGenDevice(IN CONST CHAR8 *NameString, IN AML_NODE_HEADER *ParentNode OPTIONAL, OUT AML_OBJECT_NODE **NewObjectNode OPTIONAL)
STATIC EFI_STATUS EFIAPI AmlCodeGenString(IN CONST CHAR8 *String, OUT AML_OBJECT_NODE **NewObjectNode)
STATIC EFI_STATUS EFIAPI AmlCodeGenBuffer(IN CONST UINT8 *Buffer OPTIONAL, IN UINT32 BufferSize OPTIONAL, OUT AML_OBJECT_NODE **NewObjectNode)
EFI_STATUS EFIAPI AmlAddNameStringToNamedPackage(IN CONST CHAR8 *NameString, IN AML_OBJECT_NODE_HANDLE NamedNode)
EFI_STATUS EFIAPI AmlCodeGenNameInteger(IN CONST CHAR8 *NameString, IN UINT64 Integer, IN AML_NODE_HEADER *ParentNode OPTIONAL, OUT AML_OBJECT_NODE **NewObjectNode OPTIONAL)
EFI_STATUS EFIAPI AmlCodeGenMethodRetInteger(IN CONST CHAR8 *MethodNameString, IN UINT64 ReturnedInteger, IN UINT8 NumArgs, IN BOOLEAN IsSerialized, IN UINT8 SyncLevel, IN AML_NODE_HANDLE ParentNode OPTIONAL, OUT AML_OBJECT_NODE_HANDLE *NewObjectNode OPTIONAL)
STATIC EFI_STATUS EFIAPI AmlCodeGenInteger(IN UINT64 Integer, OUT AML_OBJECT_NODE **NewObjectNode)
STATIC EFI_STATUS EFIAPI AmlCodeGenReturnInteger(IN UINT64 Integer, IN AML_NODE_HEADER *ParentNode OPTIONAL, OUT AML_OBJECT_NODE **NewObjectNode OPTIONAL)
STATIC EFI_STATUS EFIAPI AmlAddRegisterToPackage(IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *Register OPTIONAL, IN AML_OBJECT_NODE_HANDLE PackageNode)
EFI_STATUS EFIAPI AmlAddDeviceDataDescriptorPackage(IN CONST EFI_GUID *Uuid, IN AML_OBJECT_NODE_HANDLE DsdNode, OUT AML_OBJECT_NODE_HANDLE *PackageNode)
EFI_STATUS EFIAPI AmlCodeGenMethodRetNameStringIntegerArgument(IN CONST CHAR8 *MethodNameString, IN CONST CHAR8 *ReturnedNameString OPTIONAL, IN UINT8 NumArgs, IN BOOLEAN IsSerialized, IN UINT8 SyncLevel, IN UINT64 IntegerArgument, IN AML_NODE_HANDLE ParentNode OPTIONAL, OUT AML_OBJECT_NODE_HANDLE *NewObjectNode OPTIONAL)
EFI_STATUS EFIAPI AmlCreateLpiNode(IN CONST CHAR8 *LpiNameString, IN UINT16 Revision, IN UINT64 LevelId, IN AML_NODE_HANDLE ParentNode OPTIONAL, OUT AML_OBJECT_NODE_HANDLE *NewLpiNode OPTIONAL)
EFI_STATUS EFIAPI AmlCodeGenNameUnicodeString(IN CONST CHAR8 *NameString, IN CHAR16 *String, IN AML_NODE_HANDLE ParentNode OPTIONAL, OUT AML_OBJECT_NODE_HANDLE *NewObjectNode OPTIONAL)
STATIC EFI_STATUS EFIAPI AmlCodeGenReturnNameStringIntegerArgument(IN CONST CHAR8 *NameString, IN UINT64 Integer, IN AML_NODE_HEADER *ParentNode OPTIONAL, OUT AML_OBJECT_NODE **NewObjectNode OPTIONAL)
STATIC BOOLEAN EFIAPI IsNullGenericAddress(IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *Address)
EFI_STATUS EFIAPI AmlCodeGenScope(IN CONST CHAR8 *NameString, IN AML_NODE_HEADER *ParentNode OPTIONAL, OUT AML_OBJECT_NODE **NewObjectNode OPTIONAL)
EFI_STATUS EFIAPI AmlCodeGenInvokeMethod(IN CONST CHAR8 *MethodNameString, IN UINT8 NumArgs, IN AML_METHOD_PARAM *Parameters OPTIONAL, IN AML_NODE_HANDLE ParentNode)
STATIC EFI_STATUS EFIAPI AmlCodeGenMethod(IN CONST CHAR8 *NameString, IN UINT8 NumArgs, IN BOOLEAN IsSerialized, IN UINT8 SyncLevel, IN AML_NODE_HEADER *ParentNode OPTIONAL, OUT AML_OBJECT_NODE **NewObjectNode OPTIONAL)
STATIC EFI_STATUS EFIAPI AmlAddRegisterOrIntegerToPackage(IN EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE *Register OPTIONAL, IN UINT32 Integer, IN AML_OBJECT_NODE_HANDLE PackageNode)
EFI_STATUS EFIAPI AmlCodeGenNamePackage(IN CONST CHAR8 *NameString, IN AML_NODE_HEADER *ParentNode, OPTIONAL OUT AML_OBJECT_NODE **NewObjectNode OPTIONAL)
STATIC EFI_STATUS EFIAPI AmlCodeGenReturn(IN AML_NODE_HEADER *ReturnNode, IN AML_NODE_HEADER *ParentNode OPTIONAL, OUT AML_OBJECT_NODE **NewObjectNode OPTIONAL)
STATIC EFI_STATUS EFIAPI AmlCodeGenResourceTemplate(OUT AML_OBJECT_NODE **NewObjectNode)
STATIC EFI_STATUS EFIAPI AmlCodeGenReturnNameString(IN CONST CHAR8 *NameString, IN AML_NODE_HEADER *ParentNode OPTIONAL, OUT AML_OBJECT_NODE **NewObjectNode OPTIONAL)
EFI_STATUS EFIAPI AmlCodeGenNameString(IN CONST CHAR8 *NameString, IN CONST CHAR8 *String, IN AML_NODE_HEADER *ParentNode OPTIONAL, OUT AML_OBJECT_NODE **NewObjectNode OPTIONAL)
EFI_STATUS EFIAPI AmlCodeGenMethodRetNameString(IN CONST CHAR8 *MethodNameString, IN CONST CHAR8 *ReturnedNameString OPTIONAL, IN UINT8 NumArgs, IN BOOLEAN IsSerialized, IN UINT8 SyncLevel, IN AML_NODE_HANDLE ParentNode OPTIONAL, OUT AML_OBJECT_NODE_HANDLE *NewObjectNode OPTIONAL)
EFI_STATUS EFIAPI AmlCodeGenNameResourceTemplate(IN CONST CHAR8 *NameString, IN AML_NODE_HEADER *ParentNode, OPTIONAL OUT AML_OBJECT_NODE **NewObjectNode OPTIONAL)
EFI_STATUS EFIAPI AmlUpdateInteger(IN AML_OBJECT_NODE_HANDLE IntegerOpNode, IN UINT64 NewInteger)
EFI_STATUS EFIAPI AmlAppendRdNode(IN AML_OBJECT_NODE_HANDLE BufferOpNode, IN AML_DATA_NODE_HANDLE NewRdNode)
void * AML_DATA_NODE_HANDLE
void * AML_OBJECT_NODE_HANDLE
BOOLEAN EFIAPI AmlNodeCompareOpCode(IN CONST AML_OBJECT_NODE *ObjectNode, IN UINT8 OpCode, IN UINT8 SubOpCode)
EFI_STATUS EFIAPI AmlCreateObjectNode(IN CONST AML_BYTE_ENCODING *AmlByteEncoding, IN UINT32 PkgLength, OUT AML_OBJECT_NODE **NewObjectNodePtr)
EFI_STATUS EFIAPI AmlCreateRootNode(IN CONST EFI_ACPI_DESCRIPTION_HEADER *SdtHeader, OUT AML_ROOT_NODE **NewRootNodePtr)
EFI_STATUS EFIAPI AmlCreateDataNode(IN EAML_NODE_DATA_TYPE DataType, IN CONST UINT8 *Data, IN UINT32 DataSize, OUT AML_DATA_NODE **NewDataNodePtr)
EFI_STATUS EFIAPI AmlCodeGenEndTag(IN UINT8 CheckSum OPTIONAL, IN AML_OBJECT_NODE *ParentNode OPTIONAL, OUT AML_DATA_NODE **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 AmlSetFixedArgument(IN AML_OBJECT_NODE *ObjectNode, IN EAML_PARSE_INDEX Index, IN AML_NODE_HEADER *NewNode)
EFI_STATUS EFIAPI AmlNodeGetIntegerValue(IN AML_OBJECT_NODE *Node, OUT UINT64 *Value)
EFI_STATUS EFIAPI AmlNodeSetIntegerValue(IN AML_OBJECT_NODE *Node, IN UINT64 NewValue, OUT INT8 *ValueWidthDiff)
EFI_STATUS EFIAPI AmlComputeSize(IN CONST AML_NODE_HEADER *Node, IN OUT UINT32 *Size)
UINTN EFIAPI StrSize(IN CONST CHAR16 *String)
UINTN EFIAPI AsciiStrLen(IN CONST CHAR8 *String)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
CONST AML_BYTE_ENCODING *EFIAPI AmlGetByteEncodingByOpCode(IN UINT8 OpCode, IN UINT8 SubOpCode)
UINT8 EFIAPI AmlComputePkgLengthWidth(IN UINT32 Length)
EFI_STATUS EFIAPI AmlComputePkgLength(IN UINT32 Length, OUT UINT32 *PkgLen)
EFI_STATUS EFIAPI AmlGetNameStringSize(IN CONST CHAR8 *AmlPath, OUT UINT32 *AmlPathSizePtr)
EFI_STATUS EFIAPI ConvertAslNameToAmlName(IN CONST CHAR8 *AslPath, OUT CHAR8 **OutAmlPath)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
#define PcdGet64(TokenName)
EFI_STATUS EFIAPI Register(IN EFI_PEI_RSC_HANDLER_CALLBACK Callback)
#define CREATE_REVISION(Major, Minor)
AML_NODE_HANDLE EFIAPI AmlGetFixedArgument(IN AML_OBJECT_NODE_HANDLE ObjectNode, IN EAML_PARSE_INDEX Index)
AML_NODE_HANDLE EFIAPI AmlGetNextVariableArgument(IN AML_NODE_HANDLE Node, IN AML_NODE_HANDLE CurrVarArg)
EAML_NODE_TYPE EFIAPI AmlGetNodeType(IN AML_NODE_HANDLE Node)
EFI_STATUS EFIAPI AmlVarListAddTail(IN AML_NODE_HANDLE ParentNode, IN AML_NODE_HANDLE NewNode)
@ EAmlParseIndexTerm1
Second fixed argument index.
@ EAmlParseIndexTerm0
First fixed argument index.
@ EAmlNodeDataTypeRaw
Raw bytes contained in a buffer.
@ EAmlNodeDataTypeString
EAmlString, NULL terminated string.
@ EAmlNodeDataTypeNameString
EFI_STATUS EFIAPI AmlDeleteTree(IN AML_NODE_HANDLE Node)
EFI_STATUS EFIAPI AmlDetachNode(IN AML_NODE_HANDLE Node)