hw/xen/hvm: Get target page size at runtime
[qemu/ar7.git] / target / arm / cpu-param.h
blobda3243ab2178dd2edf34ea77aadd4d02c943f621
1 /*
2 * ARM cpu parameters for qemu.
4 * Copyright (c) 2003 Fabrice Bellard
5 * SPDX-License-Identifier: LGPL-2.0+
6 */
8 #ifndef ARM_CPU_PARAM_H
9 #define ARM_CPU_PARAM_H
11 #ifdef TARGET_AARCH64
12 # define TARGET_LONG_BITS 64
13 # define TARGET_PHYS_ADDR_SPACE_BITS 52
14 # define TARGET_VIRT_ADDR_SPACE_BITS 52
15 #else
16 # define TARGET_LONG_BITS 32
17 # define TARGET_PHYS_ADDR_SPACE_BITS 40
18 # define TARGET_VIRT_ADDR_SPACE_BITS 32
19 #endif
21 #ifdef CONFIG_USER_ONLY
22 # ifdef TARGET_AARCH64
23 # define TARGET_TAGGED_ADDRESSES
24 /* Allow user-only to vary page size from 4k */
25 # define TARGET_PAGE_BITS_VARY
26 # define TARGET_PAGE_BITS_MIN 12
27 # else
28 # define TARGET_PAGE_BITS 12
29 # endif
30 #else
32 * ARMv7 and later CPUs have 4K pages minimum, but ARMv5 and v6
33 * have to support 1K tiny pages.
35 # define TARGET_PAGE_BITS_VARY
36 # define TARGET_PAGE_BITS_MIN 10
38 #endif
40 #endif