xref: /openbmc/qemu/target/arm/cpu-param.h (revision b314fd06cf2e55c6cbdda753faeda0c453ee2629)
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
94f31b54bSMarkus Armbruster #define ARM_CPU_PARAM_H
1074433bf0SRichard Henderson 
1174433bf0SRichard Henderson #ifdef TARGET_AARCH64
1274433bf0SRichard Henderson # define TARGET_LONG_BITS             64
137a928f43SRichard Henderson # define TARGET_PHYS_ADDR_SPACE_BITS  52
140af312b6SRichard Henderson # define TARGET_VIRT_ADDR_SPACE_BITS  52
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
220e0c030cSRichard Henderson # ifdef TARGET_AARCH64
230e0c030cSRichard Henderson #  define TARGET_TAGGED_ADDRESSES
24*b314fd06SWarner Losh # ifdef __FreeBSD__
25*b314fd06SWarner Losh #  define TARGET_PAGE_BITS 12
26*b314fd06SWarner Losh # else
27a575230fSRichard Henderson /* Allow user-only to vary page size from 4k */
28a575230fSRichard Henderson #  define TARGET_PAGE_BITS_VARY
29a575230fSRichard Henderson #  define TARGET_PAGE_BITS_MIN  12
30*b314fd06SWarner Losh # endif
31a575230fSRichard Henderson # else
32a575230fSRichard Henderson #  define TARGET_PAGE_BITS 12
330e0c030cSRichard Henderson # endif
34e92dd332SPhilippe Mathieu-Daudé #else /* !CONFIG_USER_ONLY */
3574433bf0SRichard Henderson /*
3674433bf0SRichard Henderson  * ARMv7 and later CPUs have 4K pages minimum, but ARMv5 and v6
3774433bf0SRichard Henderson  * have to support 1K tiny pages.
3874433bf0SRichard Henderson  */
3974433bf0SRichard Henderson # define TARGET_PAGE_BITS_VARY
4074433bf0SRichard Henderson # define TARGET_PAGE_BITS_MIN  10
41e92dd332SPhilippe Mathieu-Daudé #endif /* !CONFIG_USER_ONLY */
4224d18d5dSRichard Henderson 
43e92dd332SPhilippe Mathieu-Daudé /* ARM processors have a weak memory model */
44e92dd332SPhilippe Mathieu-Daudé #define TCG_GUEST_DEFAULT_MO      (0)
4574433bf0SRichard Henderson 
4674433bf0SRichard Henderson #endif
47