Changeset 59286 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- Jan 8, 2016 12:23:32 AM (9 years ago)
- Location:
- trunk/src/VBox/ValidationKit/bootsectors/bs3kit
- Files:
-
- 2 added
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk
r59259 r59286 172 172 TOOL_Bs3Ow32_COBJSUFF = $(TOOL_OPENWATCOM_COBJSUFF) 173 173 TOOL_Bs3Ow32_CFLAGS = $(TOOL_OPENWATCOM_CFLAGS) 174 # -adfs \ - This is too complicated and it doesn't support stubbing files (svn rename fun.h pain.h). Use kDepObj instead. 175 # -ad=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(dep)) \ 176 # -adt=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \ 177 # -add=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source))) \ 178 # -adhp=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(dir $(abspath $(source)))) 174 179 TOOL_Bs3Ow32_CFLAGS.debug = $(TOOL_OPENWATCOM_CFLAGS.debug) 175 180 TOOL_Bs3Ow32_CFLAGS.dbgopt = $(TOOL_OPENWATCOM_CFLAGS.dbgopt) … … 185 190 $(TOOL_OPENWATCOM_COMPILE_C_CMDS) 186 191 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)" 192 $(QUIET)$(REDIRECT) -wo /dev/null -- $(KBUILD_BIN_PATH)/kDepObj$(HOSTSUFF_EXE) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)" 187 193 endef 188 194 189 195 TOOL_Bs3Ow32_CXXOBJSUFF = $(TOOL_OPENWATCOM_CXXOBJSUFF) 190 TOOL_Bs3Ow32_CXXFLAGS = $(TOOL_OPENWATCOM_CXXFLAGS) 196 TOOL_Bs3Ow32_CXXFLAGS = $(TOOL_OPENWATCOM_CXXFLAGS) -ad=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(dep)) -adfs 191 197 TOOL_Bs3Ow32_CXXFLAGS.debug = $(TOOL_OPENWATCOM_CXXFLAGS.debug) 192 198 TOOL_Bs3Ow32_CXXFLAGS.dbgopt = $(TOOL_OPENWATCOM_CXXFLAGS.dbgopt) … … 202 208 $(TOOL_OPENWATCOM_COMPILE_CXX_CMDS) 203 209 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)" 210 $(QUIET)$(REDIRECT) -wo /dev/null -- $(KBUILD_BIN_PATH)/kDepObj$(HOSTSUFF_EXE) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)" 204 211 endef 205 212 … … 227 234 $(TOOL_OPENWATCOM-16_COMPILE_C_CMDS) 228 235 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)" 236 $(QUIET)$(REDIRECT) -wo /dev/null -- $(KBUILD_BIN_PATH)/kDepObj$(HOSTSUFF_EXE) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)" 229 237 endef 230 238 … … 244 252 $(TOOL_OPENWATCOM-16_COMPILE_CXX_CMDS) 245 253 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)" 254 $(QUIET)$(REDIRECT) -wo /dev/null -- $(KBUILD_BIN_PATH)/kDepObj$(HOSTSUFF_EXE) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)" 246 255 endef 247 256 … … 524 533 bs3-cmn-Trap32SetGate.c \ 525 534 bs3-cmn-Trap64SetGate.c \ 535 bs3-cmn-TrapDefaultHandler.c \ 536 bs3-cmn-TrapPrintFrame.c \ 526 537 bs3-cmn-TrapSetHandler.c \ 527 538 ../../../Runtime/common/asm/ASMBitFirstClear.asm \ -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-c32-Trap32Generic.asm
r59259 r59286 31 31 %endif 32 32 33 BS3_BEGIN_DATA 3233 BS3_BEGIN_DATA16 34 34 ;; Easy to access flat address of Bs3Trap32GenericEntries. 35 35 BS3_GLOBAL_DATA g_Bs3Trap32GenericEntriesFlatAddr, 4 36 dd Bs3Trap32GenericEntries 37 36 dd Bs3Trap32GenericEntries wrt FLAT 37 ;; Easy to access flat address of Bs3Trap32DoubleFaultHandler. 38 BS3_GLOBAL_DATA g_Bs3Trap32DoubleFaultHandlerFlatAddr, 4 39 dd Bs3Trap32DoubleFaultHandler wrt FLAT 40 41 BS3_BEGIN_DATA32 38 42 ;; Pointer C trap handlers. 39 43 BS3_GLOBAL_DATA g_apfnBs3TrapHandlers_c32, 1024 … … 42 46 43 47 TMPL_BEGIN_TEXT 44 BS3_EXTERN_CMN Bs3Trap 32DefaultHandler48 BS3_EXTERN_CMN Bs3TrapDefaultHandler 45 49 BS3_EXTERN_CMN Bs3Trap32ResumeFrame 46 50 … … 268 272 mov eax, cr4 269 273 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.cr4], eax 274 str ax 275 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.tr], ax 276 sldt ax 277 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.ldtr], ax 270 278 271 279 ; 272 280 ; Set context bit width and clear all upper dwords and unused register members. 273 281 ; 282 .clear_and_dispatch_to_handler: ; The double fault code joins us here. 283 xor edx, edx 274 284 mov dword [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.cBits], 32 275 xor edx, edx285 mov dword [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.abPadding + 3], edx 276 286 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.rax + 4], edx 277 287 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.rcx + 4], edx … … 304 314 or eax, eax 305 315 jnz .call_handler 306 mov eax, Bs3Trap 32DefaultHandler316 mov eax, Bs3TrapDefaultHandler 307 317 .call_handler: 308 318 mov edi, esp … … 322 332 BS3_PROC_END bs3Trap32GenericCommon 323 333 334 335 ;; 336 ; Helper. 337 ; 338 ; @retruns Flat address in eax. 339 ; @param ax 340 ; @uses eax 341 ; 342 bs3Trap32TssInAxToFlatInEax: 343 ; Get the GDT base address and find the descriptor address (EAX) 344 sub esp, 16h 345 sgdt [esp + 2] ; +2 for correct alignment. 346 and eax, 0fff8h 347 add eax, [esp + 4] ; GDT base address. 348 add esp, 16h 349 350 ; Get the flat TSS address from the descriptor. 351 push ecx 352 mov ecx, [eax + 4] 353 and eax, 0ffff0000h 354 movzx eax, word [eax] 355 or eax, ecx 356 pop ecx 357 358 ret 359 360 ;; 361 ; Double fault handler. 362 ; 363 ; We don't have to load any selectors or clear anything in EFLAGS because the 364 ; TSS specified sane values which got loaded during the task switch. 365 ; 366 BS3_PROC_BEGIN Bs3Trap32DoubleFaultHandler 367 push 0 ; We'll copy the rip from the other TSS here later to create a more sensible call chain. 368 push ebp 369 mov ebp, esp 370 371 ; 372 ; Fill in the non-context trap frame bits. 373 ; 374 pushfd ; Get handler flags. 375 pop ecx 376 xor edx, edx ; NULL register. 377 378 sub esp, BS3TRAPFRAME_size ; Allocate trap frame. 379 mov [esp + BS3TRAPFRAME.fHandlerRfl], ecx 380 mov word [esp + BS3TRAPFRAME.bXcpt], X86_XCPT_DF 381 mov [esp + BS3TRAPFRAME.uHandlerCs], cs 382 mov [esp + BS3TRAPFRAME.uHandlerSs], ss 383 lea ecx, [ebp + 12] 384 mov [esp + BS3TRAPFRAME.uHandlerRsp], ecx 385 mov [esp + BS3TRAPFRAME.uHandlerRsp + 4], edx 386 mov ecx, [ebp + 8] 387 mov [esp + BS3TRAPFRAME.uErrCd], ecx 388 mov [esp + BS3TRAPFRAME.uErrCd + 4], edx 389 390 ; 391 ; Copy the register state from the previous task segment. 392 ; 393 394 ; Find our TSS. 395 str ax 396 call bs3Trap32TssInAxToFlatInEax 397 398 ; Find the previous TSS. 399 mov ax, [eax + X86TSS32.selPrev] 400 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.tr], ax 401 call bs3Trap32TssInAxToFlatInEax 402 403 ; Do the copying. 404 mov ecx, [eax + X86TSS32.eax] 405 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.rax], ecx 406 mov ecx, [eax + X86TSS32.ecx] 407 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.rcx], ecx 408 mov ecx, [eax + X86TSS32.edx] 409 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.rdx], ecx 410 mov ecx, [eax + X86TSS32.ebx] 411 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.rbx], ecx 412 mov ecx, [eax + X86TSS32.esp] 413 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.rsp], ecx 414 mov ecx, [eax + X86TSS32.ebp] 415 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.rbp], ecx 416 mov [ebp], ecx ; For better call stacks. 417 mov ecx, [eax + X86TSS32.esi] 418 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.rsi], ecx 419 mov ecx, [eax + X86TSS32.edi] 420 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.rdi], ecx 421 mov ecx, [eax + X86TSS32.esi] 422 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.rsi], ecx 423 mov ecx, [eax + X86TSS32.eflags] 424 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.rflags], ecx 425 mov ecx, [eax + X86TSS32.eip] 426 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.rip], ecx 427 mov [ebp + 4], ecx ; For better call stacks. 428 mov cx, [eax + X86TSS32.cs] 429 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.cs], cx 430 mov cx, [eax + X86TSS32.ds] 431 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.ds], cx 432 mov cx, [eax + X86TSS32.es] 433 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.es], cx 434 mov cx, [eax + X86TSS32.fs] 435 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.fs], cx 436 mov cx, [eax + X86TSS32.gs] 437 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.gs], cx 438 mov cx, [eax + X86TSS32.ss] 439 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.ss], cx 440 mov cx, [eax + X86TSS32.selLdt] ; Note! This isn't necessarily the ldtr at the time of the fault. 441 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.ldtr], cx 442 mov cx, [eax + X86TSS32.cr3] ; Note! This isn't necessarily the cr3 at the time of the fault. 443 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.cr3], ecx 444 445 mov dword [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.cBits], 32 446 447 ; 448 ; Control registers. 449 ; 450 mov ecx, cr0 451 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.cr0], ecx 452 mov ecx, cr2 453 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.cr2], ecx 454 mov ecx, cr4 455 mov [esp + BS3TRAPFRAME.Ctx + BS3REGCTX.cr4], ecx 456 457 ; 458 ; Join code paths with the generic handler code. 459 ; 460 jmp bs3Trap32GenericCommon.clear_and_dispatch_to_handler 461 BS3_PROC_END Bs3Trap32DoubleFaultHandler 462 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-c32-Trap32ResumeFrame.asm
r59258 r59286 52 52 mov cr4, eax 53 53 .skip_cr4: 54 54 55 mov eax, [ebx + BS3TRAPFRAME.Ctx + BS3REGCTX.cr3] 55 56 mov edx, cr3 … … 58 59 mov cr3, eax 59 60 .skip_cr3: 61 60 62 mov eax, [ebx + BS3TRAPFRAME.Ctx + BS3REGCTX.cr2] 61 63 mov edx, cr2 … … 64 66 mov cr2, eax 65 67 .skip_cr2: 68 66 69 mov eax, [ebx + BS3TRAPFRAME.Ctx + BS3REGCTX.cr0] 67 70 mov edx, cr0 … … 70 73 mov cr0, eax 71 74 .skip_cr0: 75 76 ; LDTR 77 sldt ax 78 cmp ax, [ebx + BS3TRAPFRAME.Ctx + BS3REGCTX.ldtr] 79 je .skip_ldtr 80 lldt [ebx + BS3TRAPFRAME.Ctx + BS3REGCTX.ldtr] 81 .skip_ldtr: 82 83 ; TR - complicated because we need to clear the busy bit. ASSUMES GDT. 84 str ax 85 cmp ax, [ebx + BS3TRAPFRAME.Ctx + BS3REGCTX.tr] 86 je .skip_tr 87 88 movzx eax, word [ebx + BS3TRAPFRAME.Ctx + BS3REGCTX.tr] 89 or eax, eax ; check for null. 90 jz .load_tr 91 92 sub esp, 10h 93 mov dword [esp + 8], 0 ; paranoia^2 94 sgdt [esp + 6] 95 add eax, [esp + 8] ; the limit. 96 add esp, 10h 97 98 add eax, X86DESCGENERIC_BIT_OFF_TYPE / 8 99 and byte [eax], ~(X86_SEL_TYPE_SYS_TSS_BUSY_MASK << (X86DESCGENERIC_BIT_OFF_TYPE % 8)) 100 .load_tr: 101 ltr [ebx + BS3TRAPFRAME.Ctx + BS3REGCTX.tr] 102 .skip_tr: 103 72 104 .skip_control_regs: 73 105 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemAllocZ.c
r58789 r59286 30 30 #include "bs3kit-template-header.h" 31 31 #include "bs3-cmn-memory.h" 32 #include <iprt/asm.h>33 32 34 33 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-MemFree.c
r58789 r59286 30 30 #include "bs3kit-template-header.h" 31 31 #include "bs3-cmn-memory.h" 32 #include <iprt/asm.h>33 32 34 33 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingInitRootForLM.c
r59245 r59286 30 30 #include "bs3kit-template-header.h" 31 31 #include "bs3-cmn-paging.h" 32 #include <iprt/asm.h>33 32 34 33 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingInitRootForPAE.c
r59244 r59286 30 30 #include "bs3kit-template-header.h" 31 31 #include "bs3-cmn-paging.h" 32 #include <iprt/asm.h>33 32 34 33 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-PagingInitRootForPP.c
r59239 r59286 30 30 #include "bs3kit-template-header.h" 31 31 #include "bs3-cmn-paging.h" 32 #include <iprt/asm.h>33 32 34 33 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabAlloc.c
r58789 r59286 25 25 */ 26 26 27 /********************************************************************************************************************************* 28 * Header Files * 29 *********************************************************************************************************************************/ 27 30 #include "bs3kit-template-header.h" 28 31 #include <iprt/asm.h> -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabAllocEx.c
r59245 r59286 25 25 */ 26 26 27 /********************************************************************************************************************************* 28 * Header Files * 29 *********************************************************************************************************************************/ 27 30 #include "bs3kit-template-header.h" 28 31 #include <iprt/asm.h> -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabFree.c
r58789 r59286 25 25 */ 26 26 27 /********************************************************************************************************************************* 28 * Header Files * 29 *********************************************************************************************************************************/ 27 30 #include "bs3kit-template-header.h" 28 31 #include <iprt/asm.h> -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabInit.c
r58789 r59286 25 25 */ 26 26 27 /********************************************************************************************************************************* 28 * Header Files * 29 *********************************************************************************************************************************/ 27 30 #include "bs3kit-template-header.h" 28 31 #include <iprt/asm.h> -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabListAlloc.c
r58789 r59286 25 25 */ 26 26 27 /********************************************************************************************************************************* 28 * Header Files * 29 *********************************************************************************************************************************/ 27 30 #include "bs3kit-template-header.h" 28 #include <iprt/asm.h>29 31 30 32 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SlabListAllocEx.c
r58789 r59286 25 25 */ 26 26 27 /********************************************************************************************************************************* 28 * Header Files * 29 *********************************************************************************************************************************/ 27 30 #include "bs3kit-template-header.h" 28 #include <iprt/asm.h>29 31 30 32 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap32Init.c
r59259 r59286 29 29 *********************************************************************************************************************************/ 30 30 #include "bs3kit-template-header.h" 31 #include <iprt/asm.h> 31 32 33 /********************************************************************************************************************************* 34 * Global Variables * 35 *********************************************************************************************************************************/ 36 extern uint32_t BS3_DATA_NM(g_Bs3Trap32DoubleFaultHandlerFlatAddr); 32 37 33 38 34 39 BS3_DECL(void) Bs3Trap32Init(void) 35 40 { 36 unsigned iIdt = 256; 37 while (iIdt-- > 0) 41 X86TSS32 BS3_FAR *pTss; 42 unsigned iIdt; 43 44 /* 45 * IDT entries, except the system call gate. 46 */ 47 for (iIdt = 0; iIdt < BS3_TRAP_SYSCALL; iIdt++) 38 48 Bs3Trap32SetGate(iIdt, X86_SEL_TYPE_SYS_386_INT_GATE, 0 /*bDpl*/, 39 49 BS3_SEL_R0_CS32, BS3_DATA_NM(g_Bs3Trap32GenericEntriesFlatAddr) + iIdt * 8, 0 /*cParams*/); 40 /** @todo Init TSS for double faults and stuff. */ 50 for (iIdt = BS3_TRAP_SYSCALL + 1; iIdt < 256; iIdt++) 51 Bs3Trap32SetGate(iIdt, X86_SEL_TYPE_SYS_386_INT_GATE, 0 /*bDpl*/, 52 BS3_SEL_R0_CS32, BS3_DATA_NM(g_Bs3Trap32GenericEntriesFlatAddr) + iIdt * 8, 0 /*cParams*/); 53 54 /* 55 * Initialize the normal TSS so we can do ring transitions via the IDT. 56 */ 57 //pTss = &BS3_DATA_NM(Bs3Tss32); 58 Bs3MemZero(&BS3_DATA_NM(Bs3Tss32), sizeof(*pTss)); 59 BS3_DATA_NM(Bs3Tss32).esp0 = BS3_ADDR_STACK_R0; 60 BS3_DATA_NM(Bs3Tss32).ss0 = BS3_SEL_R0_SS32; 61 BS3_DATA_NM(Bs3Tss32).esp1 = BS3_ADDR_STACK_R1; 62 BS3_DATA_NM(Bs3Tss32).ss1 = BS3_SEL_R1_SS32; 63 BS3_DATA_NM(Bs3Tss32).esp2 = BS3_ADDR_STACK_R2; 64 BS3_DATA_NM(Bs3Tss32).ss2 = BS3_SEL_R2_SS32; 65 66 /* 67 * Initialize the double fault TSS. 68 * cr3 is filled in by switcher code, when needed. 69 */ 70 pTss = &BS3_DATA_NM(Bs3Tss32DoubleFault); 71 Bs3MemZero(pTss, sizeof(*pTss)); 72 pTss->esp0 = BS3_ADDR_STACK_R0; 73 pTss->ss0 = BS3_SEL_R0_SS32; 74 pTss->esp1 = BS3_ADDR_STACK_R1; 75 pTss->ss1 = BS3_SEL_R1_SS32; 76 pTss->esp2 = BS3_ADDR_STACK_R2; 77 pTss->ss2 = BS3_SEL_R2_SS32; 78 pTss->eip = BS3_DATA_NM(g_Bs3Trap32DoubleFaultHandlerFlatAddr); 79 pTss->eflags = X86_EFL_1; 80 pTss->esp = BS3_ADDR_STACK_R0_IST1; 81 pTss->es = BS3_SEL_R0_DS32; 82 pTss->ds = BS3_SEL_R0_DS32; 83 pTss->cs = BS3_SEL_R0_CS32; 84 pTss->ss = BS3_SEL_R0_SS32; 85 86 Bs3Trap32SetGate(X86_XCPT_DF, X86_SEL_TYPE_SYS_TASK_GATE, 0 /*bDpl*/, BS3_SEL_TSS32_DF, 0, 0 /*cParams*/); 41 87 } 42 88 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap32SetGate.c
r59258 r59286 29 29 *********************************************************************************************************************************/ 30 30 #include "bs3kit-template-header.h" 31 #include <iprt/asm.h>32 31 33 32 … … 37 36 38 37 BS3_ASSERT(bDpl <= 3); 39 BS3_ASSERT(bType <= 7);38 BS3_ASSERT(bType <= 15); 40 39 BS3_ASSERT(cParams <= 15); 41 40 pIdte->Gate.u16OffsetLow = (uint16_t)off; -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Trap64SetGate.c
r59259 r59286 29 29 *********************************************************************************************************************************/ 30 30 #include "bs3kit-template-header.h" 31 #include <iprt/asm.h>32 31 33 32 … … 37 36 38 37 BS3_ASSERT(bDpl <= 3); 39 BS3_ASSERT(bType <= 7);38 BS3_ASSERT(bType <= 15); 40 39 BS3_ASSERT(bIst <= 7); 41 40 pIdte->Gate.u16OffsetLow = (uint16_t)off; -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TrapSetHandler.c
r59259 r59286 29 29 *********************************************************************************************************************************/ 30 30 #include "bs3kit-template-header.h" 31 #include <iprt/asm.h>32 31 33 32 extern PFNBS3TRAPHANDLER BS3_DATA_NM(BS3_CMN_NM(g_apfnBs3TrapHandlers))[256]; -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-first-pe16.asm
r59245 r59286 66 66 EXTERN Bs3InitMemory_rm 67 67 BS3_EXTERN_CMN Bs3Shutdown 68 BS3_EXTERN_CMN Bs3Trap32Init 68 69 69 extern _Bs3Print f_c3270 extern Bs3Print f_c6470 extern _Bs3PrintChr_c32 71 extern Bs3PrintChr_c64 71 72 72 73 BS3_BEGIN_TEXT16 … … 75 76 ; 76 77 call NAME(Bs3InitMemory_rm) ; Initialize the memory (must be done from real mode). 78 call Bs3Trap32Init 77 79 call NAME(Bs3SwitchToPE16_rm) 78 80 … … 96 98 call NAME(Bs3SwitchToPP32_rm) 97 99 BS3_SET_BITS 32 100 push '!' 101 call NAME(Bs3PrintChr_c32) 98 102 call NAME(Bs3SwitchToRM_pp32) 99 103 BS3_SET_BITS 16 … … 101 105 call NAME(Bs3SwitchToPAE32_rm) 102 106 BS3_SET_BITS 32 107 push '~' 108 call NAME(Bs3PrintChr_c32) 103 109 call NAME(Bs3SwitchToRM_pae32) 104 110 BS3_SET_BITS 16 … … 111 117 call NAME(Bs3SwitchToLM64_rm) 112 118 BS3_SET_BITS 64 119 ;; todo: push '~' 120 ;; todo: call Bs3PrintChr_c64 113 121 call Bs3SwitchToRM_lm64 114 122 BS3_SET_BITS 16 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-EnteredMode.asm
r59260 r59286 45 45 %ifdef TMPL_CMN_R86 46 46 BS3_BEGIN_DATA16 47 BS3_EXTERN_SYSTEM16 Bs3Lidt_Ivt 47 48 TMPL_BEGIN_TEXT 48 49 extern TMPL_NM(Bs3TrapSystemCallHandler) 49 50 xor ax, ax 50 51 mov ss, ax 52 53 mov ax, BS3_SEL_SYSTEM16 54 mov ds, ax 55 lidt [Bs3Lidt_Ivt] 56 51 57 mov ax, BS3DATA16 52 58 mov ds, ax … … 101 107 BS3_EXTERN_SYSTEM16 Bs3Gdte_Tss32 102 108 BS3_EXTERN_SYSTEM16 Bs3Gdte_Tss32DoubleFault 109 BS3_EXTERN_SYSTEM16 Bs3Tss32 110 BS3_EXTERN_SYSTEM16 Bs3Tss32DoubleFault 103 111 TMPL_BEGIN_TEXT 104 112 mov ax, BS3_SEL_R0_SS32 … … 112 120 btr [Bs3Gdte_Tss32DoubleFault], ax ; mark it not busy 113 121 btr [Bs3Gdte_Tss32], ax ; mark it not busy 122 mov eax, cr3 123 mov [Bs3Tss32 + X86TSS32.cr3], eax 124 mov [Bs3Tss32DoubleFault + X86TSS32.cr3], eax 114 125 mov ax, BS3_SEL_TSS32 115 126 ltr ax 116 127 117 128 mov ax, BS3_SEL_LDT 129 mov [Bs3Tss32 + X86TSS32.selLdt], ax 118 130 lldt ax 119 131 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-PagingGetRootForLM64.asm
r59245 r59286 52 52 ; 53 53 BS3_PROC_BEGIN_MODE Bs3PagingGetRootForLM64 54 BS3_ONLY_16BIT_STMT push ds 55 BS3_ONLY_16BIT_STMT push BS3DATA16 56 BS3_ONLY_16BIT_STMT pop ds 54 57 mov eax, [g_PhysPagingRootLM TMPL_WRT_DATA16_OR_FLAT] 58 BS3_ONLY_16BIT_STMT pop ds 55 59 cmp eax, 0ffffffffh 56 60 je .init_root … … 60 64 push xBP 61 65 mov xBP, xSP 66 BS3_ONLY_16BIT_STMT push ds 62 67 63 68 %ifdef TMPL_RM … … 84 89 %endif 85 90 91 BS3_ONLY_16BIT_STMT push BS3DATA16 92 BS3_ONLY_16BIT_STMT pop ds 86 93 mov eax, [g_PhysPagingRootLM TMPL_WRT_DATA16_OR_FLAT] 94 BS3_ONLY_16BIT_STMT pop ds 87 95 leave 88 96 ret -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-PagingGetRootForPAE32.asm
r59245 r59286 52 52 ; 53 53 BS3_PROC_BEGIN_MODE Bs3PagingGetRootForPAE32 54 BS3_ONLY_16BIT_STMT push ds 55 BS3_ONLY_16BIT_STMT push BS3DATA16 56 BS3_ONLY_16BIT_STMT pop ds 54 57 mov eax, [g_PhysPagingRootPAE TMPL_WRT_DATA16_OR_FLAT] 58 BS3_ONLY_16BIT_STMT pop ds 55 59 cmp eax, 0ffffffffh 56 60 je .init_root … … 60 64 push xBP 61 65 mov xBP, xSP 66 BS3_ONLY_16BIT_STMT push ds 62 67 63 68 %ifdef TMPL_RM … … 84 89 %endif 85 90 91 BS3_ONLY_16BIT_STMT push BS3DATA16 92 BS3_ONLY_16BIT_STMT pop ds 86 93 mov eax, [g_PhysPagingRootPAE TMPL_WRT_DATA16_OR_FLAT] 94 BS3_ONLY_16BIT_STMT pop ds 87 95 leave 88 96 ret -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-PagingGetRootForPP32.asm
r59245 r59286 52 52 ; 53 53 BS3_PROC_BEGIN_MODE Bs3PagingGetRootForPP32 54 BS3_ONLY_16BIT_STMT push ds 55 BS3_ONLY_16BIT_STMT push BS3DATA16 56 BS3_ONLY_16BIT_STMT pop ds 54 57 mov eax, [g_PhysPagingRootPP TMPL_WRT_DATA16_OR_FLAT] 58 BS3_ONLY_16BIT_STMT pop ds 55 59 cmp eax, 0ffffffffh 56 60 je .init_root … … 60 64 push xBP 61 65 mov xBP, xSP 66 BS3_ONLY_16BIT_STMT push ds 62 67 63 68 %ifdef TMPL_RM … … 84 89 %endif 85 90 91 BS3_ONLY_16BIT_STMT push BS3DATA16 92 BS3_ONLY_16BIT_STMT pop ds 86 93 mov eax, [g_PhysPagingRootPP TMPL_WRT_DATA16_OR_FLAT] 94 BS3_ONLY_16BIT_STMT pop ds 87 95 leave 88 96 ret -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToLM64.asm
r59259 r59286 59 59 ; unnecessary 32-bit -> 64-bit -> 32-bit trips.) 60 60 ; 61 %ifdef TMPL_16BIT 62 and esp, 0ffffh 63 push word [esp] ; copy return address. 64 and word [esp + 2], 0 ; clear upper return address 65 add dword [esp], BS3_ADDR_BS3TEXT16 ; Add base of return segment, completing 32-bit conversion. 66 %endif 61 67 extern TMPL_NM(Bs3SwitchToLM32) 62 68 call TMPL_NM(Bs3SwitchToLM32) -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-TrapSystemCallHandler.asm
r59259 r59286 70 70 mov bx, ax 71 71 shl bx, 1 72 mov bx,[cs:.aoffSyscallHandlers + bx]72 jmp word [cs:.aoffSyscallHandlers + bx] 73 73 %else 74 74 movzx ebx, ax 75 mov ebx, [.aoffSyscallHandlers + ebx * 2] 75 mov ebx, [.aoffSyscallHandlers + ebx * 4] 76 jmp xBX 76 77 %endif 77 78 .aoffSyscallHandlers: … … 119 120 BS3_SET_BITS 16 120 121 %endif 122 121 123 ; Print the character. 122 124 mov bx, 0ff00h -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h
r59259 r59286 280 280 * For indicating near 16-bit functions. 281 281 * Does nothing in 32-bit and 64-bit code. */ 282 /** @def BS3_FAR_DATA 283 * For indicating far 16-bit external data, i.e. in a segment other than DATA16. 284 * Does nothing in 32-bit and 64-bit code. */ 282 285 #ifdef M_I86 283 286 # define BS3_FAR __far … … 285 288 # define BS3_FAR_CODE __far 286 289 # define BS3_NEAR_CODE __near 290 # define BS3_FAR_DATA __far 287 291 #else 288 292 # define BS3_FAR … … 290 294 # define BS3_FAR_CODE 291 295 # define BS3_NEAR_CODE 296 # define BS3_FAR_DATA 292 297 #endif 293 298 … … 365 370 * Constructs a data name. 366 371 * 367 * Example: BS3_DATA_NM(Bs3Gdt)372 * Example: extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdt) 368 373 * 369 374 * @param a_Name The name of the global variable. … … 472 477 * @{ */ 473 478 /** The GDT, indexed by BS3_SEL_XXX shifted by 3. */ 474 extern X86DESC BS3_ DATA_NM(Bs3Gdt)[(BS3_SEL_GDT_LIMIT + 1) / 8];475 476 extern X86DESC64 BS3_ DATA_NM(Bs3Gdt_Ldt); /**< @see BS3_SEL_LDT */477 extern X86DESC BS3_ DATA_NM(Bs3Gdte_Tss16); /**< @see BS3_SEL_TSS16 */478 extern X86DESC BS3_ DATA_NM(Bs3Gdte_Tss16DoubleFault); /**< @see BS3_SEL_TSS16_DF */479 extern X86DESC BS3_ DATA_NM(Bs3Gdte_Tss16Spare0); /**< @see BS3_SEL_TSS16_SPARE0 */480 extern X86DESC BS3_ DATA_NM(Bs3Gdte_Tss16Spare1); /**< @see BS3_SEL_TSS16_SPARE1 */481 extern X86DESC BS3_ DATA_NM(Bs3Gdte_Tss32); /**< @see BS3_SEL_TSS32 */482 extern X86DESC BS3_ DATA_NM(Bs3Gdte_Tss32DoubleFault); /**< @see BS3_SEL_TSS32_DF */483 extern X86DESC BS3_ DATA_NM(Bs3Gdte_Tss32Spare0); /**< @see BS3_SEL_TSS32_SPARE0 */484 extern X86DESC BS3_ DATA_NM(Bs3Gdte_Tss32Spare1); /**< @see BS3_SEL_TSS32_SPARE1 */485 extern X86DESC BS3_ DATA_NM(Bs3Gdte_Tss32IobpIntRedirBm); /**< @see BS3_SEL_TSS32_IOBP_IRB */486 extern X86DESC BS3_ DATA_NM(Bs3Gdte_Tss32IntRedirBm); /**< @see BS3_SEL_TSS32_IRB */487 extern X86DESC BS3_ DATA_NM(Bs3Gdte_Tss64); /**< @see BS3_SEL_TSS64 */488 extern X86DESC BS3_ DATA_NM(Bs3Gdte_Tss64Spare0); /**< @see BS3_SEL_TSS64_SPARE0 */489 extern X86DESC BS3_ DATA_NM(Bs3Gdte_Tss64Spare1); /**< @see BS3_SEL_TSS64_SPARE1 */490 extern X86DESC BS3_ DATA_NM(Bs3Gdte_Tss64Iobp); /**< @see BS3_SEL_TSS64_IOBP */491 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R0_MMIO16); /**< @see BS3_SEL_VMMDEV_MMIO16 */492 493 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R0_First); /**< @see BS3_SEL_R0_FIRST */494 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R0_CS16); /**< @see BS3_SEL_R0_CS16 */495 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R0_DS16); /**< @see BS3_SEL_R0_DS16 */496 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R0_SS16); /**< @see BS3_SEL_R0_SS16 */497 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R0_CS32); /**< @see BS3_SEL_R0_CS32 */498 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R0_DS32); /**< @see BS3_SEL_R0_DS32 */499 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R0_SS32); /**< @see BS3_SEL_R0_SS32 */500 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R0_CS64); /**< @see BS3_SEL_R0_CS64 */501 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R0_DS64); /**< @see BS3_SEL_R0_DS64 */502 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R0_CS16_EO); /**< @see BS3_SEL_R0_CS16_EO */503 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R0_CS16_CNF); /**< @see BS3_SEL_R0_CS16_CNF */504 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R0_CS16_CND_EO); /**< @see BS3_SEL_R0_CS16_CNF_EO */505 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R0_CS32_EO); /**< @see BS3_SEL_R0_CS32_EO */506 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R0_CS32_CNF); /**< @see BS3_SEL_R0_CS32_CNF */507 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R0_CS32_CNF_EO); /**< @see BS3_SEL_R0_CS32_CNF_EO */508 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R0_CS64_EO); /**< @see BS3_SEL_R0_CS64_EO */509 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R0_CS64_CNF); /**< @see BS3_SEL_R0_CS64_CNF */510 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R0_CS64_CNF_EO); /**< @see BS3_SEL_R0_CS64_CNF_EO */511 512 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R1_First); /**< @see BS3_SEL_R1_FIRST */513 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R1_CS16); /**< @see BS3_SEL_R1_CS16 */514 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R1_DS16); /**< @see BS3_SEL_R1_DS16 */515 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R1_SS16); /**< @see BS3_SEL_R1_SS16 */516 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R1_CS32); /**< @see BS3_SEL_R1_CS32 */517 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R1_DS32); /**< @see BS3_SEL_R1_DS32 */518 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R1_SS32); /**< @see BS3_SEL_R1_SS32 */519 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R1_CS64); /**< @see BS3_SEL_R1_CS64 */520 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R1_DS64); /**< @see BS3_SEL_R1_DS64 */521 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R1_CS16_EO); /**< @see BS3_SEL_R1_CS16_EO */522 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R1_CS16_CNF); /**< @see BS3_SEL_R1_CS16_CNF */523 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R1_CS16_CND_EO); /**< @see BS3_SEL_R1_CS16_CNF_EO */524 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R1_CS32_EO); /**< @see BS3_SEL_R1_CS32_EO */525 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R1_CS32_CNF); /**< @see BS3_SEL_R1_CS32_CNF */526 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R1_CS32_CNF_EO); /**< @see BS3_SEL_R1_CS32_CNF_EO */527 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R1_CS64_EO); /**< @see BS3_SEL_R1_CS64_EO */528 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R1_CS64_CNF); /**< @see BS3_SEL_R1_CS64_CNF */529 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R1_CS64_CNF_EO); /**< @see BS3_SEL_R1_CS64_CNF_EO */530 531 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R2_First); /**< @see BS3_SEL_R2_FIRST */532 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R2_CS16); /**< @see BS3_SEL_R2_CS16 */533 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R2_DS16); /**< @see BS3_SEL_R2_DS16 */534 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R2_SS16); /**< @see BS3_SEL_R2_SS16 */535 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R2_CS32); /**< @see BS3_SEL_R2_CS32 */536 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R2_DS32); /**< @see BS3_SEL_R2_DS32 */537 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R2_SS32); /**< @see BS3_SEL_R2_SS32 */538 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R2_CS64); /**< @see BS3_SEL_R2_CS64 */539 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R2_DS64); /**< @see BS3_SEL_R2_DS64 */540 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R2_CS16_EO); /**< @see BS3_SEL_R2_CS16_EO */541 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R2_CS16_CNF); /**< @see BS3_SEL_R2_CS16_CNF */542 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R2_CS16_CND_EO); /**< @see BS3_SEL_R2_CS16_CNF_EO */543 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R2_CS32_EO); /**< @see BS3_SEL_R2_CS32_EO */544 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R2_CS32_CNF); /**< @see BS3_SEL_R2_CS32_CNF */545 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R2_CS32_CNF_EO); /**< @see BS3_SEL_R2_CS32_CNF_EO */546 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R2_CS64_EO); /**< @see BS3_SEL_R2_CS64_EO */547 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R2_CS64_CNF); /**< @see BS3_SEL_R2_CS64_CNF */548 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R2_CS64_CNF_EO); /**< @see BS3_SEL_R2_CS64_CNF_EO */549 550 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R3_First); /**< @see BS3_SEL_R3_FIRST */551 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R3_CS16); /**< @see BS3_SEL_R3_CS16 */552 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R3_DS16); /**< @see BS3_SEL_R3_DS16 */553 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R3_SS16); /**< @see BS3_SEL_R3_SS16 */554 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R3_CS32); /**< @see BS3_SEL_R3_CS32 */555 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R3_DS32); /**< @see BS3_SEL_R3_DS32 */556 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R3_SS32); /**< @see BS3_SEL_R3_SS32 */557 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R3_CS64); /**< @see BS3_SEL_R3_CS64 */558 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R3_DS64); /**< @see BS3_SEL_R3_DS64 */559 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R3_CS16_EO); /**< @see BS3_SEL_R3_CS16_EO */560 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R3_CS16_CNF); /**< @see BS3_SEL_R3_CS16_CNF */561 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R3_CS16_CND_EO); /**< @see BS3_SEL_R3_CS16_CNF_EO */562 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R3_CS32_EO); /**< @see BS3_SEL_R3_CS32_EO */563 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R3_CS32_CNF); /**< @see BS3_SEL_R3_CS32_CNF */564 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R3_CS32_CNF_EO); /**< @see BS3_SEL_R3_CS32_CNF_EO */565 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R3_CS64_EO); /**< @see BS3_SEL_R3_CS64_EO */566 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R3_CS64_CNF); /**< @see BS3_SEL_R3_CS64_CNF */567 extern X86DESC BS3_ DATA_NM(Bs3Gdte_R3_CS64_CNF_EO); /**< @see BS3_SEL_R3_CS64_CNF_EO */568 569 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare00); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_00 */570 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare01); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_01 */571 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare02); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_02 */572 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare03); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_03 */573 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare04); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_04 */574 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare05); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_05 */575 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare06); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_06 */576 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare07); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_07 */577 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare08); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_08 */578 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare09); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_09 */579 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare0a); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_0a */580 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare0b); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_0b */581 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare0c); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_0c */582 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare0d); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_0d */583 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare0e); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_0e */584 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare0f); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_0f */585 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare10); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_10 */586 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare11); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_11 */587 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare12); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_12 */588 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare13); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_13 */589 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare14); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_14 */590 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare15); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_15 */591 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare16); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_16 */592 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare17); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_17 */593 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare18); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_18 */594 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare19); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_19 */595 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare1a); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_1a */596 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare1b); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_1b */597 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare1c); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_1c */598 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare1d); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_1d */599 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare1e); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_1e */600 extern X86DESC BS3_ DATA_NM(Bs3GdteSpare1f); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_1f */479 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdt)[(BS3_SEL_GDT_LIMIT + 1) / 8]; 480 481 extern X86DESC64 BS3_FAR_DATA BS3_DATA_NM(Bs3Gdt_Ldt); /**< @see BS3_SEL_LDT */ 482 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_Tss16); /**< @see BS3_SEL_TSS16 */ 483 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_Tss16DoubleFault); /**< @see BS3_SEL_TSS16_DF */ 484 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_Tss16Spare0); /**< @see BS3_SEL_TSS16_SPARE0 */ 485 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_Tss16Spare1); /**< @see BS3_SEL_TSS16_SPARE1 */ 486 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_Tss32); /**< @see BS3_SEL_TSS32 */ 487 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_Tss32DoubleFault); /**< @see BS3_SEL_TSS32_DF */ 488 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_Tss32Spare0); /**< @see BS3_SEL_TSS32_SPARE0 */ 489 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_Tss32Spare1); /**< @see BS3_SEL_TSS32_SPARE1 */ 490 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_Tss32IobpIntRedirBm); /**< @see BS3_SEL_TSS32_IOBP_IRB */ 491 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_Tss32IntRedirBm); /**< @see BS3_SEL_TSS32_IRB */ 492 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_Tss64); /**< @see BS3_SEL_TSS64 */ 493 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_Tss64Spare0); /**< @see BS3_SEL_TSS64_SPARE0 */ 494 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_Tss64Spare1); /**< @see BS3_SEL_TSS64_SPARE1 */ 495 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_Tss64Iobp); /**< @see BS3_SEL_TSS64_IOBP */ 496 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R0_MMIO16); /**< @see BS3_SEL_VMMDEV_MMIO16 */ 497 498 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R0_First); /**< @see BS3_SEL_R0_FIRST */ 499 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R0_CS16); /**< @see BS3_SEL_R0_CS16 */ 500 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R0_DS16); /**< @see BS3_SEL_R0_DS16 */ 501 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R0_SS16); /**< @see BS3_SEL_R0_SS16 */ 502 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R0_CS32); /**< @see BS3_SEL_R0_CS32 */ 503 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R0_DS32); /**< @see BS3_SEL_R0_DS32 */ 504 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R0_SS32); /**< @see BS3_SEL_R0_SS32 */ 505 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R0_CS64); /**< @see BS3_SEL_R0_CS64 */ 506 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R0_DS64); /**< @see BS3_SEL_R0_DS64 */ 507 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R0_CS16_EO); /**< @see BS3_SEL_R0_CS16_EO */ 508 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R0_CS16_CNF); /**< @see BS3_SEL_R0_CS16_CNF */ 509 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R0_CS16_CND_EO); /**< @see BS3_SEL_R0_CS16_CNF_EO */ 510 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R0_CS32_EO); /**< @see BS3_SEL_R0_CS32_EO */ 511 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R0_CS32_CNF); /**< @see BS3_SEL_R0_CS32_CNF */ 512 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R0_CS32_CNF_EO); /**< @see BS3_SEL_R0_CS32_CNF_EO */ 513 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R0_CS64_EO); /**< @see BS3_SEL_R0_CS64_EO */ 514 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R0_CS64_CNF); /**< @see BS3_SEL_R0_CS64_CNF */ 515 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R0_CS64_CNF_EO); /**< @see BS3_SEL_R0_CS64_CNF_EO */ 516 517 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R1_First); /**< @see BS3_SEL_R1_FIRST */ 518 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R1_CS16); /**< @see BS3_SEL_R1_CS16 */ 519 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R1_DS16); /**< @see BS3_SEL_R1_DS16 */ 520 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R1_SS16); /**< @see BS3_SEL_R1_SS16 */ 521 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R1_CS32); /**< @see BS3_SEL_R1_CS32 */ 522 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R1_DS32); /**< @see BS3_SEL_R1_DS32 */ 523 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R1_SS32); /**< @see BS3_SEL_R1_SS32 */ 524 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R1_CS64); /**< @see BS3_SEL_R1_CS64 */ 525 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R1_DS64); /**< @see BS3_SEL_R1_DS64 */ 526 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R1_CS16_EO); /**< @see BS3_SEL_R1_CS16_EO */ 527 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R1_CS16_CNF); /**< @see BS3_SEL_R1_CS16_CNF */ 528 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R1_CS16_CND_EO); /**< @see BS3_SEL_R1_CS16_CNF_EO */ 529 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R1_CS32_EO); /**< @see BS3_SEL_R1_CS32_EO */ 530 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R1_CS32_CNF); /**< @see BS3_SEL_R1_CS32_CNF */ 531 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R1_CS32_CNF_EO); /**< @see BS3_SEL_R1_CS32_CNF_EO */ 532 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R1_CS64_EO); /**< @see BS3_SEL_R1_CS64_EO */ 533 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R1_CS64_CNF); /**< @see BS3_SEL_R1_CS64_CNF */ 534 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R1_CS64_CNF_EO); /**< @see BS3_SEL_R1_CS64_CNF_EO */ 535 536 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R2_First); /**< @see BS3_SEL_R2_FIRST */ 537 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R2_CS16); /**< @see BS3_SEL_R2_CS16 */ 538 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R2_DS16); /**< @see BS3_SEL_R2_DS16 */ 539 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R2_SS16); /**< @see BS3_SEL_R2_SS16 */ 540 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R2_CS32); /**< @see BS3_SEL_R2_CS32 */ 541 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R2_DS32); /**< @see BS3_SEL_R2_DS32 */ 542 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R2_SS32); /**< @see BS3_SEL_R2_SS32 */ 543 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R2_CS64); /**< @see BS3_SEL_R2_CS64 */ 544 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R2_DS64); /**< @see BS3_SEL_R2_DS64 */ 545 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R2_CS16_EO); /**< @see BS3_SEL_R2_CS16_EO */ 546 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R2_CS16_CNF); /**< @see BS3_SEL_R2_CS16_CNF */ 547 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R2_CS16_CND_EO); /**< @see BS3_SEL_R2_CS16_CNF_EO */ 548 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R2_CS32_EO); /**< @see BS3_SEL_R2_CS32_EO */ 549 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R2_CS32_CNF); /**< @see BS3_SEL_R2_CS32_CNF */ 550 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R2_CS32_CNF_EO); /**< @see BS3_SEL_R2_CS32_CNF_EO */ 551 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R2_CS64_EO); /**< @see BS3_SEL_R2_CS64_EO */ 552 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R2_CS64_CNF); /**< @see BS3_SEL_R2_CS64_CNF */ 553 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R2_CS64_CNF_EO); /**< @see BS3_SEL_R2_CS64_CNF_EO */ 554 555 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R3_First); /**< @see BS3_SEL_R3_FIRST */ 556 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R3_CS16); /**< @see BS3_SEL_R3_CS16 */ 557 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R3_DS16); /**< @see BS3_SEL_R3_DS16 */ 558 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R3_SS16); /**< @see BS3_SEL_R3_SS16 */ 559 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R3_CS32); /**< @see BS3_SEL_R3_CS32 */ 560 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R3_DS32); /**< @see BS3_SEL_R3_DS32 */ 561 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R3_SS32); /**< @see BS3_SEL_R3_SS32 */ 562 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R3_CS64); /**< @see BS3_SEL_R3_CS64 */ 563 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R3_DS64); /**< @see BS3_SEL_R3_DS64 */ 564 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R3_CS16_EO); /**< @see BS3_SEL_R3_CS16_EO */ 565 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R3_CS16_CNF); /**< @see BS3_SEL_R3_CS16_CNF */ 566 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R3_CS16_CND_EO); /**< @see BS3_SEL_R3_CS16_CNF_EO */ 567 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R3_CS32_EO); /**< @see BS3_SEL_R3_CS32_EO */ 568 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R3_CS32_CNF); /**< @see BS3_SEL_R3_CS32_CNF */ 569 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R3_CS32_CNF_EO); /**< @see BS3_SEL_R3_CS32_CNF_EO */ 570 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R3_CS64_EO); /**< @see BS3_SEL_R3_CS64_EO */ 571 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R3_CS64_CNF); /**< @see BS3_SEL_R3_CS64_CNF */ 572 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_R3_CS64_CNF_EO); /**< @see BS3_SEL_R3_CS64_CNF_EO */ 573 574 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare00); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_00 */ 575 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare01); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_01 */ 576 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare02); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_02 */ 577 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare03); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_03 */ 578 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare04); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_04 */ 579 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare05); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_05 */ 580 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare06); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_06 */ 581 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare07); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_07 */ 582 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare08); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_08 */ 583 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare09); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_09 */ 584 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare0a); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_0a */ 585 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare0b); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_0b */ 586 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare0c); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_0c */ 587 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare0d); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_0d */ 588 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare0e); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_0e */ 589 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare0f); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_0f */ 590 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare10); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_10 */ 591 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare11); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_11 */ 592 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare12); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_12 */ 593 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare13); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_13 */ 594 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare14); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_14 */ 595 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare15); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_15 */ 596 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare16); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_16 */ 597 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare17); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_17 */ 598 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare18); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_18 */ 599 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare19); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_19 */ 600 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare1a); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_1a */ 601 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare1b); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_1b */ 602 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare1c); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_1c */ 603 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare1d); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_1d */ 604 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare1e); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_1e */ 605 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteSpare1f); /**< GDT entry for playing with in testcases. @see BS3_SEL_SPARE_1f */ 601 606 602 607 /** GDTs setting up the tiled 16-bit access to the first 16 MBs of memory. 603 608 * @see BS3_SEL_TILED, BS3_SEL_TILED_LAST, BS3_SEL_TILED_AREA_SIZE */ 604 extern X86DESC BS3_ DATA_NM(Bs3GdteTiled)[256];609 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteTiled)[256]; 605 610 /** Free GDTes, part \#1. */ 606 extern X86DESC BS3_ DATA_NM(Bs3GdteFreePart1)[64];611 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteFreePart1)[64]; 607 612 /** The BS3CODE16 GDT entry. @see BS3_SEL_TEXT16 */ 608 extern X86DESC BS3_ DATA_NM(Bs3Gdte_CODE16);613 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_CODE16); 609 614 /** Free GDTes, part \#2. */ 610 extern X86DESC BS3_ DATA_NM(Bs3GdteFreePart2)[511];615 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteFreePart2)[511]; 611 616 /** The BS3SYSTEM16 GDT entry. */ 612 extern X86DESC BS3_ DATA_NM(Bs3Gdte_SYSTEM16);617 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_SYSTEM16); 613 618 /** Free GDTes, part \#3. */ 614 extern X86DESC BS3_ DATA_NM(Bs3GdteFreePart3)[223];619 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdteFreePart3)[223]; 615 620 /** The BS3DATA16 GDT entry. */ 616 extern X86DESC BS3_ DATA_NM(Bs3Gdte_DATA16);621 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Gdte_DATA16); 617 622 /** The end of the GDT (exclusive). */ 618 extern X86DESC BS3_ DATA_NM(Bs3GdtEnd);623 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3GdtEnd); 619 624 620 625 /** The default 16-bit TSS. */ 621 extern X86TSS16 BS3_ DATA_NM(Bs3Tss16);622 extern X86TSS16 BS3_ DATA_NM(Bs3Tss16DoubleFault);623 extern X86TSS16 BS3_ DATA_NM(Bs3Tss16Spare0);624 extern X86TSS16 BS3_ DATA_NM(Bs3Tss16Spare1);626 extern X86TSS16 BS3_FAR_DATA BS3_DATA_NM(Bs3Tss16); 627 extern X86TSS16 BS3_FAR_DATA BS3_DATA_NM(Bs3Tss16DoubleFault); 628 extern X86TSS16 BS3_FAR_DATA BS3_DATA_NM(Bs3Tss16Spare0); 629 extern X86TSS16 BS3_FAR_DATA BS3_DATA_NM(Bs3Tss16Spare1); 625 630 /** The default 32-bit TSS. */ 626 extern X86TSS32 BS3_ DATA_NM(Bs3Tss32);627 extern X86TSS32 BS3_ DATA_NM(Bs3Tss32DoubleFault);628 extern X86TSS32 BS3_ DATA_NM(Bs3Tss32Spare0);629 extern X86TSS32 BS3_ DATA_NM(Bs3Tss32Spare1);631 extern X86TSS32 BS3_FAR_DATA BS3_DATA_NM(Bs3Tss32); 632 extern X86TSS32 BS3_FAR_DATA BS3_DATA_NM(Bs3Tss32DoubleFault); 633 extern X86TSS32 BS3_FAR_DATA BS3_DATA_NM(Bs3Tss32Spare0); 634 extern X86TSS32 BS3_FAR_DATA BS3_DATA_NM(Bs3Tss32Spare1); 630 635 /** The default 64-bit TSS. */ 631 extern X86TSS64 BS3_ DATA_NM(Bs3Tss64);632 extern X86TSS64 BS3_ DATA_NM(Bs3Tss64Spare0);633 extern X86TSS64 BS3_ DATA_NM(Bs3Tss64Spare1);634 extern X86TSS64 BS3_ DATA_NM(Bs3Tss64WithIopb);635 extern X86TSS32 BS3_ DATA_NM(Bs3Tss32WithIopb);636 extern X86TSS64 BS3_FAR_DATA BS3_DATA_NM(Bs3Tss64); 637 extern X86TSS64 BS3_FAR_DATA BS3_DATA_NM(Bs3Tss64Spare0); 638 extern X86TSS64 BS3_FAR_DATA BS3_DATA_NM(Bs3Tss64Spare1); 639 extern X86TSS64 BS3_FAR_DATA BS3_DATA_NM(Bs3Tss64WithIopb); 640 extern X86TSS32 BS3_FAR_DATA BS3_DATA_NM(Bs3Tss32WithIopb); 636 641 /** Interrupt redirection bitmap used by Bs3Tss32WithIopb. */ 637 extern uint8_t BS3_ DATA_NM(Bs3SharedIntRedirBm)[32];642 extern uint8_t BS3_FAR_DATA BS3_DATA_NM(Bs3SharedIntRedirBm)[32]; 638 643 /** I/O permission bitmap used by Bs3Tss32WithIopb and Bs3Tss64WithIopb. */ 639 extern uint8_t BS3_ DATA_NM(Bs3SharedIobp)[8192+2];644 extern uint8_t BS3_FAR_DATA BS3_DATA_NM(Bs3SharedIobp)[8192+2]; 640 645 /** End of the I/O permission bitmap (exclusive). */ 641 extern uint8_t BS3_ DATA_NM(Bs3SharedIobpEnd);646 extern uint8_t BS3_FAR_DATA BS3_DATA_NM(Bs3SharedIobpEnd); 642 647 /** 16-bit IDT. */ 643 extern X86DESC BS3_ DATA_NM(Bs3Idt16)[256];648 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Idt16)[256]; 644 649 /** 32-bit IDT. */ 645 extern X86DESC BS3_ DATA_NM(Bs3Idt32)[256];650 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Idt32)[256]; 646 651 /** 64-bit IDT. */ 647 extern X86DESC64 BS3_ DATA_NM(Bs3Idt64)[256];652 extern X86DESC64 BS3_FAR_DATA BS3_DATA_NM(Bs3Idt64)[256]; 648 653 /** Structure for the LIDT instruction for loading the 16-bit IDT. */ 649 extern X86XDTR64 BS3_ DATA_NM(Bs3Lidt_Idt16);654 extern X86XDTR64 BS3_FAR_DATA BS3_DATA_NM(Bs3Lidt_Idt16); 650 655 /** Structure for the LIDT instruction for loading the 32-bit IDT. */ 651 extern X86XDTR64 BS3_ DATA_NM(Bs3Lidt_Idt32);656 extern X86XDTR64 BS3_FAR_DATA BS3_DATA_NM(Bs3Lidt_Idt32); 652 657 /** Structure for the LIDT instruction for loading the 64-bit IDT. */ 653 extern X86XDTR64 BS3_ DATA_NM(Bs3Lidt_Idt64);658 extern X86XDTR64 BS3_FAR_DATA BS3_DATA_NM(Bs3Lidt_Idt64); 654 659 /** Structure for the LIDT instruction for loading the real mode interrupt 655 660 * vector table.. */ 656 extern X86XDTR64 BS3_ DATA_NM(Bs3Lidt_Ivt);661 extern X86XDTR64 BS3_FAR_DATA BS3_DATA_NM(Bs3Lidt_Ivt); 657 662 /** Structure for the LGDT instruction for loading the GDT. */ 658 extern X86XDTR64 BS3_ DATA_NM(Bs3Lgdt_Gdt);663 extern X86XDTR64 BS3_FAR_DATA BS3_DATA_NM(Bs3Lgdt_Gdt); 659 664 /** The LDT (all entries are empty, fill in for testing). */ 660 extern X86DESC BS3_ DATA_NM(Bs3Ldt)[118];665 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3Ldt)[118]; 661 666 /** The end of the LDT (exclusive). */ 662 extern X86DESC BS3_ DATA_NM(Bs3LdtEnd);667 extern X86DESC BS3_FAR_DATA BS3_DATA_NM(Bs3LdtEnd); 663 668 664 669 /** @} */ … … 668 673 * @{ */ 669 674 /** Start of the BS3TEXT16 segment. */ 670 extern uint8_t BS3_ DATA_NM(Bs3Text16_StartOfSegment);675 extern uint8_t BS3_FAR_DATA BS3_DATA_NM(Bs3Text16_StartOfSegment); 671 676 /** End of the BS3TEXT16 segment. */ 672 extern uint8_t BS3_ DATA_NM(Bs3Text16_EndOfSegment);677 extern uint8_t BS3_FAR_DATA BS3_DATA_NM(Bs3Text16_EndOfSegment); 673 678 /** The size of the BS3TEXT16 segment. */ 674 extern uint16_t BS3_ DATA_NM(Bs3Text16_Size);679 extern uint16_t BS3_FAR_DATA BS3_DATA_NM(Bs3Text16_Size); 675 680 676 681 /** Start of the BS3SYSTEM16 segment. */ 677 extern uint8_t BS3_ DATA_NM(Bs3System16_StartOfSegment);682 extern uint8_t BS3_FAR_DATA BS3_DATA_NM(Bs3System16_StartOfSegment); 678 683 /** End of the BS3SYSTEM16 segment. */ 679 extern uint8_t BS3_ DATA_NM(Bs3System16_EndOfSegment);684 extern uint8_t BS3_FAR_DATA BS3_DATA_NM(Bs3System16_EndOfSegment); 680 685 681 686 /** Start of the BS3DATA16 segment. */ 682 extern uint8_t BS3_ DATA_NM(Bs3Data16_StartOfSegment);687 extern uint8_t BS3_FAR_DATA BS3_DATA_NM(Bs3Data16_StartOfSegment); 683 688 /** End of the BS3DATA16 segment. */ 684 extern uint8_t BS3_ DATA_NM(Bs3Data16_EndOfSegment);689 extern uint8_t BS3_FAR_DATA BS3_DATA_NM(Bs3Data16_EndOfSegment); 685 690 686 691 /** Start of the BS3TEXT32 segment. */ 687 extern uint8_t BS3_ DATA_NM(Bs3Text32_StartOfSegment);692 extern uint8_t BS3_FAR_DATA BS3_DATA_NM(Bs3Text32_StartOfSegment); 688 693 /** Start of the BS3TEXT32 segment. */ 689 extern uint8_t BS3_ DATA_NM(Bs3Text32_EndOfSegment);694 extern uint8_t BS3_FAR_DATA BS3_DATA_NM(Bs3Text32_EndOfSegment); 690 695 691 696 /** Start of the BS3DATA32 segment. */ 692 extern uint8_t BS3_ DATA_NM(Bs3Data32_StartOfSegment);697 extern uint8_t BS3_FAR_DATA BS3_DATA_NM(Bs3Data32_StartOfSegment); 693 698 /** Start of the BS3DATA32 segment. */ 694 extern uint8_t BS3_ DATA_NM(Bs3Data32_EndOfSegment);699 extern uint8_t BS3_FAR_DATA BS3_DATA_NM(Bs3Data32_EndOfSegment); 695 700 696 701 /** Start of the BS3TEXT64 segment. */ 697 extern uint8_t BS3_ DATA_NM(Bs3Text64_StartOfSegment);702 extern uint8_t BS3_FAR_DATA BS3_DATA_NM(Bs3Text64_StartOfSegment); 698 703 /** Start of the BS3TEXT64 segment. */ 699 extern uint8_t BS3_ DATA_NM(Bs3Text64_EndOfSegment);704 extern uint8_t BS3_FAR_DATA BS3_DATA_NM(Bs3Text64_EndOfSegment); 700 705 701 706 /** Start of the BS3DATA64 segment. */ 702 extern uint8_t BS3_ DATA_NM(Bs3Data64_StartOfSegment);707 extern uint8_t BS3_FAR_DATA BS3_DATA_NM(Bs3Data64_StartOfSegment); 703 708 /** Start of the BS3DATA64 segment. */ 704 extern uint8_t BS3_ DATA_NM(Bs3Data64_EndOfSegment);709 extern uint8_t BS3_FAR_DATA BS3_DATA_NM(Bs3Data64_EndOfSegment); 705 710 706 711 /** The size of the Data16, Text32, Text64, Data32 and Data64 blob. */ 707 extern uint32_t BS3_ DATA_NM(Bs3Data16Thru64Text32And64_TotalSize);712 extern uint32_t BS3_FAR_DATA BS3_DATA_NM(Bs3Data16Thru64Text32And64_TotalSize); 708 713 /** The total image size (from Text16 thu Data64). */ 709 extern uint32_t BS3_ DATA_NM(Bs3TotalImageSize);714 extern uint32_t BS3_FAR_DATA BS3_DATA_NM(Bs3TotalImageSize); 710 715 /** @} */ 711 716 … … 1643 1648 uint16_t gs; 1644 1649 uint16_t ss; 1650 uint16_t tr; 1651 uint16_t ldtr; 1645 1652 uint8_t cBits; 1646 uint8_t abPadding[ 3];1653 uint8_t abPadding[7]; 1647 1654 BS3REG cr0; 1648 1655 BS3REG cr2; … … 1696 1703 1697 1704 /** 1698 * Modifies the 32-bit IDT entry specified by @a iIdt. 1705 * Initializes 16-bit (protected mode) trap handling. 1706 * 1707 * @remarks Does not install 16-bit trap handling, just initializes the 1708 * structures. 1709 */ 1710 BS3_DECL(void) Bs3Trap16Init_c16(void); 1711 BS3_DECL(void) Bs3Trap16Init_c32(void); /**< @copydoc Bs3Trap16Init_c16 */ 1712 BS3_DECL(void) Bs3Trap16Init_c64(void); /**< @copydoc Bs3Trap16Init_c16 */ 1713 #define Bs3Trap16Init BS3_CMN_NM(Bs3Trap16Init) /**< Selects #Bs3Trap16Init_c16, #Bs3Trap16Init_c32 or #Bs3Trap16Init_c64. */ 1714 1715 /** 1716 * Initializes 32-bit trap handling. 1717 * 1718 * @remarks Does not install 32-bit trap handling, just initializes the 1719 * structures. 1720 */ 1721 BS3_DECL(void) Bs3Trap32Init_c16(void); 1722 BS3_DECL(void) Bs3Trap32Init_c32(void); /**< @copydoc Bs3Trap32Init_c16 */ 1723 BS3_DECL(void) Bs3Trap32Init_c64(void); /**< @copydoc Bs3Trap32Init_c16 */ 1724 #define Bs3Trap32Init BS3_CMN_NM(Bs3Trap32Init) /**< Selects #Bs3Trap32Init_c16, #Bs3Trap32Init_c32 or #Bs3Trap32Init_c64. */ 1725 1726 /** 1727 * Initializes 64-bit trap handling 1728 * 1729 * @remarks Does not install 64-bit trap handling, just initializes the 1730 * structures. 1731 */ 1732 BS3_DECL(void) Bs3Trap64Init_c16(void); 1733 BS3_DECL(void) Bs3Trap64Init_c32(void); /**< @copydoc Bs3Trap64Init_c16 */ 1734 BS3_DECL(void) Bs3Trap64Init_c64(void); /**< @copydoc Bs3Trap64Init_c16 */ 1735 #define Bs3Trap64Init BS3_CMN_NM(Bs3Trap64Init) /**< Selects #Bs3Trap64Init_c16, #Bs3Trap64Init_c32 or #Bs3Trap64Init_c64. */ 1736 1737 /** 1738 * Modifies the 16-bit IDT entry (protected mode) specified by @a iIdt. 1699 1739 * 1700 1740 * @param iIdt The index of the IDT entry to set. … … 1705 1745 * @param cParams The parameter count (for call gates). 1706 1746 */ 1747 BS3_DECL(void) Bs3Trap16SetGate_c16(uint8_t iIdt, uint8_t bType, uint8_t bDpl, uint16_t uSel, uint32_t off, uint8_t cParams); 1748 BS3_DECL(void) Bs3Trap16SetGate_c32(uint8_t iIdt, uint8_t bType, uint8_t bDpl, uint16_t uSel, uint32_t off, uint8_t cParams); /**< @copydoc Bs3Trap16SetGate_c16 */ 1749 BS3_DECL(void) Bs3Trap16SetGate_c64(uint8_t iIdt, uint8_t bType, uint8_t bDpl, uint16_t uSel, uint32_t off, uint8_t cParams); /**< @copydoc Bs3Trap16SetGate_c16 */ 1750 #define Bs3Trap16SetGate BS3_CMN_NM(Bs3Trap16SetGate) /**< Selects #Bs3Trap16SetGate_c16, #Bs3Trap16SetGate_c32 or #Bs3Trap16SetGate_c64. */ 1751 1752 /** The address of Bs3Trap16GenericEntries. 1753 * Bs3Trap16GenericEntries is an array of interrupt/trap/whatever entry 1754 * points, 8 bytes each, that will create a register frame and call the generic 1755 * C compatible trap handlers. */ 1756 extern uint32_t BS3_DATA_NM(g_Bs3Trap16GenericEntriesFlatAddr); 1757 1758 /** 1759 * Modifies the 32-bit IDT entry specified by @a iIdt. 1760 * 1761 * @param iIdt The index of the IDT entry to set. 1762 * @param bType The gate type (X86_SEL_TYPE_SYS_XXX). 1763 * @param bDpl The DPL. 1764 * @param uSel The handler selector. 1765 * @param off The handler offset (if applicable). 1766 * @param cParams The parameter count (for call gates). 1767 */ 1707 1768 BS3_DECL(void) Bs3Trap32SetGate_c16(uint8_t iIdt, uint8_t bType, uint8_t bDpl, uint16_t uSel, uint32_t off, uint8_t cParams); 1708 1769 BS3_DECL(void) Bs3Trap32SetGate_c32(uint8_t iIdt, uint8_t bType, uint8_t bDpl, uint16_t uSel, uint32_t off, uint8_t cParams); /**< @copydoc Bs3Trap32SetGate_c16 */ … … 1771 1832 #define Bs3Trap32SetHandler BS3_CMN_NM(Bs3Trap32SetHandler) /**< Selects #Bs3Trap32SetHandler_c16, #Bs3Trap32SetHandler_c32 or #Bs3Trap32SetHandler_c64. */ 1772 1833 1834 /** 1835 * Default C/C++ trap handler. 1836 * 1837 * This will check trap record and panic if no match was found. 1838 * 1839 * @param pTrapFrame Trap frame of the trap to handle. 1840 */ 1841 BS3_DECL(void) Bs3TrapDefaultHandler_c16(PBS3TRAPFRAME pTrapFrame); 1842 BS3_DECL(void) Bs3TrapDefaultHandler_c32(PBS3TRAPFRAME pTrapFrame); /**< @copydoc Bs3TrapDefaultHandler_c16 */ 1843 BS3_DECL(void) Bs3TrapDefaultHandler_c64(PBS3TRAPFRAME pTrapFrame); /**< @copydoc Bs3TrapDefaultHandler_c16 */ 1844 #define Bs3TrapDefaultHandler BS3_CMN_NM(Bs3TrapDefaultHandler) /**< Selects #Bs3TrapDefaultHandler_c16, #Bs3TrapDefaultHandler_c32 or #Bs3TrapDefaultHandler_c64. */ 1845 1846 /** 1847 * Prints the trap frame (to screen). 1848 * @param pTrapFrame Trap frame to print. 1849 */ 1850 BS3_DECL(void) Bs3TrapPrintFrame_c16(PCBS3TRAPFRAME pTrapFrame); 1851 BS3_DECL(void) Bs3TrapPrintFrame_c32(PCBS3TRAPFRAME pTrapFrame); /**< @copydoc Bs3TrapPrintFrame_c16 */ 1852 BS3_DECL(void) Bs3TrapPrintFrame_c64(PCBS3TRAPFRAME pTrapFrame); /**< @copydoc Bs3TrapPrintFrame_c16 */ 1853 #define Bs3TrapPrintFrame BS3_CMN_NM(Bs3TrapPrintFrame) /**< Selects #Bs3TrapPrintFrame_c16, #Bs3TrapPrintFrame_c32 or #Bs3TrapPrintFrame_c64. */ 1854 1773 1855 /** @} */ 1774 1856 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.mac
r59259 r59286 860 860 .gs resw 1 861 861 .ss resw 1 862 .tr resw 1 863 .ldtr resw 1 862 864 .cBits resb 1 863 .abPadding resb 3865 .abPadding resb 7 864 866 .cr0 resq 1 865 867 .cr2 resq 1
Note:
See TracChangeset
for help on using the changeset viewer.