Andrey Petrov (andrey.petrov(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14467
-gerrit
commit fdb03b91fb6d435fb14b71d6d872eaaa2fee7365
Author: Andrey Petrov <andrey.petrov(a)intel.com>
Date: Mon Apr 18 13:36:19 2016 -0700
soc/intel/apollolake: Configure a GPIO for TPM in bootblock
One of devices connected to FAST SPI bus is TPM. SoC uses dedicated
line for chip select for TPM function. If TPM is used, that line needs
to be configured to a specific native funciton.
Change-Id: Ib5bf4c759adf9656f7b34540d4fc924945d27a97
Signed-off-by: Andrey Petrov <andrey.petrov(a)intel.com>
---
src/mainboard/intel/apollolake_rvp/Makefile.inc | 3 +--
src/mainboard/intel/apollolake_rvp/bootblock.c | 33 -------------------------
src/soc/intel/apollolake/bootblock/bootblock.c | 14 +++++++++++
3 files changed, 15 insertions(+), 35 deletions(-)
diff --git a/src/mainboard/intel/apollolake_rvp/Makefile.inc b/src/mainboard/intel/apollolake_rvp/Makefile.inc
index b2350b9..37b198e 100644
--- a/src/mainboard/intel/apollolake_rvp/Makefile.inc
+++ b/src/mainboard/intel/apollolake_rvp/Makefile.inc
@@ -1,3 +1,2 @@
-bootblock-$(CONFIG_LPC_TPM) += bootblock.c
-
+#Nothing here yet
diff --git a/src/mainboard/intel/apollolake_rvp/bootblock.c b/src/mainboard/intel/apollolake_rvp/bootblock.c
deleted file mode 100644
index d075336..0000000
--- a/src/mainboard/intel/apollolake_rvp/bootblock.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2016 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; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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 <bootblock_common.h>
-#include <soc/gpio.h>
-
-static const struct pad_config tpm_spi_configs[] = {
- PAD_CFG_NF(GPIO_106, NATIVE, DEEP, NF3), /* FST_SPI_CS2_N */
-};
-
-static void tpm_enable(void)
-{
- /* Configure gpios */
- gpio_configure_pads(tpm_spi_configs, ARRAY_SIZE(tpm_spi_configs));
-}
-
-void bootblock_mainboard_init(void) {
- if (IS_ENABLED(CONFIG_LPC_TPM))
- tpm_enable();
-}
diff --git a/src/soc/intel/apollolake/bootblock/bootblock.c b/src/soc/intel/apollolake/bootblock/bootblock.c
index c655714..be07776 100644
--- a/src/soc/intel/apollolake/bootblock/bootblock.c
+++ b/src/soc/intel/apollolake/bootblock/bootblock.c
@@ -19,10 +19,21 @@
#include <device/pci.h>
#include <soc/bootblock.h>
#include <soc/cpu.h>
+#include <soc/gpio.h>
#include <soc/northbridge.h>
#include <soc/pci_devs.h>
#include <soc/uart.h>
+static const struct pad_config tpm_spi_configs[] = {
+ PAD_CFG_NF(GPIO_106, NATIVE, DEEP, NF3), /* FST_SPI_CS2_N */
+};
+
+static void tpm_enable(void)
+{
+ /* Configure gpios */
+ gpio_configure_pads(tpm_spi_configs, ARRAY_SIZE(tpm_spi_configs));
+}
+
void asmlinkage bootblock_c_entry(void)
{
device_t dev = NB_DEV_ROOT;
@@ -45,4 +56,7 @@ void bootblock_soc_early_init(void)
/* Prepare UART for serial console. */
if (IS_ENABLED(CONFIG_SOC_UART_DEBUG))
soc_console_uart_init();
+
+ if (IS_ENABLED(CONFIG_LPC_TPM))
+ tpm_enable();
}
Andrey Petrov (andrey.petrov(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14095
-gerrit
commit cff753c04adfaa0cff3a142faf7ff53cc517ee32
Author: Andrey Petrov <andrey.petrov(a)intel.com>
Date: Sat Apr 23 13:15:51 2016 -0700
soc/intel/apollolake: enable RAM cache for cbmem region in ramstage
Use postcar infrastructure to enable caching of area where ramstage
runs.
Change-Id: I3f2f6e82f3b9060c7350ddff754cd3dbcf457671
Signed-off-by: Andrey Petrov <andrey.petrov(a)intel.com>
---
src/soc/intel/apollolake/romstage.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/soc/intel/apollolake/romstage.c b/src/soc/intel/apollolake/romstage.c
index 1c016a0..26a5beb 100644
--- a/src/soc/intel/apollolake/romstage.c
+++ b/src/soc/intel/apollolake/romstage.c
@@ -16,12 +16,14 @@
* GNU General Public License for more details.
*/
+#include <assert.h>
#include <arch/cpu.h>
#include <arch/io.h>
#include <arch/symbols.h>
#include <cbfs.h>
#include <cbmem.h>
#include <console/console.h>
+#include <cpu/x86/mtrr.h>
#include <device/pci_def.h>
#include <device/device.h>
#include <fsp/api.h>
@@ -109,6 +111,7 @@ asmlinkage void car_stage_entry(void)
struct range_entry fsp_mem, reg_car;
struct postcar_frame pcf;
size_t mrc_data_size;
+ uintptr_t top_of_ram;
printk(BIOS_DEBUG, "Starting romstage...\n");
@@ -150,6 +153,16 @@ asmlinkage void car_stage_entry(void)
if (postcar_frame_init(&pcf, 1*KiB))
die("Unable to initialize postcar frame.\n");
+ /*
+ * We need to make sure ramstage will be run cached. At this point exact
+ * location of ramstage in cbmem is not known. Instruct postcar to cache
+ * 16 megs under cbmem top which is a safe bet to cover ramstage.
+ */
+ top_of_ram = (uintptr_t) cbmem_top();
+ /* cbmem_top() needs to be at least 16 MiB aligned */
+ assert(ALIGN_DOWN(top_of_ram, 16*MiB) == top_of_ram);
+ postcar_frame_add_mtrr(&pcf, top_of_ram - 16*MiB, 16*MiB, MTRR_TYPE_WRBACK);
+
run_postcar_phase(&pcf);
}
Timothy Pearson (tpearson(a)raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14457
-gerrit
commit 78a70b45afc0b5e4dc147bf5e8e98bc58b5db52e
Author: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Date: Thu Apr 21 17:06:37 2016 -0500
board_status/to-wiki: Indicate age of test results by background color
A major issue with the board-status Wiki page is that it shows all
test results equally regardless of age. As a test result ages it
becomes more likely that the board no longer works peroperly under
coreboot due to code churn.
Visually indicate board-test status "at a glance" by smoothly fading
the background color of the test result from green to yellow as the
test result ages. This patch sets the full yellow transition to 255
days after test for programming convenience, however the number of
days required to fully "stale" a test result could be modified
relatively easily.
Change-Id: I5a076a6cc17d53fda8e4681e38074fc1f46c0e12
Signed-off-by: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
---
util/board_status/to-wiki/towiki.sh | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/util/board_status/to-wiki/towiki.sh b/util/board_status/to-wiki/towiki.sh
index 9cf8a3c..d9ec064 100755
--- a/util/board_status/to-wiki/towiki.sh
+++ b/util/board_status/to-wiki/towiki.sh
@@ -412,7 +412,23 @@ EOF
if [ -z "$lastgood" ]; then
echo "| style=\"background:red\" | Unknown"
else
- echo "| style=\"background:lime\" | [[#$vendor/$board|$lastgood]]"
+ lastgood_diff=0
+ lastgood_ts=$(date -d "$lastgood" "+%s")
+ if [ "$lastgood_ts" != "" ]; then
+ current_ts=$(date "+%s")
+ if [ "$lastgood_ts" -lt "$current_ts" ]; then
+ lastgood_diff=$(( current_ts - lastgood_ts ))
+ # Convert seconds to days
+ lastgood_diff=$(( lastgood_diff / 86400 ))
+ # Set maximum age at 255 days for convenience of code
+ if [ $lastgood_diff -gt 255 ]; then
+ lastgood_diff=255
+ fi
+ fi
+ fi
+ lastgood_diff_hex=$(echo "obase=16; $lastgood_diff" | bc)
+ cell_bgcolor="#${lastgood_diff_hex}ff00"
+ echo "| style=\"background:${cell_bgcolor}\" | [[#$vendor/$board|$lastgood]]"
fi
echo "| $northbridge_nice"
Timothy Pearson (tpearson(a)raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14457
-gerrit
commit 233432a814120e77cda4b763fcec9194d1167d5a
Author: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Date: Thu Apr 21 17:06:37 2016 -0500
board_status/to-wiki: Indicate age of test results by background color
A major issue with the board-status Wiki page is that it shows all
test results equally regardless of age. As a test result ages it
becomes more likely that the board no longer works peroperly under
coreboot due to code churn.
Visually indicate board-test status "at a glance" by smoothly fading
the background color of the test result from green to yellow as the
test result ages. This patch sets the full red transition to 255
days after test for programming convenience, however the number of
days required to fully "stale" a test result could be modified
relatively easily.
Change-Id: I5a076a6cc17d53fda8e4681e38074fc1f46c0e12
Signed-off-by: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
---
util/board_status/to-wiki/towiki.sh | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/util/board_status/to-wiki/towiki.sh b/util/board_status/to-wiki/towiki.sh
index 9cf8a3c..d9ec064 100755
--- a/util/board_status/to-wiki/towiki.sh
+++ b/util/board_status/to-wiki/towiki.sh
@@ -412,7 +412,23 @@ EOF
if [ -z "$lastgood" ]; then
echo "| style=\"background:red\" | Unknown"
else
- echo "| style=\"background:lime\" | [[#$vendor/$board|$lastgood]]"
+ lastgood_diff=0
+ lastgood_ts=$(date -d "$lastgood" "+%s")
+ if [ "$lastgood_ts" != "" ]; then
+ current_ts=$(date "+%s")
+ if [ "$lastgood_ts" -lt "$current_ts" ]; then
+ lastgood_diff=$(( current_ts - lastgood_ts ))
+ # Convert seconds to days
+ lastgood_diff=$(( lastgood_diff / 86400 ))
+ # Set maximum age at 255 days for convenience of code
+ if [ $lastgood_diff -gt 255 ]; then
+ lastgood_diff=255
+ fi
+ fi
+ fi
+ lastgood_diff_hex=$(echo "obase=16; $lastgood_diff" | bc)
+ cell_bgcolor="#${lastgood_diff_hex}ff00"
+ echo "| style=\"background:${cell_bgcolor}\" | [[#$vendor/$board|$lastgood]]"
fi
echo "| $northbridge_nice"