2010-04-23 14:05:49 +00:00
|
|
|
#ifndef _ASM_X86_E820_H
|
|
|
|
#define _ASM_X86_E820_H
|
|
|
|
|
2015-04-21 04:21:35 +00:00
|
|
|
#define E820MAX 128 /* number of entries in E820MAP */
|
2010-04-23 14:05:49 +00:00
|
|
|
|
|
|
|
#define E820_RAM 1
|
|
|
|
#define E820_RESERVED 2
|
|
|
|
#define E820_ACPI 3
|
|
|
|
#define E820_NVS 4
|
|
|
|
#define E820_UNUSABLE 5
|
2020-09-05 20:50:50 +00:00
|
|
|
#define E820_COUNT 6 /* Number of types */
|
2010-04-23 14:05:49 +00:00
|
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#include <linux/types.h>
|
2015-04-21 04:21:35 +00:00
|
|
|
|
2018-04-12 05:02:11 +00:00
|
|
|
struct e820_entry {
|
2010-04-23 14:05:49 +00:00
|
|
|
__u64 addr; /* start of memory segment */
|
|
|
|
__u64 size; /* size of memory segment */
|
|
|
|
__u32 type; /* type of memory segment */
|
|
|
|
} __attribute__((packed));
|
|
|
|
|
|
|
|
#define ISA_START_ADDRESS 0xa0000
|
|
|
|
#define ISA_END_ADDRESS 0x100000
|
|
|
|
|
2021-03-15 05:00:23 +00:00
|
|
|
/* Implementation-defined function to install an e820 map */
|
2018-04-12 05:02:10 +00:00
|
|
|
unsigned int install_e820_map(unsigned int max_entries,
|
2018-04-12 05:02:11 +00:00
|
|
|
struct e820_entry *);
|
2021-03-15 05:00:23 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* cb_install_e820_map() - Install e820 map provided by coreboot sysinfo
|
|
|
|
*
|
|
|
|
* This should be used when booting from coreboot, since in that case the
|
|
|
|
* memory areas are provided by coreboot in its sysinfo.
|
|
|
|
*
|
|
|
|
* @max_entries: Maximum number of entries to write
|
|
|
|
* @entries: Place to put entires
|
2022-01-19 17:05:50 +00:00
|
|
|
* Return: number of entries written
|
2021-03-15 05:00:23 +00:00
|
|
|
*/
|
|
|
|
unsigned int cb_install_e820_map(unsigned int max_entries,
|
|
|
|
struct e820_entry *entries);
|
|
|
|
|
2020-09-22 18:45:29 +00:00
|
|
|
#endif /* __ASSEMBLY__ */
|
2015-10-08 03:19:10 +00:00
|
|
|
|
2010-04-23 14:05:49 +00:00
|
|
|
#endif /* _ASM_X86_E820_H */
|