Changeset 99956 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- May 24, 2023 11:39:15 AM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/CPUM-armv8.cpp
r99739 r99956 71 71 72 72 /********************************************************************************************************************************* 73 * Defined Constants And Macros * 74 *********************************************************************************************************************************/ 75 76 /** Internal form used by the macros. */ 77 #ifdef VBOX_WITH_STATISTICS 78 # define RINT(a_uFirst, a_uLast, a_enmRdFn, a_enmWrFn, a_offCpumCpu, a_uInitOrReadValue, a_fWrIgnMask, a_fWrGpMask, a_szName) \ 79 { a_uFirst, a_uLast, a_enmRdFn, a_enmWrFn, a_offCpumCpu, 0, 0, a_uInitOrReadValue, a_fWrIgnMask, a_fWrGpMask, a_szName, \ 80 { 0 }, { 0 }, { 0 }, { 0 } } 81 #else 82 # define RINT(a_uFirst, a_uLast, a_enmRdFn, a_enmWrFn, a_offCpumCpu, a_uInitOrReadValue, a_fWrIgnMask, a_fWrGpMask, a_szName) \ 83 { a_uFirst, a_uLast, a_enmRdFn, a_enmWrFn, a_offCpumCpu, 0, 0, a_uInitOrReadValue, a_fWrIgnMask, a_fWrGpMask, a_szName } 84 #endif 85 86 /** Function handlers, extended version. */ 87 #define MFX(a_uMsr, a_szName, a_enmRdFnSuff, a_enmWrFnSuff, a_uValue, a_fWrIgnMask, a_fWrGpMask) \ 88 RINT(a_uMsr, a_uMsr, kCpumSysRegRdFn_##a_enmRdFnSuff, kCpumSysRegWrFn_##a_enmWrFnSuff, 0, a_uValue, a_fWrIgnMask, a_fWrGpMask, a_szName) 89 /** Function handlers, read-only. */ 90 #define MFO(a_uMsr, a_szName, a_enmRdFnSuff) \ 91 RINT(a_uMsr, a_uMsr, kCpumSysRegRdFn_##a_enmRdFnSuff, kCpumSysRegWrFn_ReadOnly, 0, 0, 0, UINT64_MAX, a_szName) 92 /** Read-only fixed value, ignores all writes. */ 93 #define MVI(a_uMsr, a_szName, a_uValue) \ 94 RINT(a_uMsr, a_uMsr, kCpumSysRegRdFn_FixedValue, kCpumSysRegWrFn_IgnoreWrite, 0, a_uValue, UINT64_MAX, 0, a_szName) 95 96 97 /********************************************************************************************************************************* 73 98 * Structures and Typedefs * 74 99 *********************************************************************************************************************************/ … … 103 128 * Global Variables * 104 129 *********************************************************************************************************************************/ 130 /** 131 * System register ranges. 132 */ 133 static CPUMSYSREGRANGE const g_aSysRegRanges[] = 134 { 135 MFX(ARMV8_AARCH64_SYSREG_OSLAR_EL1, "OSLAR_EL1", WriteOnly, OslarEl1, 0, UINT64_C(0xfffffffffffffffe), UINT64_C(0xfffffffffffffffe)), 136 MFO(ARMV8_AARCH64_SYSREG_OSLSR_EL1, "OSLSR_EL1", OslsrEl1), 137 MVI(ARMV8_AARCH64_SYSREG_OSDLR_EL1, "OSDLR_EL1", 0) 138 }; 139 140 105 141 #if 0 /** @todo Will come later. */ 106 142 /** Saved state field descriptors for CPUMCTX. */ … … 185 221 186 222 /** 223 * Initializes the guest system register states. 224 * 225 * @returns VBox status code. 226 * @param pVM The cross context VM structure. 227 */ 228 static int cpumR3InitSysRegs(PVM pVM) 229 { 230 for (uint32_t i = 0; i < RT_ELEMENTS(g_aSysRegRanges); i++) 231 { 232 int rc = CPUMR3SysRegRangesInsert(pVM, &g_aSysRegRanges[i]); 233 AssertLogRelRCReturn(rc, rc); 234 } 235 236 return VINF_SUCCESS; 237 } 238 239 240 /** 187 241 * Initializes the CPUM. 188 242 * … … 228 282 229 283 rc = cpumR3DbgInit(pVM); 284 if (RT_FAILURE(rc)) 285 return rc; 286 287 /* 288 * Initialize the Guest system register states. 289 */ 290 rc = cpumR3InitSysRegs(pVM); 230 291 if (RT_FAILURE(rc)) 231 292 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.