list in debug CR4 more already published bits (UINTR)

fix debug print of XCR0
This commit is contained in:
Stanislav Shwartsman 2022-07-30 19:15:32 +03:00
parent 3f65841714
commit d576eaa7c1
2 changed files with 8 additions and 4 deletions

View File

@ -1022,7 +1022,8 @@ void bx_dbg_info_control_regs_command(void)
dbg_printf(" PWT=page-level write-through=%d\n", (cr3>>3) & 1);
#if BX_CPU_LEVEL >= 5
Bit32u cr4 = SIM->get_param_num("CR4", dbg_cpu_list)->get();
dbg_printf("CR4=0x%08x: %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s\n", cr4,
dbg_printf("CR4=0x%08x: %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s\n", cr4,
(cr4 & (1<<25)) ? "UINTR" : "uintr",
(cr4 & (1<<24)) ? "PKS" : "pks",
(cr4 & (1<<23)) ? "CET" : "cet",
(cr4 & (1<<22)) ? "PKE" : "pke",
@ -1063,9 +1064,10 @@ void bx_dbg_info_control_regs_command(void)
#if BX_CPU_LEVEL >= 6
if (BX_CPU(dbg_cpu)->is_cpu_extension_supported(BX_ISA_XSAVE)) {
Bit32u xcr0 = SIM->get_param_num("XCR0", dbg_cpu_list)->get();
dbg_printf("XCR0=0x%08x: %s %s %s %s %s %s %s %s %s %s %s\n", xcr0,
(xcr0 & (1<<11)) ? "CET_S" : "cet_s",
(xcr0 & (1<<10)) ? "CET_U" : "cet_u",
dbg_printf("XCR0=0x%08x: %s %s %s %s %s %s %s %s %s %s %s %s\n", xcr0,
(xcr0 & (1<<14)) ? "UINTR" : "uintr",
(xcr0 & (1<<12)) ? "CET_S" : "cet_s",
(xcr0 & (1<<11)) ? "CET_U" : "cet_u",
(xcr0 & (1<<9)) ? "PKRU" : "pkru",
(xcr0 & (1<<7)) ? "HI_ZMM" : "hi_zmm",
(xcr0 & (1<<6)) ? "ZMM_HI256" : "zmm_hi256",

View File

@ -112,6 +112,7 @@ struct bx_cr0_t {
#define BX_CR4_PKE_MASK (1 << 22)
#define BX_CR4_CET_MASK (1 << 23)
#define BX_CR4_PKS_MASK (1 << 24)
#define BX_CR4_UINTR_MASK (1 << 25)
struct bx_cr4_t {
Bit32u val32; // 32bit value of register
@ -144,6 +145,7 @@ struct bx_cr4_t {
IMPLEMENT_CRREG_ACCESSORS(PKE, 22);
IMPLEMENT_CRREG_ACCESSORS(CET, 23);
IMPLEMENT_CRREG_ACCESSORS(PKS, 24);
IMPLEMENT_CRREG_ACCESSORS(UINTR, 25);
BX_CPP_INLINE Bit32u get32() const { return val32; }
BX_CPP_INLINE void set32(Bit32u val) { val32 = val; }