Changeset 70667 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- Jan 22, 2018 8:54:43 AM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 120403
- Location:
- trunk/src/VBox/ValidationKit/bootsectors
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-2-template.c
r70666 r70667 97 97 static BS3CI2FSGSBASE const s_aWrFsBaseWorkers[] = 98 98 { 99 { "wrfsbase rbx", true, BS3_CMN_NM(bs3CpuInstr2_wrfsbase_rbx_ud2), 5, BS3_CMN_NM(bs3CpuInstr2_wrfsbase_rbx_rdfsbase_rcx_ud2), 1 0},100 { "wrfsbase ebx", false, BS3_CMN_NM(bs3CpuInstr2_wrfsbase_ebx_ud2), 4, BS3_CMN_NM(bs3CpuInstr2_wrfsbase_ebx_rdfsbase_ecx_ud2), 8},99 { "wrfsbase rbx", true, BS3_CMN_NM(bs3CpuInstr2_wrfsbase_rbx_ud2), 5, BS3_CMN_NM(bs3CpuInstr2_wrfsbase_rbx_rdfsbase_rcx_ud2), 13 }, 100 { "wrfsbase ebx", false, BS3_CMN_NM(bs3CpuInstr2_wrfsbase_ebx_ud2), 4, BS3_CMN_NM(bs3CpuInstr2_wrfsbase_ebx_rdfsbase_ecx_ud2), 10 }, 101 101 }; 102 102 103 103 static BS3CI2FSGSBASE const s_aWrGsBaseWorkers[] = 104 104 { 105 { "wrgsbase rbx", true, BS3_CMN_NM(bs3CpuInstr2_wrgsbase_rbx_ud2), 5, BS3_CMN_NM(bs3CpuInstr2_wrgsbase_rbx_rdgsbase_rcx_ud2), 1 0},106 { "wrgsbase ebx", false, BS3_CMN_NM(bs3CpuInstr2_wrgsbase_ebx_ud2), 4, BS3_CMN_NM(bs3CpuInstr2_wrgsbase_ebx_rdgsbase_ecx_ud2), 8},105 { "wrgsbase rbx", true, BS3_CMN_NM(bs3CpuInstr2_wrgsbase_rbx_ud2), 5, BS3_CMN_NM(bs3CpuInstr2_wrgsbase_rbx_rdgsbase_rcx_ud2), 13 }, 106 { "wrgsbase ebx", false, BS3_CMN_NM(bs3CpuInstr2_wrgsbase_ebx_ud2), 4, BS3_CMN_NM(bs3CpuInstr2_wrgsbase_ebx_rdgsbase_ecx_ud2), 10 }, 107 107 }; 108 108 109 109 static BS3CI2FSGSBASE const s_aRdFsBaseWorkers[] = 110 110 { 111 { "rdfsbase rbx", true, BS3_CMN_NM(bs3CpuInstr2_rdfsbase_rbx_ud2), 5, BS3_CMN_NM(bs3CpuInstr2_wrfsbase_rbx_rdfsbase_rcx_ud2), 1 0},112 { "rdfsbase ebx", false, BS3_CMN_NM(bs3CpuInstr2_rdfsbase_ebx_ud2), 4, BS3_CMN_NM(bs3CpuInstr2_wrfsbase_ebx_rdfsbase_ecx_ud2), 8},111 { "rdfsbase rbx", true, BS3_CMN_NM(bs3CpuInstr2_rdfsbase_rbx_ud2), 5, BS3_CMN_NM(bs3CpuInstr2_wrfsbase_rbx_rdfsbase_rcx_ud2), 13 }, 112 { "rdfsbase ebx", false, BS3_CMN_NM(bs3CpuInstr2_rdfsbase_ebx_ud2), 4, BS3_CMN_NM(bs3CpuInstr2_wrfsbase_ebx_rdfsbase_ecx_ud2), 10 }, 113 113 }; 114 114 115 115 static BS3CI2FSGSBASE const s_aRdGsBaseWorkers[] = 116 116 { 117 { "rdgsbase rbx", true, BS3_CMN_NM(bs3CpuInstr2_rdgsbase_rbx_ud2), 5, BS3_CMN_NM(bs3CpuInstr2_wrgsbase_rbx_rdgsbase_rcx_ud2), 1 0},118 { "rdgsbase ebx", false, BS3_CMN_NM(bs3CpuInstr2_rdgsbase_ebx_ud2), 4, BS3_CMN_NM(bs3CpuInstr2_wrgsbase_ebx_rdgsbase_ecx_ud2), 8},117 { "rdgsbase rbx", true, BS3_CMN_NM(bs3CpuInstr2_rdgsbase_rbx_ud2), 5, BS3_CMN_NM(bs3CpuInstr2_wrgsbase_rbx_rdgsbase_rcx_ud2), 13 }, 118 { "rdgsbase ebx", false, BS3_CMN_NM(bs3CpuInstr2_rdgsbase_ebx_ud2), 4, BS3_CMN_NM(bs3CpuInstr2_wrgsbase_ebx_rdgsbase_ecx_ud2), 10 }, 119 119 }; 120 120 # endif … … 806 806 Bs3TrapSetJmpAndRestore(pCtx, pTrapFrame); 807 807 pExpectCtx->rip.u = pCtx->rip.u + (!fGP ? pFsGsBaseWorker->offVerifyWorkerUd2 : 0); 808 pExpectCtx->rbx.u = !fGP ? 0 : s_aValues64[iValue].u64Base; 808 809 pExpectCtx->rcx.u = !fGP ? s_aValues64[iValue].u64Base : 0; 809 810 pExpectCtx->rflags.u32 |= X86_EFL_RF; … … 829 830 Bs3TrapSetJmpAndRestore(pCtx, pTrapFrame); 830 831 pExpectCtx->rip.u = pCtx->rip.u + pFsGsBaseWorker->offVerifyWorkerUd2; 832 pExpectCtx->rbx.u = 0; 831 833 pExpectCtx->rcx.u = s_aValues64[iValue].u64Base & UINT64_C(0x00000000ffffffff); 832 834 pExpectCtx->rflags.u32 |= X86_EFL_RF; … … 879 881 bs3CpuInstr2_fsgsbase_ExpectUD(bMode, &Ctx, &ExpectCtx, &TrapFrame); 880 882 881 /* Read existing base address. */883 /* Read any existing base address. */ 882 884 Ctx.rbx.u = 0xa0000; 883 885 Ctx.cr4.u |= X86_CR4_FSGSBASE; -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-instr-2-template.mac
r70651 r70667 197 197 BS3_PROC_BEGIN_CMN bs3CpuInstr2_wrfsbase_rbx_rdfsbase_rcx_ud2, BS3_PBC_NEAR 198 198 wrfsbase rbx 199 xor rbx, rbx 199 200 rdfsbase rcx 200 201 .again: 201 202 ud2 202 203 jmp .again 203 AssertCompile(.again - BS3_LAST_LABEL == 1 0)204 AssertCompile(.again - BS3_LAST_LABEL == 13) 204 205 BS3_PROC_END_CMN bs3CpuInstr2_wrfsbase_rbx_rdfsbase_rcx_ud2 205 206 … … 207 208 BS3_PROC_BEGIN_CMN bs3CpuInstr2_wrfsbase_ebx_rdfsbase_ecx_ud2, BS3_PBC_NEAR 208 209 wrfsbase ebx 210 xor ebx, ebx 209 211 rdfsbase ecx 210 212 .again: 211 213 ud2 212 214 jmp .again 213 AssertCompile(.again - BS3_LAST_LABEL == 8)215 AssertCompile(.again - BS3_LAST_LABEL == 10) 214 216 BS3_PROC_END_CMN bs3CpuInstr2_wrfsbase_ebx_rdfsbase_ecx_ud2 215 217 … … 217 219 BS3_PROC_BEGIN_CMN bs3CpuInstr2_wrgsbase_rbx_rdgsbase_rcx_ud2, BS3_PBC_NEAR 218 220 wrgsbase rbx 221 xor rbx, rbx 219 222 rdgsbase rcx 220 223 .again: 221 224 ud2 222 225 jmp .again 223 AssertCompile(.again - BS3_LAST_LABEL == 1 0)226 AssertCompile(.again - BS3_LAST_LABEL == 13) 224 227 BS3_PROC_END_CMN bs3CpuInstr2_wrgsbase_rbx_rdgsbase_rcx_ud2 225 228 … … 227 230 BS3_PROC_BEGIN_CMN bs3CpuInstr2_wrgsbase_ebx_rdgsbase_ecx_ud2, BS3_PBC_NEAR 228 231 wrgsbase ebx 232 xor ebx, ebx 229 233 rdgsbase ecx 230 234 .again: 231 235 ud2 232 236 jmp .again 233 AssertCompile(.again - BS3_LAST_LABEL == 8)237 AssertCompile(.again - BS3_LAST_LABEL == 10) 234 238 BS3_PROC_END_CMN bs3CpuInstr2_wrfgbase_ebx_rdgsbase_ecx_ud2 235 239
Note:
See TracChangeset
for help on using the changeset viewer.