966f4bb7d8
There are a handful of helpers for combine_cacheattrs that we can move at the same time as the main entry point. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220604040607.269301-15-richard.henderson@linaro.org Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
43 lines
1.4 KiB
C
43 lines
1.4 KiB
C
/*
|
|
* ARM page table walking.
|
|
*
|
|
* This code is licensed under the GNU GPL v2 or later.
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#ifndef TARGET_ARM_PTW_H
|
|
#define TARGET_ARM_PTW_H
|
|
|
|
#ifndef CONFIG_USER_ONLY
|
|
|
|
uint32_t arm_ldl_ptw(CPUState *cs, hwaddr addr, bool is_secure,
|
|
ARMMMUIdx mmu_idx, ARMMMUFaultInfo *fi);
|
|
uint64_t arm_ldq_ptw(CPUState *cs, hwaddr addr, bool is_secure,
|
|
ARMMMUIdx mmu_idx, ARMMMUFaultInfo *fi);
|
|
|
|
bool regime_is_user(CPUARMState *env, ARMMMUIdx mmu_idx);
|
|
bool regime_translation_disabled(CPUARMState *env, ARMMMUIdx mmu_idx);
|
|
uint64_t regime_ttbr(CPUARMState *env, ARMMMUIdx mmu_idx, int ttbrn);
|
|
|
|
int ap_to_rw_prot(CPUARMState *env, ARMMMUIdx mmu_idx,
|
|
int ap, int domain_prot);
|
|
int simple_ap_to_rw_prot_is_user(int ap, bool is_user);
|
|
|
|
static inline int
|
|
simple_ap_to_rw_prot(CPUARMState *env, ARMMMUIdx mmu_idx, int ap)
|
|
{
|
|
return simple_ap_to_rw_prot_is_user(ap, regime_is_user(env, mmu_idx));
|
|
}
|
|
|
|
bool get_phys_addr_lpae(CPUARMState *env, uint64_t address,
|
|
MMUAccessType access_type, ARMMMUIdx mmu_idx,
|
|
bool s1_is_el0,
|
|
hwaddr *phys_ptr, MemTxAttrs *txattrs, int *prot,
|
|
target_ulong *page_size_ptr,
|
|
ARMMMUFaultInfo *fi, ARMCacheAttrs *cacheattrs)
|
|
__attribute__((nonnull));
|
|
|
|
#endif /* !CONFIG_USER_ONLY */
|
|
#endif /* TARGET_ARM_PTW_H */
|