Lines Matching +full:cpu +full:- +full:viewed
18 * <http://www.gnu.org/licenses/gpl-2.0.html>
25 #include "target/arm/kvm-consts.h"
51 /* Flag: For ARM_CP_STATE_AA32, sysreg is 64-bit. */
86 * code will synchronize the CPU state before calling the hook so that it
91 * Flag: Writes to the sysreg might change the exception level - typically
92 * on older ARM chips. For those cases we need to re-read the new el when
110 * - UNDEF: discard the cpreg,
111 * - KEEP: retain the cpreg as is,
112 * - C_NZ: set const on the cpreg, but retain resetvalue,
113 * - else: set const on the cpreg, zero resetvalue, aka RES0.
152 * non-secure/secure bank (AArch32 only)
172 * To enable banking of coprocessor registers depending on ns-bit we
173 * add a bit to distinguish between secure and non-secure cpregs in the
207 * KVM is always non-secure so add the NS flag on AArch32 register in kvm_to_cpreg_id()
256 * The existence of both or neither secure and non-secure flags indicates that
257 * the register has both a secure and non-secure hash entry. A single one of
262 * or non-secure.
267 ARM_CP_SECSTATE_NS = (1 << 1), /* bit[1]: Non-secure state register */
272 * We define bits for Read and Write access for what rev C of the v7-AR ARM ARM
278 * (ie anything visible in PL2 is visible in S-PL1, some things are only
279 * visible in S-PL1) but "Secure PL1" is a bit of a mouthful, we bend the
299 * For user-mode some registers are accessible to EL0 via a kernel
300 * trap-and-emulate ABI. In this case we define the read permissions
342 * Note that this is not a catch-all case -- the set of cases which may
410 /* 51-53: RES0 */
413 /* 56-63: RES0 */
636 /* Which fine-grained trap bit register to check, if any */
674 * with the corresponding HFGWTR/HDFGTWTR bit being RES0, and vice-versa
692 * it as trap-on-writes.
867 * 'wildcard' field -- any value of that field in the MRC/MCR insn
874 * For AArch64-visible registers, opc0 is also used.
876 * way to distinguish (for KVM's benefit) guest-visible system registers
897 * Which fine-grained trap register bit to check, if any. This
916 * fieldoffset is non-zero, the reset value of the register.
928 * Offsets of the secure and non-secure fields in CPUARMState for the
964 * readfn and it has side effects (for instance clear-on-read bits).
971 * writefn and it masks out "unwritable" bits or has write-one-to-clear
984 * For ARMv8.1-VHE register aliases, we overwrite the read/write
1002 (*(uint32_t *)((char *)(env) + (ri)->fieldoffset))
1004 (*(uint64_t *)((char *)(env) + (ri)->fieldoffset))
1006 void define_one_arm_cp_reg_with_opaque(ARMCPU *cpu, const ARMCPRegInfo *reg,
1009 static inline void define_one_arm_cp_reg(ARMCPU *cpu, const ARMCPRegInfo *regs) in define_one_arm_cp_reg() argument
1011 define_one_arm_cp_reg_with_opaque(cpu, regs, NULL); in define_one_arm_cp_reg()
1014 void define_arm_cp_regs_with_opaque_len(ARMCPU *cpu, const ARMCPRegInfo *regs,
1017 #define define_arm_cp_regs_with_opaque(CPU, REGS, OPAQUE) \ argument
1020 define_arm_cp_regs_with_opaque_len(CPU, REGS, OPAQUE, \
1024 #define define_arm_cp_regs(CPU, REGS) \ argument
1025 define_arm_cp_regs_with_opaque(CPU, REGS, NULL)
1030 * Definition of an ARM co-processor register as viewed from
1032 * registers to userspace when emulating the Linux AArch64 CPU
1061 /* CPWriteFn that can be used to implement writes-ignored behaviour */
1064 /* CPReadFn that can be used for read-as-zero behaviour */
1067 /* CPWriteFn that just writes the value to ri->fieldoffset */
1077 * Return true if this reginfo struct's field in the cpu state struct
1082 return (ri->state == ARM_CP_STATE_AA64) || (ri->type & ARM_CP_64BIT); in cpreg_field_is_64bit()
1088 return (ri->access >> ((current_el * 2) + isread)) & 1; in cp_access_ok()
1113 return ri->state == ARM_CP_STATE_AA64 && in arm_cpreg_in_idspace()
1114 arm_cpreg_encoding_in_idspace(ri->opc0, ri->opc1, ri->opc2, in arm_cpreg_in_idspace()
1115 ri->crn, ri->crm); in arm_cpreg_in_idspace()
1119 static inline void define_cortex_a72_a57_a53_cp_reginfo(ARMCPU *cpu) { } in define_cortex_a72_a57_a53_cp_reginfo() argument
1121 void define_cortex_a72_a57_a53_cp_reginfo(ARMCPU *cpu);
1157 return ri->opc1 == 4 || ri->opc1 == 5; in arm_cpreg_traps_in_nv()
1162 ((_secure) ? (_env)->cp15._regname##_s : (_env)->cp15._regname##_ns)
1167 (_env)->cp15._regname##_s = (_val); \
1169 (_env)->cp15._regname##_ns = (_val); \