xref: /openbmc/qemu/target/ppc/cpu-param.h (revision a53b931645183bd0c15dd19ae0708fc3c81ecf1d)
174433bf0SRichard Henderson /*
274433bf0SRichard Henderson  * PowerPC cpu parameters for qemu.
374433bf0SRichard Henderson  *
474433bf0SRichard Henderson  * Copyright (c) 2007 Jocelyn Mayer
5*b14d0649SPhilippe Mathieu-Daudé  * SPDX-License-Identifier: LGPL-2.0-or-later
674433bf0SRichard Henderson  */
774433bf0SRichard Henderson 
874433bf0SRichard Henderson #ifndef PPC_CPU_PARAM_H
94f31b54bSMarkus Armbruster #define PPC_CPU_PARAM_H
1074433bf0SRichard Henderson 
1174433bf0SRichard Henderson #ifdef TARGET_PPC64
1274433bf0SRichard Henderson # define TARGET_LONG_BITS 64
1374433bf0SRichard Henderson /*
1474433bf0SRichard Henderson  * Note that the official physical address space bits is 62-M where M
1574433bf0SRichard Henderson  * is implementation dependent.  I've not looked up M for the set of
1674433bf0SRichard Henderson  * cpus we emulate at the system level.
1774433bf0SRichard Henderson  */
1874433bf0SRichard Henderson #define TARGET_PHYS_ADDR_SPACE_BITS 62
1974433bf0SRichard Henderson /*
2074433bf0SRichard Henderson  * Note that the PPC environment architecture talks about 80 bit virtual
2174433bf0SRichard Henderson  * addresses, with segmentation.  Obviously that's not all visible to a
2274433bf0SRichard Henderson  * single process, which is all we're concerned with here.
2374433bf0SRichard Henderson  */
2474433bf0SRichard Henderson # ifdef TARGET_ABI32
2574433bf0SRichard Henderson #  define TARGET_VIRT_ADDR_SPACE_BITS 32
2674433bf0SRichard Henderson # else
2774433bf0SRichard Henderson #  define TARGET_VIRT_ADDR_SPACE_BITS 64
2874433bf0SRichard Henderson # endif
2974433bf0SRichard Henderson #else
3074433bf0SRichard Henderson # define TARGET_LONG_BITS 32
3174433bf0SRichard Henderson # define TARGET_PHYS_ADDR_SPACE_BITS 36
3274433bf0SRichard Henderson # define TARGET_VIRT_ADDR_SPACE_BITS 32
3374433bf0SRichard Henderson #endif
34835e5fe9SRichard Henderson 
35835e5fe9SRichard Henderson #ifdef CONFIG_USER_ONLY
36835e5fe9SRichard Henderson /* Allow user-only to vary page size from 4k */
37835e5fe9SRichard Henderson # define TARGET_PAGE_BITS_VARY
38835e5fe9SRichard Henderson # define TARGET_PAGE_BITS_MIN 12
39835e5fe9SRichard Henderson #else
4074433bf0SRichard Henderson # define TARGET_PAGE_BITS 12
41835e5fe9SRichard Henderson #endif
4274433bf0SRichard Henderson 
43e92dd332SPhilippe Mathieu-Daudé #define TCG_GUEST_DEFAULT_MO 0
44e92dd332SPhilippe Mathieu-Daudé 
4574433bf0SRichard Henderson #endif
46