m1n1/src/arm_cpu_regs.h

107 lines
3 KiB
C
Raw Normal View History

/* SPDX-License-Identifier: MIT */
#include "utils.h"
#define SYS_CNTHCTL_EL2 sys_reg(3, 4, 14, 1, 0)
// HCR_EL2.E2H == 1
#define CNTHCTL_EVNTIS BIT(17)
#define CNTHCTL_EL1NVVCT BIT(16)
#define CNTHCTL_EL1NVPCT BIT(15)
#define CNTHCTL_EL1TVCT BIT(14)
#define CNTHCTL_EL1TVT BIT(13)
#define CNTHCTL_ECV BIT(12)
#define CNTHCTL_EL1PTEN BIT(11)
#define CNTHCTL_EL1PCTEN BIT(10)
#define CNTHCTL_EL0PTEN BIT(9)
#define CNTHCTL_EL0VTEN BIT(8)
#define CNTHCTL_EVNTI GENMASK(7, 4)
#define CNTHCTL_EVNTDIR BIT(3)
#define CNTHCTL_EVNTEN BIT(2)
#define CNTHCTL_EL0VCTEN BIT(1)
#define CNTHCTL_EL0PCTEN BIT(0)
#define SYS_HCR_EL2 sys_reg(3, 4, 1, 1, 0)
#define HCR_TWEDEL GENMASK(63, 60)
#define HCR_TWEDEn BIT(59)
#define HCR_TID5 BIT(58)
#define HCR_DCT BIT(57)
#define HCR_ATA BIT(56)
#define HCR_TTLBOS BIT(55)
#define HCR_TTLBIS BIT(54)
#define HCR_EnSCXT BIT(53)
#define HCR_TOCU BIT(52)
#define HCR_AMVOFFEN BIT(51)
#define HCR_TICAB BIT(50)
#define HCR_TID4 BIT(49)
#define HCR_FIEN BIT(47)
#define HCR_FWB BIT(46)
#define HCR_NV2 BIT(45)
#define HCR_AT BIT(44)
#define HCR_NV1 BIT(43)
#define HCR_NV1 BIT(43)
#define HCR_NV BIT(42)
#define HCR_NV BIT(42)
#define HCR_API BIT(41)
#define HCR_APK BIT(40)
#define HCR_MIOCNCE BIT(38)
#define HCR_TEA BIT(37)
#define HCR_TERR BIT(36)
#define HCR_TLOR BIT(35)
#define HCR_E2H BIT(34)
#define HCR_ID BIT(33)
#define HCR_CD BIT(32)
#define HCR_RW BIT(31)
#define HCR_TRVM BIT(30)
#define HCR_HCD BIT(29)
#define HCR_TDZ BIT(28)
#define HCR_TGE BIT(27)
#define HCR_TVM BIT(26)
#define HCR_TTLB BIT(25)
#define HCR_TPU BIT(24)
#define HCR_TPCP BIT(23)
#define HCR_TPC BIT(23)
#define HCR_TSW BIT(22)
#define HCR_TACR BIT(21)
#define HCR_TIDCP BIT(20)
#define HCR_TSC BIT(19)
#define HCR_TID3 BIT(18)
#define HCR_TID2 BIT(17)
#define HCR_TID1 BIT(16)
#define HCR_TID0 BIT(15)
#define HCR_TWE BIT(14)
#define HCR_TWI BIT(13)
#define HCR_DC BIT(12)
#define HCR_BSU GENMASK(11, 10)
#define HCR_FB BIT(9)
#define HCR_VSE BIT(8)
#define HCR_VI BIT(7)
#define HCR_VF BIT(6)
#define HCR_AMO BIT(5)
#define HCR_IMO BIT(4)
#define HCR_FMO BIT(3)
#define HCR_PTW BIT(2)
#define HCR_SWIO BIT(1)
#define HCR_VM BIT(0)
#define SYS_VTCR_EL2 sys_reg(3, 4, 2, 1, 2)
// Profile(A)
#define VTCR_SL2 BIT(33)
#define VTCR_DS BIT(32)
#define VTCR_NSA BIT(30)
#define VTCR_NSW BIT(29)
#define VTCR_HWU62 BIT(28)
#define VTCR_HWU61 BIT(27)
#define VTCR_HWU60 BIT(26)
#define VTCR_HWU59 BIT(25)
#define VTCR_HD BIT(22)
#define VTCR_HA BIT(21)
#define VTCR_VS BIT(19)
#define VTCR_PS GENMASK(18, 16)
#define VTCR_TG0 GENMASK(15, 14)
#define VTCR_SH0 GENMASK(13, 12)
#define VTCR_ORGN0 GENMASK(11, 10)
#define VTCR_IRGN0 GENMASK(9, 8)
#define VTCR_SL0 GENMASK(7, 6)
#define VTCR_SL0 GENMASK(7, 6)
#define VTCR_T0SZ GENMASK(5, 0)