s390x/pv: Implement a CGS check helper
[qemu/kevin.git] / target / arm / cpu-param.h
blob53cac9c89bf9e8f7a75547e5ec9598c77cbc1ba8
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 #define TARGET_PAGE_BITS 12
23 # ifdef TARGET_AARCH64
24 # define TARGET_TAGGED_ADDRESSES
25 # endif
26 #else
28 * ARMv7 and later CPUs have 4K pages minimum, but ARMv5 and v6
29 * have to support 1K tiny pages.
31 # define TARGET_PAGE_BITS_VARY
32 # define TARGET_PAGE_BITS_MIN 10
34 # define TARGET_TB_PCREL 1
37 * Cache the attrs and shareability fields from the page table entry.
39 * For ARMMMUIdx_Stage2*, pte_attrs is the S2 descriptor bits [5:2].
40 * Otherwise, pte_attrs is the same as the MAIR_EL1 8-bit format.
41 * For shareability and guarded, as in the SH and GP fields respectively
42 * of the VMSAv8-64 PTEs.
44 # define TARGET_PAGE_ENTRY_EXTRA \
45 uint8_t pte_attrs; \
46 uint8_t shareability; \
47 bool guarded;
48 #endif
50 #define NB_MMU_MODES 12
52 #endif