aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/include
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-06 07:34:30 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-06 07:34:30 +0000
commit1ab9c3c09d32283b39ca1026a9e29ada5ff7fda5 (patch)
tree1cc451d90cadccd109b9a6c5c927bf9387a7ed4b /arch/x86_64/include
parentc2c7ad21fdd42111180d317ef50b15b7404769d1 (diff)
downloadteachos-1ab9c3c09d32283b39ca1026a9e29ada5ff7fda5.tar.xz
teachos-1ab9c3c09d32283b39ca1026a9e29ada5ff7fda5.zip
Renaming scheme
Diffstat (limited to 'arch/x86_64/include')
-rw-r--r--arch/x86_64/include/arch/memory/frame_allocator.hpp34
-rw-r--r--arch/x86_64/include/arch/memory/multiboot.hpp30
-rw-r--r--arch/x86_64/include/arch/video/vga/text.hpp2
3 files changed, 33 insertions, 33 deletions
diff --git a/arch/x86_64/include/arch/memory/frame_allocator.hpp b/arch/x86_64/include/arch/memory/frame_allocator.hpp
index bcb0882..8dee848 100644
--- a/arch/x86_64/include/arch/memory/frame_allocator.hpp
+++ b/arch/x86_64/include/arch/memory/frame_allocator.hpp
@@ -11,37 +11,37 @@ namespace teachos::arch::memory
const size_t PAGE_FRAME_SIZE = 4096U;
}
- struct Frame
+ struct frame
{
size_t frame_number;
- Frame(size_t frame_number)
+ frame(size_t frame_number)
: frame_number(frame_number)
{
// Nothing to do
}
- auto containing_address(size_t address) -> Frame { return Frame{address / PAGE_FRAME_SIZE}; }
+ auto containing_address(size_t address) -> frame { return frame{address / PAGE_FRAME_SIZE}; }
};
- struct IFrameAllocator
+ struct frame_allocator
{
- virtual auto allocate_frame() -> std::optional<Frame> = 0;
- virtual auto deallocate_frame(Frame frame) -> void = 0;
+ virtual auto allocate_frame() -> std::optional<frame> = 0;
+ virtual auto deallocate_frame(frame frame) -> void = 0;
};
- struct AreaFrameAllocator : public IFrameAllocator
+ struct area_frame_allocator : public frame_allocator
{
- Frame next_free_frame;
- // std::optional<MemoryArea> current_area;
- // MemoryArea * areas;
- Frame kernel_start;
- Frame kernel_end;
- Frame multiboot_start;
- Frame multiboot_end;
-
- auto allocate_frame() -> std::optional<Frame> override;
- auto deallocate_frame(Frame frame) -> void override;
+ frame next_free_frame;
+ // std::optional<memory_area> current_area;
+ // memory_area * areas;
+ frame kernel_start;
+ frame kernel_end;
+ frame multiboot_start;
+ frame multiboot_end;
+
+ auto allocate_frame() -> std::optional<frame> override;
+ auto deallocate_frame(frame frame) -> void override;
};
} // namespace teachos::arch::memory
diff --git a/arch/x86_64/include/arch/memory/multiboot.hpp b/arch/x86_64/include/arch/memory/multiboot.hpp
index 95e6404..baad25b 100644
--- a/arch/x86_64/include/arch/memory/multiboot.hpp
+++ b/arch/x86_64/include/arch/memory/multiboot.hpp
@@ -10,7 +10,7 @@ namespace teachos::arch::memory
* The gnu boot information format is defined here:
* https://www.gnu.org/software/grub/manual/multiboot2/multiboot.html#Boot-information-format
*/
- enum class MultibootTagType : uint32_t
+ enum class multi_boot_tag_type : uint32_t
{
END,
CMDLINE,
@@ -36,13 +36,13 @@ namespace teachos::arch::memory
LOAD_BASE_ADDRESS
};
- struct MultibootTag
+ struct multi_boot_tag
{
- MultibootTagType type;
+ multi_boot_tag_type type;
uint32_t size;
};
- struct MemoryInfo
+ struct memory_info
{
uint32_t type;
uint32_t size;
@@ -50,19 +50,19 @@ namespace teachos::arch::memory
uint32_t mem_upper;
};
- struct MultibootInfo
+ struct multi_boot_info
{
uint32_t total_size;
uint32_t reserved;
/*
- * field "tags" is an array of MultibootTag, however the array is never
+ * field "tags" is an array of multi_boot_tag, however the array is never
* being accessed by index we don't know the real size at compile-time,
* and using an array definition with size 0 produces a compiler error.
*/
- struct MultibootTag tags;
+ struct multi_boot_tag tags;
};
- enum class MemoryAreaType : uint32_t
+ enum class memory_area_type : uint32_t
{
AVAILABLE = 1,
RESERVED,
@@ -71,25 +71,25 @@ namespace teachos::arch::memory
DEFECTIVE
};
- struct MemoryArea
+ struct memory_area
{
uint64_t base_addr;
uint64_t length;
- MemoryAreaType type;
+ memory_area_type type;
uint32_t reserved;
};
- struct MemoryMap
+ struct memory_map
{
- MultibootTag tag;
+ multi_boot_tag tag;
uint32_t entry_size;
uint32_t entry_version;
/*
- * field "entries" is an array of MemoryArea, however the array is never
+ * field "entries" is an array of memory_area, however the array is never
* being accessed by index, we don't know the real size at compile-time,
* and using an array definition with size 0 produces a compiler error.
*/
- struct MemoryArea entries;
+ struct memory_area entries;
};
#define EI_NIDENT 16
@@ -162,7 +162,7 @@ namespace teachos::arch::memory
struct elf_symbols_section
{
- MultibootTag tag;
+ multi_boot_tag tag;
uint16_t num;
uint16_t entsize;
uint16_t shndx;
diff --git a/arch/x86_64/include/arch/video/vga/text.hpp b/arch/x86_64/include/arch/video/vga/text.hpp
index 3b484e5..9c4c701 100644
--- a/arch/x86_64/include/arch/video/vga/text.hpp
+++ b/arch/x86_64/include/arch/video/vga/text.hpp
@@ -130,7 +130,7 @@ namespace teachos::arch::video::vga::text
*
* @note This function also updates the text mode buffer pointer.
*
- * @param code_points A integral value to write to the VGA text mode buffer.
+ * @param value A integral value to write to the VGA text mode buffer.
* @param attribute The attribute to apply to the written sequence of code points.
* @see vga::text::attribute
*/