How to retrieve cpu info from u-boot fucntion?

Sourabh Hegde Ramu hrsourabh1107 at gmail.com
Thu Aug 29 08:27:01 CEST 2024


Hello Peter,

Thanks for the update. Looking at the board/raspberrypi/rpi/rpi.c I think
MAC address is only returned for models that have onboard ethernet. but for
models raspberry pi 0w / pi 02w it might not return any value.
Am I correct? (maybe I overlooked it?) Is there any other approach for this?

Thanks in advance

On Wed, Aug 28, 2024 at 5:31 PM Peter Robinson <pbrobinson at gmail.com> wrote:

> 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