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/exception_handling/assert.hpp7
-rw-r--r--arch/x86_64/include/arch/exception_handling/panic.hpp13
-rw-r--r--arch/x86_64/include/arch/kernel/halt.hpp9
-rw-r--r--arch/x86_64/include/arch/video/vga/text.hpp5
4 files changed, 33 insertions, 1 deletions
diff --git a/arch/x86_64/include/arch/exception_handling/assert.hpp b/arch/x86_64/include/arch/exception_handling/assert.hpp
index eba43ac..f355a61 100644
--- a/arch/x86_64/include/arch/exception_handling/assert.hpp
+++ b/arch/x86_64/include/arch/exception_handling/assert.hpp
@@ -1,3 +1,6 @@
+#ifndef TEACHOS_ARCH_X86_64_EXCEPTION_HANDLING_ASSERT_HPP
+#define TEACHOS_ARCH_X86_64_EXCEPTION_HANDLING_ASSERT_HPP
+
namespace teachos::arch::exception_handling
{
/**
@@ -8,4 +11,6 @@ namespace teachos::arch::exception_handling
* @param message
*/
auto assert(bool condition, char const * message) -> void;
-} // namespace teachos::arch::exception_handling \ No newline at end of file
+} // namespace teachos::arch::exception_handling
+
+#endif \ No newline at end of file
diff --git a/arch/x86_64/include/arch/exception_handling/panic.hpp b/arch/x86_64/include/arch/exception_handling/panic.hpp
new file mode 100644
index 0000000..9566159
--- /dev/null
+++ b/arch/x86_64/include/arch/exception_handling/panic.hpp
@@ -0,0 +1,13 @@
+#ifndef TEACHOS_ARCH_X86_64_EXCEPTION_HANDLING_PANIC_HPP
+#define TEACHOS_ARCH_X86_64_EXCEPTION_HANDLING_PANIC_HPP
+
+namespace teachos::arch::exception_handling
+{
+ /**
+ * @brief Print a kernel panic message and then halt the system.
+ */
+ [[noreturn]] auto panic(char const * reason) -> void;
+ [[noreturn]] auto panic(char const * prefix, char const * reason) -> void;
+} // namespace teachos::arch::exception_handling
+
+#endif \ No newline at end of file
diff --git a/arch/x86_64/include/arch/kernel/halt.hpp b/arch/x86_64/include/arch/kernel/halt.hpp
new file mode 100644
index 0000000..6c58938
--- /dev/null
+++ b/arch/x86_64/include/arch/kernel/halt.hpp
@@ -0,0 +1,9 @@
+#ifndef TEACHOS_ARCH_X86_64_KERNEL_HALT_HPP
+#define TEACHOS_ARCH_X86_64_KERNEL_HALT_HPP
+
+namespace teachos::arch::kernel
+{
+ extern "C" [[noreturn]] auto halt() -> void;
+}
+
+#endif \ No newline at end of file
diff --git a/arch/x86_64/include/arch/video/vga/text.hpp b/arch/x86_64/include/arch/video/vga/text.hpp
index cfafce0..690f4aa 100644
--- a/arch/x86_64/include/arch/video/vga/text.hpp
+++ b/arch/x86_64/include/arch/video/vga/text.hpp
@@ -100,6 +100,11 @@ namespace teachos::arch::video::vga::text
auto cursor(bool enabled) -> void;
/**
+ * @brief Move the cursor to a new line, scrolling the buffer if necessary.
+ */
+ auto newline() -> void;
+
+ /**
* @brief Write a string of code points to the VGA text buffer.
*
* @note This function also updates the text mode buffer pointer.