850a0a7a89ec8563aaabb9cd40957433836ba682
[platform/kernel/u-boot.git] / arch / x86 / include / asm / e820.h
1 #ifndef _ASM_X86_E820_H
2 #define _ASM_X86_E820_H
3
4 #define E820MAX         128     /* number of entries in E820MAP */
5
6 #define E820_RAM        1
7 #define E820_RESERVED   2
8 #define E820_ACPI       3
9 #define E820_NVS        4
10 #define E820_UNUSABLE   5
11 #define E820_COUNT      6       /* Number of types */
12
13 #ifndef __ASSEMBLY__
14 #include <linux/types.h>
15
16 struct e820_entry {
17         __u64 addr;     /* start of memory segment */
18         __u64 size;     /* size of memory segment */
19         __u32 type;     /* type of memory segment */
20 } __attribute__((packed));
21
22 #define ISA_START_ADDRESS       0xa0000
23 #define ISA_END_ADDRESS         0x100000
24
25 /* Implementation-defined function to install an e820 map */
26 unsigned int install_e820_map(unsigned int max_entries,
27                               struct e820_entry *);
28
29 /**
30  * cb_install_e820_map() - Install e820 map provided by coreboot sysinfo
31  *
32  * This should be used when booting from coreboot, since in that case the
33  * memory areas are provided by coreboot in its sysinfo.
34  *
35  * @max_entries: Maximum number of entries to write
36  * @entries: Place to put entires
37  * @return number of entries written
38  */
39 unsigned int cb_install_e820_map(unsigned int max_entries,
40                                  struct e820_entry *entries);
41
42 #endif /* __ASSEMBLY__ */
43
44 #endif /* _ASM_X86_E820_H */