Changeset 72146 in vbox for trunk/src/VBox
- Timestamp:
- May 7, 2018 3:22:35 PM (7 years ago)
- Location:
- trunk/src/VBox/ValidationKit/bootsectors/bs3kit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapDefaultHandler.c
r72138 r72146 104 104 switch (pTrapFrame->Ctx.rdx.u8) 105 105 { 106 case 0: ASMSetCR0(uValue); break;107 case 2: ASMSetCR2(uValue); break;108 case 3: ASMSetCR3(uValue); break;109 case 4: ASMSetCR4(uValue); break;106 case 0: ASMSetCR0(uValue); pTrapFrame->Ctx.cr0.u32 = uValue; break; 107 case 2: ASMSetCR2(uValue); pTrapFrame->Ctx.cr2.u32 = uValue; break; 108 case 3: ASMSetCR3(uValue); pTrapFrame->Ctx.cr3.u32 = uValue; break; 109 case 4: ASMSetCR4(uValue); pTrapFrame->Ctx.cr4.u32 = uValue; break; 110 110 default: Bs3Panic(); 111 111 } … … 126 126 } 127 127 else if (uSyscallNo == BS3_SYSCALL_SET_TR) 128 { 128 129 Bs3RegSetTr(pTrapFrame->Ctx.rdx.u16); 130 pTrapFrame->Ctx.tr = pTrapFrame->Ctx.rdx.u16; 131 } 129 132 else if (uSyscallNo == BS3_SYSCALL_GET_TR) 130 133 pTrapFrame->Ctx.rax.u16 = ASMGetTR(); 131 134 else if (uSyscallNo == BS3_SYSCALL_SET_LDTR) 135 { 132 136 Bs3RegSetLdtr(pTrapFrame->Ctx.rdx.u16); 137 pTrapFrame->Ctx.ldtr = pTrapFrame->Ctx.rdx.u16; 138 } 133 139 else if (uSyscallNo == BS3_SYSCALL_GET_LDTR) 134 140 pTrapFrame->Ctx.rax.u16 = ASMGetLDTR(); … … 148 154 // pTrapFrame->Ctx.cs, pTrapFrame->Ctx.rip.u32, pTrapFrame->Ctx.rflags.u32, pTrapFrame->Ctx.ss, 149 155 // pTrapFrame->Ctx.rsp.u32, g_fBs3TrapNoV86Assist, 42); 150 if ( (pTrapFrame->Ctx.rflags.u32 & X86_EFL_VM) 151 && !g_fBs3TrapNoV86Assist) 156 if ((pTrapFrame->Ctx.rflags.u32 & X86_EFL_VM)) 152 157 { 153 158 bool fHandled = true; … … 165 170 * Deal with GPs in V8086 mode. 166 171 */ 167 if (pTrapFrame->bXcpt == X86_XCPT_GP) 172 if ( pTrapFrame->bXcpt == X86_XCPT_GP 173 && !g_fBs3TrapNoV86Assist) 168 174 { 169 175 bOpCode = *pbCode++; … … 259 265 */ 260 266 else if ( pTrapFrame->bXcpt == X86_XCPT_UD 267 && pTrapFrame->Ctx.cs == BS3_SEL_TEXT16 268 && pTrapFrame->Ctx.rax.u16 <= BS3_SYSCALL_LAST 261 269 && pbCode[0] == 0xf0 262 270 && pbCode[1] == 0xcd 263 && pbCode[2] == BS3_TRAP_SYSCALL 264 && pTrapFrame->Ctx.cs == BS3_SEL_TEXT16) 271 && pbCode[2] == BS3_TRAP_SYSCALL) 265 272 { 266 273 pbCode += 3; -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h
r72138 r72146 844 844 /** Get the LDT register (value returned in ax). */ 845 845 #define BS3_SYSCALL_GET_LDTR UINT16_C(0x000f) 846 /** The last system call value. */ 847 #define BS3_SYSCALL_LAST BS3_SYSCALL_GET_LDTR 846 848 /** @} */ 847 849
Note:
See TracChangeset
for help on using the changeset viewer.