arm-trusted-firmware/include/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
..
tbbr tbbr-cot: conditional definition for the macro 2021-03-24 09:49:31 +05:30
asm_macros_common.S Add support for Branch Target Identification 2019-05-24 14:44:45 +01:00
bl_common.h feat(rme): add ENABLE_RME build option and support for RMM image 2021-10-05 11:49:59 -05:00
bl_common.ld.h feat(bl_common): add XLAT tables symbols in linker script 2022-04-06 18:07:36 +02:00
debug.h feat(common/debug): add new macro ERROR_NL() to print just a newline 2021-07-21 00:01:06 +02:00
desc_image_load.h Add helper to parse BL31 parameters (both versions) 2019-07-23 20:25:34 -07:00
ep_info.h feat(rme): add Realm security state definition 2021-10-01 16:54:44 -05:00
fdt_fixup.h feat(libfdt): add function to set MAC addresses 2022-04-26 15:43:58 +02:00
fdt_wrappers.h feat(fdt-wrappers): add CPU enumeration utility function 2021-10-26 12:14:29 +01:00
feat_detect.h refactor(el3-runtime): add arch-features detection mechanism 2022-04-04 10:24:51 +01:00
image_decompress.h Standardise header guards across codebase 2018-11-08 10:20:19 +00:00
interrupt_props.h Replace __ASSEMBLY__ with compiler-builtin __ASSEMBLER__ 2019-08-01 13:14:12 -07:00
nv_cntr_ids.h dtsi: Update the nv-counter node in the device tree 2020-08-28 09:50:25 +00:00
param_header.h Replace __ASSEMBLY__ with compiler-builtin __ASSEMBLER__ 2019-08-01 13:14:12 -07:00
romlib.h Standardise header guards across codebase 2018-11-08 10:20:19 +00:00
runtime_svc.h Switch AARCH32/AARCH64 to __aarch64__ 2019-08-01 13:45:03 -07:00
tf_crc32.h refactor(hw_crc32): renamed hw_crc32 to tf_crc32 2021-08-02 17:15:41 +01:00
uuid.h feat(fdt): introduce wrapper function to read DT UUIDs 2021-04-28 12:13:12 +01:00