[PATCH] riscv: Allow platforms with no PLIC to proceed

Joel Sherrill joel at rtems.org
Mon Sep 17 12:24:08 UTC 2018


How does this get enabled? Is it supposed to be tripped by some bsp
variant?

Where is any documentation on it?

Right now, it looks like hidden magic.

--joel

On Mon, Sep 17, 2018, 7:12 AM Hesham Almatary <Hesham.Almatary at cl.cam.ac.uk>
wrote:

> Spike simulator and QEMU's spike_v1.10 don't have a PLIC
> ---
>  bsps/riscv/riscv/irq/irq.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/bsps/riscv/riscv/irq/irq.c b/bsps/riscv/riscv/irq/irq.c
> index 1a76846..3c35a37 100644
> --- a/bsps/riscv/riscv/irq/irq.c
> +++ b/bsps/riscv/riscv/irq/irq.c
> @@ -161,7 +161,12 @@ static void riscv_plic_init(const void *fdt)
>
>    plic = riscv_fdt_get_address(fdt, node);
>    if (plic == NULL) {
> +#if RISCV_ENABLE_HTIF_SUPPORT != 0
> +    /* Spike platform has HTIF and does not have a PLIC */
> +    return;
> +#else
>      bsp_fatal(RISCV_FATAL_NO_PLIC_REG_IN_DEVICE_TREE);
> +#endif
>    }
>
>    val = fdt_getprop(fdt, node, "riscv,ndev", &len);
> --
> 2.7.4
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20180917/b90c32f1/attachment-0002.html>


More information about the devel mailing list