psloop.c (197104) | psloop.c (199337) |
---|---|
1/****************************************************************************** 2 * 3 * Module Name: psloop - Main AML parse loop 4 * 5 *****************************************************************************/ 6 7/****************************************************************************** 8 * --- 159 unchanged lines hidden (view full) --- 168static ACPI_STATUS 169AcpiPsCompleteFinalOp ( 170 ACPI_WALK_STATE *WalkState, 171 ACPI_PARSE_OBJECT *Op, 172 ACPI_STATUS Status); 173 174static void 175AcpiPsLinkModuleCode ( | 1/****************************************************************************** 2 * 3 * Module Name: psloop - Main AML parse loop 4 * 5 *****************************************************************************/ 6 7/****************************************************************************** 8 * --- 159 unchanged lines hidden (view full) --- 168static ACPI_STATUS 169AcpiPsCompleteFinalOp ( 170 ACPI_WALK_STATE *WalkState, 171 ACPI_PARSE_OBJECT *Op, 172 ACPI_STATUS Status); 173 174static void 175AcpiPsLinkModuleCode ( |
176 ACPI_PARSE_OBJECT *ParentOp, |
|
176 UINT8 *AmlStart, 177 UINT32 AmlLength, 178 ACPI_OWNER_ID OwnerId); 179 180 181/******************************************************************************* 182 * 183 * FUNCTION: AcpiPsGetAmlOpcode --- 404 unchanged lines hidden (view full) --- 588 /* 589 * Currently supported module-level opcodes are: 590 * IF/ELSE/WHILE. These appear to be the most common, 591 * and easiest to support since they open an AML 592 * package. 593 */ 594 if (WalkState->PassNumber == ACPI_IMODE_LOAD_PASS1) 595 { | 177 UINT8 *AmlStart, 178 UINT32 AmlLength, 179 ACPI_OWNER_ID OwnerId); 180 181 182/******************************************************************************* 183 * 184 * FUNCTION: AcpiPsGetAmlOpcode --- 404 unchanged lines hidden (view full) --- 589 /* 590 * Currently supported module-level opcodes are: 591 * IF/ELSE/WHILE. These appear to be the most common, 592 * and easiest to support since they open an AML 593 * package. 594 */ 595 if (WalkState->PassNumber == ACPI_IMODE_LOAD_PASS1) 596 { |
596 AcpiPsLinkModuleCode (AmlOpStart, | 597 AcpiPsLinkModuleCode (Op->Common.Parent, AmlOpStart, |
597 (UINT32) (WalkState->ParserState.PkgEnd - AmlOpStart), 598 WalkState->OwnerId); 599 } 600 601 ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, 602 "Pass1: Skipping an If/Else/While body\n")); 603 604 /* Skip body of if/else/while in pass 1 */ --- 94 unchanged lines hidden (view full) --- 699 return_ACPI_STATUS (AE_OK); 700} 701 702 703/******************************************************************************* 704 * 705 * FUNCTION: AcpiPsLinkModuleCode 706 * | 598 (UINT32) (WalkState->ParserState.PkgEnd - AmlOpStart), 599 WalkState->OwnerId); 600 } 601 602 ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, 603 "Pass1: Skipping an If/Else/While body\n")); 604 605 /* Skip body of if/else/while in pass 1 */ --- 94 unchanged lines hidden (view full) --- 700 return_ACPI_STATUS (AE_OK); 701} 702 703 704/******************************************************************************* 705 * 706 * FUNCTION: AcpiPsLinkModuleCode 707 * |
707 * PARAMETERS: AmlStart - Pointer to the AML | 708 * PARAMETERS: ParentOp - Parent parser op 709 * AmlStart - Pointer to the AML |
708 * AmlLength - Length of executable AML 709 * OwnerId - OwnerId of module level code 710 * 711 * RETURN: None. 712 * 713 * DESCRIPTION: Wrap the module-level code with a method object and link the 714 * object to the global list. Note, the mutex field of the method 715 * object is used to link multiple module-level code objects. 716 * 717 ******************************************************************************/ 718 719static void 720AcpiPsLinkModuleCode ( | 710 * AmlLength - Length of executable AML 711 * OwnerId - OwnerId of module level code 712 * 713 * RETURN: None. 714 * 715 * DESCRIPTION: Wrap the module-level code with a method object and link the 716 * object to the global list. Note, the mutex field of the method 717 * object is used to link multiple module-level code objects. 718 * 719 ******************************************************************************/ 720 721static void 722AcpiPsLinkModuleCode ( |
723 ACPI_PARSE_OBJECT *ParentOp, |
|
721 UINT8 *AmlStart, 722 UINT32 AmlLength, 723 ACPI_OWNER_ID OwnerId) 724{ 725 ACPI_OPERAND_OBJECT *Prev; 726 ACPI_OPERAND_OBJECT *Next; 727 ACPI_OPERAND_OBJECT *MethodObj; | 724 UINT8 *AmlStart, 725 UINT32 AmlLength, 726 ACPI_OWNER_ID OwnerId) 727{ 728 ACPI_OPERAND_OBJECT *Prev; 729 ACPI_OPERAND_OBJECT *Next; 730 ACPI_OPERAND_OBJECT *MethodObj; |
731 ACPI_NAMESPACE_NODE *ParentNode; |
|
728 729 730 /* Get the tail of the list */ 731 732 Prev = Next = AcpiGbl_ModuleCodeList; 733 while (Next) 734 { 735 Prev = Next; --- 10 unchanged lines hidden (view full) --- 746 /* Create, initialize, and link a new temporary method object */ 747 748 MethodObj = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD); 749 if (!MethodObj) 750 { 751 return; 752 } 753 | 732 733 734 /* Get the tail of the list */ 735 736 Prev = Next = AcpiGbl_ModuleCodeList; 737 while (Next) 738 { 739 Prev = Next; --- 10 unchanged lines hidden (view full) --- 750 /* Create, initialize, and link a new temporary method object */ 751 752 MethodObj = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD); 753 if (!MethodObj) 754 { 755 return; 756 } 757 |
758 if (ParentOp->Common.Node) 759 { 760 ParentNode = ParentOp->Common.Node; 761 } 762 else 763 { 764 ParentNode = AcpiGbl_RootNode; 765 } 766 |
|
754 MethodObj->Method.AmlStart = AmlStart; 755 MethodObj->Method.AmlLength = AmlLength; 756 MethodObj->Method.OwnerId = OwnerId; 757 MethodObj->Method.Flags |= AOPOBJ_MODULE_LEVEL; 758 | 767 MethodObj->Method.AmlStart = AmlStart; 768 MethodObj->Method.AmlLength = AmlLength; 769 MethodObj->Method.OwnerId = OwnerId; 770 MethodObj->Method.Flags |= AOPOBJ_MODULE_LEVEL; 771 |
772 /* 773 * Save the parent node in NextObject. This is cheating, but we 774 * don't want to expand the method object. 775 */ 776 MethodObj->Method.NextObject = 777 ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, ParentNode); 778 |
|
759 if (!Prev) 760 { 761 AcpiGbl_ModuleCodeList = MethodObj; 762 } 763 else 764 { 765 Prev->Method.Mutex = MethodObj; 766 } --- 555 unchanged lines hidden --- | 779 if (!Prev) 780 { 781 AcpiGbl_ModuleCodeList = MethodObj; 782 } 783 else 784 { 785 Prev->Method.Mutex = MethodObj; 786 } --- 555 unchanged lines hidden --- |