From 178cb5bb0755064a0824b1b3d564260db412ea92 Mon Sep 17 00:00:00 2001 From: Nathan Ringo Date: Sun, 25 Feb 2024 01:18:10 -0600 Subject: [console] Adds the start of a console subsystem to handle kernel logs. The idea is that this is an output-only facility that log messages from the log crate are written to. It has a small buffer, and relies on a log destination regularly reading from the buffer. In the next commit, platform-specific code will be able to provide a "strict flush" routine, which runs after every write to the buffer and drains the buffer. This is mainly to help kernel development, where it's not assured that the kernel will even get as far in boot as initializing its allocator. Eventually, there will be a console fd that userspace can request, wait on, and read from. --- flake.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 9e812b8..c2bcf13 100644 --- a/flake.nix +++ b/flake.nix @@ -56,6 +56,11 @@ program = pkgsBuild.lib.getExe run-vm; }; + run = { + type = "app"; + program = pkgsBuild.lib.getExe run-vm; + }; + debug = { type = "app"; program = pkgsBuild.lib.getExe (pkgsBuild.writeShellApplication { @@ -78,7 +83,8 @@ rust-gdb ${packages.boards.qemu-virt}/kernel.elf \ -ex "target remote 127.0.0.1:$port" \ -ex "set riscv use-compressed-breakpoints yes" \ - -ex "layout src" \ + -ex "layout asm" \ + -ex "layout regs" \ -ex "focus cmd" \ -ex "tbreak hart0_boot" \ -ex "c" -- cgit v1.2.3