[Macchiato] [EXT] How to save mac addresses?

Marcin Wojtas mw at semihalf.com
Tue Jul 30 16:09:12 BST 2019


Hi Stefan,

>From what I can see, Andrew is using ACPI boot, i.e. edk2.

Hi Andrew,

You have to pass the mac address via ACPI tables. Example for eth0
(according entries should be done for other ports:
diff --git a/Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin/Dsdt.asl
b/Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin/Dsdt.asl
index 7e9e361..8e99f9f 100644
--- a/Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin/Dsdt.asl
+++ b/Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin/Dsdt.asl
@@ -238,6 +238,7 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, "MVEBU ",
"ARMADA8K", 3)
                     Package () { "port-id", 0 },
                     Package () { "gop-port-id", 0 },
                     Package () { "phy-mode", "10gbase-kr"},
+                    Package () { "local-mac-address", {0xAA, 0xBB, 0xCC,
0xDD, 0xAA, 0xBB}},^M
                   }
               })
             }

For DT you should add something like this to the port node:
local-mac-address = [0xAA 0xBB 0xCC 0xDD 0xAA 0xBB]

BTW, in what OS do you see those interfaces as enamrvl*?

Best regards,
Marcin

wt., 30 lip 2019 o 16:57 Stefan Chulski <stefanc at marvell.com> napisaƂ(a):

> > Hi folks,
> >
> > I've noticed that I'm getting random mac addresses on boot - how can I
> save
> > them in EFI or device tree?
> >
> > [root at alfred ~]# dmesg | grep mvpp
> > [    6.364974] mvpp2 MRVL0110:00 eth0: Using random mac address
> > 9e:3d:27:0f:98:34
> > [    6.409005] mvpp2 MRVL0110:01 eth1: Using random mac address
> > 4a:b3:4e:2a:40:dd
> > [    6.421132] mvpp2 MRVL0110:01 eth2: Using random mac address
> > 0e:bb:0d:fe:57:63
> > [    6.451371] mvpp2 MRVL0110:00 enamrvl110i0: renamed from eth0
> > [    6.542381] mvpp2 MRVL0110:01 enamrvl110i1: renamed from eth1
> >
> > and again a reboot later
> > [root at alfred ~]# dmesg | grep mvpp
> > [    6.467892] mvpp2 MRVL0110:00 eth0: Using random mac address
> > f2:4e:e7:95:31:43
> > [    6.519720] mvpp2 MRVL0110:01 eth1: Using random mac address
> > d6:d8:07:dd:52:0f
> > [    6.523032] mvpp2 MRVL0110:01 eth2: Using random mac address
> > 66:35:89:b5:60:8d
> > [    6.532560] mvpp2 MRVL0110:00 enamrvl110i0: renamed from eth0
> > [    6.602505] mvpp2 MRVL0110:01 enamrvl110i1: renamed from eth2
> >
> >
> > Given I don't know at a boot which of the interfaces will come up as
> > enamrvl* or eth* its making writing ifcfg-* files a PITA.
> >
> >
> > When I've looked at drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c,
> > it appears that it should be able to get it from firmware or hardware
> before
> > falling back to random,
> >
> > Is there a way to set this in EFI and/or DT somehow so it's at least
> > consistent?
>
> Try set ethXaddr in uboot.
>
> Regards.
> _______________________________________________
> Macchiato mailing list
> Macchiato at lists.einval.com
> https://lists.einval.com/cgi-bin/mailman/listinfo/macchiato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.einval.com/pipermail/macchiato/attachments/20190730/d44c0610/attachment.html>


More information about the Macchiato mailing list