Changeset 19207 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Apr 27, 2009 12:05:38 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/TRPMR0.cpp
r19015 r19207 43 43 VMMR0DECL(void) TRPMR0DispatchHostInterrupt(PVM pVM) 44 44 { 45 /* 46 * Get the active interrupt vector number. 47 */ 45 48 PVMCPU pVCpu = VMMGetCpu0(pVM); 46 49 RTUINT uActiveVector = pVCpu->trpm.s.uActiveVector; 47 48 50 pVCpu->trpm.s.uActiveVector = ~0; 49 51 AssertMsgReturnVoid(uActiveVector < 256, ("uActiveVector=%#x is invalid! (More assertions to come, please enjoy!)\n", uActiveVector)); 50 52 51 #ifdef VBOX_WITH_HYBRID_32BIT_KERNEL 53 #if HC_ARCH_BITS == 64 && defined(RT_OS_DARWIN) 54 /* 55 * Do it the simple and safe way. 56 * 57 * This is a workaround for an optimization bug in the code below 58 * or a gcc 4.2 on mac (snow leopard seed 314). 59 */ 60 trpmR0DispatchHostInterruptSimple(uActiveVector); 61 62 #else /* The complicated way: */ 63 64 # ifdef VBOX_WITH_HYBRID_32BIT_KERNEL 52 65 /* 53 66 * Check if we're in long mode or not. … … 59 72 return; 60 73 } 61 # endif74 # endif 62 75 63 76 /* … … 66 79 RTIDTR Idtr; 67 80 ASMGetIDTR(&Idtr); 68 # if HC_ARCH_BITS == 3281 # if HC_ARCH_BITS == 32 69 82 PVBOXIDTE pIdte = &((PVBOXIDTE)Idtr.pIdt)[uActiveVector]; 70 # else83 # else 71 84 PVBOXIDTE pIdte = &((PVBOXIDTE)Idtr.pIdt)[uActiveVector * 2]; 72 # endif85 # endif 73 86 AssertMsgReturnVoid(pIdte->Gen.u1Present, ("The IDT entry (%d) is not present!\n", uActiveVector)); 74 87 AssertMsgReturnVoid( pIdte->Gen.u3Type1 == VBOX_IDTE_TYPE1 … … 76 89 ("The IDT entry (%d) is not 32-bit int gate! type1=%#x type2=%#x\n", 77 90 uActiveVector, pIdte->Gen.u3Type1, pIdte->Gen.u5Type2)); 78 # if HC_ARCH_BITS == 3291 # if HC_ARCH_BITS == 32 79 92 RTFAR32 pfnHandler; 80 93 pfnHandler.off = VBOXIDTE_OFFSET(*pIdte); … … 83 96 const RTR0UINTREG uRSP = ~(RTR0UINTREG)0; 84 97 85 # else /* 64-bit: */98 # else /* 64-bit: */ 86 99 RTFAR64 pfnHandler; 87 100 pfnHandler.off = VBOXIDTE_OFFSET(*pIdte); … … 96 109 } 97 110 98 # endif111 # endif 99 112 100 113 /* … … 102 115 */ 103 116 trpmR0DispatchHostInterrupt(pfnHandler.off, pfnHandler.sel, uRSP); 117 #endif 104 118 } 105 119
Note:
See TracChangeset
for help on using the changeset viewer.