api.h 1.9 KB
Newer Older
1 2
#ifndef _ASM_E820_API_H
#define _ASM_E820_API_H
3

4
#include <asm/e820/types.h>
5

6
#ifndef __ASSEMBLY__
7
/* see comment in arch/x86/kernel/e820.c */
8 9
extern struct e820map *e820;
extern struct e820map *e820_saved;
10

11
extern unsigned long pci_mem_start;
12 13 14

extern int  e820_any_mapped(u64 start, u64 end, unsigned type);
extern int  e820_all_mapped(u64 start, u64 end, unsigned type);
15
extern void e820_add_region(u64 start, u64 size, int type);
16
extern void e820_print_map(char *who);
17 18 19
extern int  sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, u32 *pnr_map);
extern u64  e820_update_range(u64 start, u64 size, unsigned old_type, unsigned new_type);
extern u64  e820_remove_range(u64 start, u64 size, unsigned old_type, int checktype);
20 21
extern void update_e820(void);
extern void e820_setup_gap(void);
22
extern void parse_e820_ext(u64 phys_addr, u32 data_len);
23 24
extern unsigned long e820_end_of_ram_pfn(void);
extern unsigned long e820_end_of_low_ram_pfn(void);
25 26 27
extern u64  early_reserve_e820(u64 sizet, u64 align);
extern void memblock_x86_fill(void);
extern void memblock_find_dma_reserve(void);
28
extern void finish_e820_parsing(void);
29
extern void e820_reserve_resources(void);
30
extern void e820_reserve_resources_late(void);
31
extern void setup_memory_map(void);
32
extern char *default_machine_specific_memory_setup(void);
33 34
extern void e820_reallocate_tables(void);

35 36 37 38 39 40
#if defined(CONFIG_X86_64) || defined(CONFIG_X86_32) && defined(CONFIG_HIBERNATION)
extern void e820_mark_nosave_regions(unsigned long limit_pfn);
#else
static inline void e820_mark_nosave_regions(unsigned long limit_pfn) { }
#endif

41
/*
42
 * Returns true iff the specified range [start,end) is completely contained inside
43 44
 * the ISA region.
 */
45
static inline bool is_ISA_range(u64 start, u64 end)
46
{
47
	return start >= ISA_START_ADDRESS && end <= ISA_END_ADDRESS;
48
}
I
Ingo Molnar 已提交
49

50
#endif /* __ASSEMBLY__ */
51 52 53
#include <linux/ioport.h>

#define HIGH_MEMORY	(1024*1024)
54
#endif /* _ASM_E820_API_H */