H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 1 | #ifndef _ASM_X86_E820_H |
| 2 | #define _ASM_X86_E820_H |
Paul Jackson | 028b785 | 2008-05-14 08:15:40 -0700 | [diff] [blame] | 3 | |
Paul Jackson | 028b785 | 2008-05-14 08:15:40 -0700 | [diff] [blame] | 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 |
David Howells | af170c5 | 2012-12-14 22:37:13 +0000 | [diff] [blame] | 10 | #include <uapi/asm/e820.h> |
Rusty Russell | ee8e7cf | 2007-10-22 10:56:19 +1000 | [diff] [blame] | 11 | #ifndef __ASSEMBLY__ |
Bernhard Walle | 5dfcf14 | 2008-06-27 13:12:55 +0200 | [diff] [blame] | 12 | /* see comment in arch/x86/kernel/e820.c */ |
Yinghai Lu | b79cd8f | 2008-05-11 00:30:15 -0700 | [diff] [blame] | 13 | extern struct e820map e820; |
Bernhard Walle | 5dfcf14 | 2008-06-27 13:12:55 +0200 | [diff] [blame] | 14 | extern struct e820map e820_saved; |
Yinghai Lu | b79cd8f | 2008-05-11 00:30:15 -0700 | [diff] [blame] | 15 | |
Jaswinder Singh | a7b7511 | 2008-07-21 22:19:29 +0530 | [diff] [blame] | 16 | extern unsigned long pci_mem_start; |
Yinghai Lu | b79cd8f | 2008-05-11 00:30:15 -0700 | [diff] [blame] | 17 | extern int e820_any_mapped(u64 start, u64 end, unsigned type); |
| 18 | extern int e820_all_mapped(u64 start, u64 end, unsigned type); |
Yinghai Lu | d0be6bd | 2008-06-15 18:58:51 -0700 | [diff] [blame] | 19 | extern void e820_add_region(u64 start, u64 size, int type); |
Yinghai Lu | b79cd8f | 2008-05-11 00:30:15 -0700 | [diff] [blame] | 20 | extern void e820_print_map(char *who); |
Paul Jackson | c3965bd | 2008-05-14 08:15:34 -0700 | [diff] [blame] | 21 | extern int |
Jaswinder Singh Rajput | ba63903 | 2009-03-23 02:13:01 +0530 | [diff] [blame] | 22 | sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, u32 *pnr_map); |
Yinghai Lu | d0be6bd | 2008-06-15 18:58:51 -0700 | [diff] [blame] | 23 | extern u64 e820_update_range(u64 start, u64 size, unsigned old_type, |
Yinghai Lu | b79cd8f | 2008-05-11 00:30:15 -0700 | [diff] [blame] | 24 | unsigned new_type); |
Yinghai Lu | 7a1fd98 | 2008-06-21 14:48:05 -0700 | [diff] [blame] | 25 | extern u64 e820_remove_range(u64 start, u64 size, unsigned old_type, |
| 26 | int checktype); |
Yinghai Lu | b79cd8f | 2008-05-11 00:30:15 -0700 | [diff] [blame] | 27 | extern void update_e820(void); |
| 28 | extern void e820_setup_gap(void); |
Alok Kataria | 3381959 | 2008-06-24 11:48:30 -0700 | [diff] [blame] | 29 | extern int e820_search_gap(unsigned long *gapstart, unsigned long *gapsize, |
Alok Kataria | fd6493e | 2008-06-25 11:02:42 -0700 | [diff] [blame] | 30 | unsigned long start_addr, unsigned long long end_addr); |
Huang, Ying | 8c5beb5 | 2008-06-11 11:33:39 +0800 | [diff] [blame] | 31 | struct setup_data; |
Linn Crosetto | 30e46b5 | 2013-08-13 15:46:41 -0600 | [diff] [blame] | 32 | extern void parse_e820_ext(u64 phys_addr, u32 data_len); |
Yinghai Lu | b79cd8f | 2008-05-11 00:30:15 -0700 | [diff] [blame] | 33 | |
Yinghai Lu | bf62f39 | 2008-05-20 20:10:58 -0700 | [diff] [blame] | 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 |
| 38 | static inline void e820_mark_nosave_regions(unsigned long limit_pfn) |
| 39 | { |
| 40 | } |
| 41 | #endif |
| 42 | |
Yinghai Lu | f361a45 | 2008-07-10 20:38:26 -0700 | [diff] [blame] | 43 | extern unsigned long e820_end_of_ram_pfn(void); |
| 44 | extern unsigned long e820_end_of_low_ram_pfn(void); |
Tejun Heo | ab5d140 | 2011-07-12 11:15:58 +0200 | [diff] [blame] | 45 | extern u64 early_reserve_e820(u64 sizet, u64 align); |
Yinghai Lu | 72d7c3b | 2010-08-25 13:39:17 -0700 | [diff] [blame] | 46 | |
| 47 | void memblock_x86_fill(void); |
Yinghai Lu | 6f2a753 | 2010-08-25 13:39:18 -0700 | [diff] [blame] | 48 | void memblock_find_dma_reserve(void); |
| 49 | |
Yinghai Lu | ab4a465 | 2008-06-10 12:55:54 -0700 | [diff] [blame] | 50 | extern void finish_e820_parsing(void); |
Yinghai Lu | 41c094f | 2008-06-16 13:03:31 -0700 | [diff] [blame] | 51 | extern void e820_reserve_resources(void); |
Yinghai Lu | 58f7c98 | 2008-08-28 13:52:25 -0700 | [diff] [blame] | 52 | extern void e820_reserve_resources_late(void); |
Yinghai Lu | 064d25f | 2008-06-16 19:58:28 -0700 | [diff] [blame] | 53 | extern void setup_memory_map(void); |
Yinghai Lu | 95a71a4 | 2008-06-18 17:27:08 -0700 | [diff] [blame] | 54 | extern char *default_machine_specific_memory_setup(void); |
H. Peter Anvin | 65f116f | 2009-11-23 14:44:39 -0800 | [diff] [blame] | 55 | |
H. Peter Anvin | ccef086 | 2009-11-30 21:33:51 -0800 | [diff] [blame] | 56 | /* |
| 57 | * Returns true iff the specified range [s,e) is completely contained inside |
| 58 | * the ISA region. |
| 59 | */ |
H. Peter Anvin | 65f116f | 2009-11-23 14:44:39 -0800 | [diff] [blame] | 60 | static inline bool is_ISA_range(u64 s, u64 e) |
| 61 | { |
H. Peter Anvin | ccef086 | 2009-11-30 21:33:51 -0800 | [diff] [blame] | 62 | return s >= ISA_START_ADDRESS && e <= ISA_END_ADDRESS; |
H. Peter Anvin | 65f116f | 2009-11-23 14:44:39 -0800 | [diff] [blame] | 63 | } |
| 64 | |
Rusty Russell | ee8e7cf | 2007-10-22 10:56:19 +1000 | [diff] [blame] | 65 | #endif /* __ASSEMBLY__ */ |
Yinghai Lu | 064d25f | 2008-06-16 19:58:28 -0700 | [diff] [blame] | 66 | #include <linux/ioport.h> |
| 67 | |
Yinghai Lu | 064d25f | 2008-06-16 19:58:28 -0700 | [diff] [blame] | 68 | #define HIGH_MEMORY (1024*1024) |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 69 | #endif /* _ASM_X86_E820_H */ |