Changeset 100119 in vbox
- Timestamp:
- Jun 8, 2023 12:42:48 PM (18 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/armv8.h
r100099 r100119 444 444 #define ARMV8_SPSR_EL2_AARCH64_M4 RT_BIT_64(4) 445 445 #define ARMV8_SPSR_EL2_AARCH64_M4_BIT 4 446 /** Bit 5 - Reserved (read as zero). */ 447 #define ARMV8_SPSR_EL2_AARCH64_RSVD_5 RT_BIT_64(5) 446 /** Bit 5 - T - T32 instruction set state (only valid when ARMV8_SPSR_EL2_AARCH64_M4 is set). */ 447 #define ARMV8_SPSR_EL2_AARCH64_T RT_BIT_64(5) 448 #define ARMV8_SPSR_EL2_AARCH64_T_BIT 5 448 449 /** Bit 6 - I - FIQ interrupt mask. */ 449 450 #define ARMV8_SPSR_EL2_AARCH64_F RT_BIT_64(6) -
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs-armv8.cpp
r100108 r100119 226 226 VMMDECL(bool) CPUMIsGuestIn64BitCode(PVMCPU pVCpu) 227 227 { 228 RT_NOREF(pVCpu); 229 AssertReleaseFailed(); 230 return false; 228 CPUM_INT_ASSERT_NOT_EXTRN(pVCpu, CPUMCTX_EXTRN_PSTATE); 229 return !RT_BOOL(pVCpu->cpum.s.Guest.fPState & ARMV8_SPSR_EL2_AARCH64_M4); 231 230 } 232 231 … … 327 326 328 327 /** 329 * Figure whether the CPU is currently executing 16,32 or 64 bit code.330 * 331 * @returns 16,32 or 64.328 * Figure whether the CPU is currently executing 32 or 64 bit code. 329 * 330 * @returns 32 or 64. 332 331 * @param pVCpu The cross context virtual CPU structure of the calling EMT. 333 332 */ 334 333 VMMDECL(uint32_t) CPUMGetGuestCodeBits(PVMCPU pVCpu) 335 334 { 336 CPUM_INT_ASSERT_NOT_EXTRN(pVCpu, CPUMCTX_EXTRN_PC | CPUMCTX_EXTRN_PSTATE); 337 AssertReleaseFailed(); 338 RT_NOREF(pVCpu); 339 return 16; 335 CPUM_INT_ASSERT_NOT_EXTRN(pVCpu, CPUMCTX_EXTRN_PSTATE); 336 if (pVCpu->cpum.s.Guest.fPState & ARMV8_SPSR_EL2_AARCH64_M4) 337 return 32; 338 339 return 64; 340 340 } 341 341 … … 343 343 VMMDECL(DISCPUMODE) CPUMGetGuestDisMode(PVMCPU pVCpu) 344 344 { 345 CPUM_INT_ASSERT_NOT_EXTRN(pVCpu, CPUMCTX_EXTRN_PC | CPUMCTX_EXTRN_PSTATE); 346 AssertReleaseFailed(); 347 RT_NOREF(pVCpu); 348 return DISCPUMODE_16BIT; 345 CPUM_INT_ASSERT_NOT_EXTRN(pVCpu, CPUMCTX_EXTRN_PSTATE); 346 if (pVCpu->cpum.s.Guest.fPState & ARMV8_SPSR_EL2_AARCH64_M4) 347 { 348 if (pVCpu->cpum.s.Guest.fPState & ARMV8_SPSR_EL2_AARCH64_T) 349 return DISCPUMODE_ARMV8_T32; 350 351 return DISCPUMODE_ARMV8_A32; 352 } 353 354 return DISCPUMODE_ARMV8_A64; 349 355 } 350 356
Note:
See TracChangeset
for help on using the changeset viewer.