Changeset 53564 in vbox for trunk/src/VBox
- Timestamp:
- Dec 18, 2014 2:48:14 AM (10 years ago)
- Location:
- trunk/src/VBox/ValidationKit/utils/cpu
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/utils/cpu/cidet-app.cpp
r53563 r53564 50 50 #endif 51 51 52 53 /******************************************************************************* 54 * Defined Constants And Macros * 55 *******************************************************************************/ 56 /** @def CIDET_LEAVE_GS_ALONE 57 * Leave GS alone on 64-bit darwin (gs is 0, no ldt or gdt entry to load that'll 58 * restore the lower 32-bits of the base when saving and restoring the register). 59 */ 60 #if defined(RT_OS_DARWIN) && defined(RT_ARCH_AMD64) 61 # define CIDET_LEAVE_GS_ALONE 62 #endif 52 63 53 64 … … 923 934 static DECLCALLBACK(bool) CidetAppCbExecute(PCIDETCORE pThis) 924 935 { 925 #if defined(RT_OS_WINDOWS) 936 #if defined(RT_OS_WINDOWS) || defined(RT_OS_DARWIN) 926 937 /* Skip tricky stack because windows cannot dispatch exception if RSP/ESP is bad. */ 927 938 if (pThis->InCtx.fTrickyStack) … … 1057 1068 pThis->Core.InTemplateCtx.aGRegs[X86_GREG_xSP] = (uintptr_t)pThis->pbStackEnd - 64; 1058 1069 1070 pThis->Core.fTestCfg |= CIDET_TESTCFG_SEG_PRF_CS; 1071 pThis->Core.fTestCfg |= CIDET_TESTCFG_SEG_PRF_DS; 1072 pThis->Core.fTestCfg |= CIDET_TESTCFG_SEG_PRF_ES; 1073 #if !defined(RT_OS_WINDOWS) 1074 pThis->Core.fTestCfg |= CIDET_TESTCFG_SEG_PRF_FS; 1075 #endif 1076 #if !defined(CIDET_LEAVE_GS_ALONE) 1077 pThis->Core.fTestCfg |= CIDET_TESTCFG_SEG_PRF_GS; 1078 #endif 1079 1059 1080 *ppThis = pThis; 1060 1081 return VINF_SUCCESS; … … 1148 1169 */ 1149 1170 /* Alternative stack so we can play with esp/rsp. */ 1150 st ruct sigaltstackAltStack;1171 stack_t AltStack; 1151 1172 RT_ZERO(AltStack); 1152 AltStack.ss_flags = SS_ONSTACK;1173 AltStack.ss_flags = 0; 1153 1174 # ifdef SIGSTKSZ 1154 1175 AltStack.ss_size = RT_MAX(SIGSTKSZ, _128K); -
trunk/src/VBox/ValidationKit/utils/cpu/cidet-appA.asm
r53563 r53564 43 43 %endif 44 44 45 46 ;; 47 ; Leave GS alone on 64-bit darwin (gs is 0, no ldt or gdt entry to load that'll 48 ; restore the lower 32-bits of the base when saving and restoring the register). 49 %ifdef RT_OS_DARWIN 50 %ifdef RT_ARCH_AMD64 51 %define CIDET_LEAVE_GS_ALONE 52 %endif 53 %endif 54 55 56 57 BEGINCODE 45 58 46 59 ;; … … 153 166 mov es, [xDX + CIDETCPUCTX.aSRegs + X86_SREG_ES * 2] 154 167 mov fs, [xDX + CIDETCPUCTX.aSRegs + X86_SREG_FS * 2] 168 %ifndef CIDET_LEAVE_GS_ALONE 155 169 mov gs, [xDX + CIDETCPUCTX.aSRegs + X86_SREG_GS * 2] 170 %endif 156 171 157 172 ; Restore most GPRs (except xCX, xAX and xSP). -
trunk/src/VBox/ValidationKit/utils/cpu/cidet-core.cpp
r53563 r53564 61 61 /** @def CIDET_DPRINTF 62 62 * Debug printf. */ 63 #if 0 //def DEBUG_bird63 #ifdef DEBUG_bird 64 64 # define CIDET_DPRINTF(a) do { RTPrintf a; } while (0) 65 65 #else
Note:
See TracChangeset
for help on using the changeset viewer.