forked from Mirrors/opensbi
lib: Move software interrupt enablement from firmware to lib
The secondary hart waits for an IPI signal from the boot hart to executing boot code (hot boot). As a result, software generated interrupts have to be enabled for secondary harts before waiting for the boot hart boot completion IPI signal. Enabling software generated interrupts (IPI) can be done independently of the firmware code and moved to libsbi code so that the different firmware do not have to implement this. Signed-off-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
@@ -125,10 +125,6 @@ _start_warm:
|
|||||||
csrw mie, zero
|
csrw mie, zero
|
||||||
csrw mip, zero
|
csrw mip, zero
|
||||||
|
|
||||||
/* Set MSIE bit to receive IPI */
|
|
||||||
li a2, MIP_MSIP
|
|
||||||
csrw mie, a2
|
|
||||||
|
|
||||||
/* Preload per-HART details
|
/* Preload per-HART details
|
||||||
* s6 -> HART ID
|
* s6 -> HART ID
|
||||||
* s7 -> HART Count
|
* s7 -> HART Count
|
||||||
|
@@ -304,6 +304,10 @@ void sbi_hart_wait_for_coldboot(struct sbi_scratch *scratch, u32 hartid)
|
|||||||
if ((sbi_platform_hart_count(plat) <= hartid) ||
|
if ((sbi_platform_hart_count(plat) <= hartid) ||
|
||||||
(COLDBOOT_WAIT_BITMAP_SIZE <= hartid))
|
(COLDBOOT_WAIT_BITMAP_SIZE <= hartid))
|
||||||
sbi_hart_hang();
|
sbi_hart_hang();
|
||||||
|
|
||||||
|
/* Set MSIE bit to receive IPI */
|
||||||
|
csr_set(mie, MIP_MSIP);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
spin_lock(&coldboot_wait_bitmap_lock);
|
spin_lock(&coldboot_wait_bitmap_lock);
|
||||||
coldboot_wait_bitmap |= (1UL << hartid);
|
coldboot_wait_bitmap |= (1UL << hartid);
|
||||||
|
Reference in New Issue
Block a user