aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-10-31 14:02:19 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2024-11-01 10:27:59 +0200
commitd89e51f7d4312ec9a3b8b7175475ef794c7c4d35 (patch)
treed7160418a8c1e320635483a168653cc6ac8c5ee4 /arch
parent576e73d39d89cf59e5a26fd3f3e9e6787578025d (diff)
downloadkmi-d89e51f7d4312ec9a3b8b7175475ef794c7c4d35.tar.gz
kmi-d89e51f7d4312ec9a3b8b7175475ef794c7c4d35.zip
update some docs
Diffstat (limited to 'arch')
-rw-r--r--arch/riscv64/kernel/except.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/riscv64/kernel/except.c b/arch/riscv64/kernel/except.c
index 2525716..5f182fd 100644
--- a/arch/riscv64/kernel/except.c
+++ b/arch/riscv64/kernel/except.c
@@ -1,9 +1,24 @@
+/* SPDX-License-Identifier: copyleft-next-0.3.1 */
+/* Copyright 2024, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */
+
+/**
+ * @file except.c
+ * riscv64 exception handling.
+ */
+
#include <kmi/types.h>
#include <kmi/panic.h>
#include <kmi/debug.h>
#include <kmi/vmem.h>
#include <kmi/bkl.h>
+/**
+ * Handle exception. Intended to be called from entry.S.
+ *
+ * @param pc Where exception occurred.
+ * @param addr What address caused the exception, if any.
+ * @param id ID of exception, see riscv spec.
+ */
void riscv_handle_exception(void *pc, void *addr, unsigned long id)
{
switch (id) {