summaryrefslogtreecommitdiffhomepage
path: root/src/loader/inc/mem.h
blob: 7153465d6835d66d34bd5d40a34a0167b8c9be3d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// MIT License, Copyright (c) 2021 Marvin Borner

#ifndef MEM_H
#define MEM_H

#include <def.h>

enum mem_entry_type {
	MEM_NONE,
	MEM_USABLE,
	MEM_RESERVED,
	MEM_RECLAIMABLE,
	MEM_ACPI_NVS,
	MEM_UNUSABLE,
};

// Generalised memory map entry struct
struct mem_entry {
	u32 base;
	u32 length;
	u32 type;
};

struct mem_map {
	struct mem_entry *entry;
	u32 count;
};

void mem_map(void);
struct mem_map *mem_map_get(void);

#endif