Reorganized source tree

This commit is contained in:
2020-08-01 16:37:44 -05:00
parent f5dd5bb135
commit 44e712d214
29 changed files with 35 additions and 53 deletions

61
src/memorymap.hpp Normal file
View File

@@ -0,0 +1,61 @@
#ifndef MEMORYMAP_H
#define MEMORYMAP_H
#include <stdint.h>
#include <stddef.h>
#include "systypes.hpp"
namespace kernel
{
class MemoryMap
{
public:
enum Type
{
AVAILABLE = 1,
ACPI = 3,
DEFECTIVE = 5
};
class Region
{
public:
physaddr_t getLocation();
size_t getSize();
Type getType();
bool contains(physaddr_t location, size_t size);
private:
physaddr_t location;
size_t size;
uint32_t type;
};
MemoryMap(Region* map, size_t entries);
Region& operator[](size_t index);
size_t size();
private:
Region* map;
size_t entries;
};
}
#endif