mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-26 06:50:10 +00:00
fix(cm): remove ENABLE_FEAT_MTE usage
commit@c282384dbb45b6185b4aba14efebbad110d18e49 removed ENABLE_FEAT_MTE but missed its usage in context structure declaration path. All mte regs that are currently context saved/restored are needed only when FEAT_MTE2 is enabled, so move to usage of FEAT_MTE2 and remove FEAT_MTE usage Change-Id: I6b4417485fa6b7f52a31045562600945e48e81b7 Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
This commit is contained in:
parent
64bd9551b1
commit
a796d5aa11
2 changed files with 12 additions and 12 deletions
|
@ -49,9 +49,9 @@ typedef struct el2_common_regs {
|
|||
uint64_t vttbr_el2;
|
||||
} el2_common_regs_t;
|
||||
|
||||
typedef struct el2_mte_regs {
|
||||
typedef struct el2_mte2_regs {
|
||||
uint64_t tfsr_el2;
|
||||
} el2_mte_regs_t;
|
||||
} el2_mte2_regs_t;
|
||||
|
||||
typedef struct el2_fgt_regs {
|
||||
uint64_t hdfgrtr_el2;
|
||||
|
@ -118,8 +118,8 @@ typedef struct el2_sysregs {
|
|||
|
||||
el2_common_regs_t common;
|
||||
|
||||
#if ENABLE_FEAT_MTE
|
||||
el2_mte_regs_t mte;
|
||||
#if ENABLE_FEAT_MTE2
|
||||
el2_mte2_regs_t mte2;
|
||||
#endif
|
||||
|
||||
#if ENABLE_FEAT_FGT
|
||||
|
@ -185,14 +185,14 @@ typedef struct el2_sysregs {
|
|||
#define write_el2_ctx_common(ctx, reg, val) ((((ctx)->common).reg) \
|
||||
= (uint64_t) (val))
|
||||
|
||||
#if ENABLE_FEAT_MTE
|
||||
#define read_el2_ctx_mte(ctx, reg) (((ctx)->mte).reg)
|
||||
#define write_el2_ctx_mte(ctx, reg, val) ((((ctx)->mte).reg) \
|
||||
#if ENABLE_FEAT_MTE2
|
||||
#define read_el2_ctx_mte2(ctx, reg) (((ctx)->mte2).reg)
|
||||
#define write_el2_ctx_mte2(ctx, reg, val) ((((ctx)->mte2).reg) \
|
||||
= (uint64_t) (val))
|
||||
#else
|
||||
#define read_el2_ctx_mte(ctx, reg) ULL(0)
|
||||
#define write_el2_ctx_mte(ctx, reg, val)
|
||||
#endif /* ENABLE_FEAT_MTE */
|
||||
#define read_el2_ctx_mte2(ctx, reg) ULL(0)
|
||||
#define write_el2_ctx_mte2(ctx, reg, val)
|
||||
#endif /* ENABLE_FEAT_MTE2 */
|
||||
|
||||
#if ENABLE_FEAT_FGT
|
||||
#define read_el2_ctx_fgt(ctx, reg) (((ctx)->fgt).reg)
|
||||
|
|
|
@ -1278,7 +1278,7 @@ void cm_el2_sysregs_context_save(uint32_t security_state)
|
|||
el2_sysregs_context_save_gic(el2_sysregs_ctx);
|
||||
|
||||
if (is_feat_mte2_supported()) {
|
||||
write_el2_ctx_mte(el2_sysregs_ctx, tfsr_el2, read_tfsr_el2());
|
||||
write_el2_ctx_mte2(el2_sysregs_ctx, tfsr_el2, read_tfsr_el2());
|
||||
}
|
||||
|
||||
#if CTX_INCLUDE_MPAM_REGS
|
||||
|
@ -1364,7 +1364,7 @@ void cm_el2_sysregs_context_restore(uint32_t security_state)
|
|||
el2_sysregs_context_restore_gic(el2_sysregs_ctx);
|
||||
|
||||
if (is_feat_mte2_supported()) {
|
||||
write_tfsr_el2(read_el2_ctx_mte(el2_sysregs_ctx, tfsr_el2));
|
||||
write_tfsr_el2(read_el2_ctx_mte2(el2_sysregs_ctx, tfsr_el2));
|
||||
}
|
||||
|
||||
#if CTX_INCLUDE_MPAM_REGS
|
||||
|
|
Loading…
Add table
Reference in a new issue