arm-trusted-firmware/common
Andre Przywara 1aa7e302a8 feat(libfdt): add function to set MAC addresses
The devicetree specification[1] defines the generic DT properties
"mac-address" and "local-mac-address", that allow to set the MAC address
for a network device. This is needed because many platform network
devices do not define a method for obtaining a unique MAC address, and
many devices lack the non-volatile storage to hold such a number.

Some platforms (for instance Allwinner) derive the MAC address from
another unique SoC property, for instance some serial number. To allow
those MAC address to be set by TF-A, add a function that finds the DT
node of a network device (by using the "ethernet<x>" alias), then adding
the "local-mac-address" property into that node, setting it to a user
provided address. Platforms can use this function to generate MAC
addresses in a platform specific way, and store them in the DT.

DT consumers like U-Boot or the Linux kernel will automatically pick up
the address from that property and program the MAC device accordingly.

[1] https://devicetree-specification.readthedocs.io/en/latest/chapter4-device-bindings.html#local-mac-address-property

Change-Id: I3f5766cc575fa9718f9ca23e8269b11495c43be2
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-04-26 15:43:58 +02:00
..
aarch32 Align AARCH32 version of debug.S with AARCH64 2020-09-21 17:53:42 +02:00
aarch64 Print newline after hex address in aarch64 el3_panic function 2021-03-04 11:05:31 +01:00
backtrace Don't return error information from console_flush 2020-10-09 10:21:50 -05:00
bl_common.c refactor(measured-boot): avoid Measured-Boot dependency on Trusted-Boot 2022-01-11 23:06:22 +00:00
desc_image_load.c SPMD: extract SPMC DTB header size from SPMD 2020-05-13 08:08:39 +02:00
fdt_fixup.c feat(libfdt): add function to set MAC addresses 2022-04-26 15:43:58 +02:00
fdt_wrappers.c Merge "fix: libc: use long for 64-bit types on aarch64" into integration 2021-11-08 21:34:42 +01:00
fdt_wrappers.mk build(fdt-wrappers): introduce FDT wrappers makefile 2021-10-26 12:14:28 +01:00
feat_detect.c refactor(el3-runtime): add arch-features detection mechanism 2022-04-04 10:24:51 +01:00
image_decompress.c Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
runtime_svc.c Remove support for the SMC Calling Convention 2.0 2019-01-30 16:01:49 +00:00
tf_crc32.c refactor(hw_crc32): renamed hw_crc32 to tf_crc32 2021-08-02 17:15:41 +01:00
tf_log.c feat(common/debug): add new macro ERROR_NL() to print just a newline 2021-07-21 00:01:06 +02:00
uuid.c fix(fdt): fix OOB write in uuid parsing function 2021-07-26 16:42:25 +01:00