blob: a66c0d2489135b306769f3a26cec7cda0d577828 [file] [log] [blame]
Graeme Russ1bab1042010-04-24 00:05:49 +10001#ifndef _ASM_X86_E820_H
2#define _ASM_X86_E820_H
Graeme Russ1bab1042010-04-24 00:05:49 +10003
Bin Meng27947c92015-04-21 12:21:35 +08004#define E820MAX 128 /* number of entries in E820MAP */
Graeme Russ1bab1042010-04-24 00:05:49 +10005
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
Simon Glassaad0d762020-09-05 14:50:50 -060011#define E820_COUNT 6 /* Number of types */
Graeme Russ1bab1042010-04-24 00:05:49 +100012
Graeme Russ1bab1042010-04-24 00:05:49 +100013#ifndef __ASSEMBLY__
14#include <linux/types.h>
Bin Meng27947c92015-04-21 12:21:35 +080015
Bin Meng4b8fc742018-04-11 22:02:11 -070016struct e820_entry {
Graeme Russ1bab1042010-04-24 00:05:49 +100017 __u64 addr; /* start of memory segment */
18 __u64 size; /* size of memory segment */
19 __u32 type; /* type of memory segment */
20} __attribute__((packed));
21
Graeme Russ1bab1042010-04-24 00:05:49 +100022#define ISA_START_ADDRESS 0xa0000
23#define ISA_END_ADDRESS 0x100000
24
Bin Menga4899632015-10-07 20:19:10 -070025/* Implementation defined function to install an e820 map */
Bin Meng3838d712018-04-11 22:02:10 -070026unsigned int install_e820_map(unsigned int max_entries,
Bin Meng4b8fc742018-04-11 22:02:11 -070027 struct e820_entry *);
Simon Glassdd234462020-09-22 12:45:29 -060028#endif /* __ASSEMBLY__ */
Bin Menga4899632015-10-07 20:19:10 -070029
Graeme Russ1bab1042010-04-24 00:05:49 +100030#endif /* _ASM_X86_E820_H */