Changeset 60557 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- Apr 19, 2016 3:01:35 AM (9 years ago)
- Location:
- trunk/src/VBox/ValidationKit/bootsectors/bs3kit
- Files:
-
- 1 added
- 38 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk
r60554 r60557 219 219 220 220 bs3kit-common-16_VBOX_NEAR_TO_FAR_MODE_FUNCTIONS := \ 221 Bs3TestDoModes \222 221 Bs3TrapInit \ 223 222 … … 232 231 bs3kit-common-32_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE 233 232 bs3kit-common-32_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) \ 233 bs3-cmn-SwitchHlpConvFlatRetToRetfProtMode.asm \ 234 234 bs3-cmn-UInt64Div.c \ 235 235 bs3-wc32-U8D.asm \ … … 247 247 bs3kit-common-64_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE 248 248 bs3kit-common-64_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) \ 249 bs3-cmn-SwitchHlpConvFlatRetToRetfProtMode.asm \ 249 250 bs3-c64-Trap64Generic.asm \ 250 251 ../../../Runtime/common/asm/ASMGetIDTR.asm \ -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SelFlatCodeToRealMode.asm
r60539 r60557 35 35 ;* Global Variables * 36 36 ;********************************************************************************************************************************* 37 extern Bs3X0Text16_EndOfSegment 38 extern Bs3X1Text16_EndOfSegment 37 BS3_EXTERN_DATA16 Bs3RmText16_EndOfSegment 38 BS3_EXTERN_DATA16 Bs3X0Text16_EndOfSegment 39 BS3_EXTERN_DATA16 Bs3X1Text16_EndOfSegment 39 40 40 41 … … 43 44 ; 44 45 BS3_BEGIN_TEXT16 46 BS3_BEGIN_RMTEXT16 45 47 BS3_BEGIN_X0TEXT16 46 48 BS3_BEGIN_X1TEXT16 … … 77 79 78 80 mov ax, dx 79 sub ax, BS3TEXT1681 sub ax, CGROUP16 80 82 cmp ax, 1000h 81 83 jb .bs3text16 82 84 83 85 mov ax, dx 84 sub ax, BS3X0TEXT16 86 sub ax, BS3GROUPRMTEXT16 87 mov bx, Bs3RmText16_EndOfSegment wrt BS3GROUPRMTEXT16 88 add bx, 15 89 shr bx, cl 90 cmp ax, bx 91 jb .bs3rmtext16 92 93 mov ax, dx 94 sub ax, BS3GROUPX0TEXT16 85 95 mov bx, Bs3X0Text16_EndOfSegment wrt BS3GROUPX0TEXT16 86 96 add bx, 15 … … 90 100 91 101 mov ax, dx 92 sub ax, BS3 X1TEXT16102 sub ax, BS3GROUPX1TEXT16 93 103 mov bx, Bs3X1Text16_EndOfSegment wrt BS3GROUPX1TEXT16 94 104 add bx, 15 … … 104 114 ; 105 115 .bs3x1text16: 106 mov dx, BS3 X1TEXT16116 mov dx, BS3GROUPX1TEXT16 107 117 jmp .calc_return 108 118 .bs3x0text16: 109 mov dx, BS3X0TEXT16 119 mov dx, BS3GROUPX0TEXT16 120 jmp .calc_return 121 .bs3rmtext16: 122 mov dx, BS3GROUPRMTEXT16 110 123 jmp .calc_return 111 124 .bs3text16: 112 mov dx, BS3X0TEXT16125 mov dx, CGROUP16 113 126 .calc_return: 114 127 ; Convert the real-mode frame into the low 16-bit base (BX). -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SelProtModeCodeToRealMode.asm
r60554 r60557 31 31 ; 32 32 BS3_BEGIN_TEXT16 33 BS3_BEGIN_RMTEXT16 33 34 BS3_BEGIN_X0TEXT16 34 35 BS3_BEGIN_X1TEXT16 … … 50 51 51 52 ; We're allowed to use the real-mode segment value. 52 cmp ax, BS3TEXT1653 cmp ax, CGROUP16 53 54 je .bs3text16 54 55 … … 56 57 cmp ax, BS3_SEL_R0_CS16 57 58 je .bs3text16 59 cmp ax, BS3_SEL_RMTEXT16_CS 60 je .bs3rmtext16 58 61 cmp ax, BS3_SEL_X0TEXT16_CS 59 62 je .bs3x0text16 … … 81 84 je .bs3text16 82 85 .panic: 86 hlt 83 87 extern BS3_CMN_NM(Bs3Panic) 84 88 call BS3_CMN_NM(Bs3Panic) … … 86 90 87 91 .bs3x1text16: 88 mov ax, BS3 _SEL_X1TEXT16_CS92 mov ax, BS3GROUPX1TEXT16 89 93 jmp .return 90 94 .bs3x0text16: 91 mov ax, BS3_SEL_X0TEXT16_CS 95 mov ax, BS3GROUPX0TEXT16 96 jmp .return 97 .bs3rmtext16: 98 mov ax, BS3GROUPRMTEXT16 92 99 jmp .return 93 100 .bs3text16: 94 mov ax, BS3TEXT16101 mov ax, CGROUP16 95 102 .return: 96 103 pop xBP -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SelRealModeCodeToProtMode.asm
r60554 r60557 31 31 ; 32 32 BS3_BEGIN_TEXT16 33 BS3_BEGIN_RMTEXT16 33 34 BS3_BEGIN_X0TEXT16 34 35 BS3_BEGIN_X1TEXT16 … … 46 47 47 48 mov ax, [xBP + xCB + cbCurRetAddr] 48 cmp ax, BS3TEXT1649 cmp ax, CGROUP16 49 50 je .bs3text16 50 cmp ax, BS3X0TEXT16 51 cmp ax, BS3GROUPRMTEXT16 52 je .bs3rmtext16 53 cmp ax, BS3GROUPX0TEXT16 51 54 je .bs3x0text16 52 cmp ax, BS3 X1TEXT1655 cmp ax, BS3GROUPX1TEXT16 53 56 je .bs3x1text16 57 54 58 extern BS3_CMN_NM(Bs3Panic) 55 59 call BS3_CMN_NM(Bs3Panic) … … 61 65 .bs3x0text16: 62 66 mov ax, BS3_SEL_X0TEXT16_CS 67 jmp .return 68 .bs3rmtext16: 69 mov ax, BS3_SEL_RMTEXT16_CS 63 70 jmp .return 64 71 .bs3text16: -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SwitchHlpConvRealModeRetfPopBpDecBpAndReturn.asm
r60554 r60557 51 51 push ax 52 52 BS3_EXTERN_CMN Bs3SelRealModeCodeToProtMode 53 call Bs3SelRealModeCodeToProtMode ; This doesn't trash any registers (except AX).53 call Bs3SelRealModeCodeToProtMode ; This doesn't trash any registers (except AX). 54 54 add sp, 2 55 55 mov [bp + 2 + 2], ax … … 61 61 retf 62 62 63 %el se63 %elif TMPL_BITS == 32 64 64 push xAX 65 65 push xDX 66 66 67 movzx eax, word [xSP + 4*2 + 2 + 2]; return segment68 movzx edx, word [xSP + 4*2 + 2]; return offset67 movzx eax, word [xSP + xCB*2 + 2 + 2] ; return segment 68 movzx edx, word [xSP + xCB*2 + 2] ; return offset 69 69 shl eax, 4 70 70 add eax, edx 71 mov [xSP + 4*3+ 2], eax71 mov [xSP + xCB*2 + 2], eax 72 72 73 73 pop xDX 74 74 pop xAX 75 %if TMPL_BITS == 3276 75 pop bp 77 76 dec bp 78 77 ret 79 %else 80 mov bp, [rsp] 81 add rsp, 2h 78 %else 79 sub rsp, 2h 80 81 push xAX 82 push xDX 83 84 movzx eax, word [xSP + xCB*2 + 4 + 2] ; return segment 85 movzx edx, word [xSP + xCB*2 + 4] ; return offset 86 shl eax, 4 87 add eax, edx 88 89 mov bp, [xSP + xCB*2 + 2] 82 90 dec bp 83 o32 ret 84 %endif 91 92 mov [xSP + xCB*2], rax 93 94 pop xDX 95 pop xAX 96 ret 85 97 %endif 86 98 BS3_PROC_END_CMN Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestSendCmdWithU32.asm
r60527 r60557 68 68 %endif 69 69 70 %if TMPL_BITS == 1671 pop sAX72 %endif73 70 .no_vmmdev: 74 71 pop xSI -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-first-common.mac
r60554 r60557 98 98 BS3_GLOBAL_DATA Bs3TotalImageSize, 4 99 99 dd BS3_DATA_NM(Bs3Data64_EndOfSegment) wrt CGROUP16 100 100 101 BS3_GLOBAL_DATA Bs3Text16_Size, 2 101 102 dw BS3_DATA_NM(Bs3Text16_EndOfSegment) wrt CGROUP16 103 BS3_GLOBAL_DATA Bs3RmText16_Size, 2 104 dw BS3_DATA_NM(Bs3RmText16_EndOfSegment) wrt BS3GROUPRMTEXT16 102 105 BS3_GLOBAL_DATA Bs3X0Text16_Size, 2 103 106 dw BS3_DATA_NM(Bs3X0Text16_EndOfSegment) wrt BS3GROUPX0TEXT16 104 107 BS3_GLOBAL_DATA Bs3X1Text16_Size, 2 105 108 dw BS3_DATA_NM(Bs3X1Text16_EndOfSegment) wrt BS3GROUPX1TEXT16 109 110 BS3_GLOBAL_DATA Bs3RmText16_FlatAddr, 4 111 dd BS3_DATA_NM(Bs3RmText16_StartOfSegment) wrt BS3FLAT 106 112 BS3_GLOBAL_DATA Bs3X0Text16_FlatAddr, 4 107 113 dd BS3_DATA_NM(Bs3X0Text16_StartOfSegment) wrt BS3FLAT -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-EnteredMode.asm
r60554 r60557 189 189 %if BS3_MODE_IS_RM_SYS(TMPL_MODE) 190 190 extern _Bs3TrapSystemCallHandler_rm 191 mov word [ss: BS3_TRAP_SYSCALL*4], _Bs3TrapSystemCallHandler_rm wrt BS3TEXT16192 mov word [ss: BS3_TRAP_SYSCALL*4 + 2], BS3TEXT16191 mov word [ss: BS3_TRAP_SYSCALL*4], _Bs3TrapSystemCallHandler_rm wrt CGROUP16 192 mov word [ss: BS3_TRAP_SYSCALL*4 + 2], CGROUP16 193 193 194 194 %elif BS3_MODE_IS_16BIT_SYS(TMPL_MODE) … … 198 198 TMPL_BEGIN_TEXT 199 199 push 0 ; cParams 200 push TMPL_NM(Bs3TrapSystemCallHandler) wrt BS3TEXT16200 push TMPL_NM(Bs3TrapSystemCallHandler) wrt CGROUP16 201 201 push BS3_SEL_R0_CS16 202 202 push 3 ; DPL -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToLM16.asm
r60554 r60557 41 41 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 42 42 ; 43 %if TMPL_BITS == 16 44 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToLM16_Safe), function , 0 45 %endif 43 46 BS3_PROC_BEGIN_MODE Bs3SwitchToLM16, BS3_PBC_NEAR 44 47 %ifdef TMPL_LM16 … … 106 109 %endif 107 110 BS3_PROC_END_MODE Bs3SwitchToLM16 111 112 %else 113 ;; 114 ; Safe far return to non-BS3TEXT16 code. 115 BS3_EXTERN_CMN Bs3SwitchHlpConvFlatRetToRetfProtMode 116 BS3_BEGIN_TEXT16 117 BS3_SET_BITS TMPL_BITS 118 BS3_PROC_BEGIN_MODE Bs3SwitchToLM16_Safe, BS3_PBC_NEAR 119 call Bs3SwitchHlpConvFlatRetToRetfProtMode ; Special internal function. Uses nothing, but modifies the stack. 120 call TMPL_NM(Bs3SwitchToLM16) 121 BS3_SET_BITS 16 122 retf 123 BS3_PROC_END_MODE Bs3SwitchToLM16_Safe 124 108 125 %endif 109 126 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToLM32.asm
r60554 r60557 44 44 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 45 45 ; 46 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToLM32_Safe), function, 0 46 47 BS3_PROC_BEGIN_MODE Bs3SwitchToLM32, BS3_PBC_NEAR 47 48 %ifdef TMPL_LM32 … … 168 169 ; Jmp to common code for the tedious conversion. 169 170 %if BS3_MODE_IS_RM_OR_V86(TMPL_MODE) 170 BS3_EXTERN_CMN Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn171 jmp Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn171 extern _Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn_c32 172 jmp _Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn_c32 172 173 %else 173 BS3_EXTERN_CMN Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn174 jmp Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn174 extern _Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn_c32 175 jmp _Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn_c32 175 176 %endif 176 177 BS3_SET_BITS 16 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToLM64.asm
r60554 r60557 41 41 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 42 42 ; 43 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToLM16_Safe), function, 0 43 44 BS3_PROC_BEGIN_MODE Bs3SwitchToLM64, BS3_PBC_NEAR 44 45 %ifdef TMPL_LM64 … … 92 93 ; Jmp to common code for the tedious conversion. 93 94 %if BS3_MODE_IS_RM_OR_V86(TMPL_MODE) 94 BS3_EXTERN_CMN Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn95 jmp Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn95 extern _Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn_c64 96 jmp _Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn_c64 96 97 %else 97 BS3_EXTERN_CMN Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn98 jmp Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn98 extern _Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn_c64 99 jmp _Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn_c64 99 100 %endif 100 101 BS3_SET_BITS 16 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPAE16.asm
r60554 r60557 47 47 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 48 48 ; 49 %if TMPL_BITS == 16 50 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToPAE16_Safe), function , 0 51 %endif 49 52 BS3_PROC_BEGIN_MODE Bs3SwitchToPAE16, BS3_PBC_NEAR 50 53 %ifdef TMPL_PAE16 … … 189 192 %endif 190 193 BS3_PROC_END_MODE Bs3SwitchToPAE16 191 %endif 192 194 195 %else 196 ;; 197 ; Safe far return to non-BS3TEXT16 code. 198 BS3_EXTERN_CMN Bs3SwitchHlpConvFlatRetToRetfProtMode 199 BS3_BEGIN_TEXT16 200 BS3_SET_BITS TMPL_BITS 201 BS3_PROC_BEGIN_MODE Bs3SwitchToPAE16_Safe, BS3_PBC_NEAR 202 call Bs3SwitchHlpConvFlatRetToRetfProtMode ; Special internal function. Uses nothing, but modifies the stack. 203 call TMPL_NM(Bs3SwitchToPAE16) 204 BS3_SET_BITS 16 205 retf 206 BS3_PROC_END_MODE Bs3SwitchToPAE16_Safe 207 %endif 208 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPAE16_32.asm
r60554 r60557 40 40 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 41 41 ; 42 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToPAE16_32_Safe), function, 0 42 43 BS3_PROC_BEGIN_MODE Bs3SwitchToPAE16_32, BS3_PBC_NEAR 43 44 %ifdef TMPL_PAE16_32 … … 92 93 ; Jmp to common code for the tedious conversion. 93 94 %if BS3_MODE_IS_RM_OR_V86(TMPL_MODE) 94 BS3_EXTERN_CMN Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn95 jmp Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn95 extern _Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn_c32 96 jmp _Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn_c32 96 97 %else 97 BS3_EXTERN_CMN Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn98 jmp Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn98 extern _Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn_c32 99 jmp _Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn_c32 99 100 %endif 100 101 BS3_SET_BITS 16 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPAE16_V86.asm
r60554 r60557 40 40 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 41 41 ; 42 %if TMPL_BITS == 16 43 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToPAE16_V86_Safe), function , 0 44 %endif 42 45 BS3_PROC_BEGIN_MODE Bs3SwitchToPAE16_V86, BS3_PBC_NEAR 43 46 %ifdef TMPL_PAE16_V86 … … 95 98 %endif 96 99 BS3_PROC_END_MODE Bs3SwitchToPAE16_V86 100 101 %else 102 ;; 103 ; Safe far return to non-BS3TEXT16 code. 104 BS3_EXTERN_CMN Bs3SwitchHlpConvFlatRetToRetfProtMode 105 BS3_BEGIN_TEXT16 106 BS3_SET_BITS TMPL_BITS 107 BS3_PROC_BEGIN_MODE Bs3SwitchToPAE16_V86_Safe, BS3_PBC_NEAR 108 call Bs3SwitchHlpConvFlatRetToRetfProtMode ; Special internal function. Uses nothing, but modifies the stack. 109 call TMPL_NM(Bs3SwitchToPAE16_V86) 110 BS3_SET_BITS 16 111 retf 112 BS3_PROC_END_MODE Bs3SwitchToPAE16_V86_Safe 97 113 %endif 98 114 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPAE32.asm
r60554 r60557 42 42 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 43 43 ; 44 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToPAE32_Safe), function, 0 44 45 BS3_PROC_BEGIN_MODE Bs3SwitchToPAE32, BS3_PBC_NEAR 45 46 %ifdef TMPL_PAE32 … … 174 175 ; Jmp to common code for the tedious conversion. 175 176 %if BS3_MODE_IS_RM_OR_V86(TMPL_MODE) 176 BS3_EXTERN_CMN Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn177 jmp Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn177 extern _Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn_c32 178 jmp _Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn_c32 178 179 %else 179 BS3_EXTERN_CMN Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn180 jmp Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn180 extern _Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn_c32 181 jmp _Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn_c32 181 182 %endif 182 183 BS3_SET_BITS 16 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPAE32_16.asm
r60554 r60557 40 40 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 41 41 ; 42 %if TMPL_BITS == 16 43 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToPAE32_16_Safe), function , 0 44 %endif 42 45 BS3_PROC_BEGIN_MODE Bs3SwitchToPAE32_16, BS3_PBC_NEAR 43 46 %if TMPL_MODE == BS3_MODE_PAE32_16 … … 80 83 BS3_PROC_END_MODE Bs3SwitchToPAE32_16 81 84 85 82 86 %if TMPL_BITS == 16 83 87 ;; … … 102 106 %endif 103 107 BS3_PROC_END_MODE Bs3SwitchToPAE32_16 108 109 %else 110 ;; 111 ; Safe far return to non-BS3TEXT16 code. 112 BS3_EXTERN_CMN Bs3SwitchHlpConvFlatRetToRetfProtMode 113 BS3_BEGIN_TEXT16 114 BS3_SET_BITS TMPL_BITS 115 BS3_PROC_BEGIN_MODE Bs3SwitchToPAE32_16_Safe, BS3_PBC_NEAR 116 call Bs3SwitchHlpConvFlatRetToRetfProtMode ; Special internal function. Uses nothing, but modifies the stack. 117 call TMPL_NM(Bs3SwitchToPAE32_16) 118 BS3_SET_BITS 16 119 retf 120 BS3_PROC_END_MODE Bs3SwitchToPAE32_16_Safe 104 121 %endif 105 122 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPAEV86.asm
r60554 r60557 40 40 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 41 41 ; 42 %if TMPL_BITS == 16 43 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToPAEV86_Safe), function , 0 44 %endif 42 45 BS3_PROC_BEGIN_MODE Bs3SwitchToPAEV86, BS3_PBC_NEAR 43 46 %if TMPL_MODE == BS3_MODE_PAEV86 … … 89 92 %endif 90 93 BS3_PROC_END_MODE Bs3SwitchToPAEV86 94 95 %else 96 ;; 97 ; Safe far return to non-BS3TEXT16 code. 98 BS3_EXTERN_CMN Bs3SwitchHlpConvFlatRetToRetfProtMode 99 BS3_BEGIN_TEXT16 100 BS3_SET_BITS TMPL_BITS 101 BS3_PROC_BEGIN_MODE Bs3SwitchToPAEV86_Safe, BS3_PBC_NEAR 102 call Bs3SwitchHlpConvFlatRetToRetfProtMode ; Special internal function. Uses nothing, but modifies the stack. 103 call TMPL_NM(Bs3SwitchToPAEV86) 104 BS3_SET_BITS 16 105 retf 106 BS3_PROC_END_MODE Bs3SwitchToPAEV86_Safe 91 107 %endif 92 108 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPE16.asm
r60554 r60557 40 40 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 41 41 ; 42 %if TMPL_BITS == 16 43 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToPE16_Safe), function , 0 44 %endif 42 45 BS3_PROC_BEGIN_MODE Bs3SwitchToPE16, BS3_PBC_NEAR 43 46 %ifdef TMPL_PE16 … … 148 151 %endif 149 152 BS3_PROC_END_MODE Bs3SwitchToPE16 153 154 %else 155 ;; 156 ; Safe far return to non-BS3TEXT16 code. 157 BS3_EXTERN_CMN Bs3SwitchHlpConvFlatRetToRetfProtMode 158 BS3_BEGIN_TEXT16 159 BS3_SET_BITS TMPL_BITS 160 BS3_PROC_BEGIN_MODE Bs3SwitchToPE16_Safe, BS3_PBC_NEAR 161 call Bs3SwitchHlpConvFlatRetToRetfProtMode ; Special internal function. Uses nothing, but modifies the stack. 162 call TMPL_NM(Bs3SwitchToPE16) 163 BS3_SET_BITS 16 164 retf 165 BS3_PROC_END_MODE Bs3SwitchToPE16_Safe 150 166 %endif 151 167 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPE16_32.asm
r60554 r60557 40 40 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 41 41 ; 42 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToPE16_32_Safe), function, 0 42 43 BS3_PROC_BEGIN_MODE Bs3SwitchToPE16_32, BS3_PBC_NEAR 43 44 %ifdef TMPL_PE16_32 … … 92 93 ; Jmp to common code for the tedious conversion. 93 94 %if BS3_MODE_IS_RM_OR_V86(TMPL_MODE) 94 BS3_EXTERN_CMN Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn95 jmp Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn95 extern _Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn_c32 96 jmp _Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn_c32 96 97 %else 97 BS3_EXTERN_CMN Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn98 jmp Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn98 extern _Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn_c32 99 jmp _Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn_c32 99 100 %endif 100 101 BS3_SET_BITS 16 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPE16_V86.asm
r60554 r60557 40 40 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 41 41 ; 42 %if TMPL_BITS == 16 43 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToPE16_V86_Safe), function , 0 44 %endif 42 45 BS3_PROC_BEGIN_MODE Bs3SwitchToPE16_V86, BS3_PBC_NEAR 43 46 %ifdef TMPL_PE16_V86 … … 95 98 %endif 96 99 BS3_PROC_END_MODE Bs3SwitchToPE16_V86 100 101 %else 102 ;; 103 ; Safe far return to non-BS3TEXT16 code. 104 BS3_EXTERN_CMN Bs3SwitchHlpConvFlatRetToRetfProtMode 105 BS3_BEGIN_TEXT16 106 BS3_SET_BITS TMPL_BITS 107 BS3_PROC_BEGIN_MODE Bs3SwitchToPE16_V86_Safe, BS3_PBC_NEAR 108 call Bs3SwitchHlpConvFlatRetToRetfProtMode ; Special internal function. Uses nothing, but modifies the stack. 109 call TMPL_NM(Bs3SwitchToPE16_V86) 110 BS3_SET_BITS 16 111 retf 112 BS3_PROC_END_MODE Bs3SwitchToPE16_V86_Safe 97 113 %endif 98 114 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPE32.asm
r60554 r60557 41 41 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 42 42 ; 43 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToPE32_Safe), function, 0 43 44 BS3_PROC_BEGIN_MODE Bs3SwitchToPE32, BS3_PBC_NEAR 44 45 %ifdef TMPL_PE32 … … 152 153 ; Jmp to common code for the tedious conversion. 153 154 %if BS3_MODE_IS_RM_OR_V86(TMPL_MODE) 154 BS3_EXTERN_CMN Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn155 jmp Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn155 extern _Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn_c32 156 jmp _Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn_c32 156 157 %else 157 BS3_EXTERN_CMN Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn158 jmp Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn158 extern _Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn_c32 159 jmp _Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn_c32 159 160 %endif 160 161 BS3_SET_BITS 16 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPE32_16.asm
r60554 r60557 40 40 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 41 41 ; 42 %if TMPL_BITS == 16 43 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToPE32_16_Safe), function , 0 44 %endif 42 45 BS3_PROC_BEGIN_MODE Bs3SwitchToPE32_16, BS3_PBC_NEAR 43 46 %if TMPL_MODE == BS3_MODE_PE32_16 … … 103 106 %endif 104 107 BS3_PROC_END_MODE Bs3SwitchToPE32_16 108 109 %else 110 ;; 111 ; Safe far return to non-BS3TEXT16 code. 112 BS3_EXTERN_CMN Bs3SwitchHlpConvFlatRetToRetfProtMode 113 BS3_BEGIN_TEXT16 114 BS3_SET_BITS TMPL_BITS 115 BS3_PROC_BEGIN_MODE Bs3SwitchToPE32_16_Safe, BS3_PBC_NEAR 116 call Bs3SwitchHlpConvFlatRetToRetfProtMode ; Special internal function. Uses nothing, but modifies the stack. 117 call TMPL_NM(Bs3SwitchToPE32_16) 118 BS3_SET_BITS 16 119 retf 120 BS3_PROC_END_MODE Bs3SwitchToPE32_16_Safe 105 121 %endif 106 122 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPEV86.asm
r60554 r60557 40 40 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 41 41 ; 42 %if TMPL_BITS == 16 43 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToPEV86_Safe), function , 0 44 %endif 42 45 BS3_PROC_BEGIN_MODE Bs3SwitchToPEV86, BS3_PBC_NEAR 43 46 %if TMPL_MODE == BS3_MODE_PEV86 … … 89 92 %endif 90 93 BS3_PROC_END_MODE Bs3SwitchToPEV86 94 95 %else 96 ;; 97 ; Safe far return to non-BS3TEXT16 code. 98 BS3_EXTERN_CMN Bs3SwitchHlpConvFlatRetToRetfProtMode 99 BS3_BEGIN_TEXT16 100 BS3_SET_BITS TMPL_BITS 101 BS3_PROC_BEGIN_MODE Bs3SwitchToPEV86_Safe, BS3_PBC_NEAR 102 call Bs3SwitchHlpConvFlatRetToRetfProtMode ; Special internal function. Uses nothing, but modifies the stack. 103 call TMPL_NM(Bs3SwitchToPEV86) 104 BS3_SET_BITS 16 105 retf 106 BS3_PROC_END_MODE Bs3SwitchToPEV86_Safe 91 107 %endif 92 108 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPP16.asm
r60554 r60557 47 47 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 48 48 ; 49 %if TMPL_BITS == 16 50 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToPP16_Safe), function , 0 51 %endif 49 52 BS3_PROC_BEGIN_MODE Bs3SwitchToPP16, BS3_PBC_NEAR 50 53 %ifdef TMPL_PP16 … … 205 208 %endif 206 209 BS3_PROC_END_MODE Bs3SwitchToPP16 207 %endif 208 210 211 %else 212 ;; 213 ; Safe far return to non-BS3TEXT16 code. 214 BS3_EXTERN_CMN Bs3SwitchHlpConvFlatRetToRetfProtMode 215 BS3_BEGIN_TEXT16 216 BS3_SET_BITS TMPL_BITS 217 BS3_PROC_BEGIN_MODE Bs3SwitchToPP16_Safe, BS3_PBC_NEAR 218 call Bs3SwitchHlpConvFlatRetToRetfProtMode ; Special internal function. Uses nothing, but modifies the stack. 219 call TMPL_NM(Bs3SwitchToPP16) 220 BS3_SET_BITS 16 221 retf 222 BS3_PROC_END_MODE Bs3SwitchToPP16_Safe 223 %endif 224 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPP16_32.asm
r60554 r60557 40 40 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 41 41 ; 42 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToPP16_32_Safe), function, 0 42 43 BS3_PROC_BEGIN_MODE Bs3SwitchToPP16_32, BS3_PBC_NEAR 43 44 %ifdef TMPL_PP16_32 … … 92 93 ; Jmp to common code for the tedious conversion. 93 94 %if BS3_MODE_IS_RM_OR_V86(TMPL_MODE) 94 BS3_EXTERN_CMN Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn95 jmp Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn95 extern _Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn_c32 96 jmp _Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn_c32 96 97 %else 97 BS3_EXTERN_CMN Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn98 jmp Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn98 extern _Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn_c32 99 jmp _Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn_c32 99 100 %endif 100 101 BS3_SET_BITS 16 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPP16_V86.asm
r60554 r60557 40 40 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 41 41 ; 42 %if TMPL_BITS == 16 43 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToPP16_V86_Safe), function , 0 44 %endif 42 45 BS3_PROC_BEGIN_MODE Bs3SwitchToPP16_V86, BS3_PBC_NEAR 43 46 %ifdef TMPL_PP16_V86 … … 95 98 %endif 96 99 BS3_PROC_END_MODE Bs3SwitchToPP16_V86 100 101 %else 102 ;; 103 ; Safe far return to non-BS3TEXT16 code. 104 BS3_EXTERN_CMN Bs3SwitchHlpConvFlatRetToRetfProtMode 105 BS3_BEGIN_TEXT16 106 BS3_SET_BITS TMPL_BITS 107 BS3_PROC_BEGIN_MODE Bs3SwitchToPP16_V86_Safe, BS3_PBC_NEAR 108 call Bs3SwitchHlpConvFlatRetToRetfProtMode ; Special internal function. Uses nothing, but modifies the stack. 109 call TMPL_NM(Bs3SwitchToPP16_V86) 110 BS3_SET_BITS 16 111 retf 112 BS3_PROC_END_MODE Bs3SwitchToPP16_V86_Safe 97 113 %endif 98 114 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPP32.asm
r60554 r60557 42 42 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 43 43 ; 44 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToPP32_Safe), function, 0 44 45 BS3_PROC_BEGIN_MODE Bs3SwitchToPP32, BS3_PBC_NEAR 45 46 %ifdef TMPL_PP32 … … 182 183 ; Jmp to common code for the tedious conversion. 183 184 %if BS3_MODE_IS_RM_OR_V86(TMPL_MODE) 184 BS3_EXTERN_CMN Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn185 jmp Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn185 extern _Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn_c32 186 jmp _Bs3SwitchHlpConvRealModeRetfPopBpDecBpAndReturn_c32 186 187 %else 187 BS3_EXTERN_CMN Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn188 jmp Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn188 extern _Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn_c32 189 jmp _Bs3SwitchHlpConvProtModeRetfPopBpDecBpAndReturn_c32 189 190 %endif 190 191 BS3_SET_BITS 16 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPP32_16.asm
r60554 r60557 40 40 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 41 41 ; 42 %if TMPL_BITS == 16 43 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToPP32_16_Safe), function , 0 44 %endif 42 45 BS3_PROC_BEGIN_MODE Bs3SwitchToPP32_16, BS3_PBC_NEAR 43 46 %if TMPL_MODE == BS3_MODE_PP32_16 … … 103 106 %endif 104 107 BS3_PROC_END_MODE Bs3SwitchToPP32_16 108 109 %else 110 ;; 111 ; Safe far return to non-BS3TEXT16 code. 112 BS3_EXTERN_CMN Bs3SwitchHlpConvFlatRetToRetfProtMode 113 BS3_BEGIN_TEXT16 114 BS3_SET_BITS TMPL_BITS 115 BS3_PROC_BEGIN_MODE Bs3SwitchToPP32_16_Safe, BS3_PBC_NEAR 116 call Bs3SwitchHlpConvFlatRetToRetfProtMode ; Special internal function. Uses nothing, but modifies the stack. 117 call TMPL_NM(Bs3SwitchToPP32_16) 118 BS3_SET_BITS 16 119 retf 120 BS3_PROC_END_MODE Bs3SwitchToPP32_16_Safe 105 121 %endif 106 122 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPPV86.asm
r60554 r60557 40 40 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 41 41 ; 42 %if TMPL_BITS == 16 43 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToPPV86_Safe), function , 0 44 %endif 42 45 BS3_PROC_BEGIN_MODE Bs3SwitchToPPV86, BS3_PBC_NEAR 43 46 %if TMPL_MODE == BS3_MODE_PPV86 … … 89 92 %endif 90 93 BS3_PROC_END_MODE Bs3SwitchToPPV86 94 95 %else 96 ;; 97 ; Safe far return to non-BS3TEXT16 code. 98 BS3_EXTERN_CMN Bs3SwitchHlpConvFlatRetToRetfProtMode 99 BS3_BEGIN_TEXT16 100 BS3_SET_BITS TMPL_BITS 101 BS3_PROC_BEGIN_MODE Bs3SwitchToPPV86_Safe, BS3_PBC_NEAR 102 call Bs3SwitchHlpConvFlatRetToRetfProtMode ; Special internal function. Uses nothing, but modifies the stack. 103 call TMPL_NM(Bs3SwitchToPPV86) 104 BS3_SET_BITS 16 105 retf 106 BS3_PROC_END_MODE Bs3SwitchToPPV86_Safe 91 107 %endif 92 108 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToRM.asm
r60554 r60557 55 55 ; 56 56 ; @uses GPRs and EFLAGS are unchanged (except high 32-bit register (AMD64) parts). 57 ; CS is loaded with BS3TEXT16.57 ; CS is loaded with CGROUP16. 58 58 ; SS:[RE]SP is converted to real mode address. 59 59 ; DS and ES are loaded with BS3DATA16_GROUP. … … 65 65 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 66 66 ; 67 %if TMPL_BITS == 16 68 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToRM_Safe), function , 0 69 %endif 67 70 BS3_PROC_BEGIN_MODE Bs3SwitchToRM, BS3_PBC_NEAR 68 71 %ifdef TMPL_RM … … 265 268 and eax, X86_CR0_NO_PE_NO_PG 266 269 mov cr0, eax 267 jmp BS3TEXT16:.reload_cs270 jmp CGROUP16:.reload_cs 268 271 .reload_cs: 269 272 … … 361 364 %endif 362 365 BS3_PROC_END_MODE Bs3SwitchToRM 363 %endif 364 366 367 %else 368 ;; 369 ; Safe far return to non-BS3TEXT16 code. 370 BS3_EXTERN_CMN Bs3SelFlatCodeToRealMode 371 BS3_BEGIN_TEXT16 372 BS3_SET_BITS TMPL_BITS 373 BS3_PROC_BEGIN_MODE Bs3SwitchToRM_Safe, BS3_PBC_NEAR 374 %if TMPL_BITS == 64 375 push xAX 376 push xCX 377 sub xSP, 20h 378 379 mov xCX, [xSP + xCB*2 + 20h] 380 call Bs3SelFlatCodeToRealMode ; well behaved assembly function, only clobbers ecx 381 mov [xSP + xCB*2 + 20h + 4], eax 382 383 add xSP, 20h 384 pop xCX 385 pop xAX 386 add xSP, 4 387 %else 388 xchg eax, [xSP] 389 push xAX 390 call Bs3SelFlatCodeToRealMode ; well behaved assembly function, only clobbers eax 391 add xSP, 4 392 xchg [xSP], eax 393 %endif 394 call TMPL_NM(Bs3SwitchToRM) 395 BS3_SET_BITS 16 396 retf 397 BS3_PROC_END_MODE Bs3SwitchToRM_Safe 398 %endif 399 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-TestDoModes.c
r60554 r60557 31 31 * Header Files * 32 32 *********************************************************************************************************************************/ 33 #include "bs3kit-template-header.h" 34 #include "bs3-cmn-test.h" 33 #if defined(__WATCOMC__) && TMPL_MODE == BS3_MODE_RM 34 /* In real mode we move this blob of code to the RMTEXT16 segment to save space. */ 35 # define BS3_USE_RM_TEXT_SEG 1 36 # include "bs3kit-template-header.h" 37 # include "bs3-cmn-test.h" 38 # pragma code_seg("BS3RMTEXT16", "BS3CLASS16RMCODE") 39 #else 40 # include "bs3kit-template-header.h" 41 # include "bs3-cmn-test.h" 42 #endif 35 43 36 44 … … 63 71 * Assembly Symbols * 64 72 *********************************************************************************************************************************/ 65 BS3_DECL_FAR(uint8_t) TMPL_FAR_NM(Bs3TestCallDoerInRM)(uint32_t uCallbackFarPtr); 66 BS3_DECL_FAR(uint8_t) TMPL_FAR_NM(Bs3TestCallDoerInPE16)(uint32_t uCallbackFarPtr); 67 BS3_DECL_FAR(uint8_t) TMPL_FAR_NM(Bs3TestCallDoerInPE16_32)(uint32_t uFlatAddrCallback); 68 BS3_DECL_FAR(uint8_t) TMPL_FAR_NM(Bs3TestCallDoerInPE16_V86)(uint32_t uCallbackFarPtr); 69 BS3_DECL_FAR(uint8_t) TMPL_FAR_NM(Bs3TestCallDoerInPE32)(uint32_t uFlatAddrCallback); 70 BS3_DECL_FAR(uint8_t) TMPL_FAR_NM(Bs3TestCallDoerInPE32_16)(uint32_t uCallbackFarPtr); 71 BS3_DECL_FAR(uint8_t) TMPL_FAR_NM(Bs3TestCallDoerInPEV86)(uint32_t uCallbackFarPtr); 72 BS3_DECL_FAR(uint8_t) TMPL_FAR_NM(Bs3TestCallDoerInPP16)(uint32_t uCallbackFarPtr); 73 BS3_DECL_FAR(uint8_t) TMPL_FAR_NM(Bs3TestCallDoerInPP16_32)(uint32_t uFlatAddrCallback); 74 BS3_DECL_FAR(uint8_t) TMPL_FAR_NM(Bs3TestCallDoerInPP16_V86)(uint32_t uCallbackFarPtr); 75 BS3_DECL_FAR(uint8_t) TMPL_FAR_NM(Bs3TestCallDoerInPP32)(uint32_t uFlatAddrCallback); 76 BS3_DECL_FAR(uint8_t) TMPL_FAR_NM(Bs3TestCallDoerInPP32_16)(uint32_t uCallbackFarPtr); 77 BS3_DECL_FAR(uint8_t) TMPL_FAR_NM(Bs3TestCallDoerInPPV86)(uint32_t uCallbackFarPtr); 78 BS3_DECL_FAR(uint8_t) TMPL_FAR_NM(Bs3TestCallDoerInPAE16)(uint32_t uCallbackFarPtr); 79 BS3_DECL_FAR(uint8_t) TMPL_FAR_NM(Bs3TestCallDoerInPAE16_32)(uint32_t uFlatAddrCallback); 80 BS3_DECL_FAR(uint8_t) TMPL_FAR_NM(Bs3TestCallDoerInPAE16_V86)(uint32_t uCallbackFarPtr); 81 BS3_DECL_FAR(uint8_t) TMPL_FAR_NM(Bs3TestCallDoerInPAE32)(uint32_t uFlatAddrCallback); 82 BS3_DECL_FAR(uint8_t) TMPL_FAR_NM(Bs3TestCallDoerInPAE32_16)(uint32_t uCallbackFarPtr); 83 BS3_DECL_FAR(uint8_t) TMPL_FAR_NM(Bs3TestCallDoerInPAEV86)(uint32_t uCallbackFarPtr); 84 BS3_DECL_FAR(uint8_t) TMPL_FAR_NM(Bs3TestCallDoerInLM16)(uint32_t uCallbackFarPtr); 85 BS3_DECL_FAR(uint8_t) TMPL_FAR_NM(Bs3TestCallDoerInLM32)(uint32_t uFlatAddrCallback); 86 BS3_DECL_FAR(uint8_t) TMPL_FAR_NM(Bs3TestCallDoerInLM64)(uint32_t uFlatAddrCallback); 73 /* These are in the same code segment as this code, so no FAR necessary. */ 74 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInRM)(uint32_t uCallbackFarPtr); 75 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPE16)(uint32_t uCallbackFarPtr); 76 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPE16_32)(uint32_t uFlatAddrCallback); 77 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPE16_V86)(uint32_t uCallbackFarPtr); 78 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPE32)(uint32_t uFlatAddrCallback); 79 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPE32_16)(uint32_t uCallbackFarPtr); 80 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPEV86)(uint32_t uCallbackFarPtr); 81 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPP16)(uint32_t uCallbackFarPtr); 82 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPP16_32)(uint32_t uFlatAddrCallback); 83 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPP16_V86)(uint32_t uCallbackFarPtr); 84 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPP32)(uint32_t uFlatAddrCallback); 85 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPP32_16)(uint32_t uCallbackFarPtr); 86 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPPV86)(uint32_t uCallbackFarPtr); 87 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPAE16)(uint32_t uCallbackFarPtr); 88 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPAE16_32)(uint32_t uFlatAddrCallback); 89 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPAE16_V86)(uint32_t uCallbackFarPtr); 90 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPAE32)(uint32_t uFlatAddrCallback); 91 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPAE32_16)(uint32_t uCallbackFarPtr); 92 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInPAEV86)(uint32_t uCallbackFarPtr); 93 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInLM16)(uint32_t uCallbackFarPtr); 94 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInLM32)(uint32_t uFlatAddrCallback); 95 BS3_DECL_NEAR(uint8_t) TMPL_NM(Bs3TestCallDoerInLM64)(uint32_t uFlatAddrCallback); 87 96 88 97 … … 218 227 { 219 228 PRE_DO_CALL(g_szBs3ModeName_rm); 220 bErrNo = TMPL_ FAR_NM(Bs3TestCallDoerInRM)(CONV_TO_RM_FAR16(paEntries[i].pfnDoRM));229 bErrNo = TMPL_NM(Bs3TestCallDoerInRM)(CONV_TO_RM_FAR16(paEntries[i].pfnDoRM)); 221 230 CHECK_RESULT(g_szBs3ModeName_rm); 222 231 } … … 235 244 { 236 245 PRE_DO_CALL(g_szBs3ModeName_pe16); 237 bErrNo = TMPL_ FAR_NM(Bs3TestCallDoerInPE16)(CONV_TO_PROT_FAR16(paEntries[i].pfnDoPE16));246 bErrNo = TMPL_NM(Bs3TestCallDoerInPE16)(CONV_TO_PROT_FAR16(paEntries[i].pfnDoPE16)); 238 247 CHECK_RESULT(g_szBs3ModeName_pe16); 239 248 } … … 248 257 { 249 258 PRE_DO_CALL(g_szBs3ModeName_pe16_32); 250 bErrNo = TMPL_ FAR_NM(Bs3TestCallDoerInPE16_32)(CONV_TO_FLAT(paEntries[i].pfnDoPE16_32));259 bErrNo = TMPL_NM(Bs3TestCallDoerInPE16_32)(CONV_TO_FLAT(paEntries[i].pfnDoPE16_32)); 251 260 CHECK_RESULT(g_szBs3ModeName_pe16_32); 252 261 } … … 255 264 { 256 265 PRE_DO_CALL(g_szBs3ModeName_pe16_v86); 257 bErrNo = TMPL_ FAR_NM(Bs3TestCallDoerInPE16_V86)(CONV_TO_RM_FAR16(paEntries[i].pfnDoPE16_V86));266 bErrNo = TMPL_NM(Bs3TestCallDoerInPE16_V86)(CONV_TO_RM_FAR16(paEntries[i].pfnDoPE16_V86)); 258 267 CHECK_RESULT(g_szBs3ModeName_pe16_v86); 259 268 } … … 262 271 { 263 272 PRE_DO_CALL(g_szBs3ModeName_pe32); 264 bErrNo = TMPL_ FAR_NM(Bs3TestCallDoerInPE32)(CONV_TO_FLAT(paEntries[i].pfnDoPE32));273 bErrNo = TMPL_NM(Bs3TestCallDoerInPE32)(CONV_TO_FLAT(paEntries[i].pfnDoPE32)); 265 274 CHECK_RESULT(g_szBs3ModeName_pe32); 266 275 } … … 269 278 { 270 279 PRE_DO_CALL(g_szBs3ModeName_pe32_16); 271 bErrNo = TMPL_ FAR_NM(Bs3TestCallDoerInPE32_16)(CONV_TO_PROT_FAR16(paEntries[i].pfnDoPE32_16));280 bErrNo = TMPL_NM(Bs3TestCallDoerInPE32_16)(CONV_TO_PROT_FAR16(paEntries[i].pfnDoPE32_16)); 272 281 CHECK_RESULT(g_szBs3ModeName_pe32_16); 273 282 } … … 276 285 { 277 286 PRE_DO_CALL(g_szBs3ModeName_pev86); 278 bErrNo = TMPL_ FAR_NM(Bs3TestCallDoerInPEV86)(CONV_TO_RM_FAR16(paEntries[i].pfnDoPEV86));287 bErrNo = TMPL_NM(Bs3TestCallDoerInPEV86)(CONV_TO_RM_FAR16(paEntries[i].pfnDoPEV86)); 279 288 CHECK_RESULT(g_szBs3ModeName_pev86); 280 289 } … … 286 295 { 287 296 PRE_DO_CALL(g_szBs3ModeName_pp16); 288 bErrNo = TMPL_ FAR_NM(Bs3TestCallDoerInPP16)(CONV_TO_PROT_FAR16(paEntries[i].pfnDoPP16));297 bErrNo = TMPL_NM(Bs3TestCallDoerInPP16)(CONV_TO_PROT_FAR16(paEntries[i].pfnDoPP16)); 289 298 CHECK_RESULT(g_szBs3ModeName_pp16); 290 299 } … … 293 302 { 294 303 PRE_DO_CALL(g_szBs3ModeName_pp16_32); 295 bErrNo = TMPL_ FAR_NM(Bs3TestCallDoerInPP16_32)(CONV_TO_FLAT(paEntries[i].pfnDoPP16_32));304 bErrNo = TMPL_NM(Bs3TestCallDoerInPP16_32)(CONV_TO_FLAT(paEntries[i].pfnDoPP16_32)); 296 305 CHECK_RESULT(g_szBs3ModeName_pp16_32); 297 306 } … … 300 309 { 301 310 PRE_DO_CALL(g_szBs3ModeName_pp16_v86); 302 bErrNo = TMPL_ FAR_NM(Bs3TestCallDoerInPP16_V86)(CONV_TO_RM_FAR16(paEntries[i].pfnDoPP16_V86));311 bErrNo = TMPL_NM(Bs3TestCallDoerInPP16_V86)(CONV_TO_RM_FAR16(paEntries[i].pfnDoPP16_V86)); 303 312 CHECK_RESULT(g_szBs3ModeName_pp16_v86); 304 313 } … … 307 316 { 308 317 PRE_DO_CALL(g_szBs3ModeName_pp32); 309 bErrNo = TMPL_ FAR_NM(Bs3TestCallDoerInPP32)(CONV_TO_FLAT(paEntries[i].pfnDoPP32));318 bErrNo = TMPL_NM(Bs3TestCallDoerInPP32)(CONV_TO_FLAT(paEntries[i].pfnDoPP32)); 310 319 CHECK_RESULT(g_szBs3ModeName_pp32); 311 320 } … … 314 323 { 315 324 PRE_DO_CALL(g_szBs3ModeName_pp32_16); 316 bErrNo = TMPL_ FAR_NM(Bs3TestCallDoerInPP32_16)(CONV_TO_PROT_FAR16(paEntries[i].pfnDoPP32_16));325 bErrNo = TMPL_NM(Bs3TestCallDoerInPP32_16)(CONV_TO_PROT_FAR16(paEntries[i].pfnDoPP32_16)); 317 326 CHECK_RESULT(g_szBs3ModeName_pp32_16); 318 327 } … … 321 330 { 322 331 PRE_DO_CALL(g_szBs3ModeName_ppv86); 323 bErrNo = TMPL_ FAR_NM(Bs3TestCallDoerInPPV86)(CONV_TO_RM_FAR16(paEntries[i].pfnDoPPV86));332 bErrNo = TMPL_NM(Bs3TestCallDoerInPPV86)(CONV_TO_RM_FAR16(paEntries[i].pfnDoPPV86)); 324 333 CHECK_RESULT(g_szBs3ModeName_ppv86); 325 334 } … … 338 347 { 339 348 PRE_DO_CALL(g_szBs3ModeName_pae16); 340 bErrNo = TMPL_ FAR_NM(Bs3TestCallDoerInPAE16)(CONV_TO_PROT_FAR16(paEntries[i].pfnDoPAE16));349 bErrNo = TMPL_NM(Bs3TestCallDoerInPAE16)(CONV_TO_PROT_FAR16(paEntries[i].pfnDoPAE16)); 341 350 CHECK_RESULT(g_szBs3ModeName_pae16); 342 351 } … … 345 354 { 346 355 PRE_DO_CALL(g_szBs3ModeName_pae16_32); 347 bErrNo = TMPL_ FAR_NM(Bs3TestCallDoerInPAE16_32)(CONV_TO_FLAT(paEntries[i].pfnDoPAE16_32));356 bErrNo = TMPL_NM(Bs3TestCallDoerInPAE16_32)(CONV_TO_FLAT(paEntries[i].pfnDoPAE16_32)); 348 357 CHECK_RESULT(g_szBs3ModeName_pae16_32); 349 358 } … … 352 361 { 353 362 PRE_DO_CALL(g_szBs3ModeName_pae16_v86); 354 bErrNo = TMPL_ FAR_NM(Bs3TestCallDoerInPAE16_V86)(CONV_TO_RM_FAR16(paEntries[i].pfnDoPAE16_V86));363 bErrNo = TMPL_NM(Bs3TestCallDoerInPAE16_V86)(CONV_TO_RM_FAR16(paEntries[i].pfnDoPAE16_V86)); 355 364 CHECK_RESULT(g_szBs3ModeName_pae16_v86); 356 365 } … … 359 368 { 360 369 PRE_DO_CALL(g_szBs3ModeName_pae32); 361 bErrNo = TMPL_ FAR_NM(Bs3TestCallDoerInPAE32)(CONV_TO_FLAT(paEntries[i].pfnDoPAE32));370 bErrNo = TMPL_NM(Bs3TestCallDoerInPAE32)(CONV_TO_FLAT(paEntries[i].pfnDoPAE32)); 362 371 CHECK_RESULT(g_szBs3ModeName_pae32); 363 372 } … … 366 375 { 367 376 PRE_DO_CALL(g_szBs3ModeName_pae32_16); 368 bErrNo = TMPL_ FAR_NM(Bs3TestCallDoerInPAE32_16)(CONV_TO_PROT_FAR16(paEntries[i].pfnDoPAE32_16));377 bErrNo = TMPL_NM(Bs3TestCallDoerInPAE32_16)(CONV_TO_PROT_FAR16(paEntries[i].pfnDoPAE32_16)); 369 378 CHECK_RESULT(g_szBs3ModeName_pae32_16); 370 379 } … … 373 382 { 374 383 PRE_DO_CALL(g_szBs3ModeName_paev86); 375 bErrNo = TMPL_ FAR_NM(Bs3TestCallDoerInPAEV86)(CONV_TO_RM_FAR16(paEntries[i].pfnDoPAEV86));384 bErrNo = TMPL_NM(Bs3TestCallDoerInPAEV86)(CONV_TO_RM_FAR16(paEntries[i].pfnDoPAEV86)); 376 385 CHECK_RESULT(g_szBs3ModeName_paev86); 377 386 } … … 390 399 { 391 400 PRE_DO_CALL(g_szBs3ModeName_lm16); 392 bErrNo = TMPL_ FAR_NM(Bs3TestCallDoerInLM16)(CONV_TO_PROT_FAR16(paEntries[i].pfnDoLM16));401 bErrNo = TMPL_NM(Bs3TestCallDoerInLM16)(CONV_TO_PROT_FAR16(paEntries[i].pfnDoLM16)); 393 402 CHECK_RESULT(g_szBs3ModeName_lm16); 394 403 } … … 397 406 { 398 407 PRE_DO_CALL(g_szBs3ModeName_lm32); 399 bErrNo = TMPL_ FAR_NM(Bs3TestCallDoerInLM32)(CONV_TO_FLAT(paEntries[i].pfnDoLM32));408 bErrNo = TMPL_NM(Bs3TestCallDoerInLM32)(CONV_TO_FLAT(paEntries[i].pfnDoLM32)); 400 409 CHECK_RESULT(g_szBs3ModeName_lm32); 401 410 } … … 404 413 { 405 414 PRE_DO_CALL(g_szBs3ModeName_lm64); 406 bErrNo = TMPL_ FAR_NM(Bs3TestCallDoerInLM64)(CONV_TO_FLAT(paEntries[i].pfnDoLM64));415 bErrNo = TMPL_NM(Bs3TestCallDoerInLM64)(CONV_TO_FLAT(paEntries[i].pfnDoLM64)); 407 416 CHECK_RESULT(g_szBs3ModeName_lm64); 408 417 } -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-TestDoModesHlp.asm
r60554 r60557 25 25 ; 26 26 27 ;********************************************************************************************************************************* 28 ;* Header Files * 29 ;********************************************************************************************************************************* 27 30 %include "bs3kit-template-header.mac" 31 32 33 ;********************************************************************************************************************************* 34 ;* Defined Constants And Macros * 35 ;********************************************************************************************************************************* 36 ; 37 ; We put most of this mess in the RMTEXT16 segment when in real mode. 38 ; 39 %if TMPL_MODE == BS3_MODE_RM 40 %define MY_BEGIN_TEXT BS3_BEGIN_RMTEXT16 41 %define MY_BEGIN_TEXT16 BS3_BEGIN_RMTEXT16 42 %else 43 %define MY_BEGIN_TEXT TMPL_BEGIN_TEXT 44 %define MY_BEGIN_TEXT16 BS3_BEGIN_TEXT16 45 %endif 28 46 29 47 … … 31 49 ;* External Symbols * 32 50 ;********************************************************************************************************************************* 51 %if TMPL_MODE == BS3_MODE_RM 52 BS3_BEGIN_TEXT16_FARSTUBS 53 extern TMPL_FAR_NM(Bs3SwitchToRM) 54 extern TMPL_FAR_NM(Bs3SwitchToPE16) 55 extern TMPL_FAR_NM(Bs3SwitchToPE16_32) 56 extern TMPL_FAR_NM(Bs3SwitchToPE16_V86) 57 extern TMPL_FAR_NM(Bs3SwitchToPE32) 58 extern TMPL_FAR_NM(Bs3SwitchToPE32_16) 59 extern TMPL_FAR_NM(Bs3SwitchToPEV86) 60 extern TMPL_FAR_NM(Bs3SwitchToPP16) 61 extern TMPL_FAR_NM(Bs3SwitchToPP16_32) 62 extern TMPL_FAR_NM(Bs3SwitchToPP16_V86) 63 extern TMPL_FAR_NM(Bs3SwitchToPP32) 64 extern TMPL_FAR_NM(Bs3SwitchToPP32_16) 65 extern TMPL_FAR_NM(Bs3SwitchToPPV86) 66 extern TMPL_FAR_NM(Bs3SwitchToPAE16) 67 extern TMPL_FAR_NM(Bs3SwitchToPAE16_32) 68 extern TMPL_FAR_NM(Bs3SwitchToPAE16_V86) 69 extern TMPL_FAR_NM(Bs3SwitchToPAE32) 70 extern TMPL_FAR_NM(Bs3SwitchToPAE32_16) 71 extern TMPL_FAR_NM(Bs3SwitchToPAEV86) 72 extern TMPL_FAR_NM(Bs3SwitchToLM16) 73 extern TMPL_FAR_NM(Bs3SwitchToLM32) 74 extern TMPL_FAR_NM(Bs3SwitchToLM64) 75 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_rm_far) 76 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pe16_far) 77 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pe16_v86_far) 78 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pe32_16_far) 79 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pev86_far) 80 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pp16_far) 81 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pp16_v86_far) 82 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pp32_16_far) 83 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_ppv86_far) 84 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pae16_far) 85 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pae16_v86_far) 86 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pae32_16_far) 87 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_paev86_far) 88 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_lm16_far) 89 %else 90 BS3_BEGIN_TEXT16 33 91 extern TMPL_NM(Bs3SwitchToRM) 34 92 extern TMPL_NM(Bs3SwitchToPE16) … … 53 111 extern TMPL_NM(Bs3SwitchToLM32) 54 112 extern TMPL_NM(Bs3SwitchToLM64) 55 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_rm) 56 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pe16) 57 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pe16_32) 58 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pe16_v86) 59 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pe32) 60 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pe32_16) 61 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pev86) 62 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pp16) 63 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pp16_32) 64 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pp16_v86) 65 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pp32) 66 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pp32_16) 67 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_ppv86) 68 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pae16) 69 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pae16_32) 70 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pae16_v86) 71 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pae32) 72 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pae32_16) 73 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_paev86) 74 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_lm16) 75 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_lm32) 76 extern RT_CONCAT3(Bs3SwitchTo,TMPL_MODE_UNAME,_lm64) 77 113 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_rm) 114 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pe16) 115 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pe16_v86) 116 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pe32_16) 117 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pev86) 118 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pp16) 119 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pp16_v86) 120 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pp32_16) 121 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_ppv86) 122 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pae16) 123 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pae16_v86) 124 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pae32_16) 125 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_paev86) 126 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_lm16) 127 %endif 128 BS3_BEGIN_TEXT16 129 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pe16_32):wrt BS3FLAT 130 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pe32):wrt BS3FLAT 131 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pp16_32):wrt BS3FLAT 132 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pp32):wrt BS3FLAT 133 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pae16_32):wrt BS3FLAT 134 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pae32):wrt BS3FLAT 135 extern RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_lm32):wrt BS3FLAT 136 extern RT_CONCAT3(Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_lm64):wrt BS3FLAT 137 138 139 140 MY_BEGIN_TEXT 78 141 79 142 ;; … … 154 217 xPOPF 155 218 pop xBP 156 %if TMPL_BITS == 16157 retf158 %else159 219 ret 160 %endif161 220 162 221 ; … … 217 276 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInRM(uint16_t offBs3Text16); 218 277 ; @uses rax 219 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInRM, BS3_PBC_ FAR220 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 221 jmp TMPL_NM(bs3TestCallDoerPrologue) 222 BS3_BEGIN_TEXT16278 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInRM, BS3_PBC_NEAR 279 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 280 jmp TMPL_NM(bs3TestCallDoerPrologue) 281 MY_BEGIN_TEXT16 223 282 BS3_SET_BITS TMPL_BITS 224 283 .doit: … … 228 287 ; Mode switch, make the call, switch back. 229 288 STRICT_SAVE_REGS 289 %if TMPL_MODE == BS3_MODE_RM 290 call far TMPL_FAR_NM(Bs3SwitchToRM) 291 %else 230 292 call TMPL_NM(Bs3SwitchToRM) 293 %endif 231 294 BS3_SET_BITS 16 232 295 STRICT_CHECK_REGS … … 243 306 244 307 STRICT_SAVE_REGS 245 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_rm) 246 BS3_SET_BITS TMPL_BITS 247 STRICT_CHECK_REGS 248 jmp TMPL_NM(bs3TestCallDoerEpilogue) 249 TMPL_BEGIN_TEXT 308 %if TMPL_MODE == BS3_MODE_RM 309 call far RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_rm_far) 310 %else 311 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_rm) 312 %endif 313 BS3_SET_BITS TMPL_BITS 314 STRICT_CHECK_REGS 315 jmp TMPL_NM(bs3TestCallDoerEpilogue) 316 MY_BEGIN_TEXT 250 317 BS3_PROC_END_MODE Bs3TestCallDoerInRM 251 318 … … 258 325 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPE16(uint16_t offBs3Text16); 259 326 ; @uses rax 260 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPE16, BS3_PBC_ FAR261 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 262 jmp TMPL_NM(bs3TestCallDoerPrologue) 263 BS3_BEGIN_TEXT16327 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPE16, BS3_PBC_NEAR 328 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 329 jmp TMPL_NM(bs3TestCallDoerPrologue) 330 MY_BEGIN_TEXT16 264 331 BS3_SET_BITS TMPL_BITS 265 332 .doit: … … 269 336 ; Mode switch, make the call, switch back. 270 337 STRICT_SAVE_REGS 338 %if TMPL_MODE == BS3_MODE_RM 339 call far TMPL_FAR_NM(Bs3SwitchToPE16) 340 %else 271 341 call TMPL_NM(Bs3SwitchToPE16) 342 %endif 272 343 BS3_SET_BITS 16 273 344 STRICT_CHECK_REGS … … 282 353 283 354 STRICT_SAVE_REGS 284 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pe16) 285 BS3_SET_BITS TMPL_BITS 286 jmp TMPL_NM(bs3TestCallDoerEpilogue) 287 TMPL_BEGIN_TEXT 355 %if TMPL_MODE == BS3_MODE_RM 356 call far RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pe16_far) 357 %else 358 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pe16) 359 %endif 360 BS3_SET_BITS TMPL_BITS 361 jmp TMPL_NM(bs3TestCallDoerEpilogue) 362 MY_BEGIN_TEXT 288 363 BS3_PROC_END_MODE Bs3TestCallDoerInPE16 289 364 … … 291 366 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPE16_32(uint16_t offBs3Text16); 292 367 ; @uses rax 293 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPE16_32, BS3_PBC_ FAR368 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPE16_32, BS3_PBC_NEAR 294 369 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 295 370 jmp TMPL_NM(bs3TestCallDoerPrologue) … … 299 374 ; Mode switch, make the call, switch back. 300 375 STRICT_SAVE_REGS 376 %if TMPL_MODE == BS3_MODE_RM 377 call far TMPL_FAR_NM(Bs3SwitchToPE16_32) 378 %else 301 379 call TMPL_NM(Bs3SwitchToPE16_32) 380 %endif 302 381 BS3_SET_BITS 32 303 382 STRICT_CHECK_REGS … … 307 386 308 387 STRICT_SAVE_REGS 309 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_ pe16_32)388 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pe16_32) 310 389 BS3_SET_BITS TMPL_BITS 311 390 STRICT_CHECK_REGS … … 316 395 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPE16_V86(uint16_t offBs3Text16); 317 396 ; @uses rax 318 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPE16_V86, BS3_PBC_FAR 319 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 320 jmp TMPL_NM(bs3TestCallDoerPrologue) 321 .doit: 322 mov ax, [xBP + xCB + cbCurRetAddr] ; Load far function pointer. 323 mov dx, [xBP + xCB + cbCurRetAddr + 2] 324 325 ; Mode switch, make the call, switch back. 326 STRICT_SAVE_REGS 397 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPE16_V86, BS3_PBC_NEAR 398 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 399 jmp TMPL_NM(bs3TestCallDoerPrologue) 400 .doit: 401 mov ax, [xBP + xCB + cbCurRetAddr] ; Load far function pointer. 402 mov dx, [xBP + xCB + cbCurRetAddr + 2] 403 404 ; Mode switch, make the call, switch back. 405 STRICT_SAVE_REGS 406 %if TMPL_MODE == BS3_MODE_RM 407 call far TMPL_FAR_NM(Bs3SwitchToPE16_V86) 408 %else 327 409 call TMPL_NM(Bs3SwitchToPE16_V86) 410 %endif 328 411 BS3_SET_BITS 16 329 412 STRICT_CHECK_REGS … … 338 421 339 422 STRICT_SAVE_REGS 340 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pe16_v86) 423 %if TMPL_MODE == BS3_MODE_RM 424 call far RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pe16_v86_far) 425 %else 426 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pe16_v86) 427 %endif 341 428 BS3_SET_BITS TMPL_BITS 342 429 STRICT_CHECK_REGS … … 347 434 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPE32(uint16_t offBs3Text16); 348 435 ; @uses rax 349 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPE32, BS3_PBC_ FAR436 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPE32, BS3_PBC_NEAR 350 437 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 351 438 jmp TMPL_NM(bs3TestCallDoerPrologue) … … 355 442 ; Mode switch, make the call, switch back. 356 443 STRICT_SAVE_REGS 444 %if TMPL_MODE == BS3_MODE_RM 445 call far TMPL_FAR_NM(Bs3SwitchToPE32) 446 %else 357 447 call TMPL_NM(Bs3SwitchToPE32) 448 %endif 358 449 BS3_SET_BITS 32 359 450 STRICT_CHECK_REGS … … 363 454 364 455 STRICT_SAVE_REGS 365 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_ pe32)456 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pe32) 366 457 BS3_SET_BITS TMPL_BITS 367 458 STRICT_CHECK_REGS … … 372 463 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPE32_16(uint16_t offBs3Text16); 373 464 ; @uses rax 374 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPE32_16, BS3_PBC_ FAR375 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 376 jmp TMPL_NM(bs3TestCallDoerPrologue) 377 BS3_BEGIN_TEXT16465 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPE32_16, BS3_PBC_NEAR 466 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 467 jmp TMPL_NM(bs3TestCallDoerPrologue) 468 MY_BEGIN_TEXT16 378 469 BS3_SET_BITS TMPL_BITS 379 470 .doit: … … 383 474 ; Mode switch, make the call, switch back. 384 475 STRICT_SAVE_REGS 476 %if TMPL_MODE == BS3_MODE_RM 477 call far TMPL_FAR_NM(Bs3SwitchToPE32_16) 478 %else 385 479 call TMPL_NM(Bs3SwitchToPE32_16) 480 %endif 386 481 BS3_SET_BITS 16 387 482 STRICT_CHECK_REGS … … 396 491 397 492 STRICT_SAVE_REGS 398 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pe32_16) 399 BS3_SET_BITS TMPL_BITS 400 STRICT_CHECK_REGS 401 jmp TMPL_NM(bs3TestCallDoerEpilogue) 402 TMPL_BEGIN_TEXT 493 %if TMPL_MODE == BS3_MODE_RM 494 call far RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pe32_16_far) 495 %else 496 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pe32_16) 497 %endif 498 BS3_SET_BITS TMPL_BITS 499 STRICT_CHECK_REGS 500 jmp TMPL_NM(bs3TestCallDoerEpilogue) 501 MY_BEGIN_TEXT 403 502 BS3_PROC_END_MODE Bs3TestCallDoerInPE32_16 404 503 … … 406 505 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPEV86(uint16_t offBs3Text16); 407 506 ; @uses rax 408 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPEV86, BS3_PBC_ FAR409 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 410 jmp TMPL_NM(bs3TestCallDoerPrologue) 411 BS3_BEGIN_TEXT16507 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPEV86, BS3_PBC_NEAR 508 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 509 jmp TMPL_NM(bs3TestCallDoerPrologue) 510 MY_BEGIN_TEXT16 412 511 BS3_SET_BITS TMPL_BITS 413 512 .doit: … … 417 516 ; Mode switch, make the call, switch back. 418 517 STRICT_SAVE_REGS 518 %if TMPL_MODE == BS3_MODE_RM 519 call far TMPL_FAR_NM(Bs3SwitchToPEV86) 520 %else 419 521 call TMPL_NM(Bs3SwitchToPEV86) 522 %endif 420 523 BS3_SET_BITS 16 421 524 STRICT_CHECK_REGS … … 430 533 431 534 STRICT_SAVE_REGS 432 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pev86) 433 BS3_SET_BITS TMPL_BITS 434 STRICT_CHECK_REGS 435 jmp TMPL_NM(bs3TestCallDoerEpilogue) 436 TMPL_BEGIN_TEXT 535 %if TMPL_MODE == BS3_MODE_RM 536 call far RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pev86_far) 537 %else 538 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pev86) 539 %endif 540 BS3_SET_BITS TMPL_BITS 541 STRICT_CHECK_REGS 542 jmp TMPL_NM(bs3TestCallDoerEpilogue) 543 MY_BEGIN_TEXT 437 544 BS3_PROC_END_MODE Bs3TestCallDoerInPEV86 438 545 … … 446 553 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPP16(uint16_t offBs3Text16); 447 554 ; @uses rax 448 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPP16, BS3_PBC_ FAR449 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 450 jmp TMPL_NM(bs3TestCallDoerPrologue) 451 BS3_BEGIN_TEXT16555 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPP16, BS3_PBC_NEAR 556 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 557 jmp TMPL_NM(bs3TestCallDoerPrologue) 558 MY_BEGIN_TEXT16 452 559 BS3_SET_BITS TMPL_BITS 453 560 .doit: … … 457 564 ; Mode switch, make the call, switch back. 458 565 STRICT_SAVE_REGS 566 %if TMPL_MODE == BS3_MODE_RM 567 call far TMPL_FAR_NM(Bs3SwitchToPP16) 568 %else 459 569 call TMPL_NM(Bs3SwitchToPP16) 570 %endif 460 571 BS3_SET_BITS 16 461 572 STRICT_CHECK_REGS … … 470 581 471 582 STRICT_SAVE_REGS 472 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pp16) 473 BS3_SET_BITS TMPL_BITS 474 STRICT_CHECK_REGS 475 jmp TMPL_NM(bs3TestCallDoerEpilogue) 476 TMPL_BEGIN_TEXT 583 %if TMPL_MODE == BS3_MODE_RM 584 call far RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pp16_far) 585 %else 586 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pp16) 587 %endif 588 BS3_SET_BITS TMPL_BITS 589 STRICT_CHECK_REGS 590 jmp TMPL_NM(bs3TestCallDoerEpilogue) 591 MY_BEGIN_TEXT 477 592 BS3_PROC_END_MODE Bs3TestCallDoerInPP16 478 593 … … 480 595 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPP16_32(uint16_t offBs3Text16); 481 596 ; @uses rax 482 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPP16_32, BS3_PBC_ FAR597 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPP16_32, BS3_PBC_NEAR 483 598 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 484 599 jmp TMPL_NM(bs3TestCallDoerPrologue) … … 488 603 ; Mode switch, make the call, switch back. 489 604 STRICT_SAVE_REGS 605 %if TMPL_MODE == BS3_MODE_RM 606 call far TMPL_FAR_NM(Bs3SwitchToPP16_32) 607 %else 490 608 call TMPL_NM(Bs3SwitchToPP16_32) 609 %endif 491 610 BS3_SET_BITS 32 492 611 STRICT_CHECK_REGS … … 496 615 497 616 STRICT_SAVE_REGS 498 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_ pp16_32)617 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pp16_32) 499 618 BS3_SET_BITS TMPL_BITS 500 619 STRICT_CHECK_REGS … … 505 624 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPP16_V86(uint16_t offBs3Text16); 506 625 ; @uses rax 507 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPP16_V86, BS3_PBC_FAR 508 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 509 jmp TMPL_NM(bs3TestCallDoerPrologue) 510 .doit: 511 mov ax, [xBP + xCB + cbCurRetAddr] ; Load far function pointer. 512 mov dx, [xBP + xCB + cbCurRetAddr + 2] 513 514 ; Mode switch, make the call, switch back. 515 STRICT_SAVE_REGS 626 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPP16_V86, BS3_PBC_NEAR 627 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 628 jmp TMPL_NM(bs3TestCallDoerPrologue) 629 .doit: 630 mov ax, [xBP + xCB + cbCurRetAddr] ; Load far function pointer. 631 mov dx, [xBP + xCB + cbCurRetAddr + 2] 632 633 ; Mode switch, make the call, switch back. 634 STRICT_SAVE_REGS 635 %if TMPL_MODE == BS3_MODE_RM 636 call far TMPL_FAR_NM(Bs3SwitchToPP16_V86) 637 %else 516 638 call TMPL_NM(Bs3SwitchToPP16_V86) 639 %endif 517 640 BS3_SET_BITS 16 518 641 STRICT_CHECK_REGS … … 527 650 528 651 STRICT_SAVE_REGS 529 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pp16_v86) 652 %if TMPL_MODE == BS3_MODE_RM 653 call far RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pp16_v86_far) 654 %else 655 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pp16_v86) 656 %endif 530 657 BS3_SET_BITS TMPL_BITS 531 658 STRICT_CHECK_REGS … … 536 663 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPP32(uint16_t offBs3Text16); 537 664 ; @uses rax 538 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPP32, BS3_PBC_ FAR665 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPP32, BS3_PBC_NEAR 539 666 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 540 667 jmp TMPL_NM(bs3TestCallDoerPrologue) … … 544 671 ; Mode switch, make the call, switch back. 545 672 STRICT_SAVE_REGS 673 %if TMPL_MODE == BS3_MODE_RM 674 call far TMPL_FAR_NM(Bs3SwitchToPP32) 675 %else 546 676 call TMPL_NM(Bs3SwitchToPP32) 677 %endif 547 678 BS3_SET_BITS 32 548 679 STRICT_CHECK_REGS … … 552 683 553 684 STRICT_SAVE_REGS 554 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_ pp32)685 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pp32) 555 686 BS3_SET_BITS TMPL_BITS 556 687 STRICT_CHECK_REGS … … 561 692 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPP32_16(uint16_t offBs3Text16); 562 693 ; @uses rax 563 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPP32_16, BS3_PBC_ FAR564 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 565 jmp TMPL_NM(bs3TestCallDoerPrologue) 566 BS3_BEGIN_TEXT16694 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPP32_16, BS3_PBC_NEAR 695 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 696 jmp TMPL_NM(bs3TestCallDoerPrologue) 697 MY_BEGIN_TEXT16 567 698 BS3_SET_BITS TMPL_BITS 568 699 .doit: … … 572 703 ; Mode switch, make the call, switch back. 573 704 STRICT_SAVE_REGS 705 %if TMPL_MODE == BS3_MODE_RM 706 call far TMPL_FAR_NM(Bs3SwitchToPP32_16) 707 %else 574 708 call TMPL_NM(Bs3SwitchToPP32_16) 709 %endif 575 710 BS3_SET_BITS 16 576 711 STRICT_CHECK_REGS … … 585 720 586 721 STRICT_SAVE_REGS 587 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pp32_16) 588 BS3_SET_BITS TMPL_BITS 589 STRICT_CHECK_REGS 590 jmp TMPL_NM(bs3TestCallDoerEpilogue) 591 TMPL_BEGIN_TEXT 722 %if TMPL_MODE == BS3_MODE_RM 723 call far RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pp32_16_far) 724 %else 725 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pp32_16) 726 %endif 727 BS3_SET_BITS TMPL_BITS 728 STRICT_CHECK_REGS 729 jmp TMPL_NM(bs3TestCallDoerEpilogue) 730 MY_BEGIN_TEXT 592 731 BS3_PROC_END_MODE Bs3TestCallDoerInPP32_16 593 732 … … 595 734 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPPV86(uint16_t offBs3Text16); 596 735 ; @uses rax 597 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPPV86, BS3_PBC_ FAR598 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 599 jmp TMPL_NM(bs3TestCallDoerPrologue) 600 BS3_BEGIN_TEXT16736 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPPV86, BS3_PBC_NEAR 737 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 738 jmp TMPL_NM(bs3TestCallDoerPrologue) 739 MY_BEGIN_TEXT16 601 740 BS3_SET_BITS TMPL_BITS 602 741 .doit: … … 606 745 ; Mode switch, make the call, switch back. 607 746 STRICT_SAVE_REGS 747 %if TMPL_MODE == BS3_MODE_RM 748 call far TMPL_FAR_NM(Bs3SwitchToPPV86) 749 %else 608 750 call TMPL_NM(Bs3SwitchToPPV86) 751 %endif 609 752 BS3_SET_BITS 16 610 753 STRICT_CHECK_REGS … … 619 762 620 763 STRICT_SAVE_REGS 621 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_ppv86) 622 BS3_SET_BITS TMPL_BITS 623 STRICT_CHECK_REGS 624 jmp TMPL_NM(bs3TestCallDoerEpilogue) 625 TMPL_BEGIN_TEXT 764 %if TMPL_MODE == BS3_MODE_RM 765 call far RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_ppv86_far) 766 %else 767 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_ppv86) 768 %endif 769 BS3_SET_BITS TMPL_BITS 770 STRICT_CHECK_REGS 771 jmp TMPL_NM(bs3TestCallDoerEpilogue) 772 MY_BEGIN_TEXT 626 773 BS3_PROC_END_MODE Bs3TestCallDoerInPPV86 627 774 … … 635 782 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPAE16(uint16_t offBs3Text16); 636 783 ; @uses rax 637 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPAE16, BS3_PBC_ FAR638 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 639 jmp TMPL_NM(bs3TestCallDoerPrologue) 640 BS3_BEGIN_TEXT16784 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPAE16, BS3_PBC_NEAR 785 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 786 jmp TMPL_NM(bs3TestCallDoerPrologue) 787 MY_BEGIN_TEXT16 641 788 BS3_SET_BITS TMPL_BITS 642 789 .doit: … … 646 793 ; Mode switch, make the call, switch back. 647 794 STRICT_SAVE_REGS 795 %if TMPL_MODE == BS3_MODE_RM 796 call far TMPL_FAR_NM(Bs3SwitchToPAE16) 797 %else 648 798 call TMPL_NM(Bs3SwitchToPAE16) 799 %endif 649 800 BS3_SET_BITS 16 650 801 STRICT_CHECK_REGS … … 659 810 660 811 STRICT_SAVE_REGS 661 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pae16) 662 BS3_SET_BITS TMPL_BITS 663 STRICT_CHECK_REGS 664 jmp TMPL_NM(bs3TestCallDoerEpilogue) 665 TMPL_BEGIN_TEXT 812 %if TMPL_MODE == BS3_MODE_RM 813 call far RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pae16_far) 814 %else 815 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pae16) 816 %endif 817 BS3_SET_BITS TMPL_BITS 818 STRICT_CHECK_REGS 819 jmp TMPL_NM(bs3TestCallDoerEpilogue) 820 MY_BEGIN_TEXT 666 821 BS3_PROC_END_MODE Bs3TestCallDoerInPAE16 667 822 … … 669 824 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPAE16_32(uint16_t offBs3Text16); 670 825 ; @uses rax 671 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPAE16_32, BS3_PBC_ FAR826 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPAE16_32, BS3_PBC_NEAR 672 827 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 673 828 jmp TMPL_NM(bs3TestCallDoerPrologue) … … 677 832 ; Mode switch, make the call, switch back. 678 833 STRICT_SAVE_REGS 834 %if TMPL_MODE == BS3_MODE_RM 835 call far TMPL_FAR_NM(Bs3SwitchToPAE16_32) 836 %else 679 837 call TMPL_NM(Bs3SwitchToPAE16_32) 838 %endif 680 839 BS3_SET_BITS 32 681 840 STRICT_CHECK_REGS … … 685 844 686 845 STRICT_SAVE_REGS 687 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_ pae16_32)846 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pae16_32) 688 847 BS3_SET_BITS TMPL_BITS 689 848 STRICT_CHECK_REGS … … 694 853 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPAE16_V86(uint16_t offBs3Text16); 695 854 ; @uses rax 696 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPAE16_V86, BS3_PBC_FAR 697 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 698 jmp TMPL_NM(bs3TestCallDoerPrologue) 699 .doit: 700 mov ax, [xBP + xCB + cbCurRetAddr] ; Load far function pointer. 701 mov dx, [xBP + xCB + cbCurRetAddr + 2] 702 703 ; Mode switch, make the call, switch back. 704 STRICT_SAVE_REGS 855 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPAE16_V86, BS3_PBC_NEAR 856 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 857 jmp TMPL_NM(bs3TestCallDoerPrologue) 858 .doit: 859 mov ax, [xBP + xCB + cbCurRetAddr] ; Load far function pointer. 860 mov dx, [xBP + xCB + cbCurRetAddr + 2] 861 862 ; Mode switch, make the call, switch back. 863 STRICT_SAVE_REGS 864 %if TMPL_MODE == BS3_MODE_RM 865 call far TMPL_FAR_NM(Bs3SwitchToPAE16_V86) 866 %else 705 867 call TMPL_NM(Bs3SwitchToPAE16_V86) 868 %endif 706 869 BS3_SET_BITS 16 707 870 STRICT_CHECK_REGS … … 716 879 717 880 STRICT_SAVE_REGS 718 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pae16_v86) 881 %if TMPL_MODE == BS3_MODE_RM 882 call far RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pae16_v86_far) 883 %else 884 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pae16_v86) 885 %endif 719 886 BS3_SET_BITS TMPL_BITS 720 887 STRICT_CHECK_REGS … … 725 892 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPAE32(uint16_t offBs3Text16); 726 893 ; @uses rax 727 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPAE32, BS3_PBC_ FAR894 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPAE32, BS3_PBC_NEAR 728 895 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 729 896 jmp TMPL_NM(bs3TestCallDoerPrologue) … … 733 900 ; Mode switch, make the call, switch back. 734 901 STRICT_SAVE_REGS 902 %if TMPL_MODE == BS3_MODE_RM 903 call far TMPL_FAR_NM(Bs3SwitchToPAE32) 904 %else 735 905 call TMPL_NM(Bs3SwitchToPAE32) 906 %endif 736 907 BS3_SET_BITS 32 737 908 STRICT_CHECK_REGS … … 741 912 742 913 STRICT_SAVE_REGS 743 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_ pae32)914 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pae32) 744 915 BS3_SET_BITS TMPL_BITS 745 916 STRICT_CHECK_REGS … … 750 921 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPAE32_16(uint16_t offBs3Text16); 751 922 ; @uses rax 752 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPAE32_16, BS3_PBC_ FAR753 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 754 jmp TMPL_NM(bs3TestCallDoerPrologue) 755 BS3_BEGIN_TEXT16923 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPAE32_16, BS3_PBC_NEAR 924 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 925 jmp TMPL_NM(bs3TestCallDoerPrologue) 926 MY_BEGIN_TEXT16 756 927 BS3_SET_BITS TMPL_BITS 757 928 .doit: … … 761 932 ; Mode switch, make the call, switch back. 762 933 STRICT_SAVE_REGS 934 %if TMPL_MODE == BS3_MODE_RM 935 call far TMPL_FAR_NM(Bs3SwitchToPAE32_16) 936 %else 763 937 call TMPL_NM(Bs3SwitchToPAE32_16) 938 %endif 764 939 BS3_SET_BITS 16 765 940 STRICT_CHECK_REGS … … 774 949 775 950 STRICT_SAVE_REGS 776 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pae32_16) 777 BS3_SET_BITS TMPL_BITS 778 STRICT_CHECK_REGS 779 jmp TMPL_NM(bs3TestCallDoerEpilogue) 780 TMPL_BEGIN_TEXT 951 %if TMPL_MODE == BS3_MODE_RM 952 call far RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_pae32_16_far) 953 %else 954 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_pae32_16) 955 %endif 956 BS3_SET_BITS TMPL_BITS 957 STRICT_CHECK_REGS 958 jmp TMPL_NM(bs3TestCallDoerEpilogue) 959 MY_BEGIN_TEXT 781 960 BS3_PROC_END_MODE Bs3TestCallDoerInPAE32_16 782 961 … … 784 963 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInPAEV86(uint16_t offBs3Text16); 785 964 ; @uses rax 786 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPAEV86, BS3_PBC_ FAR787 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 788 jmp TMPL_NM(bs3TestCallDoerPrologue) 789 BS3_BEGIN_TEXT16965 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPAEV86, BS3_PBC_NEAR 966 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 967 jmp TMPL_NM(bs3TestCallDoerPrologue) 968 MY_BEGIN_TEXT16 790 969 BS3_SET_BITS TMPL_BITS 791 970 .doit: … … 795 974 ; Mode switch, make the call, switch back. 796 975 STRICT_SAVE_REGS 976 %if TMPL_MODE == BS3_MODE_RM 977 call far TMPL_FAR_NM(Bs3SwitchToPAEV86) 978 %else 797 979 call TMPL_NM(Bs3SwitchToPAEV86) 980 %endif 798 981 BS3_SET_BITS 16 799 982 STRICT_CHECK_REGS … … 808 991 809 992 STRICT_SAVE_REGS 810 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_paev86) 811 BS3_SET_BITS TMPL_BITS 812 STRICT_CHECK_REGS 813 jmp TMPL_NM(bs3TestCallDoerEpilogue) 814 TMPL_BEGIN_TEXT 993 %if TMPL_MODE == BS3_MODE_RM 994 call far RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_paev86_far) 995 %else 996 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_paev86) 997 %endif 998 BS3_SET_BITS TMPL_BITS 999 STRICT_CHECK_REGS 1000 jmp TMPL_NM(bs3TestCallDoerEpilogue) 1001 MY_BEGIN_TEXT 815 1002 BS3_PROC_END_MODE Bs3TestCallDoerInPAEV86 816 1003 … … 824 1011 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInLM16(uint16_t offBs3Text16); 825 1012 ; @uses rax 826 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInLM16, BS3_PBC_ FAR827 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 828 jmp TMPL_NM(bs3TestCallDoerPrologue) 829 BS3_BEGIN_TEXT161013 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInLM16, BS3_PBC_NEAR 1014 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 1015 jmp TMPL_NM(bs3TestCallDoerPrologue) 1016 MY_BEGIN_TEXT16 830 1017 BS3_SET_BITS TMPL_BITS 831 1018 .doit: … … 835 1022 ; Mode switch, make the call, switch back. 836 1023 STRICT_SAVE_REGS 1024 %if TMPL_MODE == BS3_MODE_RM 1025 call far TMPL_FAR_NM(Bs3SwitchToLM16) 1026 %else 837 1027 call TMPL_NM(Bs3SwitchToLM16) 1028 %endif 838 1029 BS3_SET_BITS 16 839 1030 STRICT_CHECK_REGS … … 848 1039 849 1040 STRICT_SAVE_REGS 850 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_lm16) 851 BS3_SET_BITS TMPL_BITS 852 STRICT_CHECK_REGS 853 jmp TMPL_NM(bs3TestCallDoerEpilogue) 854 TMPL_BEGIN_TEXT 1041 %if TMPL_MODE == BS3_MODE_RM 1042 call far RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_lm16_far) 1043 %else 1044 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_lm16) 1045 %endif 1046 BS3_SET_BITS TMPL_BITS 1047 STRICT_CHECK_REGS 1048 jmp TMPL_NM(bs3TestCallDoerEpilogue) 1049 MY_BEGIN_TEXT 855 1050 BS3_PROC_END_MODE Bs3TestCallDoerInLM16 856 1051 … … 858 1053 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInLM32(uint16_t offBs3Text16); 859 1054 ; @uses rax 860 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInLM32, BS3_PBC_ FAR1055 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInLM32, BS3_PBC_NEAR 861 1056 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 862 1057 jmp TMPL_NM(bs3TestCallDoerPrologue) … … 866 1061 ; Mode switch, make the call, switch back. 867 1062 STRICT_SAVE_REGS 1063 %if TMPL_MODE == BS3_MODE_RM 1064 call far TMPL_FAR_NM(Bs3SwitchToLM32) 1065 %else 868 1066 call TMPL_NM(Bs3SwitchToLM32) 1067 %endif 869 1068 BS3_SET_BITS 32 870 1069 STRICT_CHECK_REGS … … 875 1074 876 1075 STRICT_SAVE_REGS 877 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_ lm32)1076 call RT_CONCAT3(_Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_lm32) 878 1077 BS3_SET_BITS TMPL_BITS 879 1078 STRICT_CHECK_REGS … … 884 1083 ; @cproto BS3_DECL(uint8_t) Bs3TestCallDoerInLM64(uint16_t offBs3Text16); 885 1084 ; @uses rax 886 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInLM64, BS3_PBC_ FAR1085 BS3_PROC_BEGIN_MODE Bs3TestCallDoerInLM64, BS3_PBC_NEAR 887 1086 BS3_LEA_MOV_WRT_RIP(xAX, .doit) 888 1087 jmp TMPL_NM(bs3TestCallDoerPrologue) … … 892 1091 ; Mode switch, make the call, switch back. 893 1092 STRICT_SAVE_REGS 1093 %if TMPL_MODE == BS3_MODE_RM 1094 call far TMPL_FAR_NM(Bs3SwitchToLM64) 1095 %else 894 1096 call TMPL_NM(Bs3SwitchToLM64) 1097 %endif 895 1098 BS3_SET_BITS 64 896 1099 STRICT_CHECK_REGS … … 902 1105 903 1106 STRICT_SAVE_REGS 904 call RT_CONCAT3(Bs3SwitchTo,TMPL_MODE_UNAME,_ lm64)1107 call RT_CONCAT3(Bs3SwitchTo,TMPL_MODE_UNAME,_Safe_lm64) 905 1108 BS3_SET_BITS TMPL_BITS 906 1109 STRICT_CHECK_REGS … … 908 1111 BS3_PROC_END_MODE Bs3TestCallDoerInLM64 909 1112 1113 1114 ; 1115 ; Finally near stub for the API call (16-bit only). 1116 ; 1117 %if TMPL_BITS == 16 1118 BS3_BEGIN_TEXT16_NEARSTUBS 1119 BS3_PROC_BEGIN_MODE Bs3TestDoModes, BS3_PBC_NEAR 1120 pop ax 1121 %if TMPL_MODE == BS3_MODE_RM 1122 push cs 1123 push ax 1124 extern TMPL_FAR_NM(Bs3TestDoModes):wrt BS3GROUPRMTEXT16 1125 jmp far TMPL_FAR_NM(Bs3TestDoModes) 1126 %else 1127 push cs 1128 push ax 1129 extern TMPL_FAR_NM(Bs3TestDoModes):wrt CGROUP16 1130 jmp TMPL_NM(Bs3TestDoModes) 1131 %endif 1132 BS3_PROC_END_MODE Bs3TestDoModes 1133 1134 %endif -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-TrapSystemCallHandler.asm
r60554 r60557 67 67 ; CPUs too! 68 68 ; 69 BS3_PROC_BEGIN_MODE Bs3TrapSystemCallHandler, BS3_PBC_NEAR ; Near because we'll probably only ever need this from BS3TEXT16.69 BS3_PROC_BEGIN_MODE Bs3TrapSystemCallHandler, BS3_PBC_NEAR ; Near because we'll probably only ever need this from CGROUP16. 70 70 ; 71 71 ; This prologue is kind of complicated because of 80286 and older CPUs … … 168 168 .aoffSyscallHandlers: 169 169 %ifdef TMPL_16BIT 170 dw .invalid_syscall wrt BS3TEXT16171 dw .print_chr wrt BS3TEXT16172 dw .print_str wrt BS3TEXT16173 dw .to_ringX wrt BS3TEXT16174 dw .to_ringX wrt BS3TEXT16175 dw .to_ringX wrt BS3TEXT16176 dw .to_ringX wrt BS3TEXT16177 dw .restore_ctx wrt BS3TEXT16170 dw .invalid_syscall wrt CGROUP16 171 dw .print_chr wrt CGROUP16 172 dw .print_str wrt CGROUP16 173 dw .to_ringX wrt CGROUP16 174 dw .to_ringX wrt CGROUP16 175 dw .to_ringX wrt CGROUP16 176 dw .to_ringX wrt CGROUP16 177 dw .restore_ctx wrt CGROUP16 178 178 %else 179 179 dd .invalid_syscall wrt FLAT -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-rm-InitGdt.c
r60556 r60557 44 44 BS3_DECL_FAR(void) Bs3InitGdt_rm_far(void) 45 45 { 46 #if 1 47 Bs3Gdte_R0_CS16.Gen.u16LimitLow = Bs3Text16_Size - 1; 48 Bs3Gdte_R1_CS16.Gen.u16LimitLow = Bs3Text16_Size - 1; 49 Bs3Gdte_R2_CS16.Gen.u16LimitLow = Bs3Text16_Size - 1; 50 Bs3Gdte_R3_CS16.Gen.u16LimitLow = Bs3Text16_Size - 1; 51 #endif 52 Bs3Gdte_RMTEXT16_CS.Gen.u16LimitLow = Bs3RmText16_Size - 1; 46 53 Bs3Gdte_X0TEXT16_CS.Gen.u16LimitLow = Bs3X0Text16_Size - 1; 47 Bs3Gdte_X1TEXT16_CS.Gen.u16LimitLow = Bs3X0Text16_Size - 1; 54 Bs3Gdte_X1TEXT16_CS.Gen.u16LimitLow = Bs3X1Text16_Size - 1; 55 56 Bs3Gdte_RMTEXT16_CS.Gen.u16BaseLow = (uint16_t)Bs3RmText16_FlatAddr; 48 57 Bs3Gdte_X0TEXT16_CS.Gen.u16BaseLow = (uint16_t)Bs3X0Text16_FlatAddr; 49 58 Bs3Gdte_X1TEXT16_CS.Gen.u16BaseLow = (uint16_t)Bs3X1Text16_FlatAddr; 59 60 Bs3Gdte_RMTEXT16_CS.Gen.u8BaseHigh1 = (uint8_t)(Bs3RmText16_FlatAddr >> 16); 50 61 Bs3Gdte_X0TEXT16_CS.Gen.u8BaseHigh1 = (uint8_t)(Bs3X0Text16_FlatAddr >> 16); 51 62 Bs3Gdte_X1TEXT16_CS.Gen.u8BaseHigh1 = (uint8_t)(Bs3X1Text16_FlatAddr >> 16); -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-system-data.asm
r60539 r60557 177 177 dw 00000h, 00000h, 00000h, 00000h ; Entry 0d0h - currently unused 178 178 dw 00000h, 00000h, 00000h, 00000h ; Entry 0d8h - currently unused 179 dw 00000h, 00000h, 00000h, 00000h ; Entry 0e0h - currently unused180 179 181 180 ; Misc selectors. 181 BS3_GLOBAL_DATA Bs3Gdte_RMTEXT16_CS, 8 ; Entry 0e0h 182 dw 0fffeh, 00000h ; 16-bit conforming code (read+exec) segment, accessed. Will be finalized at startup. 183 dw 09f00h, 00000h 182 184 BS3_GLOBAL_DATA Bs3Gdte_X0TEXT16_CS, 8 ; Entry 0e8h 183 185 dw 0fffeh, 00000h ; 16-bit conforming code (read+exec) segment, accessed. Will be finalized at startup. -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-data.h
r60527 r60557 50 50 # define Bs3Gdte_Tss64Spare1 BS3_DATA_NM(Bs3Gdte_Tss64Spare1) 51 51 # define Bs3Gdte_Tss64Iobp BS3_DATA_NM(Bs3Gdte_Tss64Iobp) 52 # define Bs3Gdte_RMTEXT16_CS BS3_DATA_NM(Bs3Gdte_RMTEXT16_CS) 53 # define Bs3Gdte_X0TEXT16_CS BS3_DATA_NM(Bs3Gdte_X0TEXT16_CS) 54 # define Bs3Gdte_X1TEXT16_CS BS3_DATA_NM(Bs3Gdte_X1TEXT16_CS) 52 55 # define Bs3Gdte_R0_MMIO16 BS3_DATA_NM(Bs3Gdte_R0_MMIO16) 53 56 … … 220 223 # define Bs3Text16_EndOfSegment BS3_DATA_NM(Bs3Text16_EndOfSegment) 221 224 # define Bs3Text16_Size BS3_DATA_NM(Bs3Text16_Size) 225 222 226 # define Bs3System16_StartOfSegment BS3_DATA_NM(Bs3System16_StartOfSegment) 223 227 # define Bs3System16_EndOfSegment BS3_DATA_NM(Bs3System16_EndOfSegment) 228 224 229 # define Bs3Data16_StartOfSegment BS3_DATA_NM(Bs3Data16_StartOfSegment) 225 230 # define Bs3Data16_EndOfSegment BS3_DATA_NM(Bs3Data16_EndOfSegment) 231 232 # define Bs3RmText16_StartOfSegment BS3_DATA_NM(Bs3RmText16_StartOfSegment) 233 # define Bs3RmText16_EndOfSegment BS3_DATA_NM(Bs3RmText16_EndOfSegment) 234 # define Bs3RmText16_Size BS3_DATA_NM(Bs3RmText16_Size) 235 # define Bs3RmText16_FlatAddr BS3_DATA_NM(Bs3RmText16_FlatAddr) 236 237 # define Bs3X0Text16_StartOfSegment BS3_DATA_NM(Bs3X0Text16_StartOfSegment) 238 # define Bs3X0Text16_EndOfSegment BS3_DATA_NM(Bs3X0Text16_EndOfSegment) 239 # define Bs3X0Text16_Size BS3_DATA_NM(Bs3X0Text16_Size) 240 # define Bs3X0Text16_FlatAddr BS3_DATA_NM(Bs3X0Text16_FlatAddr) 241 242 # define Bs3X1Text16_StartOfSegment BS3_DATA_NM(Bs3X1Text16_StartOfSegment) 243 # define Bs3X1Text16_EndOfSegment BS3_DATA_NM(Bs3X1Text16_EndOfSegment) 244 # define Bs3X1Text16_Size BS3_DATA_NM(Bs3X1Text16_Size) 245 # define Bs3X1Text16_FlatAddr BS3_DATA_NM(Bs3X1Text16_FlatAddr) 246 226 247 # define Bs3Text32_StartOfSegment BS3_DATA_NM(Bs3Text32_StartOfSegment) 227 248 # define Bs3Text32_EndOfSegment BS3_DATA_NM(Bs3Text32_EndOfSegment) 249 228 250 # define Bs3Data32_StartOfSegment BS3_DATA_NM(Bs3Data32_StartOfSegment) 229 251 # define Bs3Data32_EndOfSegment BS3_DATA_NM(Bs3Data32_EndOfSegment) 252 230 253 # define Bs3Text64_StartOfSegment BS3_DATA_NM(Bs3Text64_StartOfSegment) 231 254 # define Bs3Text64_EndOfSegment BS3_DATA_NM(Bs3Text64_EndOfSegment) 255 232 256 # define Bs3Data64_StartOfSegment BS3_DATA_NM(Bs3Data64_StartOfSegment) 233 257 # define Bs3Data64_EndOfSegment BS3_DATA_NM(Bs3Data64_EndOfSegment) … … 235 259 # define Bs3Data16Thru64Text32And64_TotalSize BS3_DATA_NM(Bs3Data16Thru64Text32And64_TotalSize) 236 260 # define Bs3TotalImageSize BS3_DATA_NM(Bs3TotalImageSize) 261 237 262 # define g_achBs3HexDigits BS3_DATA_NM(g_achBs3HexDigits) 238 263 # define g_achBs3HexDigitsUpper BS3_DATA_NM(g_achBs3HexDigitsUpper) -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h
r60556 r60557 228 228 #define BS3_SEL_TSS64_IOBP 0x00a0 /**< The 64-bit TSS selector. */ 229 229 230 #define BS3_SEL_RMTEXT16_CS 0x00e0 /**< Conforming code selector for accessing the BS3RMTEXT16 segment. Runtime config. */ 230 231 #define BS3_SEL_X0TEXT16_CS 0x00e8 /**< Conforming code selector for accessing the BS3X0TEXT16 segment. Runtime config. */ 231 #define BS3_SEL_X1TEXT16_CS 0x00f0 /**< Conforming code selector for accessing the BS3X 0TEXT16 segment. Runtime config. */232 #define BS3_SEL_X1TEXT16_CS 0x00f0 /**< Conforming code selector for accessing the BS3X1TEXT16 segment. Runtime config. */ 232 233 #define BS3_SEL_VMMDEV_MMIO16 0x00f8 /**< Selector for accessing the VMMDev MMIO segment at 0100000h from 16-bit code. */ 233 234 … … 705 706 extern X86DESC BS3_FAR_DATA Bs3Gdte_Tss64Spare1; /**< @see BS3_SEL_TSS64_SPARE1 */ 706 707 extern X86DESC BS3_FAR_DATA Bs3Gdte_Tss64Iobp; /**< @see BS3_SEL_TSS64_IOBP */ 708 extern X86DESC BS3_FAR_DATA Bs3Gdte_RMTEXT16_CS; /**< @see BS3_SEL_RMTEXT16_CS */ 707 709 extern X86DESC BS3_FAR_DATA Bs3Gdte_X0TEXT16_CS; /**< @see BS3_SEL_X0TEXT16_CS */ 708 710 extern X86DESC BS3_FAR_DATA Bs3Gdte_X1TEXT16_CS; /**< @see BS3_SEL_X1TEXT16_CS */ … … 930 932 /** End of the BS3RMTEXT16 segment. */ 931 933 extern uint8_t BS3_FAR_DATA Bs3RmText16_EndOfSegment; 934 /** The size of the BS3RMTEXT16 segment. */ 935 extern uint16_t BS3_FAR_DATA Bs3RmText16_Size; 936 /** The flat start address of the BS3X0TEXT16 segment. */ 937 extern uint32_t BS3_FAR_DATA Bs3RmText16_FlatAddr; 932 938 933 939 /** Start of the BS3X0TEXT16 segment. */ … … 937 943 /** The size of the BS3X0TEXT16 segment. */ 938 944 extern uint16_t BS3_FAR_DATA Bs3X0Text16_Size; 939 /** The flat start address of the BS3X 1TEXT16 segment. */945 /** The flat start address of the BS3X0TEXT16 segment. */ 940 946 extern uint32_t BS3_FAR_DATA Bs3X0Text16_FlatAddr; 941 947 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.mac
r60554 r60557 1477 1477 %define BS3_SEL_TSS64_IOBP 00a0h ;;< The 64-bit TSS selector. 1478 1478 1479 %define BS3_SEL_RMTEXT16_CS 00e0h ;;< Conforming code selector for accessing the BS3RMTEXT16 segment. Runtime config. 1479 1480 %define BS3_SEL_X0TEXT16_CS 00e8h ;;< Conforming code selector for accessing the BS3X0TEXT16 segment. Runtime config. 1480 %define BS3_SEL_X1TEXT16_CS 00f0h ;;< Conforming code selector for accessing the BS3X 0TEXT16 segment. Runtime config.1481 %define BS3_SEL_X1TEXT16_CS 00f0h ;;< Conforming code selector for accessing the BS3X1TEXT16 segment. Runtime config. 1481 1482 %define BS3_SEL_VMMDEV_MMIO16 00f8h ;;< Selector for accessing the VMMDev MMIO segment at 0100000h from 16-bit code. 1482 1483
Note:
See TracChangeset
for help on using the changeset viewer.