xref: /kvm-unit-tests/lib/powerpc/asm/setup.h (revision 4ff26ec5da572134631ddae4fd4303feadba45ac)
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 
10 #define NR_CPUS			8	/* arbitrarily set for now */
11 extern u32 cpus[NR_CPUS];
12 extern int nr_cpus;
13 
14 extern uint64_t tb_hz;
15 
16 #define NR_MEM_REGIONS		8
17 #define MR_F_PRIMARY		(1U << 0)
18 struct mem_region {
19 	phys_addr_t start;
20 	phys_addr_t end;
21 	unsigned int flags;
22 };
23 extern struct mem_region mem_regions[NR_MEM_REGIONS];
24 extern phys_addr_t __physical_start, __physical_end;
25 extern unsigned __icache_bytes, __dcache_bytes;
26 
27 #define PHYSICAL_START		(__physical_start)
28 #define PHYSICAL_END		(__physical_end)
29 
30 void setup(const void *fdt);
31 
32 #endif /* _ASMPOWERPC_SETUP_H_ */
33