3

I want to find the unique ID of a Raspberry Pi (BCM2835/2836/2837), without using kernel lookup.

Can anyone give me the memory address of the device serial number?

Before anyone suggests how to do it using kernel, I already know how to get the serial number that way. I want the bare metal method which I have not been able to find anywhere (I did check the kernel source but that is rather convoluted and obfuscated and looks like a huge effort to trace back).

Surely there must be a memory address or some registers I can easily set to return the serial number, or is it a Videocore function and not accessible via ARM memory access without using mailbox?

tlhIngan
  • 3,372
  • 5
  • 21
  • 33
fishy
  • 31
  • 1
  • 2

1 Answers1

3

The serial can be read by querying mailbox 0 channel 8 with the tag 0x00010004 as described here in the Raspberry Pi firmware wiki. The serial number is returned as a uint64 variable.

Get board serial

  • Tag: 0x00010004
  • Request:
    • Length: 0
  • Response:
    • Length: 8
    • Value:
      • u64: board serial
goobering
  • 10,750
  • 4
  • 40
  • 64
Dmitry Grigoryev
  • 28,277
  • 6
  • 54
  • 147