How to retrieve cpu info from u-boot fucntion?

Peter Robinson pbrobinson at gmail.com
Wed Aug 28 17:31:14 CEST 2024


Hi,

I appear to have missed the first post.

> Is there any update on the below request? Are there any functions similar
> to eth_get_ethaddr() to retrieve device-specific info? I am working with
> raspberry pi 0 and there is no network interface card.
> So, eth_get_ethaddr() returns null

So there's a bunch of drivers for OTP/eFuses in drivers/misc/* which
provide access to those sort of unique options such as CPU serial
numbers, and possibly stored MACs etc.

I know the RPi has a OTP/eFUSE HW IP block, I don't believe U-Boot has
a driver for that as yet.
The main RPi firmware may have an mbox/API for querying those sorts of
things, looking at board/raspberrypi/rpi/rpi.c there's a
set_usbethaddr which calls a msg_get_mac_address to request a MAC from
the RPi firmware, I suspect that may work for your needs.

Peter

> Thanks in advance
>
> On Wed, Jun 19, 2024 at 9:11 AM Sourabh Hegde Ramu <hrsourabh1107 at gmail.com>
> wrote:
>
> > Hello,
> >
> > Currently, I am using the MAC address from eth_get_ethaddr() function to
> > calculate a hash value. But, I would like to replace this with a more
> > unique device info such as cpuid or other values. But I could not find any
> > function that can retrieve cpu info.
> >
> > Can anyone please point me in the correct direction? Do we have any
> > functions for this? Are these things part of the documentation?
> >
> > Thanks in advance.
> >
> > Kind regards,
> > Sourabh
> >


More information about the U-Boot mailing list