blob: a9f7c6ec32bf7ecad8041a7db1af54c4f2a47393 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * structures and definitions for the int 15, ax=e820 memory map
3 * scheme.
4 *
5 * In a nutshell, arch/i386/boot/setup.S populates a scratch table
6 * in the empty_zero_block that contains a list of usable address/size
7 * duples. In arch/i386/kernel/setup.c, this information is
8 * transferred into the e820map, and in arch/i386/mm/init.c, that
9 * new information is used to mark pages reserved or not.
10 *
11 */
12#ifndef __E820_HEADER
13#define __E820_HEADER
14
Bernhard Wallec9cce832008-01-30 13:30:32 +010015#include <linux/ioport.h>
16
Linus Torvalds1da177e2005-04-16 15:20:36 -070017#define HIGH_MEMORY (1024*1024)
18
19#ifndef __ASSEMBLY__
20
Linus Torvalds1da177e2005-04-16 15:20:36 -070021extern struct e820map e820;
Yinghai Lu093af8d2008-01-30 13:33:32 +010022extern void update_e820(void);
Arjan van de Ven95222362006-04-07 19:49:27 +020023
24extern int e820_all_mapped(unsigned long start, unsigned long end,
25 unsigned type);
Jan Beulichb92e9fa2007-05-02 19:27:11 +020026extern int e820_any_mapped(u64 start, u64 end, unsigned type);
Ingo Molnarfa5c4632008-04-16 02:29:42 +020027extern void propagate_e820_map(void);
bibo,maob5b24052006-12-07 02:14:06 +010028extern void register_bootmem_low_pages(unsigned long max_low_pfn);
Yinghai Lu093af8d2008-01-30 13:33:32 +010029extern void add_memory_region(unsigned long long start,
30 unsigned long long size, int type);
Yinghai Lu5dca6a12008-03-18 16:44:19 -070031extern void update_memory_range(u64 start, u64 size, unsigned old_type,
32 unsigned new_type);
Yasunori Goto5c95da92006-12-22 01:09:54 -080033extern void e820_register_memory(void);
bibo,maocef518e2006-12-07 02:14:06 +010034extern void limit_regions(unsigned long long size);
35extern void print_memory_map(char *who);
Huang, Ying2215e692008-01-30 13:31:19 +010036extern void init_iomem_resources(struct resource *code_resource,
Joe Perches1257d6e2008-03-23 01:02:04 -070037 struct resource *data_resource,
38 struct resource *bss_resource);
Arjan van de Ven95222362006-04-07 19:49:27 +020039
Rafael J. Wysockib0cb1a12007-07-29 23:24:36 +020040#if defined(CONFIG_PM) && defined(CONFIG_HIBERNATION)
Rafael J. Wysocki1c100702007-07-21 17:11:09 +020041extern void e820_mark_nosave_regions(void);
42#else
43static inline void e820_mark_nosave_regions(void)
44{
45}
46#endif
47
Bernhard Wallec9cce832008-01-30 13:30:32 +010048
Linus Torvalds1da177e2005-04-16 15:20:36 -070049#endif/*!__ASSEMBLY__*/
Linus Torvalds1da177e2005-04-16 15:20:36 -070050#endif/*__E820_HEADER*/