Re: Wrong number of CPUs detected on RPI3 and FreeBSD 13.1

From: Otacilio <otacilio.neto_at_bsd.com.br>
Date: Wed, 08 Jun 2022 12:25:29 UTC
Em 05/06/2022 14:31, greg@unrelenting.technology escreveu:
> June 5, 2022 2:18 PM, "Otacilio" <otacilio.neto@bsd.com.br> wrote:
>
>> After some debug I found that this routine is returning -1:
>>
>> Someone can give-me a hint about the function of psci_callfn ?
> PSCI is an interface for calling into power management firmware.
> Just saying that *a* PSCI call failed is not informative, we really need the arguments of the call.
>
> I'm not sure what firmware you have on the SD card but armstub8 from
> https://github.com/gonzoua/rpi3-psci-monitor should support:
> PSCI_VERSION, PSCI_CPU_ON, PSCI_SYSTEM_OFF, and PSCI_SYSTEM_RESET.
> Which should be all the calls that FreeBSD ever does…

I did a ofwdump on the RPI3 running the sdcard with my local FreeBSD13.1 
build (bad) and the same RPI3 running another sdcard with a downloaded 
image from freebsd.org (good) and the results are very different.

The god one:

Node 0x48:
   Node 0x110: framebuffer@3e513000
   Node 0x1c0: psci
   Node 0x1fc: system
   Node 0x230: axi
     Node 0x238: vc_mem
   Node 0x264: aliases
   Node 0x6f0: chosen
     Node 0x878: bootloader
   Node 0x890: reserved-memory
     Node 0x8e0: linux,cma
   Node 0x94c: thermal-zones
     Node 0x960: cpu-thermal
...

FreeBSD generic 13.1-RELEASE FreeBSD 13.1-RELEASE 
releng/13.1-n250148-fc952ac2212 GENERIC arm64

======================

Tha bad one:

Node 0x58:
   Node 0x120: framebuffer@3e513000
   Node 0x1d0: psci
   Node 0x20c: system
   Node 0x240: axi
     Node 0x248: vc_mem
   Node 0x274: aliases
   Node 0x6e0: chosen
   Node 0x810: thermal-zones
     Node 0x824: cpu-thermal
       Node 0x888: cooling-maps
   Node 0x8a8: soc
     Node 0x934: dma@7e007000

...

FreeBSD azul 13.1-RELEASE FreeBSD 13.1-RELEASE #2 
releng/13.1-n250148-fc952ac2212-dirty: Sat Jun  4 22:14:44 -03 2022 
ota@azul:/usr/local/www/apache24/storage/FreeBSD/obj/usr/local/www/apache24/storage/FreeBSD/src/arm64.aarch64/sys/GENERIC 
arm64


The ofwdump output must be the same on both?


Thanks a lot