Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11465
-gerrit
commit fafe131d3045d495f672f5e33b99a0cef22442ea
Author: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Date: Sat Aug 29 18:53:43 2015 -0700
UNTESTED: drivers/intel/fsp1_1: Take platform ID as a string, not integers
The platform ID is an 8 character ASCII string, so our config should
take it in as a string, rather than a set of two 32-bit integers.
Change-Id: I76da85fab59fe4891fbc3b5edf430f2791b70ffb
Signed-off-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
---
src/drivers/intel/fsp1_1/Kconfig | 14 ++++----------
src/drivers/intel/fsp1_1/fsp_util.c | 11 +++++++++--
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/src/drivers/intel/fsp1_1/Kconfig b/src/drivers/intel/fsp1_1/Kconfig
index af5920b..2d25b04 100644
--- a/src/drivers/intel/fsp1_1/Kconfig
+++ b/src/drivers/intel/fsp1_1/Kconfig
@@ -50,17 +50,11 @@ config FSP_FILE
help
The path and filename of the Intel FSP binary for this platform.
-config FSP_IMAGE_ID_DWORD0
- hex "First 4 bytes of 8 byte platform string"
+config FSP_IMAGE_ID_STRING
+ string "8 byte platform string identtifying the FSP platform"
help
- The first four bytes of the eight byte platform specific string
- used to identify the FSP binary that should be used.
-
-config FSP_IMAGE_ID_DWORD1
- hex "Second 4 bytes of 8 byte platform string"
- help
- The second four bytes of the eight byte platform specific string
- used to identify the FSP binary that should be used.
+ 8 ASCII character byte signature string that will help match the FSP
+ binary to a supported hardware configuration.
config FSP_INCLUDE_PATH
string "Path for FSP specific include files"
diff --git a/src/drivers/intel/fsp1_1/fsp_util.c b/src/drivers/intel/fsp1_1/fsp_util.c
index 09d1286..cb58d27 100644
--- a/src/drivers/intel/fsp1_1/fsp_util.c
+++ b/src/drivers/intel/fsp1_1/fsp_util.c
@@ -36,6 +36,13 @@ FSP_INFO_HEADER *find_fsp(void)
u8 *u8;
u32 u32;
} fsp_ptr;
+ static const union {
+ char str_id[8];
+ u32 int_id[2];
+ } fsp_id = {
+ .str_id = CONFIG_FSP_IMAGE_ID_STRING
+ };
+
u32 *image_id;
for (;;) {
@@ -87,8 +94,8 @@ FSP_INFO_HEADER *find_fsp(void)
/* Verify the FSP ID */
image_id = (u32 *)&fsp_ptr.fih->ImageId[0];
- if ((image_id[0] != CONFIG_FSP_IMAGE_ID_DWORD0)
- || (image_id[1] != CONFIG_FSP_IMAGE_ID_DWORD1))
+ if ((image_id[0] != fsp_id.int_id[0])
+ || (image_id[1] != fsp_id.int_id[1]))
fsp_ptr.u8 = (u8 *)ERROR_FSP_SIG_MISMATCH;
break;
}
Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11463
-gerrit
commit 5e28e23e5508b40c296cf976166e5ebd59a9cb1c
Author: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Date: Sat Aug 29 14:34:25 2015 -0700
UNTESTED: drivers/intel/fsp1_1: Do no run microcode updates via FSP
Our bootblock already upgrades the CPU microcode before any call to
FSP. As a result, the FSP microcode update will be a no-op.
THIS IS TRUE FOR THE BSP. UNTESTED ON APs.
Since we have to pass the microcode location to FSP via a stack,
before CAR, this stack exists in flash, and needs the location
hardcoded. If we remove this limitation, then we no longer need to
hardcode the location of the microcode, and can use the standard
rules for adding microcode.
DO NOT MERGE: THIS HAS NOT BEEN TESTED ON REAL HARDWARE.
FSP DOCUMENTATION SAYS IT WILL NOT UPGRADE MICROCODE IF A VALID
MICROCODE UPDATE IS NOT FOUND, BUT IT IS UNCLEAR IF THE FSP
TempRamInit WILL FAIL OR NOT UNDER THESE CONDITIONS.
NEEDSTEST.
NOTFORMERGE!!!!
Change-Id: I47d11061a1cfb741a633102225b63715d1bfd382
Signed-off-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
---
src/drivers/intel/fsp1_1/Kconfig | 13 -------------
src/drivers/intel/fsp1_1/cache_as_ram.inc | 4 ++--
src/soc/intel/braswell/microcode/Makefile.inc | 11 -----------
src/soc/intel/skylake/microcode/Makefile.inc | 11 -----------
4 files changed, 2 insertions(+), 37 deletions(-)
diff --git a/src/drivers/intel/fsp1_1/Kconfig b/src/drivers/intel/fsp1_1/Kconfig
index 42c42c0..af5920b 100644
--- a/src/drivers/intel/fsp1_1/Kconfig
+++ b/src/drivers/intel/fsp1_1/Kconfig
@@ -45,19 +45,6 @@ config HAVE_FSP_BIN
if HAVE_FSP_BIN
-config CPU_MICROCODE_CBFS_LEN
- hex "Microcode update region length in bytes"
- default 0
- help
- The length in bytes of the microcode update region.
-
-config CPU_MICROCODE_CBFS_LOC
- hex "Microcode update base address in CBFS"
- default 0
- help
- The location (base address) in CBFS that contains the microcode update
- binary.
-
config FSP_FILE
string "Intel FSP binary path and filename"
help
diff --git a/src/drivers/intel/fsp1_1/cache_as_ram.inc b/src/drivers/intel/fsp1_1/cache_as_ram.inc
index 6af30ce..1d35b14 100644
--- a/src/drivers/intel/fsp1_1/cache_as_ram.inc
+++ b/src/drivers/intel/fsp1_1/cache_as_ram.inc
@@ -344,8 +344,8 @@ fake_fsp_stack:
.long find_fsp_ret
CAR_init_params:
- .long CONFIG_CPU_MICROCODE_CBFS_LOC /* Microcode Location */
- .long CONFIG_CPU_MICROCODE_CBFS_LEN /* Microcode Length */
+ .long 0 /* Microcode Location */
+ .long 0 /* Microcode Length */
.long 0xFFFFFFFF - CONFIG_CBFS_SIZE + 1 /* Firmware Location */
.long CONFIG_CBFS_SIZE /* Total Firmware Length */
diff --git a/src/soc/intel/braswell/microcode/Makefile.inc b/src/soc/intel/braswell/microcode/Makefile.inc
index da25b8b..3497328 100644
--- a/src/soc/intel/braswell/microcode/Makefile.inc
+++ b/src/soc/intel/braswell/microcode/Makefile.inc
@@ -1,13 +1,2 @@
# Add CPU uCode source to list of files to build.
cpu_microcode-y += microcode_blob.c
-
-# This section overrides the default build process for the microcode to place
-# it at a known location in the CBFS. This only needs to be enabled if FSP is
-# being used.
-# Define the correct offset for the file in CBFS
-fsp_ucode_cbfs_base = $(CONFIG_CPU_MICROCODE_CBFS_LOC)
-
-# Override the location that was supplied by the core code.
-add-cpu-microcode-to-cbfs = \
- $(CBFSTOOL) $(1) add -n $(cpu_ucode_cbfs_name) -f $(cpu_ucode_cbfs_file) -t microcode -b $(fsp_ucode_cbfs_base)
-
diff --git a/src/soc/intel/skylake/microcode/Makefile.inc b/src/soc/intel/skylake/microcode/Makefile.inc
index a5e8981..ba308f6 100644
--- a/src/soc/intel/skylake/microcode/Makefile.inc
+++ b/src/soc/intel/skylake/microcode/Makefile.inc
@@ -1,13 +1,2 @@
# Add CPU uCode source to list of files to build.
cpu_microcode-$(CONFIG_CPU_MICROCODE_CBFS_GENERATE) += microcode_blob.c
-
-# This section overrides the default build process for the microcode to place
-# it at a known location in the CBFS. This only needs to be enabled if FSP is
-# being used.
-# Define the correct offset for the file in CBFS
-fsp_ucode_cbfs_base = $(CONFIG_CPU_MICROCODE_CBFS_LOC)
-
-# Override the location that was supplied by the core code.
-add-cpu-microcode-to-cbfs = \
- $(CBFSTOOL) $(1) add -n $(cpu_ucode_cbfs_name) -f $(cpu_ucode_cbfs_file) -t microcode -b $(fsp_ucode_cbfs_base)
-
the following patch was just integrated into master:
commit 1cb1c924c58d952ae197ba1508d0dc7c9bfda0b4
Author: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Date: Sat Aug 29 19:08:28 2015 -0700
soc/intel/braswell/Kconfig: Remove ENABLE_MRC_CACHE Kconfig
This option was removed in the following commit:
* 80f5d5b fsp1_1: remove duplicate mrc caching mechanism
Change-Id: I08ef4fc6029cc066e4f7b9c82b6b187a9794afdb
Signed-off-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Reviewed-on: http://review.coreboot.org/11462
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See http://review.coreboot.org/11462 for details.
-gerrit
the following patch was just integrated into master:
commit 681012ab3d500bcbda3971d122e60587133df1cd
Author: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Date: Sat Aug 29 17:48:01 2015 -0700
drivers/intel/fsp_1_1: Remove useless #ifndef/#error pairs
The #error messages only say that "CONFIG_* must be defined", which
conveys no more information that the compiler or assembler failing
when it encounters an undefined CONFIG_* symbol.
Change-Id: I6058474d4cd454cfc20290650425d379f388abd9
Signed-off-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Reviewed-on: http://review.coreboot.org/11461
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See http://review.coreboot.org/11461 for details.
-gerrit
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11468
-gerrit
commit 8559b9328f77a7e9eb8811c21e4c9133581a1e33
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Sun Aug 30 15:41:54 2015 -0500
armv7/arm64: remove timestamp.c
The src/lib/timestamp.c already has an implementation using
timer_monotonic_get() for timestamp_get(). Use that instead
of duplicating the logic.
BUG=chrome-os-partner:44669
BRANCH=None
TEST=None
Change-Id: If17be86143f217445bd64d67ceee4355fa482d39
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/arch/arm/armv7/Makefile.inc | 6 ------
src/arch/arm/armv7/timestamp.c | 28 ----------------------------
src/arch/arm64/Makefile.inc | 5 -----
src/arch/arm64/timestamp.c | 28 ----------------------------
4 files changed, 67 deletions(-)
diff --git a/src/arch/arm/armv7/Makefile.inc b/src/arch/arm/armv7/Makefile.inc
index a46ef87..089ef79 100644
--- a/src/arch/arm/armv7/Makefile.inc
+++ b/src/arch/arm/armv7/Makefile.inc
@@ -59,8 +59,6 @@ bootblock-y += cache_m.c
endif # CONFIG_ARCH_BOOTBLOCK_ARMV7
-bootblock-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
-
################################################################################
## verification stage
################################################################################
@@ -85,8 +83,6 @@ verstage-S-ccopts += $(armv7-m_asm_flags)
endif # CONFIG_ARCH_VERSTAGE_ARMV7_M
-verstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
-
################################################################################
## ROM stage
################################################################################
@@ -96,7 +92,6 @@ romstage-y += cpu.S
romstage-y += exception.c
romstage-y += exception_asm.S
romstage-y += mmu.c
-romstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
romstage-c-ccopts += $(armv7-a_flags)
romstage-S-ccopts += $(armv7-a_asm_flags)
@@ -117,7 +112,6 @@ ramstage-y += cpu.S
ramstage-y += exception.c
ramstage-y += exception_asm.S
ramstage-y += mmu.c
-ramstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
ramstage-c-ccopts += $(armv7-a_flags)
ramstage-S-ccopts += $(armv7-a_asm_flags)
diff --git a/src/arch/arm/armv7/timestamp.c b/src/arch/arm/armv7/timestamp.c
deleted file mode 100644
index 1b3138f..0000000
--- a/src/arch/arm/armv7/timestamp.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2013 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc.
- */
-
-#include <timestamp.h>
-#include <timer.h>
-
-uint64_t timestamp_get(void)
-{
- struct mono_time timestamp;
- timer_monotonic_get(×tamp);
- return (uint64_t)timestamp.microseconds;
-}
diff --git a/src/arch/arm64/Makefile.inc b/src/arch/arm64/Makefile.inc
index 3e14f8b..a625c7a 100644
--- a/src/arch/arm64/Makefile.inc
+++ b/src/arch/arm64/Makefile.inc
@@ -64,7 +64,6 @@ bootblock-y += cpu-stubs.c
bootblock-y += stages.c
bootblock-y += eabi_compat.c
bootblock-y += transition.c transition_asm.S
-bootblock-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
bootblock-y += memset.S
bootblock-y += memcpy.S
@@ -95,7 +94,6 @@ verstage-y += ../../lib/memset.c
verstage-y += ../../lib/memcpy.c
verstage-y += ../../lib/memmove.c
verstage-y += stages.c
-verstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
endif # CONFIG_ARCH_VERSTAGE_ARM64
@@ -115,7 +113,6 @@ romstage-y += eabi_compat.c
romstage-y += memset.S
romstage-y += memcpy.S
romstage-y += memmove.S
-romstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
romstage-y += transition.c transition_asm.S
rmodules_arm64-y += memset.S
@@ -169,8 +166,6 @@ secmon-y += memset.S
secmon-y += memmove.S
secmon-y += memcpy.S
-ramstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
-
ramstage-srcs += $(wildcard src/mainboard/$(MAINBOARDDIR)/mainboard.c)
# Build the ramstage
diff --git a/src/arch/arm64/timestamp.c b/src/arch/arm64/timestamp.c
deleted file mode 100644
index 2962c7f..0000000
--- a/src/arch/arm64/timestamp.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2014 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc.
- */
-
-#include <timestamp.h>
-#include <timer.h>
-
-uint64_t timestamp_get(void)
-{
- struct mono_time timestamp;
- timer_monotonic_get(×tamp);
- return (uint64_t)timestamp.microseconds;
-}