• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _ASM_X86_E820_H
2 #define _ASM_X86_E820_H
3 
4 #ifdef CONFIG_EFI
5 #include <linux/numa.h>
6 #define E820_X_MAX (E820MAX + 3 * MAX_NUMNODES)
7 #else	/* ! CONFIG_EFI */
8 #define E820_X_MAX E820MAX
9 #endif
10 #include <uapi/asm/e820.h>
11 #ifndef __ASSEMBLY__
12 /* see comment in arch/x86/kernel/e820.c */
13 extern struct e820map e820;
14 extern struct e820map e820_saved;
15 
16 extern unsigned long pci_mem_start;
17 extern int e820_any_mapped(u64 start, u64 end, unsigned type);
18 extern int e820_all_mapped(u64 start, u64 end, unsigned type);
19 extern void e820_add_region(u64 start, u64 size, int type);
20 extern void e820_print_map(char *who);
21 extern int
22 sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, u32 *pnr_map);
23 extern u64 e820_update_range(u64 start, u64 size, unsigned old_type,
24 			       unsigned new_type);
25 extern u64 e820_remove_range(u64 start, u64 size, unsigned old_type,
26 			     int checktype);
27 extern void update_e820(void);
28 extern void e820_setup_gap(void);
29 extern int e820_search_gap(unsigned long *gapstart, unsigned long *gapsize,
30 			unsigned long start_addr, unsigned long long end_addr);
31 struct setup_data;
32 extern void parse_e820_ext(u64 phys_addr, u32 data_len);
33 
34 #if defined(CONFIG_X86_64) || \
35 	(defined(CONFIG_X86_32) && defined(CONFIG_HIBERNATION))
36 extern void e820_mark_nosave_regions(unsigned long limit_pfn);
37 #else
e820_mark_nosave_regions(unsigned long limit_pfn)38 static inline void e820_mark_nosave_regions(unsigned long limit_pfn)
39 {
40 }
41 #endif
42 
43 extern unsigned long e820_end_of_ram_pfn(void);
44 extern unsigned long e820_end_of_low_ram_pfn(void);
45 extern u64 early_reserve_e820(u64 sizet, u64 align);
46 
47 void memblock_x86_fill(void);
48 void memblock_find_dma_reserve(void);
49 
50 extern void finish_e820_parsing(void);
51 extern void e820_reserve_resources(void);
52 extern void e820_reserve_resources_late(void);
53 extern void setup_memory_map(void);
54 extern char *default_machine_specific_memory_setup(void);
55 
56 /*
57  * Returns true iff the specified range [s,e) is completely contained inside
58  * the ISA region.
59  */
is_ISA_range(u64 s,u64 e)60 static inline bool is_ISA_range(u64 s, u64 e)
61 {
62 	return s >= ISA_START_ADDRESS && e <= ISA_END_ADDRESS;
63 }
64 
65 #endif /* __ASSEMBLY__ */
66 #include <linux/ioport.h>
67 
68 #define HIGH_MEMORY	(1024*1024)
69 #endif /* _ASM_X86_E820_H */
70