[coreboot-gerrit] Patch set updated for coreboot: skylake: Add and fill out CID1 NVS field

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Sat Feb 27 00:04:13 CET 2016


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

-gerrit

commit 77f84906f9f518365050806ed1d507a0ff9be5bf
Author: Duncan Laurie <dlaurie at chromium.org>
Date:   Thu Feb 25 08:45:43 2016 -0800

    skylake: Add and fill out CID1 NVS field
    
    Add a country identifier field to NVS and populate it with the
    call to wifi_regulatory_domain() which will (by default) do a
    lookup for the 'region' identifier in VPD on a Chrome OS device.
    
    BUG=chrome-os-partner:50516
    BRANCH=glados
    TEST=build and boot on chell
    
    Change-Id: Ie7531848e620095732772c22156a85b7f8a6df5c
    Signed-off-by: Patrick Georgi <pgeorgi at google.com>
    Original-Commit-Id: dafdb3760a0302e3effdc0e83977c1bfd5c9d3b2
    Original-Change-Id: Ic83ab008045a469d0e0756f7e4d42f1b3894c529
    Original-Signed-off-by: Duncan Laurie <dlaurie at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/329295
    Original-Reviewed-by: Aaron Durbin <adurbin at chromium.org>
---
 src/soc/intel/skylake/acpi.c             | 4 ++++
 src/soc/intel/skylake/acpi/globalnvs.asl | 1 +
 src/soc/intel/skylake/include/soc/nvs.h  | 3 ++-
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/soc/intel/skylake/acpi.c b/src/soc/intel/skylake/acpi.c
index 678e0a9..934d7b5 100644
--- a/src/soc/intel/skylake/acpi.c
+++ b/src/soc/intel/skylake/acpi.c
@@ -41,6 +41,7 @@
 #include <string.h>
 #include <types.h>
 #include <vendorcode/google/chromeos/gnvs.h>
+#include <wrdd.h>
 
 /*
  * List of suported C-states in this processor.
@@ -193,6 +194,9 @@ static void acpi_create_gnvs(global_nvs_t *gnvs)
 
 	/* Enable DPTF based on mainboard configuration */
 	gnvs->dpte = config->dptf_enable;
+
+	/* Fill in the Wifi Region id */
+	gnvs->cid1 = wifi_regulatory_domain();
 }
 
 unsigned long acpi_fill_mcfg(unsigned long current)
diff --git a/src/soc/intel/skylake/acpi/globalnvs.asl b/src/soc/intel/skylake/acpi/globalnvs.asl
index 1ea7e53..2bff7d3 100644
--- a/src/soc/intel/skylake/acpi/globalnvs.asl
+++ b/src/soc/intel/skylake/acpi/globalnvs.asl
@@ -63,6 +63,7 @@ Field (GNVS, ByteAcc, NoLock, Preserve)
 	DPTE,	8,	// 0x30 - Enable DPTF
 	NHLA,	64,	// 0x31 - NHLT Address
 	NHLL,	32,	// 0x39 - NHLT Length
+	CID1,	16,	// 0x3d - Wifi Country Identifier
 
 	/* ChromeOS specific */
 	Offset (0x100),
diff --git a/src/soc/intel/skylake/include/soc/nvs.h b/src/soc/intel/skylake/include/soc/nvs.h
index 032068f..f9d5b71 100644
--- a/src/soc/intel/skylake/include/soc/nvs.h
+++ b/src/soc/intel/skylake/include/soc/nvs.h
@@ -53,7 +53,8 @@ typedef struct {
 	u8	dpte; /* 0x30 - Enable DPTF */
 	u64	nhla; /* 0x31 - NHLT Address */
 	u32	nhll; /* 0x39 - NHLT Length */
-	u8	unused[195];
+	u16	cid1; /* 0x3d - Wifi Country Identifier */
+	u8	unused[193];
 
 	/* ChromeOS specific (0x100 - 0xfff) */
 	chromeos_acpi_t chromeos;



More information about the coreboot-gerrit mailing list