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@chromium.org>
Original-Commit-Id: 46a649608e6740e07c562c722fadd8c64e264b5f
Original-Change-Id: Iecd8739c9269b58064b3c3275f5376cebcd6804b
Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/225506
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/8753
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Vadim Bendebury
2014-10-24 15:14:55 -07:00
committed by Patrick Georgi
parent aee78f0dbe
commit 522f9c6df1
3 changed files with 11 additions and 0 deletions

View File

@ -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;