Andrey Petrov (andrey.petrov(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13799
-gerrit
commit 5e32e293a75ee6d31c9761c66647c7e8e9294555
Author: Andrey Petrov <andrey.petrov(a)intel.com>
Date: Thu Feb 25 14:17:45 2016 -0800
drivers/intel/fsp2_0: Add SiliconInit API
This adds SiliconInit API that is needed to be called after memory
has been trained. This call is needed to let the blob do various
initialisations of IP blocks.
Change-Id: I35e02f22174c8392e55ac869265a19c4309932e5
Signed-off-by: Andrey Petrov <andrey.petrov(a)intel.com>
---
src/drivers/intel/fsp2_0/silicon_init.c | 59 +++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/src/drivers/intel/fsp2_0/silicon_init.c b/src/drivers/intel/fsp2_0/silicon_init.c
new file mode 100644
index 0000000..b9c16b0
--- /dev/null
+++ b/src/drivers/intel/fsp2_0/silicon_init.c
@@ -0,0 +1,59 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2015 Intel Corp.
+ * (Written by Andrey Petrov <andrey.petrov(a)intel.com> for 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.
+ */
+
+#include <arch/cpu.h>
+#include <cbfs.h>
+#include <console/console.h>
+#include <fsp/api.h>
+#include <fsp/util.h>
+#include <string.h>
+
+struct fsp_header fsps_hdr;
+
+typedef asmlinkage enum fsp_status (*fsp_silicon_init_fn)
+ (void *silicon_upd);
+
+static enum fsp_status do_silicon_init(struct fsp_header *hdr)
+{
+ struct FSPS_UPD upd, *supd;
+ fsp_silicon_init_fn silicon_init;
+ enum fsp_status status;
+
+ /* Our header we are compiled with is out of sync with the blob */
+ if (hdr->cfg_region_size > sizeof(upd)) {
+ printk(BIOS_ERR, "FSPS UPD is bigger than the header.\n");
+ return FSP_OUT_OF_RESOURCES;
+ }
+
+ supd = (struct FSPS_UPD *) (hdr->cfg_region_offset + hdr->image_base);
+ memcpy(&upd, supd, sizeof(upd));
+
+ /* Give SoC/mainboard a chance to populate entries */
+ platform_fsp_silicon_init_params_cb(&upd);
+
+ silicon_init = (void *) (hdr->image_base +
+ hdr->silicon_init_entry_offset);
+
+ status = silicon_init(&upd);
+ printk(BIOS_DEBUG, "FspSiliconInit returned 0x%08x\n", status);
+ return status;
+}
+
+enum fsp_status fsp_silicon_init(struct range_entry *range)
+{
+ /* Load FSP-S and save FSP header. We will need it for Notify */
+ /* TODO: do not hardcode CBFS file names */
+ if (fsp_load_binary(&fsps_hdr, "blobs/fsps.bin", range) != CB_SUCCESS)
+ return FSP_NOT_FOUND;
+
+ return do_silicon_init(&fsps_hdr);
+}
the following patch was just integrated into master:
commit 42f42ff4501cf0ec345b7f9a3c850934e6f04c00
Author: Vladimir Serbinenko <phcoder(a)gmail.com>
Date: Fri Mar 4 09:31:14 2016 +0100
Hide EC_GOOGLE_CHROMEEC_SPI_BUS.
It's mobo architecture, not a user-adjustable setting.
Change-Id: I8bb81638f391cf0ba880801e4707d8f0957897c8
Signed-off-by: Vladimir Serbinenko <phcoder(a)gmail.com>
Reviewed-on: https://review.coreboot.org/13906
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth(a)google.com>
See https://review.coreboot.org/13906 for details.
-gerrit
the following patch was just integrated into master:
commit ca1b2d19a9ba4363fa0586c9d23602a712fc27ea
Author: Vladimir Serbinenko <phcoder(a)gmail.com>
Date: Fri Mar 4 09:29:50 2016 +0100
lz4_wrapper: Use __asm__ rather than asm.
__asm__ is more robust to compilation flags.
Change-Id: Ic7ca6e38ddd439dcfc4a62ef272ecea62416b4be
Signed-off-by: Vladimir Serbinenko <phcoder(a)gmail.com>
Reviewed-on: https://review.coreboot.org/13905
Tested-by: build bot (Jenkins)
Reviewed-by: Julius Werner <jwerner(a)chromium.org>
See https://review.coreboot.org/13905 for details.
-gerrit
the following patch was just integrated into master:
commit d51a0896c6c0e995b6a60ee322e04d311bb4b031
Author: Vladimir Serbinenko <phcoder(a)gmail.com>
Date: Fri Mar 4 09:20:20 2016 +0100
Kconfig: hide useless options on ARM.
Those options have no effect or lead to compile error on ARM due
to fundamental incompatibilities. Add proper "depends on" clauses
to hide them.
Change-Id: I860fbd331439c25efd8aa92023195fda3add2e2c
Signed-off-by: Vladimir Serbinenko <phcoder(a)gmail.com>
Reviewed-on: https://review.coreboot.org/13904
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth(a)google.com>
See https://review.coreboot.org/13904 for details.
-gerrit
Andrey Petrov (andrey.petrov(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13861
-gerrit
commit cd5865118eb0689b247163f3011b516e06042802
Author: Andrey Petrov <andrey.petrov(a)intel.com>
Date: Sun Feb 28 22:37:15 2016 -0800
arch/x86: Add common assembly code for stages that run in CAR
This adds a few assembly lines that are generic enough to be shared
between romstage and verstage that are ran in CAR. The GDT reload
is bypassed and the stack is reloaded with the CAR stack defined
in car.ld. The entry point for all those stages is car_stage_entry().
Change-Id: Ie7ef6a02f62627f29a109126d08c68176075bd67
Signed-off-by: Andrey Petrov <andrey.petrov(a)intel.com>
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/arch/x86/assembly_entry.S | 38 +++++++++++++++++++++++++++++++++++++-
src/arch/x86/include/arch/cpu.h | 9 +++++++++
2 files changed, 46 insertions(+), 1 deletion(-)
diff --git a/src/arch/x86/assembly_entry.S b/src/arch/x86/assembly_entry.S
index 01e91b0..e4d166c 100644
--- a/src/arch/x86/assembly_entry.S
+++ b/src/arch/x86/assembly_entry.S
@@ -1,7 +1,8 @@
/*
* This file is part of the coreboot project.
*
- * Copyright 2015 Google Inc.
+ * Copyright 2016 Google Inc.
+ * 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
@@ -13,6 +14,8 @@
* GNU General Public License for more details.
*/
+#if !IS_ENABLED(CONFIG_C_ENVIRONMENT_BOOTBLOCK)
+
/* This file assembles the start of the romstage program by the order of the
* includes. Thus, it's extremely important that one pays very careful
* attention to the order of the includes. */
@@ -31,3 +34,36 @@
* cache-as-ram setup files would be here.
*/
#include <generated/assembly.inc>
+
+#else
+
+/*
+ * This path is for stages that post bootblock when employing
+ * CONFIG_C_ENVIRONMENT_BOOTBLOCK. There's no need to re-load the gdt, etc
+ * as all those settings are cached within the processor. In order to
+ * continue with C code execution one needs to set stack pointer and clear
+ * CAR_GLOBAL variables that are stage specific.
+ */
+.section ".text._start", "ax", @progbits
+.global _start
+_start:
+
+ /* reset stack pointer to CAR stack */
+ mov $_car_stack_end, %esp
+
+ /* clear CAR_GLOBAL area as it is not shared */
+ cld
+ xor %eax, %eax
+ movl $(_car_global_end), %ecx
+ movl $(_car_global_start), %edi
+ sub %edi, %ecx
+ rep stosl
+
+ jmp car_stage_entry
+
+/* This is here for linking purposes. */
+.weak car_stage_entry
+car_stage_entry:
+1:
+ jmp 1b
+#endif
diff --git a/src/arch/x86/include/arch/cpu.h b/src/arch/x86/include/arch/cpu.h
index 408fa15..f50901f 100644
--- a/src/arch/x86/include/arch/cpu.h
+++ b/src/arch/x86/include/arch/cpu.h
@@ -239,4 +239,13 @@ static inline void get_fms(struct cpuinfo_x86 *c, uint32_t tfms)
#define asmlinkage __attribute__((regparm(0)))
#define alwaysinline inline __attribute__((always_inline))
+#ifndef __ROMCC__
+/*
+ * When using CONFIG_C_ENVIRONMENT_BOOTBLOCK the car_stage_entry()
+ * is the symbol jumped to for each stage after bootblock using
+ * cache-as-ram.
+ */
+void asmlinkage car_stage_entry(void);
+#endif
+
#endif /* ARCH_CPU_H */
the following patch was just integrated into master:
commit ab8f923f5372baeacbf1d97c2a44446b0f9d0ddd
Author: Martin Roth <martinroth(a)google.com>
Date: Tue Jan 5 16:14:12 2016 -0700
toolchain.inc: test IASL by version string instead of number
Test that the coreboot toolchain version of IASL is being used by
looking for the string 'coreboot toolchain' instead of a specific
version number. While this may cause people to have to rebuild
their toolchains again now, it helps to prevent toolchain failures
when bisecting in the future.
Change-Id: I9913eeae8f29ddc3ec8c70077c05d898595eb283
Signed-off-by: Martin Roth <martinroth(a)google.com>
Reviewed-on: https://review.coreboot.org/12847
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See https://review.coreboot.org/12847 for details.
-gerrit