arm64: Add register definitions for MDCR_EL2

This is needed to support the bhyve gdb stub implementation on arm64.

Reviewed by:	andrew
MFC after:	1 week
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D42867
This commit is contained in:
Mark Johnston 2023-12-01 13:28:58 -05:00
parent c2ed7a6360
commit 4f12883c36

View file

@ -232,4 +232,22 @@
/* Assumed to be 0 by locore.S */
#define VTTBR_HOST 0x0000000000000000
/* MDCR_EL2 - Hyp Debug Control Register */
#define MDCR_EL2_HPMN_MASK 0x1f
#define MDCR_EL2_HPMN_SHIFT 0
#define MDCR_EL2_TPMCR_SHIFT 5
#define MDCR_EL2_TPMCR (0x1UL << MDCR_EL2_TPMCR_SHIFT)
#define MDCR_EL2_TPM_SHIFT 6
#define MDCR_EL2_TPM (0x1UL << MDCR_EL2_TPM_SHIFT)
#define MDCR_EL2_HPME_SHIFT 7
#define MDCR_EL2_HPME (0x1UL << MDCR_EL2_HPME_SHIFT)
#define MDCR_EL2_TDE_SHIFT 8
#define MDCR_EL2_TDE (0x1UL << MDCR_EL2_TDE_SHIFT)
#define MDCR_EL2_TDA_SHIFT 9
#define MDCR_EL2_TDA (0x1UL << MDCR_EL2_TDA_SHIFT)
#define MDCR_EL2_TDOSA_SHIFT 10
#define MDCR_EL2_TDOSA (0x1UL << MDCR_EL2_TDOSA_SHIFT)
#define MDCR_EL2_TDRA_SHIFT 11
#define MDCR_EL2_TDRA (0x1UL << MDCR_EL2_TDRA_SHIFT)
#endif /* !_MACHINE_HYPERVISOR_H_ */