feat: start adding physical memory allocator
This commit is contained in:
parent
8dc53f662e
commit
e2ea22ad53
15 changed files with 440 additions and 38 deletions
|
|
@ -34,6 +34,34 @@ enum class tag_type : uint32_t {
|
|||
load_base_addr = 24,
|
||||
};
|
||||
|
||||
inline constexpr const char* get_tag_name(tag_type type) {
|
||||
switch (type) {
|
||||
case tag_type::end: return "end";
|
||||
case tag_type::cmdline: return "cmdline";
|
||||
case tag_type::boot_loader_name: return "boot_loader_name";
|
||||
case tag_type::module: return "module";
|
||||
case tag_type::basic_meminfo: return "basic_meminfo";
|
||||
case tag_type::bootdev: return "bootdev";
|
||||
case tag_type::mmap: return "mmap";
|
||||
case tag_type::vbe: return "vbe";
|
||||
case tag_type::framebuffer: return "framebuffer";
|
||||
case tag_type::elf_sections: return "elf_sections";
|
||||
case tag_type::apm: return "apm";
|
||||
case tag_type::efi32: return "efi32";
|
||||
case tag_type::efi64: return "efi64";
|
||||
case tag_type::smbios: return "smbios";
|
||||
case tag_type::acpi_old: return "acpi_old";
|
||||
case tag_type::acpi_new: return "acpi_new";
|
||||
case tag_type::network: return "network";
|
||||
case tag_type::efi_mmap: return "efi_mmap";
|
||||
case tag_type::efi_bs: return "efi_bs";
|
||||
case tag_type::efi32_ih: return "efi32_ih";
|
||||
case tag_type::efi64_ih: return "efi64_ih";
|
||||
case tag_type::load_base_addr: return "load_base_addr";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
enum class framebuffer_type : uint8_t {
|
||||
indexed = 0,
|
||||
rgb = 1,
|
||||
|
|
@ -48,6 +76,17 @@ enum class mem_type : uint32_t {
|
|||
badram = 5,
|
||||
};
|
||||
|
||||
inline constexpr const char* get_mem_type_name(mem_type type) {
|
||||
switch (type) {
|
||||
case mem_type::available: return "available";
|
||||
case mem_type::reserved: return "reserved";
|
||||
case mem_type::acpi_reclaimable: return "acpi_reclaimable";
|
||||
case mem_type::nvs: return "nvs";
|
||||
case mem_type::badram: return "badram";
|
||||
default: return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
struct color {
|
||||
uint8_t red;
|
||||
uint8_t green;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue