xref: /qemu/target/ppc/cpu-param.h (revision 513823e7521a09ed7ad1e32e6454bac3b2cbf52d)
1 /*
2  * PowerPC cpu parameters for qemu.
3  *
4  * Copyright (c) 2007 Jocelyn Mayer
5  * SPDX-License-Identifier: LGPL-2.0-or-later
6  */
7 
8 #ifndef PPC_CPU_PARAM_H
9 #define PPC_CPU_PARAM_H
10 
11 #ifdef TARGET_PPC64
12 /*
13  * Note that the official physical address space bits is 62-M where M
14  * is implementation dependent.  I've not looked up M for the set of
15  * cpus we emulate at the system level.
16  */
17 #define TARGET_PHYS_ADDR_SPACE_BITS 62
18 /*
19  * Note that the PPC environment architecture talks about 80 bit virtual
20  * addresses, with segmentation.  Obviously that's not all visible to a
21  * single process, which is all we're concerned with here.
22  */
23 # ifdef TARGET_ABI32
24 #  define TARGET_VIRT_ADDR_SPACE_BITS 32
25 # else
26 #  define TARGET_VIRT_ADDR_SPACE_BITS 64
27 # endif
28 #else
29 # define TARGET_PHYS_ADDR_SPACE_BITS 36
30 # define TARGET_VIRT_ADDR_SPACE_BITS 32
31 #endif
32 
33 #ifdef CONFIG_USER_ONLY
34 /* Allow user-only to vary page size from 4k */
35 # define TARGET_PAGE_BITS_VARY
36 # define TARGET_PAGE_BITS_MIN 12
37 #else
38 # define TARGET_PAGE_BITS 12
39 #endif
40 
41 #define TCG_GUEST_DEFAULT_MO 0
42 
43 #endif
44