mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01:00
Disable all interrupts during warm irqchip init.
M mode is not expected to recieve any interrupts. S mode interrupts shouldn't be enabled in M mode. Signed-off-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
@@ -81,10 +81,15 @@ int plic_warm_irqchip_init(u32 target_hart,
|
||||
if (plic_hart_count <= target_hart)
|
||||
return -1;
|
||||
|
||||
if (m_cntx_id > -1) {
|
||||
for (i = 0; i < ie_words; i++)
|
||||
plic_set_ie(m_cntx_id, i, 0);
|
||||
}
|
||||
|
||||
/* By default, enable all IRQs for S-mode of target HART */
|
||||
if (s_cntx_id > -1) {
|
||||
for (i = 0; i < ie_words; i++)
|
||||
plic_set_ie(s_cntx_id, i, -1);
|
||||
plic_set_ie(s_cntx_id, i, 0);
|
||||
}
|
||||
|
||||
/* By default, enable M-mode threshold */
|
||||
|
Reference in New Issue
Block a user