Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup and name some previouly-unnamed registers #371

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/cpu_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#define SYS_IMP_APL_ACTLR_EL12 sys_reg(3, 6, 15, 14, 6)

#define SYS_IMP_APL_AMX_CTX_EL1 sys_reg(3, 4, 15, 5, 0)
#define SYS_IMP_APL_AMX_STATE_T sys_reg(3, 4, 15, 1, 3)
#define SYS_IMP_APL_AMX_CTL_EL1 sys_reg(3, 4, 15, 1, 4)
#define SYS_IMP_APL_AMX_CTL_EL2 sys_reg(3, 4, 15, 4, 7)
#define SYS_IMP_APL_AMX_CTL_EL12 sys_reg(3, 4, 15, 4, 6)
Expand Down Expand Up @@ -555,6 +556,9 @@
#define UPMCR0_IMODE_FIQ (4 << 16)
#define UPMCR0_IMODE_MASK (7 << 16)

#define SYS_IMP_APL_CORE_NRG_ACC_DAT sys_reg(3, 7, 15, 1, 1)
#define SYS_IMP_APL_CORE_SRM_NRG_ACC_DAT sys_reg(3, 7, 15, 3, 1)

#define SYS_IMP_APL_UPMSR sys_reg(3, 7, 15, 6, 4)
#define UPMSR_IACT (BIT(0))

Expand Down
10 changes: 5 additions & 5 deletions src/hv_exc.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,8 @@ static bool hv_handle_msr_unlocked(struct exc_info *ctx, u64 iss)
regs[31] = 0;

switch (reg) {
/* Some kind of timer */
SYSREG_PASS(sys_reg(3, 7, 15, 1, 1));
SYSREG_PASS(sys_reg(3, 7, 15, 3, 1));
SYSREG_PASS(SYS_IMP_APL_CORE_NRG_ACC_DAT);
SYSREG_PASS(SYS_IMP_APL_CORE_SRM_NRG_ACC_DAT);
/* Architectural timer, for ECV */
SYSREG_MAP(SYS_CNTV_CTL_EL0, SYS_CNTV_CTL_EL02)
SYSREG_MAP(SYS_CNTV_CVAL_EL0, SYS_CNTV_CVAL_EL02)
Expand All @@ -220,6 +219,7 @@ static bool hv_handle_msr_unlocked(struct exc_info *ctx, u64 iss)
SYSREG_MAP(SYS_CNTP_CVAL_EL0, SYS_CNTP_CVAL_EL02)
SYSREG_MAP(SYS_CNTP_TVAL_EL0, SYS_CNTP_TVAL_EL02)
/* Spammy stuff seen on t600x p-cores */
/* These are PMU/PMC registers */
SYSREG_PASS(sys_reg(3, 2, 15, 12, 0));
SYSREG_PASS(sys_reg(3, 2, 15, 13, 0));
SYSREG_PASS(sys_reg(3, 2, 15, 14, 0));
Expand All @@ -231,7 +231,7 @@ static bool hv_handle_msr_unlocked(struct exc_info *ctx, u64 iss)
/* Noisy traps */
SYSREG_PASS(SYS_IMP_APL_HID4)
SYSREG_PASS(SYS_IMP_APL_EHID4)
/* We don't normally trap hese, but if we do, they're noisy */
/* We don't normally trap these, but if we do, they're noisy */
SYSREG_PASS(SYS_IMP_APL_GXF_STATUS_EL1)
SYSREG_PASS(SYS_IMP_APL_CNTVCT_ALIAS_EL0)
SYSREG_PASS(SYS_IMP_APL_TPIDR_GL1)
Expand All @@ -243,7 +243,7 @@ static bool hv_handle_msr_unlocked(struct exc_info *ctx, u64 iss)
SYSREG_MAP(SYS_IMP_APL_APCTL_EL1, SYS_IMP_APL_APCTL_EL12)
SYSREG_MAP(SYS_IMP_APL_AMX_CTL_EL1, SYS_IMP_APL_AMX_CTL_EL12)
/* FIXME:Might be wrong */
SYSREG_PASS(sys_reg(3, 4, 15, 1, 3))
SYSREG_PASS(SYS_IMP_APL_AMX_STATE_T)
/* pass through PMU handling */
SYSREG_PASS(SYS_IMP_APL_PMCR1)
SYSREG_PASS(SYS_IMP_APL_PMCR2)
Expand Down
Loading