Changeset 19286 in vbox for trunk/src/VBox/VMM/TRPMInternal.h
- Timestamp:
- May 1, 2009 12:41:07 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 46737
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/TRPMInternal.h
r19016 r19286 73 73 * @param pTRPM Pointer to TRPM instance data. 74 74 */ 75 #define TRPM2VM(pTRPM) ( (PVM)((char*)pTRPM - pTRPM->offVM) ) 76 #endif 77 78 /** 79 * Converts a TRPMCPU pointer into a VM pointer. 80 * @returns Pointer to the VM structure the TRPMCPU is part of. 81 * @param pTRPM Pointer to TRPMCPU instance data. 82 */ 83 #define TRPMCPU2VM(pTrpmCpu) ( (PVM)((char*)pTrpmCpu - pTrpmCpu->offVM) ) 75 #define TRPM_2_VM(pTRPM) ( (PVM)((uint8_t *)(pTRPM) - (pTRPM)->offVM) ) 76 #endif 84 77 85 78 /** … … 87 80 * @returns Pointer to the VM structure the TRPMCPU is part of. 88 81 * @param pTRPM Pointer to TRPMCPU instance data. 89 */ 90 #define TRPM2TRPMCPU(pTrpmCpu) ( (PTRPMCPU)((char*)pTrpmCpu + pTrpmCpu->offTRPMCPU) ) 82 * @remarks Raw-mode only, not SMP safe. 83 */ 84 #define TRPM_2_TRPMCPU(pTrpmCpu) ( (PTRPMCPU)((uint8_t *)(pTrpmCpu) + (pTrpmCpu)->offTRPMCPU) ) 85 91 86 92 87 /** … … 99 94 { 100 95 /** Offset to the VM structure. 101 * See TRPM 2VM(). */96 * See TRPM_2_VM(). */ 102 97 RTINT offVM; 103 98 /** Offset to the TRPMCPU structure. … … 178 173 179 174 175 /** 176 * Converts a TRPMCPU pointer into a VM pointer. 177 * @returns Pointer to the VM structure the TRPMCPU is part of. 178 * @param pTRPM Pointer to TRPMCPU instance data. 179 */ 180 #define TRPMCPU_2_VM(pTrpmCpu) ( (PVM)((uint8_t *)(pTrpmCpu) - (pTrpmCpu)->offVM) ) 181 182 /** 183 * Converts a TRPMCPU pointer into a VMCPU pointer. 184 * @returns Pointer to the VMCPU structure the TRPMCPU is part of. 185 * @param pTRPM Pointer to TRPMCPU instance data. 186 */ 187 #define TRPMCPU_2_VMCPU(pTrpmCpu) ( (PVMCPU)((uint8_t *)(pTrpmCpu) - (pTrpmCpu)->offVMCpu) ) 188 189 190 /** 191 * Per CPU data for TRPM. 192 */ 180 193 typedef struct TRPMCPU 181 194 { 182 /** Offset to the VM structure. 183 * See TRPMCPU2VM(). */ 184 RTINT offVM; 195 /** Offset into the VM structure. 196 * See TRPMCPU_2_VM(). */ 197 uint32_t offVM; 198 /** Offset into the VMCPU structure. 199 * See TRPMCPU_2_VMCPU(). */ 200 uint32_t offVMCpu; 201 185 202 /** Active Interrupt or trap vector number. 186 203 * If not ~0U this indicates that we're currently processing
Note:
See TracChangeset
for help on using the changeset viewer.