Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13844
-gerrit
commit d6491855ce27b5d52019b7391bd20541b1b56afb
Author: Patrick Georgi <pgeorgi(a)google.com>
Date: Fri Feb 26 15:27:20 2016 -0800
vboot: Update to current master to support S3 resume signalling
This is used in coreboot-side vboot code now, to keep booting from
the same RW section after wakeup - necessary when romstage is in RW
and its use of the RAM init configuration cache may differ between
versions.
Change-Id: Ie531cf3ddc980154f48772b3ff87e23473010721
Signed-off-by: Patrick Georgi <pgeorgi(a)google.com>
---
3rdparty/vboot | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/3rdparty/vboot b/3rdparty/vboot
index 933c4e7..d187cd3 160000
--- a/3rdparty/vboot
+++ b/3rdparty/vboot
@@ -1 +1 @@
-Subproject commit 933c4e7aa4b873f0ad9cd4c348a1ea4f37f66aa7
+Subproject commit d187cd3fc792f8bcefbee4587c83eafbd08441fc
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13834
-gerrit
commit 32b347d053a3e5bd346b48dbf7bd70613c187acb
Author: Duncan Laurie <dlaurie(a)chromium.org>
Date: Fri Feb 19 20:26:07 2016 -0800
vboot: Set S3_RESUME flag for vboot context if necessary
If a platform does verification of the memory init step, and it must
resume with the same slot that it booted from then it needs to set
the vboot context flag when resuming instead of booting. This will
affect the slot that is selected to verify and resume from.
BUG=chromium:577269
BRANCH=glados
TEST=manually tested on chell:
1) ensure that booting from slot A resumes from slot A.
2) ensure that booting from slot B resumes from slot B.
3) do RW update while booted from slot A (so the flags are set to try
slot B) and ensure that suspend/resume still functions properly using
current slot A.
4) do RW update while booted from slot B (so the flags are set to try
slot A) and ensure that suspend/resume still functions properly using
current slot B.
Change-Id: I77e6320e36b4d2cbc308cfb39f0d4999e3497be3
Signed-off-by: Patrick Georgi <pgeorgi(a)google.com>
Original-Commit-Id: 4c84af7eae7b2a52a28cc3ef8a80649301215a68
Original-Change-Id: I395e5abaccd6f578111f242d1e85e28dced469ea
Original-Signed-off-by: Duncan Laurie <dlaurie(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/328775
Original-Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/vendorcode/google/chromeos/vboot2/vboot_logic.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/vendorcode/google/chromeos/vboot2/vboot_logic.c b/src/vendorcode/google/chromeos/vboot2/vboot_logic.c
index a4829c0..d43fb27 100644
--- a/src/vendorcode/google/chromeos/vboot2/vboot_logic.c
+++ b/src/vendorcode/google/chromeos/vboot2/vboot_logic.c
@@ -311,6 +311,15 @@ void verstage_main(void)
antirollback_read_space_firmware(&ctx);
timestamp_add_now(TS_END_TPMINIT);
+ /* Set S3 resume flag if vboot should behave differently when selecting
+ * which slot to boot. This is only relevant to vboot if the platform
+ * does verification of memory init and thus must ensure it resumes with
+ * the same slot that it booted from. */
+ if (IS_ENABLED(CONFIG_RESUME_PATH_SAME_AS_BOOT) &&
+ IS_ENABLED(CONFIG_VBOOT_STARTS_IN_BOOTBLOCK) &&
+ vboot_platform_is_resuming())
+ ctx.flags |= VB2_CONTEXT_S3_RESUME;
+
if (!IS_ENABLED(CONFIG_VIRTUAL_DEV_SWITCH) &&
get_developer_mode_switch())
ctx.flags |= VB2_CONTEXT_FORCE_DEVELOPER_MODE;
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13836
-gerrit
commit bbfd6a60729484656338f80d390ae7c294b9a210
Author: Felix Durairaj <felixx.durairaj(a)intel.com>
Date: Fri Nov 20 15:51:35 2015 -0800
lib: Implement framework for retrieving WiFi regulatory domain
Platforms that need to initialize WRDD package with the regulatory domain
information should implement function wifi_regulatory_domain.
A weak implementation is provided here.
Signed-off-by: fdurairx <felixx.durairaj(a)intel.com>
Reviewed-on: https://chromium-review.googlesource.com/314384
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati(a)intel.com>
Commit-Queue: Hannah Williams <hannah.williams(a)intel.com>
Tested-by: Hannah Williams <hannah.williams(a)intel.com>
(cherry picked from commit c25d7221679d1fab830d614eeabfa3436bce6ac1)
BUG=chrome-os-partner:50516
BRANCH=glados
TEST=build and boot on chell
Change-Id: I1cbdf4e940b009c74ee8ed8f4fca85f4f5c943b2
Signed-off-by: Patrick Georgi <pgeorgi(a)google.com>
Original-Commit-Id: 27bba336e620a2d3d331e350d4f46164e337fabc
Original-Signed-off-by: Duncan Laurie <dlaurie(a)chromium.org>
Original-Change-Id: I84e2acd748856437b40bbf997bf23f158c711712
Original-Reviewed-on: https://chromium-review.googlesource.com/329291
Original-Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/lib/Makefile.inc | 1 +
src/lib/wrdd.c | 22 ++++++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index 7d1d146..646fefa 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -114,6 +114,7 @@ ramstage-y += cbfs.c
ramstage-$(CONFIG_COMMON_CBFS_SPI_WRAPPER) += cbfs_spi.c
ramstage-y += lzma.c lzmadecode.c
ramstage-y += stack.c
+ramstage-y += wrdd.c
ramstage-$(CONFIG_CONSOLE_CBMEM) += cbmem_console.c
ramstage-$(CONFIG_BOOTSPLASH) += jpeg.c
ramstage-$(CONFIG_TRACE) += trace.c
diff --git a/src/lib/wrdd.c b/src/lib/wrdd.c
new file mode 100644
index 0000000..da082f8
--- /dev/null
+++ b/src/lib/wrdd.c
@@ -0,0 +1,22 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2012 Google Inc.
+ * Copyright (C) 2015 Intel Corp.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <wrdd.h>
+
+uint16_t __attribute__((weak)) wifi_regulatory_domain(void)
+{
+ return WRDD_DEFAULT_REGULATORY_DOMAIN;
+}
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13837
-gerrit
commit 585c99b30a486f5418dc1ee4335f48d0aae5fe0c
Author: Huang, Huki <huki.huang(a)intel.com>
Date: Thu Jan 21 10:17:06 2016 +0800
Chromeos: Modify wifi_regulatory_domain to use "region" key in VPD
In ChromeOS VPD spec the right name is "region".
Signed-off-by: Hannah Williams <hannah.williams(a)intel.com>
Reviewed-on: https://chromium-review.googlesource.com/322851
Reviewed-by: Hung-Te Lin <hungte(a)chromium.org>
Reviewed-by: mukesh agrawal <quiche(a)chromium.org>
(cherry picked from commit 21ea0663e7f3ffe3aaea6b6ce0e1216fcd9ca23e)
BUG=chrome-os-partner:50516
BRANCH=glados
TEST=build and boot on chell
Change-Id: I4ba9a9c65af3732fa263030640495ab5bea91d1f
Signed-off-by: Patrick Georgi <pgeorgi(a)google.com>
Original-Commit-Id: 848f18e731eb11dd3037d12607d7364f95e64e34
Original-Signed-off-by: Duncan Laurie <dlaurie(a)chromium.org>
Original-Change-Id: Ib96036f9cd76449f170af5c3dd6ef6e8e91ded94
Original-Reviewed-on: https://chromium-review.googlesource.com/329293
Original-Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/vendorcode/google/chromeos/cros_vpd.h | 2 +-
src/vendorcode/google/chromeos/wrdd.c | 11 +++++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/vendorcode/google/chromeos/cros_vpd.h b/src/vendorcode/google/chromeos/cros_vpd.h
index ca9c320..96ca8af 100644
--- a/src/vendorcode/google/chromeos/cros_vpd.h
+++ b/src/vendorcode/google/chromeos/cros_vpd.h
@@ -7,7 +7,7 @@
#ifndef __CROS_VPD_H__
#define __CROS_VPD_H__
-#define CROS_VPD_WIFI_DOMAINKEY "regions"
+#define CROS_VPD_REGION_NAME "region"
/*
* Reads VPD string value by key.
diff --git a/src/vendorcode/google/chromeos/wrdd.c b/src/vendorcode/google/chromeos/wrdd.c
index ab27cc0..ad80992 100644
--- a/src/vendorcode/google/chromeos/wrdd.c
+++ b/src/vendorcode/google/chromeos/wrdd.c
@@ -26,6 +26,7 @@
* The first part is the ISO 3166-1 alpha-2 code of the country;
* The second part is a string of up to three alphanumeric characters
*/
+#define VARIANT_SEPARATOR '.'
struct wrdd_code_value_pair {
const char *code;
u16 value;
@@ -50,21 +51,27 @@ uint16_t wifi_regulatory_domain(void)
.value = WRDD_REGULATORY_DOMAIN_INDONESIA
}
};
- const char *wrdd_domain_key = CROS_VPD_WIFI_DOMAINKEY;
+ const char *wrdd_domain_key = CROS_VPD_REGION_NAME;
int i;
struct wrdd_code_value_pair *p;
/* wrdd_domain_value is ISO 3166-2 */
char wrdd_domain_code[7];
+ char *separator;
/* If not found for any reason fall backto the default value */
if (!cros_vpd_gets(wrdd_domain_key, wrdd_domain_code,
- sizeof(wrdd_domain_code))) {
+ ARRAY_SIZE(wrdd_domain_code))) {
printk(BIOS_DEBUG,
"Error: Could not locate '%s' in VPD\n", wrdd_domain_key);
return WRDD_DEFAULT_REGULATORY_DOMAIN;
}
printk(BIOS_DEBUG, "Found '%s'='%s' in VPD\n",
wrdd_domain_key, wrdd_domain_code);
+ separator = memchr(wrdd_domain_code, VARIANT_SEPARATOR,
+ ARRAY_SIZE(wrdd_domain_code));
+ if (separator) {
+ *separator = '\0';
+ }
for (i = 0; i < ARRAY_SIZE(wrdd_table); i++) {
p = &wrdd_table[i];
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13838
-gerrit
commit beac442fed758b0ee8f93b9a705a5aae860339cc
Author: Duncan Laurie <dlaurie(a)chromium.org>
Date: Thu Feb 25 08:44:06 2016 -0800
intel/wifi: Add WRDD ACPI method
Add an ACPI file containing a generic WRDD method that is used
by Intel wireless kernel drivers to determine the country code
to be used for regulatory domain configuration of the wireless
radios.
This requires an NVS variable called 'CID1' to provide an
ISO-3166-2 alpha-2 country code or it will just return 0 instead.
This is implemented as a bare method because this needs to be
included directly into the wifi device that is defined by the
mainboard as it may have board-specific settings like _PRW that
need to be provided as well.
BUG=chrome-os-partner:50516
BRANCH=glados
TEST=boot on chell with 'region'='us' in VPD and see that it is
properly read out by calling WRDD method on the WiFi device.
Change-Id: I27a5e27f65d05ff62a0e79a87a32c1ef0c5d0ef3
Signed-off-by: Patrick Georgi <pgeorgi(a)google.com>
Original-Commit-Id: 2da0cf76ca3cc5e3dfbc4a0859733523de780cf5
Original-Change-Id: I9d83c3938cceafc77ef8747a5c47f586ee84437e
Original-Signed-off-by: Duncan Laurie <dlaurie(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/329294
Original-Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/drivers/intel/wifi/acpi/wrdd.asl | 37 ++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/src/drivers/intel/wifi/acpi/wrdd.asl b/src/drivers/intel/wifi/acpi/wrdd.asl
new file mode 100644
index 0000000..6f071ad
--- /dev/null
+++ b/src/drivers/intel/wifi/acpi/wrdd.asl
@@ -0,0 +1,37 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2016 Google Inc.
+ * Copyright (C) 2016 Intel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+/*
+ * This method is used by the Intel wireless kernel drivers to determine
+ * the proper country code for regulatory domain configuration.
+ *
+ * It requires an NVS field called CID1 to be present that provides the
+ * ISO-3166-2 alpha-2 country code.
+ */
+Method (WRDD, 0, Serialized)
+{
+ Name (WRDX, Package () {
+ 0, /* Revision */
+ Package () {
+ 0x00000007, /* Domain Type, 0x7:WiFi */
+ 0x00000000, /* No Default Country Identifier */
+ }
+ })
+
+ /* Replace Country Identifier with value from NVS */
+ Store (\CID1, Index (DeRefOf (Index (WRDX, 1)), 1))
+ Return (WRDX)
+}