Massive backlog of changes

This commit is contained in:
2022-06-15 15:59:31 -05:00
parent c962a83ff0
commit a52f06f81e
49 changed files with 1855 additions and 1083 deletions

27
include/memmap.h Normal file
View File

@@ -0,0 +1,27 @@
#pragma once
#include "types/physaddr.h"
#include <stddef.h>
enum memory_type_t
{
M_AVAILABLE = 1,
M_UNAVAILABLE = 2,
M_DEFECTIVE = 3
};
struct memory_region_t
{
physaddr_t location;
size_t size;
unsigned int type;
};
struct memory_map_t
{
struct memory_region_t *array;
size_t size;
size_t capacity;
};
void insert_region(struct memory_map_t *map, physaddr_t location, size_t size, enum memory_type_t type);