Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14211
-gerrit
commit c4c122713bfccd2b425e5fd0d0b69fa5e8e01ad3
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Thu Mar 31 12:48:30 2016 -0500
drivers/intel/fsp2_0: signal that FSP components are loaded
In order for the platform code to handle situations where
special actions are required after a piece of code is loaded
use arch_segment_loaded() to signal to the platform code
that the compoment is fully loaded into memory.
Change-Id: I119cfc9913f15eb4968fe5bf6a56589e2c53f2d1
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/drivers/intel/fsp2_0/util.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/drivers/intel/fsp2_0/util.c b/src/drivers/intel/fsp2_0/util.c
index a234a7c..c4fe8dc 100644
--- a/src/drivers/intel/fsp2_0/util.c
+++ b/src/drivers/intel/fsp2_0/util.c
@@ -17,6 +17,7 @@
#include <fsp/util.h>
#include <lib.h>
#include <memrange.h>
+#include <program_loading.h>
#include <string.h>
static bool looks_like_fsp_header(const uint8_t *raw_hdr)
@@ -130,5 +131,8 @@ enum cb_err fsp_load_binary(struct fsp_header *hdr,
if (rdev_readat(&file_data, (void *)hdr->image_base, 0, hdr->image_size) < 0)
return CB_ERR;
+ /* Signal that FSP component has been loaded. */
+ arch_segment_loaded(hdr->image_base, hdr->image_size, SEG_FINAL);
+
return CB_SUCCESS;
}
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14210
-gerrit
commit 5ad0a02a16fe04f240db9eb3a6932eaca3a455c7
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Thu Mar 31 11:38:13 2016 -0500
soc/intel/apollolake: use CAR code coherency for all CAR stages
The flush L1D to L2 operation was only being used when loading
romstage from bootblock. However, when the FSP-M component is
loaded no code coherency actions are taken. I suspect this is
because the FSP-M component is larger than the 24KiB L1D and
the entry point is early in the image. Thus, when loading
the FSP-M component the earlier part of the image if flushed
out to L2 in the process of loading the latter part of the
component. Also, once verstage is introduced the same
code coherency actions need to be taken as well. Therefore,
position the apollolake code to handle all these cases.
Change-Id: Ie71764f1b420a6072c4f149ad3e37278b6cb70e1
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/soc/intel/apollolake/Makefile.inc | 2 ++
src/soc/intel/apollolake/bootblock/bootblock.c | 9 -------
src/soc/intel/apollolake/car.c | 33 ++++++++++++++++++++++++++
3 files changed, 35 insertions(+), 9 deletions(-)
diff --git a/src/soc/intel/apollolake/Makefile.inc b/src/soc/intel/apollolake/Makefile.inc
index 41ac847..70ab515 100644
--- a/src/soc/intel/apollolake/Makefile.inc
+++ b/src/soc/intel/apollolake/Makefile.inc
@@ -11,6 +11,7 @@ subdirs-y += ../../../cpu/x86/cache
bootblock-y += bootblock/bootblock.c
bootblock-y += bootblock/cache_as_ram.S
bootblock-y += bootblock/bootblock.c
+bootblock-y += car.c
bootblock-y += gpio.c
bootblock-y += mmap_boot.c
bootblock-y += placeholders.c
@@ -18,6 +19,7 @@ bootblock-y += tsc_freq.c
bootblock-$(CONFIG_SOC_UART_DEBUG) += uart_early.c
romstage-y += placeholders.c
+romstage-y += car.c
romstage-$(CONFIG_PLATFORM_USES_FSP2_0) += romstage.c
romstage-y += gpio.c
romstage-$(CONFIG_SOC_UART_DEBUG) += uart_early.c
diff --git a/src/soc/intel/apollolake/bootblock/bootblock.c b/src/soc/intel/apollolake/bootblock/bootblock.c
index 4ea3f70..a9258e1 100644
--- a/src/soc/intel/apollolake/bootblock/bootblock.c
+++ b/src/soc/intel/apollolake/bootblock/bootblock.c
@@ -12,7 +12,6 @@
#include <arch/cpu.h>
#include <bootblock_common.h>
#include <device/pci.h>
-#include <program_loading.h>
#include <soc/bootblock.h>
#include <soc/cpu.h>
#include <soc/northbridge.h>
@@ -36,14 +35,6 @@ void asmlinkage bootblock_c_entry(void)
main();
}
-void platform_prog_run(struct prog *prog)
-{
- /* Flush L1D cache to L2 */
- msr_t msr = rdmsr(MSR_POWER_MISC);
- msr.lo |= (1 << 8);
- wrmsr(MSR_POWER_MISC, msr);
-}
-
void bootblock_soc_early_init(void)
{
/* Prepare UART for serial console. */
diff --git a/src/soc/intel/apollolake/car.c b/src/soc/intel/apollolake/car.c
new file mode 100644
index 0000000..7646865
--- /dev/null
+++ b/src/soc/intel/apollolake/car.c
@@ -0,0 +1,33 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2016 Intel Corp.
+ * Copyright 2016 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; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <arch/cpu.h>
+#include <program_loading.h>
+#include <soc/cpu.h>
+
+/*
+ * This file supports the necessary hoops one needs to jump through since
+ * early FSP component and early stages are running from cache-as-ram.
+ */
+
+static void flush_l1d_to_l2(void)
+{
+ msr_t msr = rdmsr(MSR_POWER_MISC);
+ msr.lo |= (1 << 8);
+ wrmsr(MSR_POWER_MISC, msr);
+}
+
+void platform_prog_run(struct prog *prog)
+{
+ /* Flush L1D cache to L2 */
+ flush_l1d_to_l2();
+}
the following patch was just integrated into master:
commit c00f4d669dd03bf5a4ee8c255bb71fc86f229239
Author: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Date: Wed Mar 30 13:07:47 2016 -0500
nb/amd/mct_ddr3: Clear early MCEs and report DRAM MCEs
During power on from cold (S5) state, numerous MCEs are generated
before DRAM training starts, e.g. during HT link training. Clear
these MCEs before DRAM training start, and report any MCEs generated
during DRAM training.
Change-Id: I7d047571242e5bd041e4aac22c1ec1d7d26ef0e6
Signed-off-by: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Reviewed-on: https://review.coreboot.org/14191
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth(a)google.com>
Tested-by: Raptor Engineering Automated Test Stand <noreply(a)raptorengineeringinc.com>
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
See https://review.coreboot.org/14191 for details.
-gerrit
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14194
-gerrit
commit 2e7b942c0b887110bf654f315e994af995732ddd
Author: Martin Roth <martinroth(a)google.com>
Date: Wed Mar 30 13:56:23 2016 -0600
lint/lint-stable-004-style-labels: Update script
- Look at entire tree instead of just the current commit. This was
causing the test to overlook some issues that were already in the tree.
- If git is on the system, and the code is in a git repo, use the
'git ls-files' command to find the files to examine. If those
conditions aren't met, fall back to using the find command.
- Wrap the command so it's easier to read.
Change-Id: I3dce219a29ffb1ae56a31318b995e3ba8ea43e70
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
util/lint/lint-stable-004-style-labels | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/util/lint/lint-stable-004-style-labels b/util/lint/lint-stable-004-style-labels
index f024ca1..7b68b4a 100755
--- a/util/lint/lint-stable-004-style-labels
+++ b/util/lint/lint-stable-004-style-labels
@@ -2,6 +2,7 @@
# This file is part of the coreboot project.
#
# Copyright (C) 2012 Patrick Georgi <patrick(a)georgi-clan.de>
+# Copyright (C) 2016 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
@@ -15,4 +16,15 @@
# DESCR: Check that C labels begin at start-of-line
LC_ALL=C export LC_ALL
-git diff --name-status |grep -v "^D" |cut -c3- |grep "^src/.*\.[csS]" | xargs grep -Hn '^[[:space:]][[:space:]]*[a-z][a-z]*:[[:space:]]*$' |grep -v "[^a-z_]default:"
+
+# Use git ls-files if the code is in a git repo, otherwise use find.
+if [ -n "$(command -v git)" ] && [ -d .git ]; then
+ FIND_FILES="git ls-files"
+else
+ FIND_FILES="find src"
+fi
+
+${FIND_FILES} | \
+ grep "^src/.*\.[csS]$" | \
+ xargs grep -Hn '^[[:space:]][[:space:]]*[a-z][a-z]*:[[:space:]]*$' | \
+ grep -v "[^a-z_]default:"
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14193
-gerrit
commit 2df8c503085095b6b17f3ff97e8b71d0ed7245e9
Author: Martin Roth <martinroth(a)google.com>
Date: Wed Mar 30 13:30:12 2016 -0600
src/: Fix lint style-labels warnings
The lint-stable-004-style-labels check tries to verify that labels in c
and asm files start at the first column, and don't have whitespace in
front of them.
This fixes the 2 actual violations of the lint check.
Change-Id: Ia11a90d7301e62a116c7a9ef9b4c2bc3f982b308
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
src/cpu/allwinner/a10/raminit.c | 2 +-
src/cpu/amd/family_10h-family_15h/processor_name.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/cpu/allwinner/a10/raminit.c b/src/cpu/allwinner/a10/raminit.c
index e917e6e..f3b39cb 100644
--- a/src/cpu/allwinner/a10/raminit.c
+++ b/src/cpu/allwinner/a10/raminit.c
@@ -317,7 +317,7 @@ static int dramc_scan_dll_para(void)
return dramc_scan_readpipe();
}
- fail:
+fail:
clrbits_le32(&dram->dllcr[0], 0x3f << 6);
for (cr_i = 1; cr_i < 5; cr_i++)
clrbits_le32(&dram->dllcr[cr_i], 0x4f << 14);
diff --git a/src/cpu/amd/family_10h-family_15h/processor_name.c b/src/cpu/amd/family_10h-family_15h/processor_name.c
index ac0392b..3d92ee2 100644
--- a/src/cpu/amd/family_10h-family_15h/processor_name.c
+++ b/src/cpu/amd/family_10h-family_15h/processor_name.c
@@ -340,7 +340,7 @@ int init_processor_name(void)
}
}
- done:
+done:
strcpymax(&program_string[j], processor_name_string,
sizeof(program_string) - j);
}
the following patch was just integrated into master:
commit c094d9961144871c472698c41ce634e58abb6a32
Author: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Date: Tue Mar 29 20:37:36 2016 -0500
nb/amd/mct_ddr3: Disable MCE framework during DRAM training
On Family 15h processors, with certain RDIMMs, MCEs are generated
as a normal part of DCT startup / DRAM training. Disable sync
flood on parity or UC data error until ECC has been enabled.
Change-Id: Ife54751ff127ffd59baaad35d3fea14ea01ef505
Signed-off-by: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Reviewed-on: https://review.coreboot.org/14186
Tested-by: Raptor Engineering Automated Test Stand <noreply(a)raptorengineeringinc.com>
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth(a)google.com>
See https://review.coreboot.org/14186 for details.
-gerrit