[coreboot-gerrit] Patch set updated for coreboot: 1f9f370 libpayload: make wifi calibration table available through sysinfo

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Thu Mar 19 12:10:53 CET 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8753

-gerrit

commit 1f9f370de2c98474753255d718f98d7e7d2de37e
Author: Vadim Bendebury <vbendeb at chromium.org>
Date:   Fri Oct 24 15:14:55 2014 -0700

    libpayload: make wifi calibration table available through sysinfo
    
    The WiFi calibration blob saved in the CBMEM by coreboot needs to be
    visible by depthcharge to supply it to the kernel.
    
    BRANCH=storm
    BUG=chrome-os-partner:32611
    TEST=none yet
    
    Change-Id: I43a857f073a47ca315d400df4c53d5eb38e91601
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Original-Commit-Id: 46a649608e6740e07c562c722fadd8c64e264b5f
    Original-Change-Id: Iecd8739c9269b58064b3c3275f5376cebcd6804b
    Original-Signed-off-by: Vadim Bendebury <vbendeb at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/225506
    Original-Reviewed-by: Aaron Durbin <adurbin at chromium.org>
---
 payloads/libpayload/include/coreboot_tables.h | 1 +
 payloads/libpayload/include/sysinfo.h         | 1 +
 payloads/libpayload/libc/coreboot.c           | 9 +++++++++
 3 files changed, 11 insertions(+)

diff --git a/payloads/libpayload/include/coreboot_tables.h b/payloads/libpayload/include/coreboot_tables.h
index 13a9978..72c2ad8 100644
--- a/payloads/libpayload/include/coreboot_tables.h
+++ b/payloads/libpayload/include/coreboot_tables.h
@@ -199,6 +199,7 @@ struct lb_range {
 #define CB_TAG_CBMEM_CONSOLE	0x0017
 #define CB_TAG_MRC_CACHE	0x0018
 #define CB_TAG_ACPI_GNVS	0x0024
+#define CB_TAG_WIFI_CALIBRATION	0x0027
 struct cb_cbmem_tab {
 	uint32_t tag;
 	uint32_t size;
diff --git a/payloads/libpayload/include/sysinfo.h b/payloads/libpayload/include/sysinfo.h
index b90a8bd..5ad839b 100644
--- a/payloads/libpayload/include/sysinfo.h
+++ b/payloads/libpayload/include/sysinfo.h
@@ -114,6 +114,7 @@ struct sysinfo_t {
 	void	*mrc_cache;
 	void	*acpi_gnvs;
 	u32     board_id;
+	void	*wifi_calibration;
 };
 
 extern struct sysinfo_t lib_sysinfo;
diff --git a/payloads/libpayload/libc/coreboot.c b/payloads/libpayload/libc/coreboot.c
index b777e47..2f4536c 100644
--- a/payloads/libpayload/libc/coreboot.c
+++ b/payloads/libpayload/libc/coreboot.c
@@ -183,6 +183,12 @@ static void cb_parse_string(unsigned char *ptr, char **info)
 	*info = (char *)((struct cb_string *)ptr)->string;
 }
 
+static void cb_parse_wifi_calibration(void *ptr, struct sysinfo_t *info)
+{
+	struct cb_cbmem_tab *const cbmem = (struct cb_cbmem_tab *)ptr;
+	info->wifi_calibration = phys_to_virt(cbmem->cbmem_tab);
+}
+
 int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
 {
 	struct cb_header *header;
@@ -315,6 +321,9 @@ int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
 		case CB_TAG_BOARD_ID:
 			cb_parse_board_id(ptr, info);
 			break;
+		case CB_TAG_WIFI_CALIBRATION:
+			cb_parse_wifi_calibration(ptr, info);
+			break;
 		default:
 			cb_parse_arch_specific(rec, info);
 			break;



More information about the coreboot-gerrit mailing list