@@ -184,7 +184,7 @@ static bool v7m_stack_write(ARMCPU *cpu, uint32_t addr, uint32_t value,
CPUState *cs = CPU(cpu);
CPUARMState *env = &cpu->env;
MemTxResult txres;
- GetPhysAddrResult res = {};
+ GetPhysAddrResult res = { .f.attrs = MEMTXATTRS_CPU(cs) };
ARMMMUFaultInfo fi = {};
bool secure = mmu_idx & ARM_MMU_IDX_M_S;
int exc;
@@ -272,7 +272,7 @@ static bool v7m_stack_read(ARMCPU *cpu, uint32_t *dest, uint32_t addr,
CPUState *cs = CPU(cpu);
CPUARMState *env = &cpu->env;
MemTxResult txres;
- GetPhysAddrResult res = {};
+ GetPhysAddrResult res = { .f.attrs = MEMTXATTRS_CPU(cs) };
ARMMMUFaultInfo fi = {};
bool secure = mmu_idx & ARM_MMU_IDX_M_S;
int exc;
@@ -665,7 +665,7 @@ static bool arm_v7m_load_vector(ARMCPU *cpu, int exc, bool targets_secure,
MemTxResult result;
uint32_t addr = env->v7m.vecbase[targets_secure] + exc * 4;
uint32_t vector_entry;
- MemTxAttrs attrs = {};
+ MemTxAttrs attrs = MEMTXATTRS_CPU(cs);
ARMMMUIdx mmu_idx;
bool exc_secure;
@@ -1999,7 +1999,7 @@ static bool v7m_read_half_insn(ARMCPU *cpu, ARMMMUIdx mmu_idx, bool secure,
CPUState *cs = CPU(cpu);
CPUARMState *env = &cpu->env;
V8M_SAttributes sattrs = {};
- GetPhysAddrResult res = {};
+ GetPhysAddrResult res = { .f.attrs = MEMTXATTRS_CPU(cs) };
ARMMMUFaultInfo fi = {};
MemTxResult txres;
@@ -2047,7 +2047,7 @@ static bool v7m_read_sg_stack_word(ARMCPU *cpu, ARMMMUIdx mmu_idx,
CPUState *cs = CPU(cpu);
CPUARMState *env = &cpu->env;
MemTxResult txres;
- GetPhysAddrResult res = {};
+ GetPhysAddrResult res = { .f.attrs = MEMTXATTRS_CPU(cs) };
ARMMMUFaultInfo fi = {};
uint32_t value;
@@ -2805,7 +2805,7 @@ uint32_t HELPER(v7m_tt)(CPUARMState *env, uint32_t addr, uint32_t op)
* inspecting the other MPU state.
*/
if (arm_current_el(env) != 0 || alt) {
- GetPhysAddrResult res = {};
+ GetPhysAddrResult res = { .f.attrs = MEMTXATTRS_CPU(env_cpu(env)) };
ARMMMUFaultInfo fi = {};
/* We can ignore the return value as prot is always set */
There are a number of helpers for M-profile that deal with CPU initiated access to the vector and stack areas. While it is unlikely these coincided with memory mapped IO devices it is not inconceivable. Embedded targets tend to attract all sorts of interesting code and for completeness we should tag the transaction appropriately. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> --- v5 - rebase fixes for refactoring --- target/arm/m_helper.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)