aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-09-11 21:50:55 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2022-09-14 21:21:27 +0300
commit025778e89e7d0fe3cd1ad53537c9cc6f3cd819cc (patch)
treea137a9f405578b41e092e13892516feccc4d71e6 /common
parent9e2720ca086a74cfb6fa595da8c42e6cd24352ee (diff)
downloadkmi-025778e89e7d0fe3cd1ad53537c9cc6f3cd819cc.tar.gz
kmi-025778e89e7d0fe3cd1ad53537c9cc6f3cd819cc.zip
riscv32 boots and advances as far as riscv64
Diffstat (limited to 'common')
-rw-r--r--common/debug.c7
-rw-r--r--common/tcb.c5
2 files changed, 10 insertions, 2 deletions
diff --git a/common/debug.c b/common/debug.c
index 1f5e872..36fed87 100644
--- a/common/debug.c
+++ b/common/debug.c
@@ -46,10 +46,15 @@ void setup_dmap_dbg()
void setup_io_dbg(struct vmem *b)
{
- vm_t io_ptr = setup_kernel_io(b, dbg_info.dbg_ptr);
+ vm_t io_ptr = map_io_dbg(b);
__setup_dbg(io_ptr, dbg_info.dev);
}
+vm_t map_io_dbg(struct vmem *b)
+{
+ return setup_kernel_io(b, dbg_info.dbg_ptr);
+}
+
/* if there arises a need for more supported serial drivers, I should probably
* try to implement some kind of basic driver subsystem, but this is good enough
* for now. */
diff --git a/common/tcb.c b/common/tcb.c
index 119898f..1e25f47 100644
--- a/common/tcb.c
+++ b/common/tcb.c
@@ -76,7 +76,10 @@ static id_t __alloc_tid(struct tcb *t)
* Setup RPC stack.
*
* RPC stack is local to each thread, and should not be visible to other threads
- * in the same process.
+ * in the same process. Currently maps the RPC stack in BASE_PAGE increments, to
+ * hopefully allow us to later quickly disallow access to programs lower down in
+ * the RPC call chain by turning off all stack pages lower than the current
+ * stack pointer. We shall see if this actually works or not.
*
* @param t Thread to setup RPC stack for.
* @param bytes Minimum size of RPC stack.