From 0a6815b7143a8ffd0e09777b5fbd12098d8884c2 Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Wed, 31 Dec 2025 19:00:20 +0800 Subject: dev: PILC implementation --- include/drivers/plic.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 include/drivers/plic.h (limited to 'include/drivers') diff --git a/include/drivers/plic.h b/include/drivers/plic.h new file mode 100644 index 0000000..8e8d986 --- /dev/null +++ b/include/drivers/plic.h @@ -0,0 +1,17 @@ +#pragma once +#include "common/types.h" + +namespace PILC +{ + // Global initialization (executed only once by hart 0) + void init(); + + // Per-core initialization (executed when each CPU starts) + void inithart(); + + // Claim interrupt: Get the currently occurring interrupt number (IRQ) + int claim(); + + // End of interrupt: notify the PLIC that this IRQ has been handled + void complete(int irq); +} // namespace PILC -- cgit v1.2.3