Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Sep 2023 15:42:13 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        "Patrick M. Hausen" <pmh@hausen.com>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Getting a stable MAC address for a RPI CM3+ with ue0 interface
Message-ID:  <686EF03A-4A77-4B41-B231-16428514764D@yahoo.com>
In-Reply-To: <414AE626-93AD-48E5-96FF-D8DBB2EFDBD1@hausen.com>
References:  <3C1032FF-B914-4863-8A03-759A8B4BE216@hausen.com> <77E70D30-8E7D-42DC-A041-3A783E1C6908@yahoo.com> <5205C76E-BAB4-4AB7-8A03-1E8A2D4353BB@hausen.com> <2093E18F-3F37-4C0B-8A73-2E85A631E30E@yahoo.com> <414AE626-93AD-48E5-96FF-D8DBB2EFDBD1@hausen.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sep 20, 2023, at 14:12, Patrick M. Hausen <pmh@hausen.com> wrote:

>> Am 20.09.2023 um 23:06 schrieb Mark Millard <marklmi@yahoo.com>:
>> It might be worth figuring out if the ethernet0 alias exists and what
>> it points to (if it exists).
> 
> What is an ethernet0 alias and how can I check it? Currently I have access
> to the modules when they are running FreeBSD. No console or pre-boot.

It is not in the notation that can be used with dtc or the like
but you likely can look usefully at:

# ofwdump -p -r / | more

output to get some information. For example, from a RPi4B:

# ofwdump -p -r / | more
Node 0x48: 
  memreserve:
    3b 30 00 00 04 c0 00 00 
  serial-number:
  . . .
  Node 0x15c: psci
    compatible:
      61 72 6d 2c 70 73 63 69 2d 30 2e 32 00 
      'arm,psci-0.2'
    method:
      73 6d 63 00 
      'smc'
. . .
  Node 0x200: aliases
. . .
    emmc2bus:
      2f 65 6d 6d 63 32 62 75 73 00 
      '/emmc2bus'
    ethernet0:
      2f 73 63 62 2f 65 74 68 65 72 6e 65 74 40 37 64 35 38 30 30 
      30 30 00 
      '/scb/ethernet@7d580000'
    pcie0:
      2f 73 63 62 2f 70 63 69 65 40 37 64 35 30 30 30 30 30 00 
      '/scb/pcie@7d500000'
. . .

So: the ethernet0 alias points to /scb/ethernet@7d580000

/scb/ethernet@7d580000 starts with (partially redacted):

  Node 0x87f0: scb
    compatible:
      73 69 6d 70 6c 65 2d 62 75 73 00 
      'simple-bus'
. . .
    Node 0x8b90: ethernet@7d580000
      local-mac-address:
        ?? ?? ?? ?? ?? ?? 
. . .

That is what force_mac_address would be providing,
given the ethernet0 definition above.

I'll note that, as I remembmer, the psci material
was added to the live dtb by the armstub*.bin
provided by via FreeBSD specific materials.

An example addition by U-Boot is:

  Node 0x828: chosen
    fixup-applied:
    u-boot,version:
      32 30 32 33 2e 30 31 00 
      '2023.01'

The RPi* firmware does various dynamic adjustments
of what is in the *.dtb file used. The *.dtb's do
not span the variations.

I'm not aware of ofwdump being able to show any
earlier-stage live dtb's, even if you know the
address(es).

> I will have to check how I can get any pre-boot access if necessary.
> 



===
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?686EF03A-4A77-4B41-B231-16428514764D>