[PATCH] hw/arm: Add missing psci_conduit to NPCM8XX SoC boot info

Guenter Roeck posted 1 patch 2 weeks, 3 days ago
hw/arm/npcm8xx.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] hw/arm: Add missing psci_conduit to NPCM8XX SoC boot info
Posted by Guenter Roeck 2 weeks, 3 days ago
Without psci_conduit, the Linux kernel crashes almost immediately.

    psci: probing for conduit method from DT.
    Internal error: Oops - Undefined instruction: 0000000002000000 [#1] PREEMPT SMP

Fixes: ae0c4d1a1290 ("hw/arm: Add NPCM8XX SoC")
Cc: Hao Wu <wuhaotsh@google.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 hw/arm/npcm8xx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/arm/npcm8xx.c b/hw/arm/npcm8xx.c
index f182accc47..e5a1929ed7 100644
--- a/hw/arm/npcm8xx.c
+++ b/hw/arm/npcm8xx.c
@@ -346,6 +346,7 @@ static struct arm_boot_info npcm8xx_binfo = {
     .secure_boot            = false,
     .board_id               = -1,
     .board_setup_addr       = NPCM8XX_BOARD_SETUP_ADDR,
+    .psci_conduit           = QEMU_PSCI_CONDUIT_SMC,
 };
 
 void npcm8xx_load_kernel(MachineState *machine, NPCM8xxState *soc)
-- 
2.45.2
Re: [PATCH] hw/arm: Add missing psci_conduit to NPCM8XX SoC boot info
Posted by Peter Maydell 2 weeks ago
On Sat, 15 Mar 2025 at 14:20, Guenter Roeck <linux@roeck-us.net> wrote:
>
> Without psci_conduit, the Linux kernel crashes almost immediately.
>
>     psci: probing for conduit method from DT.
>     Internal error: Oops - Undefined instruction: 0000000002000000 [#1] PREEMPT SMP
>
> Fixes: ae0c4d1a1290 ("hw/arm: Add NPCM8XX SoC")
> Cc: Hao Wu <wuhaotsh@google.com>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>  hw/arm/npcm8xx.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/hw/arm/npcm8xx.c b/hw/arm/npcm8xx.c
> index f182accc47..e5a1929ed7 100644
> --- a/hw/arm/npcm8xx.c
> +++ b/hw/arm/npcm8xx.c
> @@ -346,6 +346,7 @@ static struct arm_boot_info npcm8xx_binfo = {
>      .secure_boot            = false,
>      .board_id               = -1,
>      .board_setup_addr       = NPCM8XX_BOARD_SETUP_ADDR,
> +    .psci_conduit           = QEMU_PSCI_CONDUIT_SMC,
>  };

Why do we need this for npcm8xx when we don't need it
for npcm7xx? Or is it also broken on 7xx?

thanks
-- PMM
Re: [PATCH] hw/arm: Add missing psci_conduit to NPCM8XX SoC boot info
Posted by Guenter Roeck 2 weeks ago
On 3/18/25 09:59, Peter Maydell wrote:
> On Sat, 15 Mar 2025 at 14:20, Guenter Roeck <linux@roeck-us.net> wrote:
>>
>> Without psci_conduit, the Linux kernel crashes almost immediately.
>>
>>      psci: probing for conduit method from DT.
>>      Internal error: Oops - Undefined instruction: 0000000002000000 [#1] PREEMPT SMP
>>
>> Fixes: ae0c4d1a1290 ("hw/arm: Add NPCM8XX SoC")
>> Cc: Hao Wu <wuhaotsh@google.com>
>> Cc: Peter Maydell <peter.maydell@linaro.org>
>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>> ---
>>   hw/arm/npcm8xx.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/hw/arm/npcm8xx.c b/hw/arm/npcm8xx.c
>> index f182accc47..e5a1929ed7 100644
>> --- a/hw/arm/npcm8xx.c
>> +++ b/hw/arm/npcm8xx.c
>> @@ -346,6 +346,7 @@ static struct arm_boot_info npcm8xx_binfo = {
>>       .secure_boot            = false,
>>       .board_id               = -1,
>>       .board_setup_addr       = NPCM8XX_BOARD_SETUP_ADDR,
>> +    .psci_conduit           = QEMU_PSCI_CONDUIT_SMC,
>>   };
> 
> Why do we need this for npcm8xx when we don't need it
> for npcm7xx? Or is it also broken on 7xx?
> 

I don't see a reference to psci in npcm7xx devicetree files
in the upstream Linux kernel.

$ git grep psci arch/arm64/boot/dts/nuvoton/ arch/arm/boot/dts/nuvoton/
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi:                        enable-method = "psci";
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi:                        enable-method = "psci";
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi:        psci {
arch/arm64/boot/dts/nuvoton/ma35d1.dtsi:                compatible = "arm,psci-0.2";
arch/arm64/boot/dts/nuvoton/nuvoton-npcm845.dtsi:                       enable-method = "psci";
arch/arm64/boot/dts/nuvoton/nuvoton-npcm845.dtsi:                       enable-method = "psci";
arch/arm64/boot/dts/nuvoton/nuvoton-npcm845.dtsi:                       enable-method = "psci";
arch/arm64/boot/dts/nuvoton/nuvoton-npcm845.dtsi:                       enable-method = "psci";
arch/arm64/boot/dts/nuvoton/nuvoton-npcm845.dtsi:       psci {
arch/arm64/boot/dts/nuvoton/nuvoton-npcm845.dtsi:               compatible      = "arm,psci-1.0";

Guenter