aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/include')
-rw-r--r--arch/x86_64/include/arch/memory/multiboot.hpp48
1 files changed, 25 insertions, 23 deletions
diff --git a/arch/x86_64/include/arch/memory/multiboot.hpp b/arch/x86_64/include/arch/memory/multiboot.hpp
index f1f0613..37b10f0 100644
--- a/arch/x86_64/include/arch/memory/multiboot.hpp
+++ b/arch/x86_64/include/arch/memory/multiboot.hpp
@@ -43,14 +43,6 @@ namespace teachos::arch::memory
uint32_t size;
};
- struct memory_info
- {
- uint32_t type;
- uint32_t size;
- uint32_t mem_lower;
- uint32_t mem_upper;
- };
-
struct multi_boot_info
{
uint32_t total_size;
@@ -62,6 +54,13 @@ namespace teachos::arch::memory
alignas(8) struct multi_boot_tag tags;
};
+ struct memory_info
+ {
+ multi_boot_tag tag;
+ uint32_t mem_lower;
+ uint32_t mem_upper;
+ };
+
enum class memory_area_type : uint32_t
{
AVAILABLE = 1,
@@ -73,8 +72,8 @@ namespace teachos::arch::memory
struct memory_area
{
- uint64_t base_addr;
- uint64_t length;
+ uint64_t base_address;
+ uint64_t area_length;
alignas(8) memory_area_type type;
};
@@ -157,18 +156,21 @@ namespace teachos::arch::memory
std::bitset<64U> flags;
};
+ /**
+ * https://docs.oracle.com/cd/E19455-01/806-3773/elf-2/index.html
+ */
struct elf_section_header
{
- uint32_t sh_name; /* Section name (string tbl index) */
- elf_section_type sh_type; /* Section type */
- elf_section_flags sh_flags; /* Section flags */
- uint64_t sh_addr; /* Section virtual addr at execution */
- uint64_t sh_offset; /* Section file offset */
- uint64_t sh_size; /* Section size in bytes */
- uint32_t sh_link; /* Link to another section */
- uint32_t sh_info; /* Additional section information */
- uint64_t sh_addralign; /* Section alignment */
- uint64_t sh_entsize; /* Entry size if section holds table */
+ uint32_t name_table_index;
+ elf_section_type type;
+ elf_section_flags flags;
+ uint64_t virtual_address;
+ uint64_t file_offset;
+ uint64_t section_size;
+ uint32_t other_section;
+ uint32_t additional_information;
+ uint64_t address_alignment;
+ uint64_t fixed_table_entry_size;
};
/**
@@ -177,9 +179,9 @@ namespace teachos::arch::memory
struct elf_symbols_section
{
multi_boot_tag tag;
- uint32_t num;
- uint32_t entsize;
- uint32_t shndx;
+ uint32_t number_of_sections;
+ uint32_t entry_size;
+ uint32_t section_index;
alignas(8) struct elf_section_header sections;
};
} // namespace teachos::arch::memory