mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 14:53:54 -06:00
target/arm/ptw: extract arm_mmu_idx_to_security_space
We'll reuse this function later. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-id: 20250414153027.1486719-2-pierrick.bouvier@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
d5bd8d8267
commit
e47a9e886f
1 changed files with 14 additions and 7 deletions
|
@ -3551,13 +3551,9 @@ bool get_phys_addr_with_space_nogpc(CPUARMState *env, vaddr address,
|
|||
memop, result, fi);
|
||||
}
|
||||
|
||||
bool get_phys_addr(CPUARMState *env, vaddr address,
|
||||
MMUAccessType access_type, MemOp memop, ARMMMUIdx mmu_idx,
|
||||
GetPhysAddrResult *result, ARMMMUFaultInfo *fi)
|
||||
static ARMSecuritySpace
|
||||
arm_mmu_idx_to_security_space(CPUARMState *env, ARMMMUIdx mmu_idx)
|
||||
{
|
||||
S1Translate ptw = {
|
||||
.in_mmu_idx = mmu_idx,
|
||||
};
|
||||
ARMSecuritySpace ss;
|
||||
|
||||
switch (mmu_idx) {
|
||||
|
@ -3618,7 +3614,18 @@ bool get_phys_addr(CPUARMState *env, vaddr address,
|
|||
g_assert_not_reached();
|
||||
}
|
||||
|
||||
ptw.in_space = ss;
|
||||
return ss;
|
||||
}
|
||||
|
||||
bool get_phys_addr(CPUARMState *env, vaddr address,
|
||||
MMUAccessType access_type, MemOp memop, ARMMMUIdx mmu_idx,
|
||||
GetPhysAddrResult *result, ARMMMUFaultInfo *fi)
|
||||
{
|
||||
S1Translate ptw = {
|
||||
.in_mmu_idx = mmu_idx,
|
||||
.in_space = arm_mmu_idx_to_security_space(env, mmu_idx),
|
||||
};
|
||||
|
||||
return get_phys_addr_gpc(env, &ptw, address, access_type,
|
||||
memop, result, fi);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue