123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #include <arch.h>
- #include <arch_features.h>
- #include <arch_helpers.h>
- #include <lib/extensions/tcr2.h>
- void tcr2_enable(cpu_context_t *ctx)
- {
- u_register_t reg;
- el3_state_t *state;
- state = get_el3state_ctx(ctx);
-
- reg = read_ctx_reg(state, CTX_SCR_EL3);
- reg |= SCR_TCR2EN_BIT;
- write_ctx_reg(state, CTX_SCR_EL3, reg);
- }
- void tcr2_disable(cpu_context_t *ctx)
- {
- u_register_t reg;
- el3_state_t *state;
- state = get_el3state_ctx(ctx);
-
- reg = read_ctx_reg(state, CTX_SCR_EL3);
- reg &= ~SCR_TCR2EN_BIT;
- write_ctx_reg(state, CTX_SCR_EL3, reg);
- }
|