cancel
Showing results for 
Search instead for 
Did you mean: 

What is the machine type constant to be used for booting Linux in STM32MP1 (STM32MP157F-EV1)?

AGamb.4
Associate III

Hello,

 

I am working on a custom Boot Loader (SSBL) for the STM32MP157F-EV1 board to replace U-Boot in the boot chain (BL33), this is a requirement for my project.

 

As I understand, to boot the Linux Kernel it is needed to provide 3 values through the first 3 registers as follows:

  • R0 = constant 0
  • R1 = Machine Type
  • R2 = Address of loaded DTB

What would be the MACH_TYPE needed to pass to the linux kernel to boot through the register R1?

 

The list of MACH_TYPES can be found in https://elixir.bootlin.com/linux/v5.17-rc6/source/arch/arm/tools/mach-types. But I do not find an specific one for this board or any stm MPU.

 

Thank you,

Andrés Gamboa

1 REPLY 1
Jean-Marc S
ST Employee

Hello Gamboa

For a DT-only BSP the MACH_TYPE should be all 1 (~0) as explained in below article

https://elixir.bootlin.com/linux/v5.15.41/source/Documentation/arm/booting.rst#L78

For DT-only platforms, the machine type will be determined by device

tree. set the machine type to all ones (~0). This is not strictly

necessary, but assures that it will not match any existing types.

JM