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
extern int e820_any_mapped(u64 start, u64 end, unsigned type);
extern int e820_all_mapped(u64 start, u64 end, unsigned type);
14
extern void e820_add_region(u64 start, u64 size, int type);
15
extern void e820_print_map(char *who);
16
extern int
17
sanitize_e820_map(struct e820entry *biosmap, int max_nr_map, u32 *pnr_map);
18
extern u64 e820_update_range(u64 start, u64 size, unsigned old_type,
19
			       unsigned new_type);
Y
Yinghai Lu 已提交
20 21
extern u64 e820_remove_range(u64 start, u64 size, unsigned old_type,
			     int checktype);
22 23
extern void update_e820(void);
extern void e820_setup_gap(void);
24
struct setup_data;
25
extern void parse_e820_ext(u64 phys_addr, u32 data_len);
26

27 28 29 30 31 32 33 34 35
#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

36 37
extern unsigned long e820_end_of_ram_pfn(void);
extern unsigned long e820_end_of_low_ram_pfn(void);
38
extern u64 early_reserve_e820(u64 sizet, u64 align);
39 40

void memblock_x86_fill(void);
41 42
void memblock_find_dma_reserve(void);

43
extern void finish_e820_parsing(void);
44
extern void e820_reserve_resources(void);
45
extern void e820_reserve_resources_late(void);
46
extern void setup_memory_map(void);
47
extern char *default_machine_specific_memory_setup(void);
48

49 50
extern void e820_reallocate_tables(void);

51 52 53 54
/*
 * Returns true iff the specified range [s,e) is completely contained inside
 * the ISA region.
 */
55 56
static inline bool is_ISA_range(u64 s, u64 e)
{
57
	return s >= ISA_START_ADDRESS && e <= ISA_END_ADDRESS;
58
}
I
Ingo Molnar 已提交
59

60
#endif /* __ASSEMBLY__ */
61 62 63
#include <linux/ioport.h>

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