Reorganized source tree. Started using autotools.

This commit is contained in:
2020-07-17 10:03:28 -05:00
parent 36c88daa87
commit 0bb65f2d94
28 changed files with 142 additions and 149 deletions

61
src/mmgr/memorymap.hpp Normal file
View File

@@ -0,0 +1,61 @@
#ifndef MEMORYMAP_H
#define MEMORYMAP_H
#include <stdint.h>
#include <stddef.h>
#include "types.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