blob: f1da7ebd19051dd040ce24f77db73ef02eee8ff3 [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);
bibo,maob2dff6a2006-12-07 02:14:06 +010027extern void find_max_pfn(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);
Yasunori Goto5c95da92006-12-22 01:09:54 -080031extern void e820_register_memory(void);
bibo,maocef518e2006-12-07 02:14:06 +010032extern void limit_regions(unsigned long long size);
33extern void print_memory_map(char *who);
Huang, Ying2215e692008-01-30 13:31:19 +010034extern void init_iomem_resources(struct resource *code_resource,
Bernhard Wallec9cce832008-01-30 13:30:32 +010035 struct resource *data_resource,
36 struct resource *bss_resource);
Arjan van de Ven95222362006-04-07 19:49:27 +020037
Rafael J. Wysockib0cb1a12007-07-29 23:24:36 +020038#if defined(CONFIG_PM) && defined(CONFIG_HIBERNATION)
Rafael J. Wysocki1c100702007-07-21 17:11:09 +020039extern void e820_mark_nosave_regions(void);
40#else
41static inline void e820_mark_nosave_regions(void)
42{
43}
44#endif
45
Bernhard Wallec9cce832008-01-30 13:30:32 +010046
Linus Torvalds1da177e2005-04-16 15:20:36 -070047#endif/*!__ASSEMBLY__*/
Linus Torvalds1da177e2005-04-16 15:20:36 -070048#endif/*__E820_HEADER*/