aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2025-10-29 13:38:35 +0100
committerFelix Morgner <felix.morgner@ost.ch>2025-10-29 13:38:35 +0100
commitc2b0bdfe3b725166f16c742cdaca7969052df382 (patch)
tree18873cdc668fdff983b05d91aa3eb3fa51b8d560
parent465817e3e124bafb95de0d8a030b66bc067046b6 (diff)
downloadteachos-c2b0bdfe3b725166f16c742cdaca7969052df382.tar.xz
teachos-c2b0bdfe3b725166f16c742cdaca7969052df382.zip
x86_64/boot: add missing linker script symbols
-rw-r--r--arch/x86_64/include/x86_64/boot/ld.hpp66
1 files changed, 43 insertions, 23 deletions
diff --git a/arch/x86_64/include/x86_64/boot/ld.hpp b/arch/x86_64/include/x86_64/boot/ld.hpp
index cf59c66..104e6ee 100644
--- a/arch/x86_64/include/x86_64/boot/ld.hpp
+++ b/arch/x86_64/include/x86_64/boot/ld.hpp
@@ -19,29 +19,49 @@
namespace teachos::boot::x86_64
{
- /**
- * @var _start_physical
- * @brief The first byte of the loaded kernel image.
- *
- * @details
- * This symbols is defined in the kernel linker script and marks the start of the kernel image in physical memory.
- * To use this symbol for its intended purpose, the address of it shall be taken.
- *
- * @see _end_physical
- */
- extern "C" std::byte _start_physical;
-
- /**
- * @var _end_physical
- * @brief The first byte after the loaded kernel image.
- *
- * @details
- * This symbols is defined in the kernel linker script and marks the end of the kernel image in physical memory.
- * To use this symbol for its intended purpose, the address of it shall be taken.
- *
- * @see _start_physical
- */
- extern "C" std::byte _end_physical;
+
+ extern "C"
+ {
+ /**
+ * @brief The first byte of the loaded kernel image.
+ *
+ * @details
+ * This symbol is defined in the kernel linker script and marks the start of the kernel image in physical memory.
+ * To use this symbol for its intended purpose, the address of it shall be taken.
+ *
+ * @see _end_physical
+ */
+ extern std::byte _start_physical;
+
+ /**
+ * @brief The first byte after the loaded kernel image.
+ *
+ * @details
+ * This symbol is defined in the kernel linker script and marks the end of the kernel image in physical memory.
+ * To use this symbol for its intended purpose, the address of it shall be taken.
+ *
+ * @see _start_physical
+ */
+ extern std::byte _end_physical;
+
+ /**
+ * @brief The first byte of the loaded kernel image in the virtual address space.
+ *
+ * @details
+ * This symbol is defined in the kernel linker script and marks the start of the kernel image in virtual memory.
+ * To use this symbol for its intended purpose, the address of it shall be taken.
+ */
+ extern std::byte _start_virtual;
+
+ /**
+ * @brief The first byte after the loaded kernel image in the virtual address space.
+ *
+ * @details
+ * This symbol is defined in the kernel linker script and marks the end of the kernel image in virtual memory.
+ * To use this symbol for its intended purpose, the address of it shall be taken.
+ */
+ extern std::byte _end_virtual;
+ }
} // namespace teachos::boot::x86_64
#endif