- Timestamp:
- Feb 7, 2020 1:12:36 PM (5 years ago)
- Location:
- trunk/src/VBox/ValidationKit/bootsectors
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-state64-1.c64
r83006 r83017 96 96 { 97 97 Bs3TestInit("bs3-cpu-state64-1"); 98 if (!(g_uBs3CpuDetected & BS3CPU_F_LONG_MODE)) 99 Bs3TestSkipped("no long mode"); 100 else 101 { 102 /* 103 * Switch to 64-bit mode and back to rm. 104 */ 105 Bs3TestSub("noop"); 106 bs3CpuState64InitCtx(0); 107 bs3CpuState64Worker(bs3CpuState64Worker_Nop); 108 bs3CpuState64Comp(false /*fModRbx*/); 98 /* 99 * Switch to 64-bit mode and back to rm. 100 */ 101 Bs3TestSub("noop"); 102 bs3CpuState64InitCtx(0); 103 bs3CpuState64Worker(bs3CpuState64Worker_Nop); 104 bs3CpuState64Comp(false /*fModRbx*/); 109 105 110 111 112 113 114 115 116 117 118 119 120 121 106 Bs3TestSub("Modify all 32-bit GPRs"); 107 bs3CpuState64InitCtx(0); 108 bs3CpuState64Worker(bs3CpuState64Worker_ModAll32BitGrps); 109 g_bs3CpuState64CtxToLoad.rax.u = UINT64_C(0xc0ffee0d); 110 g_bs3CpuState64CtxToLoad.rcx.u = UINT64_C(0xc0ffee1d); 111 g_bs3CpuState64CtxToLoad.rdx.u = UINT64_C(0xc0ffee2d); 112 g_bs3CpuState64CtxToLoad.rbx.u = UINT64_C(0xc0ffee3d); 113 g_bs3CpuState64CtxToLoad.rsp.u = UINT64_C(0xc0ffee4d); 114 g_bs3CpuState64CtxToLoad.rbp.u = UINT64_C(0xc0ffee5d); 115 g_bs3CpuState64CtxToLoad.rsi.u = UINT64_C(0xc0ffee6d); 116 g_bs3CpuState64CtxToLoad.rdi.u = UINT64_C(0xc0ffee7d); 117 bs3CpuState64Comp(true /*fModRbx*/); 122 118 123 124 125 126 g_bs3CpuState64CtxToLoad.rax.u = UINT64_C(0xfad0);127 g_bs3CpuState64CtxToLoad.rcx.u = UINT64_C(0xfad1);128 g_bs3CpuState64CtxToLoad.rdx.u = UINT64_C(0xfad2);129 g_bs3CpuState64CtxToLoad.rbx.u = UINT64_C(0xfad3);130 g_bs3CpuState64CtxToLoad.rsp.u = UINT64_C(0xfad4);131 g_bs3CpuState64CtxToLoad.rbp.u = UINT64_C(0xfad5);132 g_bs3CpuState64CtxToLoad.rsi.u = UINT64_C(0xfad6);133 g_bs3CpuState64CtxToLoad.rdi.u = UINT64_C(0xfad7);134 119 Bs3TestSub("Modify all 16-bit GPRs"); 120 bs3CpuState64InitCtx(0); 121 bs3CpuState64Worker(bs3CpuState64Worker_ModAll16BitGrps); 122 g_bs3CpuState64CtxToLoad.rax.au16[0] = UINT16_C(0xfad0); 123 g_bs3CpuState64CtxToLoad.rcx.au16[0] = UINT16_C(0xfad1); 124 g_bs3CpuState64CtxToLoad.rdx.au16[0] = UINT16_C(0xfad2); 125 g_bs3CpuState64CtxToLoad.rbx.au16[0] = UINT16_C(0xfad3); 126 g_bs3CpuState64CtxToLoad.rsp.au16[0] = UINT16_C(0xfad4); 127 g_bs3CpuState64CtxToLoad.rbp.au16[0] = UINT16_C(0xfad5); 128 g_bs3CpuState64CtxToLoad.rsi.au16[0] = UINT16_C(0xfad6); 129 g_bs3CpuState64CtxToLoad.rdi.au16[0] = UINT16_C(0xfad7); 130 bs3CpuState64Comp(true /*fModRbx*/); 135 131 136 Bs3TestSub("Modify all 8-bit GPRs"); 137 bs3CpuState64InitCtx(0); 138 bs3CpuState64Worker(bs3CpuState64Worker_ModAll8BitGrps); 139 g_bs3CpuState64CtxToLoad.rax.u = 0; 140 g_bs3CpuState64CtxToLoad.rax.au8[0] = 0x10; 141 g_bs3CpuState64CtxToLoad.rax.au8[1] = 0x11; 142 g_bs3CpuState64CtxToLoad.rcx.u = 0; 143 g_bs3CpuState64CtxToLoad.rcx.au8[0] = 0x20; 144 g_bs3CpuState64CtxToLoad.rcx.au8[1] = 0x21; 145 g_bs3CpuState64CtxToLoad.rdx.u = 0; 146 g_bs3CpuState64CtxToLoad.rdx.au8[0] = 0x30; 147 g_bs3CpuState64CtxToLoad.rdx.au8[1] = 0x31; 148 g_bs3CpuState64CtxToLoad.rbx.u = 0; 149 g_bs3CpuState64CtxToLoad.rbx.au8[0] = 0x40; 150 g_bs3CpuState64CtxToLoad.rbx.au8[1] = 0x41; 151 bs3CpuState64Comp(true /*fModRbx*/); 132 Bs3TestSub("Modify all 8-bit GPRs"); 133 bs3CpuState64InitCtx(0); 134 bs3CpuState64Worker(bs3CpuState64Worker_ModAll8BitGrps); 135 g_bs3CpuState64CtxToLoad.rax.au8[0] = 0x10; 136 g_bs3CpuState64CtxToLoad.rax.au8[1] = 0x11; 137 g_bs3CpuState64CtxToLoad.rcx.au8[0] = 0x20; 138 g_bs3CpuState64CtxToLoad.rcx.au8[1] = 0x21; 139 g_bs3CpuState64CtxToLoad.rdx.au8[0] = 0x30; 140 g_bs3CpuState64CtxToLoad.rdx.au8[1] = 0x31; 141 g_bs3CpuState64CtxToLoad.rbx.au8[0] = 0x40; 142 g_bs3CpuState64CtxToLoad.rbx.au8[1] = 0x41; 143 bs3CpuState64Comp(true /*fModRbx*/); 152 144 153 154 155 156 157 145 Bs3TestSub("Modify CR2"); 146 bs3CpuState64InitCtx(0); 147 bs3CpuState64Worker(bs3CpuState64Worker_ModCr2); 148 g_bs3CpuState64CtxToLoad.cr2.u = 0xf00dface; 149 bs3CpuState64Comp(true /*fModRbx*/); 158 150 159 151 /** @todo DRx */ 160 }161 152 Bs3TestTerm(); 162 153 for (;;) -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-first-init-all-lm64.asm
r83003 r83017 36 36 extern NAME(Main_lm64) 37 37 extern NAME(Bs3Shutdown_c64) 38 extern BS3_DATA_NM(g_uBs3CpuDetected) 39 extern NAME(Bs3PrintStrN_c16) 40 extern NAME(Bs3Panic_c16) 38 41 39 42 ;; Entry point. … … 51 54 52 55 ; 56 ; Check that long mode is supported. 57 ; 58 test word [BS3_DATA_NM(g_uBs3CpuDetected)], BS3CPU_F_LONG_MODE 59 jnz .long_mode_supported 60 push .s_szLongModeError_End - .s_szLongModeError 61 push cs 62 push .s_szLongModeError wrt CGROUP16 63 call NAME(Bs3PrintStrN_c16) 64 call NAME(Bs3Panic_c16) 65 .long_mode_supported: 66 67 ; 53 68 ; Switch to LM64 and call main. 54 69 ; … … 60 75 call NAME(Bs3Shutdown_c64) 61 76 77 .s_szLongModeError: 78 db 'BS3 Error! Long mode not supported!', 0ah, 0dh 79 .s_szLongModeError_End: 80 db 00h 81
Note:
See TracChangeset
for help on using the changeset viewer.