meminit.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #ifndef meminit_h
  2. #define meminit_h
  3. /*
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. */
  8. /*
  9. * Entries defined so far:
  10. * - boot param structure itself
  11. * - memory map
  12. * - initrd (optional)
  13. * - command line string
  14. * - kernel code & data
  15. * - crash dumping code reserved region
  16. * - Kernel memory map built from EFI memory map
  17. * - ELF core header
  18. *
  19. * More could be added if necessary
  20. */
  21. #define IA64_MAX_RSVD_REGIONS 9
  22. struct rsvd_region {
  23. u64 start; /* virtual address of beginning of element */
  24. u64 end; /* virtual address of end of element + 1 */
  25. };
  26. extern struct rsvd_region rsvd_region[IA64_MAX_RSVD_REGIONS + 1];
  27. extern int num_rsvd_regions;
  28. extern void find_memory (void);
  29. extern void reserve_memory (void);
  30. extern void find_initrd (void);
  31. extern int filter_rsvd_memory (u64 start, u64 end, void *arg);
  32. extern int filter_memory (u64 start, u64 end, void *arg);
  33. extern unsigned long efi_memmap_init(u64 *s, u64 *e);
  34. extern int find_max_min_low_pfn (u64, u64, void *);
  35. extern unsigned long vmcore_find_descriptor_size(unsigned long address);
  36. extern int reserve_elfcorehdr(u64 *start, u64 *end);
  37. /*
  38. * For rounding an address to the next IA64_GRANULE_SIZE or order
  39. */
  40. #define GRANULEROUNDDOWN(n) ((n) & ~(IA64_GRANULE_SIZE-1))
  41. #define GRANULEROUNDUP(n) (((n)+IA64_GRANULE_SIZE-1) & ~(IA64_GRANULE_SIZE-1))
  42. #ifdef CONFIG_NUMA
  43. extern void call_pernode_memory (unsigned long start, unsigned long len, void *func);
  44. #else
  45. # define call_pernode_memory(start, len, func) (*func)(start, len, 0)
  46. #endif
  47. #define IGNORE_PFN0 1 /* XXX fix me: ignore pfn 0 until TLB miss handler is updated... */
  48. extern int register_active_ranges(u64 start, u64 len, int nid);
  49. #ifdef CONFIG_VIRTUAL_MEM_MAP
  50. # define LARGE_GAP 0x40000000 /* Use virtual mem map if hole is > than this */
  51. extern unsigned long VMALLOC_END;
  52. extern struct page *vmem_map;
  53. extern int find_largest_hole(u64 start, u64 end, void *arg);
  54. extern int create_mem_map_page_table(u64 start, u64 end, void *arg);
  55. extern int vmemmap_find_next_valid_pfn(int, int);
  56. #else
  57. static inline int vmemmap_find_next_valid_pfn(int node, int i)
  58. {
  59. return i + 1;
  60. }
  61. #endif
  62. #endif /* meminit_h */