fix: remove kernel mouse cursor demo, +add two future-implemented syscalls for shutdown & reset

This commit is contained in:
2026-02-18 16:52:44 +01:00
parent 116262a4b6
commit 3295b9970b
11 changed files with 33 additions and 143 deletions
Binary file not shown.
+2
View File
@@ -37,6 +37,8 @@ namespace Zenith {
static constexpr uint64_t SYS_WAITPID = 23;
static constexpr uint64_t SYS_TERMSIZE = 24;
static constexpr uint64_t SYS_GETARGS = 25;
static constexpr uint64_t SYS_RESET = 26;
static constexpr uint64_t SYS_SHUTDOWN = 27;
struct FbInfo {
uint64_t width;
+11
View File
@@ -176,4 +176,15 @@ namespace zenith {
if (rows) *rows = (int)(r >> 32);
}
// Power management
[[noreturn]] inline void reset() {
syscall0(Zenith::SYS_RESET);
__builtin_unreachable();
}
[[noreturn]] inline void shutdown() {
syscall0(Zenith::SYS_SHUTDOWN);
__builtin_unreachable();
}
}
Binary file not shown.
+8
View File
@@ -96,6 +96,8 @@ static void cmd_help() {
zenith::print(" ping <ip> Send ICMP echo requests\n");
zenith::print(" uptime Show uptime in milliseconds\n");
zenith::print(" clear Clear the screen\n");
zenith::print(" reset Reboot the system\n");
zenith::print(" shutdown Shut down the system\n");
zenith::print(" exit Exit the shell\n");
}
@@ -430,6 +432,12 @@ static void process_command(const char* line) {
cmd_uptime();
} else if (streq(line, "clear")) {
cmd_clear();
} else if (streq(line, "reset")) {
zenith::print("Rebooting...\n");
zenith::reset();
} else if (streq(line, "shutdown")) {
zenith::print("Shutting down...\n");
zenith::shutdown();
} else if (streq(line, "exit")) {
zenith::print("Goodbye.\n");
zenith::exit(0);