u-boot/arch
Yu Chien Peter Lin d1b24a6140 riscv: andes: Fix enable register settings of PLICSW
On 32-core platform, hart31 gets stuck at secondary_hart_loop
as the corresponding enable bit is not set in enable_ipi().
We should program the next word (0x2f84) which is assigned
as the enable register of hart31. It should be done in the same
way when we invoke riscv_send_ipi() to trigger software interrupt
on hart31.

The following diagram shows the enable bits of the fixed PLICSW
scheme.

   Pending regs: 0x1000  x---0---0---0---0------0---0
Pending hart ID:             0   1   2   3 ... 30  31
   Interrupt ID:         0   1   2   3   4 ... 31  32
                         |   |   |   |   |      |   |
    Enable regs: 0x2000  x---1---0---0---0-...--0---0---> hart0
                         |   |   |   |   |      |   |
                 0x2080  x---0---1---0---0-...--0---0---> hart1
                         |   |   |   |   |      |   |
                 0x2100  x---0---0---1---0-...--0---0---> hart2
                         |   |   |   |   |      |   |
                 0x2180  x---0---0---0---1-...--0---0---> hart3
                         .   .   .   .   .      .   .
                         .   .   .   .   .      .   .
                         .   .   .   .   .      .   .
                 0x2f00  x---0---0---0---0-...--1---0---> hart30
                         |   |   |   |   |      |   |
                 0x2f80  x---0---0---0---0-...--0---1---> hart31
                         <-------- word 0 -------><--- word 1 --->

This patch includes some cleanups to macros/functions.

Fixes: ebf11273220a ("riscv: andes: Rearrange Andes PLICSW to single-bit-per-hart strategy")
Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Randolph <randolph@andestech.com>
2023-12-06 16:05:39 +08:00
..
arc arc: Remove common.h usage 2023-10-24 16:34:45 -04:00
arm ARM: dts: renesas: Disable RPC driver on R8A779G0 V4H White Hawk board 2023-12-02 17:16:01 +01:00
m68k Kconfig: Remove all default n/no options 2023-10-30 15:32:49 -04:00
microblaze microblaze: Remove common.h usage 2023-10-24 16:34:45 -04:00
mips bmips: Add Inteno XG6846 board 2023-11-06 10:20:21 -05:00
nios2 event: Convert existing spy records to simple 2023-08-31 13:16:54 -04:00
powerpc mpc85xx: relocate code in non-SPL build 2023-10-28 09:17:55 -04:00
riscv riscv: andes: Fix enable register settings of PLICSW 2023-12-06 16:05:39 +08:00
sandbox sandbox: Close file after mmaping it 2023-11-14 20:04:01 -07:00
sh spl: Use SYS_MALLOC_F instead of SYS_MALLOC_F_LEN 2023-10-06 14:38:12 -04:00
x86 common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
xtensa treewide: unify the linker symbol reference format 2023-08-09 09:21:42 -04:00
.gitignore
Kconfig cmd: mbr: Allow 4 MBR partitions without need for extended 2023-10-24 17:05:24 -04:00
Kconfig.nxp LFU-544: Kconfig.nxp: Fixed secure boot on LS-CH2 platforms 2023-07-06 13:04:56 +08:00
u-boot-elf.lds