iMX8 not all cores starting
Stefan Kalkowski
stefan.kalkowski at genode-labs.com
Tue Oct 6 11:02:05 CEST 2020
Hello Pirmin,
On Tue, Oct 06, 2020 at 09:24:40AM +0200, Duss Pirmin wrote:
> Hi Genodians
>
> As mentioned in an earlier mail I'm currently enabling base-hw on the
> IoT gateway of CompuLab [1].
>
> The used SoC is a iMX8mm, which is a bit different from the iMX8mq used
> on the EVK [2].
>
> On a running Linux I used `memtool` to read register values.
>
> In `src/bootstrap/spec/iot_gateway/platform.cc` I have changed the
> following things:
> - the values for the `regulator` registers
> - the register offsets and values for the ARM_PLL registers
> - the values of the IOMUX configuration
>
Being in your position, I would not do PLL or IOMUX settings or
whatever in the first place, but leave them out completely. Typically,
the ARM Trusted Firmware and U-boot, which already run have configured
the SoC in a way that you can use at least serial line, cpus and their
timers.
The addition of PLL settings for i.MX 8MQ were added when we wanted to
raise the CPU frequency from the very beginning. The IOMUX settings
are done here, because some more high-level peripherals like USB,
Ethernet or display engine needed it. However they will be moved to
the platform driver anyway. Anyway, to exclude that your settings
influence the e.g., CPU frequency/voltage badly you should leave them
out now.
The enabling of the secondary CPUs is done by the ARM Trusted Firmware
in case of the i.MX8 MQ. As far as I can see by looking at the device
tree of your SoC, it is the same for i.MX8 MM. Please, assure that
Board::Cpu::wake_up_all_cpus() is doing the same, namely doing three
SMC calls. You might check the result of the call!
Then please add raw() calls at the earliest place possible in
bootstrap to see whether the secondary cpus may have come up, but
stuck somewhere else. (when successful you will see character salad
due to unsynchronized raw() calls).
I hope this helps somehow further.
Regards
Stefan
> Now the code bootstrap finishes and the kernel begins to run.
> By adding some `Genode::raw()`s to `void kernel_init()` I'm able to see,
> that the initialization for kernel waits for all CPUs to start at `while
> (!pool_ready) { ; }`.
>
> If change `NR_OF_CPUS` to 1, I'm able to run the log run script.
>
> log output of IoT gateway [1]:
>
> ```
> Kernel: Board() :: 324
> Kernel: Board() :: 342
> Kernel: wake_up_all_cpus() :: 352 --- 1
> Kernel: wake_up_all_cpus() :: 352 --- 2
> Kernel: wake_up_all_cpus() :: 352 --- 3
>
> Kernel: kernel_init() :: 56
> Kernel: initialize() :: 184
> Kernel: initialize() :: 186 --- 0
> Kernel: initialize() :: 188 --- 0 initialized=4
>
> ```
>
> log output from EVK [2]:
>
> ```
> Kernel: kernel_init() :: 56
>
> Kernel: initialize() :: 186 --- 0
> Kernel: initialize() :: 188 --- 0 initialized=4
> Kernel: initialize() :: 184
> Kernel: initialize() :: 186 --- 3
> Kernel: initialize() :: 188 --- 3 initialized=3
> Kernel: initialize() :: 184
> Kernel: initialize() :: 186 --- 2
> Kernel: initialize() :: 188 --- 2 initialized=2
> Kernel: initialize() :: 184
> Kernel: initialize() :: 186 --- 1
> Kernel: initialize() :: 188 --- 1 initialized=1
>
> kernel initialized
>
> ```
>
> Has anybody an idea what registers could have an influence on the start
> up of the CPUs?
>
> [1]
> https://www.compulab.com/products/iot-gateways/iot-gate-imx8-industrial-arm-iot-gateway/
>
> [2]
> https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/evaluation-kit-for-the-i-mx-8m-applications-processor:MCIMX8M-EVK
>
> Best regards,
> Pirmin
>
> _______________________________________________
> Genode users mailing list
> users at lists.genode.org
> https://lists.genode.org/listinfo/users
--
Stefan Kalkowski
Genode labs
https://github.com/skalk | https://genode.org
More information about the users
mailing list