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