Changeset 100723 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Jul 28, 2023 7:23:31 AM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/NEMR3Native-darwin-armv8.cpp
r100708 r100723 174 174 #undef CPUM_VREG_EMIT 175 175 }; 176 /** Debug system registers. */ 177 static const struct 178 { 179 hv_sys_reg_t enmHvReg; 180 uint32_t offCpumCtx; 181 } s_aCpumDbgRegs[] = 182 { 183 #define CPUM_DBGREG_EMIT(a_BorW, a_Idx) \ 184 { HV_SYS_REG_DBG ## a_BorW ## CR ## a_Idx ## _EL1, RT_UOFFSETOF(CPUMCTX, a ## a_BorW ## p[a_Idx].Ctrl.u64) }, \ 185 { HV_SYS_REG_DBG ## a_BorW ## VR ## a_Idx ## _EL1, RT_UOFFSETOF(CPUMCTX, a ## a_BorW ## p[a_Idx].Value.u64) } 186 /* Breakpoint registers. */ 187 CPUM_DBGREG_EMIT(B, 0), 188 CPUM_DBGREG_EMIT(B, 1), 189 CPUM_DBGREG_EMIT(B, 2), 190 CPUM_DBGREG_EMIT(B, 3), 191 CPUM_DBGREG_EMIT(B, 4), 192 CPUM_DBGREG_EMIT(B, 5), 193 CPUM_DBGREG_EMIT(B, 6), 194 CPUM_DBGREG_EMIT(B, 7), 195 CPUM_DBGREG_EMIT(B, 8), 196 CPUM_DBGREG_EMIT(B, 9), 197 CPUM_DBGREG_EMIT(B, 10), 198 CPUM_DBGREG_EMIT(B, 11), 199 CPUM_DBGREG_EMIT(B, 12), 200 CPUM_DBGREG_EMIT(B, 13), 201 CPUM_DBGREG_EMIT(B, 14), 202 CPUM_DBGREG_EMIT(B, 15), 203 /* Watchpoint registers. */ 204 CPUM_DBGREG_EMIT(W, 0), 205 CPUM_DBGREG_EMIT(W, 1), 206 CPUM_DBGREG_EMIT(W, 2), 207 CPUM_DBGREG_EMIT(W, 3), 208 CPUM_DBGREG_EMIT(W, 4), 209 CPUM_DBGREG_EMIT(W, 5), 210 CPUM_DBGREG_EMIT(W, 6), 211 CPUM_DBGREG_EMIT(W, 7), 212 CPUM_DBGREG_EMIT(W, 8), 213 CPUM_DBGREG_EMIT(W, 9), 214 CPUM_DBGREG_EMIT(W, 10), 215 CPUM_DBGREG_EMIT(W, 11), 216 CPUM_DBGREG_EMIT(W, 12), 217 CPUM_DBGREG_EMIT(W, 13), 218 CPUM_DBGREG_EMIT(W, 14), 219 CPUM_DBGREG_EMIT(W, 15) 220 #undef CPUM_DBGREG_EMIT 221 }; 176 222 /** System registers. */ 177 223 static const struct … … 190 236 { HV_SYS_REG_TTBR0_EL1, CPUMCTX_EXTRN_SCTLR_TCR_TTBR, RT_UOFFSETOF(CPUMCTX, Ttbr0.u64) }, 191 237 { HV_SYS_REG_TTBR1_EL1, CPUMCTX_EXTRN_SCTLR_TCR_TTBR, RT_UOFFSETOF(CPUMCTX, Ttbr1.u64) }, 192 { HV_SYS_REG_VBAR_EL1, CPUMCTX_EXTRN_SYSREG ,RT_UOFFSETOF(CPUMCTX, VBar.u64) },238 { HV_SYS_REG_VBAR_EL1, CPUMCTX_EXTRN_SYSREG_MISC, RT_UOFFSETOF(CPUMCTX, VBar.u64) }, 193 239 }; 194 240 /** ID registers. */ … … 512 558 513 559 if ( hrc == HV_SUCCESS 514 && (fWhat & (CPUMCTX_EXTRN_SPSR | CPUMCTX_EXTRN_ELR | CPUMCTX_EXTRN_SP | CPUMCTX_EXTRN_SCTLR_TCR_TTBR | CPUMCTX_EXTRN_SYSREG))) 560 && (fWhat & CPUMCTX_EXTRN_SYSREG_DEBUG)) 561 { 562 /* Debug registers. */ 563 for (uint32_t i = 0; i < RT_ELEMENTS(s_aCpumDbgRegs); i++) 564 { 565 uint64_t *pu64 = (uint64_t *)((uint8_t *)&pVCpu->cpum.GstCtx + s_aCpumDbgRegs[i].offCpumCtx); 566 hrc |= hv_vcpu_get_sys_reg(pVCpu->nem.s.hVCpu, s_aCpumDbgRegs[i].enmHvReg, pu64); 567 } 568 } 569 570 if ( hrc == HV_SUCCESS 571 && (fWhat & (CPUMCTX_EXTRN_SPSR | CPUMCTX_EXTRN_ELR | CPUMCTX_EXTRN_SP | CPUMCTX_EXTRN_SCTLR_TCR_TTBR | CPUMCTX_EXTRN_SYSREG_MISC))) 515 572 { 516 573 /* System registers. */ … … 581 638 582 639 if ( hrc == HV_SUCCESS 583 && (pVCpu->cpum.GstCtx.fExtrn & (CPUMCTX_EXTRN_SPSR | CPUMCTX_EXTRN_ELR | CPUMCTX_EXTRN_SP | CPUMCTX_EXTRN_SCTLR_TCR_TTBR | CPUMCTX_EXTRN_SYSREG)) 584 != (CPUMCTX_EXTRN_SPSR | CPUMCTX_EXTRN_ELR | CPUMCTX_EXTRN_SP | CPUMCTX_EXTRN_SCTLR_TCR_TTBR | CPUMCTX_EXTRN_SYSREG)) 640 && !(pVCpu->cpum.GstCtx.fExtrn & CPUMCTX_EXTRN_SYSREG_DEBUG)) 641 { 642 /* Debug registers. */ 643 for (uint32_t i = 0; i < RT_ELEMENTS(s_aCpumDbgRegs); i++) 644 { 645 uint64_t *pu64 = (uint64_t *)((uint8_t *)&pVCpu->cpum.GstCtx + s_aCpumDbgRegs[i].offCpumCtx); 646 hrc |= hv_vcpu_set_sys_reg(pVCpu->nem.s.hVCpu, s_aCpumDbgRegs[i].enmHvReg, *pu64); 647 } 648 } 649 650 if ( hrc == HV_SUCCESS 651 && (pVCpu->cpum.GstCtx.fExtrn & (CPUMCTX_EXTRN_SPSR | CPUMCTX_EXTRN_ELR | CPUMCTX_EXTRN_SP | CPUMCTX_EXTRN_SCTLR_TCR_TTBR | CPUMCTX_EXTRN_SYSREG_MISC)) 652 != (CPUMCTX_EXTRN_SPSR | CPUMCTX_EXTRN_ELR | CPUMCTX_EXTRN_SP | CPUMCTX_EXTRN_SCTLR_TCR_TTBR | CPUMCTX_EXTRN_SYSREG_MISC)) 585 653 { 586 654 /* System registers. */
Note:
See TracChangeset
for help on using the changeset viewer.