1 #ifndef _ASMARM_SETUP_H_ 2 #define _ASMARM_SETUP_H_ 3 /* 4 * Copyright (C) 2014, 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 <asm/page.h> 10 #include <asm/pgtable-hwdef.h> 11 12 #define NR_CPUS 512 13 extern u64 cpus[NR_CPUS]; /* per-cpu IDs (MPIDRs) */ 14 extern int nr_cpus; 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 __phys_offset, __phys_end; 25 26 #define PHYS_OFFSET (__phys_offset) 27 #define PHYS_END (__phys_end) 28 29 #define L1_CACHE_SHIFT 6 30 #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) 31 #define SMP_CACHE_BYTES L1_CACHE_BYTES 32 33 void setup(const void *fdt); 34 35 #endif /* _ASMARM_SETUP_H_ */ 36