xref: /openbmc/linux/arch/ia64/include/asm/meminit.h (revision 762f99f4f3cb41a775b5157dd761217beba65873)
17f30491cSTony Luck #ifndef meminit_h
27f30491cSTony Luck #define meminit_h
37f30491cSTony Luck 
47f30491cSTony Luck /*
57f30491cSTony Luck  * This file is subject to the terms and conditions of the GNU General Public
67f30491cSTony Luck  * License.  See the file "COPYING" in the main directory of this archive
77f30491cSTony Luck  * for more details.
87f30491cSTony Luck  */
97f30491cSTony Luck 
107f30491cSTony Luck 
117f30491cSTony Luck /*
127f30491cSTony Luck  * Entries defined so far:
137f30491cSTony Luck  * 	- boot param structure itself
147f30491cSTony Luck  * 	- memory map
157f30491cSTony Luck  * 	- initrd (optional)
167f30491cSTony Luck  * 	- command line string
177f30491cSTony Luck  * 	- kernel code & data
187f30491cSTony Luck  * 	- crash dumping code reserved region
197f30491cSTony Luck  * 	- Kernel memory map built from EFI memory map
207f30491cSTony Luck  * 	- ELF core header
217f30491cSTony Luck  *
227f30491cSTony Luck  * More could be added if necessary
237f30491cSTony Luck  */
24627308c9SIsaku Yamahata #define IA64_MAX_RSVD_REGIONS 9
257f30491cSTony Luck 
267f30491cSTony Luck struct rsvd_region {
27*e088a4adSMatthew Wilcox 	u64 start;	/* virtual address of beginning of element */
28*e088a4adSMatthew Wilcox 	u64 end;	/* virtual address of end of element + 1 */
297f30491cSTony Luck };
307f30491cSTony Luck 
317f30491cSTony Luck extern struct rsvd_region rsvd_region[IA64_MAX_RSVD_REGIONS + 1];
327f30491cSTony Luck 
337f30491cSTony Luck extern void find_memory (void);
347f30491cSTony Luck extern void reserve_memory (void);
357f30491cSTony Luck extern void find_initrd (void);
36*e088a4adSMatthew Wilcox extern int filter_rsvd_memory (u64 start, u64 end, void *arg);
37*e088a4adSMatthew Wilcox extern int filter_memory (u64 start, u64 end, void *arg);
38*e088a4adSMatthew Wilcox extern unsigned long efi_memmap_init(u64 *s, u64 *e);
39*e088a4adSMatthew Wilcox extern int find_max_min_low_pfn (u64, u64, void *);
407f30491cSTony Luck 
417f30491cSTony Luck extern unsigned long vmcore_find_descriptor_size(unsigned long address);
427f30491cSTony Luck 
437f30491cSTony Luck /*
447f30491cSTony Luck  * For rounding an address to the next IA64_GRANULE_SIZE or order
457f30491cSTony Luck  */
467f30491cSTony Luck #define GRANULEROUNDDOWN(n)	((n) & ~(IA64_GRANULE_SIZE-1))
477f30491cSTony Luck #define GRANULEROUNDUP(n)	(((n)+IA64_GRANULE_SIZE-1) & ~(IA64_GRANULE_SIZE-1))
487f30491cSTony Luck 
497f30491cSTony Luck #ifdef CONFIG_NUMA
507f30491cSTony Luck   extern void call_pernode_memory (unsigned long start, unsigned long len, void *func);
517f30491cSTony Luck #else
527f30491cSTony Luck # define call_pernode_memory(start, len, func)	(*func)(start, len, 0)
537f30491cSTony Luck #endif
547f30491cSTony Luck 
557f30491cSTony Luck #define IGNORE_PFN0	1	/* XXX fix me: ignore pfn 0 until TLB miss handler is updated... */
567f30491cSTony Luck 
577f30491cSTony Luck extern int register_active_ranges(u64 start, u64 len, int nid);
587f30491cSTony Luck 
597f30491cSTony Luck #endif /* meminit_h */
60