the following patch was just integrated into master:
commit ed0f6d7cb762b40d282101cf847f3d45209a5f26
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Tue Jun 28 14:59:21 2016 -0500
lib/nhlt: add helper functions for adding endpoints
In order to ease the porting of supporting NHLT endpoints
introduce a nhlt_endpoint_descriptor structure as well as
corresponding helper functions.
Change-Id: I68edaf681b4e60502f6ddbbd04de21d8aa072296
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
Reviewed-on: https://review.coreboot.org/15486
Reviewed-by: Furquan Shaikh <furquan(a)google.com>
Tested-by: build bot (Jenkins)
See https://review.coreboot.org/15486 for details.
-gerrit
Furquan Shaikh (furquan(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15498
-gerrit
commit 3afe52e05ed70baf971ccc98a52df8b8bde74b64
Author: Furquan Shaikh <furquan(a)google.com>
Date: Wed Jun 29 11:26:27 2016 -0700
vbnv: Do not initialize vbnv_copy in vbnv layer
If read_vbnv finds that the vbnv_copy is not valid, it initializes it
with the correct HEADER_SIGNATURE and other attributes. However, the
vbnv copy is checked for validity and initialized at the vboot layer as
well. Since, vboot is the owner of this data, it should be the one
initializing it. Thus, if read_vbnv sees that the data is not valid,
simply reset it to all 0s and let vboot layer take care of it. This also
removes the need for additional checks to ensure that the dirty vbnv
copy is properly updated on storage.
Change-Id: I6101ac41f31f720a6e357c9c56e571d62e0f2f47
Signed-off-by: Furquan Shaikh <furquan(a)google.com>
---
src/vendorcode/google/chromeos/vbnv.c | 14 +++-----------
src/vendorcode/google/chromeos/vbnv.h | 7 +------
src/vendorcode/google/chromeos/vboot2/vboot_logic.c | 8 ++------
3 files changed, 6 insertions(+), 23 deletions(-)
diff --git a/src/vendorcode/google/chromeos/vbnv.c b/src/vendorcode/google/chromeos/vbnv.c
index baccb23..d900775 100644
--- a/src/vendorcode/google/chromeos/vbnv.c
+++ b/src/vendorcode/google/chromeos/vbnv.c
@@ -63,10 +63,6 @@ static uint8_t crc8_vbnv(const uint8_t *data, int len)
static void reset_vbnv(uint8_t *vbnv_copy)
{
memset(vbnv_copy, 0, VBNV_BLOCK_SIZE);
- vbnv_copy[HEADER_OFFSET] = HEADER_SIGNATURE |
- HEADER_FIRMWARE_SETTINGS_RESET |
- HEADER_KERNEL_SETTINGS_RESET;
- vbnv_copy[CRC_OFFSET] = crc8_vbnv(vbnv_copy, CRC_OFFSET);
}
/* Read VBNV data into cache. */
@@ -88,9 +84,8 @@ int verify_vbnv(uint8_t *vbnv_copy)
/*
* Read VBNV data from configured storage backend.
* If VBNV verification fails, reset the vbnv copy.
- * Returns 1 if write-back of vbnv copy is required. Else, returns 0.
*/
-int read_vbnv(uint8_t *vbnv_copy)
+void read_vbnv(uint8_t *vbnv_copy)
{
if (IS_ENABLED(CONFIG_CHROMEOS_VBNV_CMOS))
read_vbnv_cmos(vbnv_copy);
@@ -100,11 +95,8 @@ int read_vbnv(uint8_t *vbnv_copy)
read_vbnv_flash(vbnv_copy);
/* Check data for consistency */
- if (verify_vbnv(vbnv_copy))
- return 0;
-
- reset_vbnv(vbnv_copy);
- return 1;
+ if (!verify_vbnv(vbnv_copy))
+ reset_vbnv(vbnv_copy);
}
/*
diff --git a/src/vendorcode/google/chromeos/vbnv.h b/src/vendorcode/google/chromeos/vbnv.h
index a66d687..5d21cc8 100644
--- a/src/vendorcode/google/chromeos/vbnv.h
+++ b/src/vendorcode/google/chromeos/vbnv.h
@@ -19,12 +19,7 @@
#include <types.h>
/* Generic functions */
-/*
- * Return value for read_vbnv:
- * 1 = write-back of vbnv copy is required.
- * 0 = otherwise
- */
-int read_vbnv(uint8_t *vbnv_copy);
+void read_vbnv(uint8_t *vbnv_copy);
void save_vbnv(const uint8_t *vbnv_copy);
int verify_vbnv(uint8_t *vbnv_copy);
int get_recovery_mode_from_vbnv(void);
diff --git a/src/vendorcode/google/chromeos/vboot2/vboot_logic.c b/src/vendorcode/google/chromeos/vboot2/vboot_logic.c
index 116c949..4c799c9 100644
--- a/src/vendorcode/google/chromeos/vboot2/vboot_logic.c
+++ b/src/vendorcode/google/chromeos/vboot2/vboot_logic.c
@@ -301,12 +301,8 @@ void verstage_main(void)
/* Set up context and work buffer */
vb2_init_work_context(&ctx);
- /*
- * Read nvdata from a non-volatile storage and mark data as changed
- * if instructed.
- */
- if (read_vbnv(ctx.nvdata))
- ctx.flags |= VB2_CONTEXT_NVDATA_CHANGED;
+ /* Read nvdata from a non-volatile storage. */
+ read_vbnv(ctx.nvdata);
/* Set S3 resume flag if vboot should behave differently when selecting
* which slot to boot. This is only relevant to vboot if the platform
Lijian Zhao (lijian.zhao(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15497
-gerrit
commit 98f79223491a46c1204a8dd275b78d423c5662c4
Author: Zhao, Lijian <lijian.zhao(a)intel.com>
Date: Tue Jun 28 11:34:29 2016 -0700
intel/amenia: keep ISH enabled for now
Disable ISH causes reset in FSP, this should be fixed in later stepping,
util then keep ISH enabled.
BUG= None
TEST=Boot up into OS
Change-Id: I6319cd9f2fd27893b389ea0f10c8fe5a5a191432
Signed-off-by: Zhao, Lijian <lijian.zhao(a)intel.com>
---
src/mainboard/intel/amenia/devicetree.cb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mainboard/intel/amenia/devicetree.cb b/src/mainboard/intel/amenia/devicetree.cb
index 2080d6f..36abe97 100644
--- a/src/mainboard/intel/amenia/devicetree.cb
+++ b/src/mainboard/intel/amenia/devicetree.cb
@@ -8,7 +8,7 @@ chip soc/intel/apollolake
register "pcie_rp2_clkreq_pin" = "0" # SSD
# Integrated Sensor Hub
- register "integrated_sensor_hub_enable" = "0"
+ register "integrated_sensor_hub_enable" = "1"
# EMMC TX DATA Delay 1#
# 0x1A[14:8] stands for 26*125 = 3250 pSec delay for HS400
the following patch was just integrated into master:
commit 78461a9d55de07f3187b48dfd6abca48db90e906
Author: Andrey Petrov <andrey.petrov(a)intel.com>
Date: Tue Jun 28 12:14:33 2016 -0700
soc/intel/apollolake: Change PCI macros to match Skylake
Change PCI macros in such a way they can be transparently used across
romstage and ramstage.
Change-Id: Idc708c1990f2fc1d941bb82efcb0a697524f2eca
Signed-off-by: Andrey Petrov <andrey.petrov(a)intel.com>
Reviewed-on: https://review.coreboot.org/15483
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
See https://review.coreboot.org/15483 for details.
-gerrit
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15489
-gerrit
commit 45443cc72a0efb5dfc91639a2120ded3043a51dd
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Tue Jun 28 15:36:01 2016 -0500
lib/nhlt: drop nhlt_soc_add_endpoint()
The nhlt_soc_add_endpoint() is no longer used. Drop its declaration.
Change-Id: I3b68471650a43c5faae44bde523abca7ba250a34
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/include/nhlt.h | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/include/nhlt.h b/src/include/nhlt.h
index 3300d43..17b7d11 100644
--- a/src/include/nhlt.h
+++ b/src/include/nhlt.h
@@ -45,7 +45,7 @@ struct nhlt_format_config;
* An example sequence:
*
* nhlt = nhlt_init()
- * ep = nhlt_soc_add_endpoint()
+ * ep = nhlt_add_endpoint()
* nhlt_endpoint_append_config(ep)
* nhlt_endpoint_add_formats(ep)
* nhlt_soc_serialize()
@@ -97,19 +97,13 @@ int nhlt_add_ssp_endpoints(struct nhlt *nhlt, int virtual_bus_id,
/*
* Add endpoint to NHLT object. Returns NULL on error.
*
- * Note that the SoC variant uses SoC-specifc types for the hardware interface
- * and device types. This is to allow the SoC code to validate its particular
- * device support for specific hardware interfaces.
- *
- * The more generic nhlt_add_endpoint() is called by the SoC code to provide
+ * generic nhlt_add_endpoint() is called by the SoC code to provide
* the specific assumptions/uses for NHLT for that platform. All fields
* are the NHLT enumerations found within this header file.
*/
struct nhlt_endpoint *nhlt_add_endpoint(struct nhlt *nhlt, int link_type,
int device_type, int dir,
uint16_t vid, uint16_t did);
-struct nhlt_endpoint *nhlt_soc_add_endpoint(struct nhlt *nhlt, int soc_hwintf,
- int soc_devtype, int dir);
/*
* Append blob of configuration to the endpoint proper. Returns 0 on
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15490
-gerrit
commit 032a427437eca33dff1f67c4e6af3e80d7652ba9
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Tue Jun 28 15:41:07 2016 -0500
soc/intel/{common,skylake}: provide common NHLT SoC support
The nhlt_soc_serialize() and nhlt_soc_serialize_oem_overrides()
functions should be able to be leveraged on all Intel SoCs
which support NHLT. Therefore provide that functionality and
make skylake use it.
Change-Id: Ib5535cc874f2680ec22554cecaf97b09753cacd0
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/soc/intel/common/Kconfig | 4 ++++
src/soc/intel/common/Makefile.inc | 1 +
src/soc/intel/common/nhlt.c | 41 +++++++++++++++++++++++++++++++++
src/soc/intel/skylake/Kconfig | 1 +
src/soc/intel/skylake/nhlt/Makefile.inc | 1 -
src/soc/intel/skylake/nhlt/nhlt.c | 41 ---------------------------------
6 files changed, 47 insertions(+), 42 deletions(-)
diff --git a/src/soc/intel/common/Kconfig b/src/soc/intel/common/Kconfig
index fdd8f04..776004b 100644
--- a/src/soc/intel/common/Kconfig
+++ b/src/soc/intel/common/Kconfig
@@ -99,4 +99,8 @@ config SOC_INTEL_COMMON_ACPI
bool
default n
+config SOC_INTEL_COMMON_NHLT
+ bool
+ default n
+
endif # SOC_INTEL_COMMON
diff --git a/src/soc/intel/common/Makefile.inc b/src/soc/intel/common/Makefile.inc
index 88d5fd2..e9ad508 100644
--- a/src/soc/intel/common/Makefile.inc
+++ b/src/soc/intel/common/Makefile.inc
@@ -20,6 +20,7 @@ ramstage-$(CONFIG_SOC_INTEL_COMMON_ACPI_WAKE_SOURCE) += acpi_wake_source.c
ramstage-y += vbt.c
ramstage-$(CONFIG_SOC_INTEL_COMMON_GFX_OPREGION) += opregion.c
ramstage-$(CONFIG_SOC_INTEL_COMMON_ACPI) += ./acpi/acpi.c
+ramstage-$(CONFIG_SOC_INTEL_COMMON_NHLT) += nhlt.c
smm-$(CONFIG_SOC_INTEL_COMMON_SMI) += smihandler.c
diff --git a/src/soc/intel/common/nhlt.c b/src/soc/intel/common/nhlt.c
new file mode 100644
index 0000000..d498152
--- /dev/null
+++ b/src/soc/intel/common/nhlt.c
@@ -0,0 +1,41 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2015 Google, Inc.
+ *
+ * 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 <cbmem.h>
+#include <nhlt.h>
+#include <soc/acpi.h>
+
+uintptr_t nhlt_soc_serialize(struct nhlt *nhlt, uintptr_t acpi_addr)
+{
+ return nhlt_soc_serialize_oem_overrides(nhlt, acpi_addr, NULL, NULL);
+}
+
+uintptr_t nhlt_soc_serialize_oem_overrides(struct nhlt *nhlt,
+ uintptr_t acpi_addr, const char *oem_id, const char *oem_table_id)
+{
+ global_nvs_t *gnvs;
+
+ gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS);
+
+ if (gnvs == NULL)
+ return acpi_addr;
+
+ /* Update NHLT GNVS Data */
+ gnvs->nhla = (uintptr_t)acpi_addr;
+ gnvs->nhll = nhlt_current_size(nhlt);
+
+ return nhlt_serialize_oem_overrides(nhlt, acpi_addr,
+ oem_id, oem_table_id);
+}
diff --git a/src/soc/intel/skylake/Kconfig b/src/soc/intel/skylake/Kconfig
index a134d1c..6843cef 100644
--- a/src/soc/intel/skylake/Kconfig
+++ b/src/soc/intel/skylake/Kconfig
@@ -38,6 +38,7 @@ config CPU_SPECIFIC_OPTIONS
select SOC_INTEL_COMMON
select SOC_INTEL_COMMON_ACPI_WAKE_SOURCE
select SOC_INTEL_COMMON_LPSS_I2C
+ select SOC_INTEL_COMMON_NHLT
select SOC_INTEL_COMMON_RESET
select SMM_TSEG
select SMP
diff --git a/src/soc/intel/skylake/nhlt/Makefile.inc b/src/soc/intel/skylake/nhlt/Makefile.inc
index aff182c..e022482 100644
--- a/src/soc/intel/skylake/nhlt/Makefile.inc
+++ b/src/soc/intel/skylake/nhlt/Makefile.inc
@@ -1,4 +1,3 @@
-ramstage-y += nhlt.c
ramstage-y += dmic.c
ramstage-y += nau88l25.c
ramstage-y += max98357.c
diff --git a/src/soc/intel/skylake/nhlt/nhlt.c b/src/soc/intel/skylake/nhlt/nhlt.c
deleted file mode 100644
index d498152..0000000
--- a/src/soc/intel/skylake/nhlt/nhlt.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2015 Google, Inc.
- *
- * 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 <cbmem.h>
-#include <nhlt.h>
-#include <soc/acpi.h>
-
-uintptr_t nhlt_soc_serialize(struct nhlt *nhlt, uintptr_t acpi_addr)
-{
- return nhlt_soc_serialize_oem_overrides(nhlt, acpi_addr, NULL, NULL);
-}
-
-uintptr_t nhlt_soc_serialize_oem_overrides(struct nhlt *nhlt,
- uintptr_t acpi_addr, const char *oem_id, const char *oem_table_id)
-{
- global_nvs_t *gnvs;
-
- gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS);
-
- if (gnvs == NULL)
- return acpi_addr;
-
- /* Update NHLT GNVS Data */
- gnvs->nhla = (uintptr_t)acpi_addr;
- gnvs->nhll = nhlt_current_size(nhlt);
-
- return nhlt_serialize_oem_overrides(nhlt, acpi_addr,
- oem_id, oem_table_id);
-}