summaryrefslogtreecommitdiffstats
path: root/src/include/boot
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2014-09-22 18:48:41 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-04-02 17:27:37 +0200
commit274ef4186ff7120309ac89343e35ba57608d0f4d (patch)
tree45645ad12b746b48421c94d972f19842b6c6cb45 /src/include/boot
parent074a028ef715763ecda99386d472c751092150a1 (diff)
downloadcoreboot-274ef4186ff7120309ac89343e35ba57608d0f4d.tar.gz
coreboot-274ef4186ff7120309ac89343e35ba57608d0f4d.tar.bz2
coreboot-274ef4186ff7120309ac89343e35ba57608d0f4d.zip
vpd: retrieve mac addresses and pass them to bootloader
Chrome OS devices firmware usually includes an area called VPD (Vital Product Data). VPD is a blob of a certain structure, in particular containing freely defined variable size fields. A field is a tuple of the field name and field contents. MAC addresses of the interfaces are stored in VPD as well. Field names are in the form of 'ethernet_macN', where N is the zero based interface number. This patch retrieves the MAC address(es) from the VPD and populates them in the coreboot table so that they become available to the bootloader. BUG=chrome-os-partner:32152, chromium:417117 TEST=with this and other patches in place the storm device tree shows up with MAC addresses properly initialized. Change-Id: I955207b3a644cde100cc4b48e51a2ab9a3cb1ba0 Signed-off-by: Stefan Reinauer <reinauer@chromium.org> Original-Commit-Id: 1972b9e97b57cc8503c5e4dc496706970ed2ffbe Original-Change-Id: I12c0d15ca84f60e4824e1056c9be2e81a7ad8e73 Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/219443 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/9207 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/include/boot')
-rw-r--r--src/include/boot/coreboot_tables.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/include/boot/coreboot_tables.h b/src/include/boot/coreboot_tables.h
index 46c1df5e4971..0efb8fdb4187 100644
--- a/src/include/boot/coreboot_tables.h
+++ b/src/include/boot/coreboot_tables.h
@@ -263,6 +263,19 @@ struct lb_board_id {
uint32_t board_id;
};
+#define LB_TAG_MAC_ADDRS 0x0026
+struct mac_address {
+ uint8_t mac_addr[6];
+ uint8_t pad[2]; /* Pad it to 8 bytes to keep it simple. */
+};
+
+struct lb_macs {
+ uint32_t tag;
+ uint32_t size;
+ uint32_t count;
+ struct mac_address mac_addrs[0];
+};
+
/* The following structures are for the cmos definitions table */
#define LB_TAG_CMOS_OPTION_TABLE 200
/* cmos header record */