diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2025-12-31 19:00:20 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2025-12-31 19:00:20 +0800 |
| commit | 0a6815b7143a8ffd0e09777b5fbd12098d8884c2 (patch) | |
| tree | 1dc95d54891eb787b63bcaaaa842d88605de8d1c /include/drivers/plic.h | |
| parent | 94005550703f85de9d1355dfa713d3250409d2c2 (diff) | |
| download | lume-0a6815b7143a8ffd0e09777b5fbd12098d8884c2.tar.gz lume-0a6815b7143a8ffd0e09777b5fbd12098d8884c2.tar.xz | |
dev: PILC implementation
Diffstat (limited to 'include/drivers/plic.h')
| -rw-r--r-- | include/drivers/plic.h | 17 |
1 files changed, 17 insertions, 0 deletions
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 |
