From 32e880127366fabc3e8b4fecb642f1cc06b8fd71 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Mon, 2 Dec 2024 20:47:19 +0100 Subject: Prepend the name of the task on debug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 'printk' and 'sys_write' calls, prepend the name of the task that is being executed for each message. This is an easy way to show off that we are doing the right thing with the 'tp' register, even if we don't do much with it. Signed-off-by: Miquel Sabaté Solà --- kernel/head.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'kernel/head.S') diff --git a/kernel/head.S b/kernel/head.S index 31f423e..9a12833 100644 --- a/kernel/head.S +++ b/kernel/head.S @@ -94,9 +94,9 @@ _start_kernel: li t6, 0 csrw sscratch, 0 - // Point tp and sp to the init task. This is not crucial because in the end - // we are not doing anything with the 'tp' register, and our processes - // actually don't do anything on the stack. + // Point tp and sp to the init task. The 'tp' register will always point to + // the current process being executed, and it will be shown on debug when + // printing out messages. la tp, tasks la sp, tasks + THREAD_SIZE -- cgit v1.2.3