SoC UID and machine hashable data are both based on the same data but are both registered at different places with different functions.
This series aims to unify this by adding a function which uses the passed SoC UID to provide it to the environment and also to register machine hashable data. The SoC ID code on i.MX is quite a mess and this series cleans this up a bit. We have drivers/nvmem/ocotp.c which reads the SoC ID and provides machine hashable data and we have drivers/soc/imx/soc-imx8m.c which implements a SoC driver and exposes soc0.serial_number, but the SoC driver only works on i.MX8M which is a subset of the SoCs supported by the ocotp driver. Furthermore I realized that on i.MX8MP the SoC ID is 128bit whereas we currently only use 64bit which additionally read from the wrong registers. This series fixes this, but doing so will change the machine_id passed to Linux which may break userspace, so this change might need some discussion. Maybe we need a way to keep the previous machine_id for already rolled out devices. Signed-off-by: Sascha Hauer <[email protected]> --- Sascha Hauer (9): introduce SoC UID soc: imx8mp: Soc ID is 128bit ARM: i.MX6: print leading zero for SoC ID nvmem: bsec: call barebox_set_soc_uid() nvmem: imx-ocotp-ele: call barebox_set_soc_uid() nvmem: ocotp: Fix SoC ID reading for i.MX8MP nvmem: imx-ocotp: call barebox_set_soc_uid() soc: imx8m: register SoC UID Documentation: migration: add i.MX8MP SoC UID change note .../migration-guides/migration-master.rst | 8 +++ arch/arm/mach-imx/imx6.c | 2 +- common/misc.c | 58 ++++++++++++++++++++++ drivers/nvmem/bsec.c | 8 +-- drivers/nvmem/imx-ocotp-ele.c | 12 +++-- drivers/nvmem/ocotp.c | 40 ++++++++++++--- drivers/soc/imx/soc-imx8m.c | 37 ++++++++++---- include/barebox-info.h | 4 ++ 8 files changed, 144 insertions(+), 25 deletions(-) --- base-commit: 45b4b47cc650b0552d4920d0a353a860f6d2468c change-id: 20251113-soc-uid-21daee8feac6 Best regards, -- Sascha Hauer <[email protected]>
