174433bf0SRichard Henderson /* 274433bf0SRichard Henderson * ARM cpu parameters for qemu. 374433bf0SRichard Henderson * 474433bf0SRichard Henderson * Copyright (c) 2003 Fabrice Bellard 574433bf0SRichard Henderson * SPDX-License-Identifier: LGPL-2.0+ 674433bf0SRichard Henderson */ 774433bf0SRichard Henderson 874433bf0SRichard Henderson #ifndef ARM_CPU_PARAM_H 974433bf0SRichard Henderson #define ARM_CPU_PARAM_H 1 1074433bf0SRichard Henderson 1174433bf0SRichard Henderson #ifdef TARGET_AARCH64 1274433bf0SRichard Henderson # define TARGET_LONG_BITS 64 1374433bf0SRichard Henderson # define TARGET_PHYS_ADDR_SPACE_BITS 48 1474433bf0SRichard Henderson # define TARGET_VIRT_ADDR_SPACE_BITS 48 1574433bf0SRichard Henderson #else 1674433bf0SRichard Henderson # define TARGET_LONG_BITS 32 1774433bf0SRichard Henderson # define TARGET_PHYS_ADDR_SPACE_BITS 40 1874433bf0SRichard Henderson # define TARGET_VIRT_ADDR_SPACE_BITS 32 1974433bf0SRichard Henderson #endif 2074433bf0SRichard Henderson 2174433bf0SRichard Henderson #ifdef CONFIG_USER_ONLY 2274433bf0SRichard Henderson #define TARGET_PAGE_BITS 12 23*0e0c030cSRichard Henderson # ifdef TARGET_AARCH64 24*0e0c030cSRichard Henderson # define TARGET_TAGGED_ADDRESSES 25*0e0c030cSRichard Henderson # endif 2674433bf0SRichard Henderson #else 2774433bf0SRichard Henderson /* 2874433bf0SRichard Henderson * ARMv7 and later CPUs have 4K pages minimum, but ARMv5 and v6 2974433bf0SRichard Henderson * have to support 1K tiny pages. 3074433bf0SRichard Henderson */ 3174433bf0SRichard Henderson # define TARGET_PAGE_BITS_VARY 3274433bf0SRichard Henderson # define TARGET_PAGE_BITS_MIN 10 3374433bf0SRichard Henderson #endif 3474433bf0SRichard Henderson 35b6ad6062SRémi Denis-Courmont #define NB_MMU_MODES 15 3674433bf0SRichard Henderson 3774433bf0SRichard Henderson #endif 38