- Timestamp:
- Jun 12, 2009 12:06:25 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/ACPI/VBoxAcpi.cpp
r20493 r20506 1 /* $Id$ */ 1 2 /** @file 2 * VBoxAcpi - Virtual 3 * VBoxAcpi - VirtualBox ACPI maniputation functionality. 3 4 */ 4 5 … … 40 41 41 42 #ifdef VBOX_WITH_DYNAMIC_DSDT 42 static int prepareDynamicDsdt(PPDMDEVINS pDevIns, 43 void* *ppPtr, 43 static int prepareDynamicDsdt(PPDMDEVINS pDevIns, 44 void* *ppPtr, 44 45 size_t *puDsdtLen) 45 46 { … … 50 51 } 51 52 52 static int cleanupDynamicDsdt(PPDMDEVINS pDevIns, 53 static int cleanupDynamicDsdt(PPDMDEVINS pDevIns, 53 54 void* pPtr) 54 55 { … … 61 62 uint16_t cNumCpus; 62 63 int rc; 63 64 64 65 rc = CFGMR3QueryU16Def(pDevIns->pCfgHandle, "NumCPUs", &cNumCpus, 1); 65 66 66 67 if (RT_FAILURE(rc)) 67 68 return rc; 68 69 /** 69 70 /** 70 71 * Now search AML for: 71 72 * AML_PROCESSOR_OP (UINT16) 0x5b83 72 73 * and replace whole block with 73 * AML_NOOP_OP (UINT16) 0xa3 74 * AML_NOOP_OP (UINT16) 0xa3 74 75 * for VCPU not configured 75 76 */ … … 78 79 { 79 80 /* 80 * AML_PROCESSOR_OP 81 * AML_PROCESSOR_OP 81 82 * 82 * DefProcessor := ProcessorOp PkgLength NameString ProcID 83 * DefProcessor := ProcessorOp PkgLength NameString ProcID 83 84 PblkAddr PblkLen ObjectList 84 85 * ProcessorOp := ExtOpPrefix 0x83 … … 92 93 /* false alarm, not named starting CP */ 93 94 continue; 94 95 95 96 /* Maybe use ProcID instead? */ 96 97 cAcpiCpus++; … … 99 100 100 101 /* Will fill unwanted CPU block with NOOPs */ 101 /* 102 * See 18.2.4 Package Length Encoding in ACPI spec 103 * for full format 102 /* 103 * See 18.2.4 Package Length Encoding in ACPI spec 104 * for full format 104 105 */ 105 106 uint32_t cBytes = pAml[i + 2]; 106 AssertReleaseMsg((cBytes >> 6) == 0, 107 AssertReleaseMsg((cBytes >> 6) == 0, 107 108 ("So far, we only understand simple package length")); 108 109 109 110 /* including AML_PROCESSOR_OP itself */ 110 111 for (uint32_t j = 0; j < cBytes + 2; j++) … … 121 122 aSum = aSum + (uint8_t)pAml[i]; 122 123 pAml[9] = (uint8_t) (0 - aSum); 123 124 124 125 return 0; 125 126 } … … 147 148 #endif 148 149 } 150
Note:
See TracChangeset
for help on using the changeset viewer.