aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-26 07:10:37 +0000
committerMatteo Gmür <matteo.gmuer1@ost.ch>2024-10-26 07:10:37 +0000
commit873f8c52699c6d4e3d32e5df253ae8ec0266a501 (patch)
treeef21f60a7de1b09c255f911208b9370d75d5a208 /arch
parentc2c7503fec31c07645fdc087dbf1ef487e90912e (diff)
downloadteachos-873f8c52699c6d4e3d32e5df253ae8ec0266a501.tar.xz
teachos-873f8c52699c6d4e3d32e5df253ae8ec0266a501.zip
Use alignas instead of reserved keyword
Diffstat (limited to 'arch')
-rw-r--r--arch/x86_64/include/arch/memory/multiboot/memory_map.hpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/x86_64/include/arch/memory/multiboot/memory_map.hpp b/arch/x86_64/include/arch/memory/multiboot/memory_map.hpp
index 858ae52..e30d2c4 100644
--- a/arch/x86_64/include/arch/memory/multiboot/memory_map.hpp
+++ b/arch/x86_64/include/arch/memory/multiboot/memory_map.hpp
@@ -21,17 +21,14 @@ namespace teachos::arch::memory::multiboot
/**
* @brief Defines an entry in the entries array of the memory_map struct.
*
- * @note Has to have all padding stripped between the individual values, because the size of the entry needs to be
- * exactly 24 bytes and not one byte more. See
- * https://www.gnu.org/software/c-intro-and-ref/manual/html_node/Packed-Structures.html for more information on the
- * used attribute.
+ * @note Last value needs to be padded, because the size of the entry needs to be
+ * exactly 24 bytes and not one byte more.
*/
- struct __attribute__((packed)) memory_area
+ struct memory_area
{
uint64_t base_address; ///< Base address the memory region starts at.
uint64_t area_length; ///< Size of the memory region, added to base_address results in the final address.
- memory_area_type type; ///< Specific type of memory the region can contain.
- uint32_t zero; ///<
+ alignas(8) memory_area_type type; ///< Specific type of memory the region can contain.
};
/**