xref: /qemu/target/arm/cpu-param.h (revision 7cef6d686309e2792186504ae17cf4f3eb57ef68)
1 /*
2  * ARM cpu parameters for qemu.
3  *
4  * Copyright (c) 2003 Fabrice Bellard
5  * SPDX-License-Identifier: LGPL-2.0-or-later
6  */
7 
8 #ifndef ARM_CPU_PARAM_H
9 #define ARM_CPU_PARAM_H
10 
11 #ifdef TARGET_AARCH64
12 # define TARGET_PHYS_ADDR_SPACE_BITS  52
13 # define TARGET_VIRT_ADDR_SPACE_BITS  52
14 #else
15 # define TARGET_PHYS_ADDR_SPACE_BITS  40
16 # define TARGET_VIRT_ADDR_SPACE_BITS  32
17 #endif
18 
19 #ifdef CONFIG_USER_ONLY
20 # if defined(TARGET_AARCH64) && defined(CONFIG_LINUX)
21 /* Allow user-only to vary page size from 4k */
22 #  define TARGET_PAGE_BITS_VARY
23 # else
24 #  define TARGET_PAGE_BITS 12
25 # endif
26 #else /* !CONFIG_USER_ONLY */
27 /*
28  * ARMv7 and later CPUs have 4K pages minimum, but ARMv5 and v6
29  * have to support 1K tiny pages.
30  */
31 # define TARGET_PAGE_BITS_VARY
32 # define TARGET_PAGE_BITS_LEGACY 10
33 #endif /* !CONFIG_USER_ONLY */
34 
35 /*
36  * ARM-specific extra insn start words:
37  * 1: Conditional execution bits
38  * 2: Partial exception syndrome for data aborts
39  */
40 #define TARGET_INSN_START_EXTRA_WORDS 2
41 
42 #endif
43