mirror of
https://github.com/retroSoC/retroSoC.git
synced 2026-11-04 22:32:36 +00:00
fix(hp/linux): initialize the C906-internal PLIC through OpenSBI
The retrosoc_hp platform registered no irqchip_init hook, so the C906-internal PLIC (thead,c900-plic, decoded by the core BIU rather than the SoC fabric) was never initialized before the kernel probed it. Select FDT_IRQCHIP_PLIC and register fdt_irqchip_init: OpenSBI v1.9's thead,c900-plic match applies the T-Head M-to-S delegation quirk that S-mode external-interrupt delivery requires. Verified by nm on the rebuilt fw_jump.elf (fdt_irqchip_init/fdt_irqchip_plic linked in).
This commit is contained in:
2 files changed
+8
No files matched your search
@@ -2,5 +2,8 @@
|
||||
|
||||
config PLATFORM_RETROSOC_HP
|
||||
bool
|
||||
select FDT
|
||||
select FDT_IRQCHIP
|
||||
select FDT_IRQCHIP_PLIC
|
||||
select IPI_MSWI
|
||||
default y
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <sbi/sbi_platform.h>
|
||||
#include <sbi/sbi_timer.h>
|
||||
#include <sbi_utils/ipi/aclint_mswi.h>
|
||||
#include <sbi_utils/irqchip/fdt_irqchip.h>
|
||||
|
||||
/* Internal C906 CLINT (thead,c900-clint), decoded by the core BIU. */
|
||||
#define RETROSOC_HP_CLINT_BASE 0x0C000000UL
|
||||
@@ -140,6 +141,10 @@ static int retrosoc_hp_timer_init(void) {
|
||||
|
||||
static const struct sbi_platform_operations s_platform_operations = {
|
||||
.early_init = retrosoc_hp_early_init,
|
||||
/* Initialize the C906-internal PLIC from the boot FDT: the thead,c900-plic
|
||||
* match applies the T-Head M-to-S delegation quirk that S-mode interrupt
|
||||
* delivery requires. */
|
||||
.irqchip_init = fdt_irqchip_init,
|
||||
.timer_init = retrosoc_hp_timer_init,
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user