xref: /kvm-unit-tests/lib/powerpc/asm/setup.h (revision 0c4e631ecaf30f8065dec5cc589d5894c961e6ee)
1 #ifndef _ASMPOWERPC_SETUP_H_
2 #define _ASMPOWERPC_SETUP_H_
3 /*
4  * Copyright (C) 2016, Red Hat Inc, Andrew Jones <drjones@redhat.com>
5  *
6  * This work is licensed under the terms of the GNU LGPL, version 2.
7  */
8 #include <libcflat.h>
9 #include <alloc.h>	/* phys_addr_t */
10 
11 #define NR_CPUS			8	/* arbitrarily set for now */
12 extern u32 cpus[NR_CPUS];
13 extern int nr_cpus;
14 
15 #define NR_MEM_REGIONS		8
16 #define MR_F_PRIMARY		(1U << 0)
17 struct mem_region {
18 	phys_addr_t start;
19 	phys_addr_t end;
20 	unsigned int flags;
21 };
22 extern struct mem_region mem_regions[NR_MEM_REGIONS];
23 extern phys_addr_t __physical_start, __physical_end;
24 extern unsigned __icache_bytes, __dcache_bytes;
25 
26 #define PHYSICAL_START		(__physical_start)
27 #define PHYSICAL_END		(__physical_end)
28 
29 #endif /* _ASMPOWERPC_SETUP_H_ */
30