diff options
| author | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-10-17 13:12:29 +0200 |
|---|---|---|
| committer | Matteo Gmür <matteo.gmuer1@ost.ch> | 2024-10-17 13:12:29 +0200 |
| commit | f9ddd266e1ab1a7fcd4952a066083ca19fba63cf (patch) | |
| tree | 694825047086e18855bdb34fc24698292f6258ff /arch/x86_64/include | |
| parent | d539ed1f4f26a42959bcae6ea3050b7f99f5f872 (diff) | |
| parent | b865b36b38d951de28cc4df5fa67338b8245a1c3 (diff) | |
| download | teachos-f9ddd266e1ab1a7fcd4952a066083ca19fba63cf.tar.xz teachos-f9ddd266e1ab1a7fcd4952a066083ca19fba63cf.zip | |
Merge branch 'fmorgner/abort' into 'feat_memory_manager'
Implement support for `std::terminate` via `::abort`
See merge request teachos/kernel!2
Diffstat (limited to 'arch/x86_64/include')
| -rw-r--r-- | arch/x86_64/include/arch/exception_handling/assert.hpp | 7 | ||||
| -rw-r--r-- | arch/x86_64/include/arch/exception_handling/panic.hpp | 13 | ||||
| -rw-r--r-- | arch/x86_64/include/arch/kernel/halt.hpp | 9 | ||||
| -rw-r--r-- | arch/x86_64/include/arch/video/vga/text.hpp | 5 |
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. |
