Antonello Dettori (dev(a)dettori.io) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13937
-gerrit
commit 1277de084bb75874953a4a16bf83e9c3a905d967
Author: Antonello Dettori <dev(a)dettori.io>
Date: Mon Mar 7 23:56:57 2016 +0000
payloads/seabios: Add "git revision" to the SeaBIOS version menu
Adds an option to specify a git revision from which to build SeaBIOS.
Change-Id: Ifbf3b82e784f79395ab7cd07c5804f72928d7640
Signed-off-by: Antonello Dettori <dev(a)dettori.io>
---
payloads/external/Makefile.inc | 2 ++
payloads/external/SeaBIOS/Kconfig | 16 ++++++++++++++++
payloads/external/SeaBIOS/Makefile.inc | 7 +++++++
3 files changed, 25 insertions(+)
diff --git a/payloads/external/Makefile.inc b/payloads/external/Makefile.inc
index 557de2a..5eb1062 100644
--- a/payloads/external/Makefile.inc
+++ b/payloads/external/Makefile.inc
@@ -45,6 +45,8 @@ seabios:
AS="$(AS_x86_32)" IASL="$(IASL)" \
CONFIG_SEABIOS_MASTER=$(CONFIG_SEABIOS_MASTER) \
CONFIG_SEABIOS_STABLE=$(CONFIG_SEABIOS_STABLE) \
+ CONFIG_SEABIOS_REVISION=$(CONFIG_SEABIOS_REVISION) \
+ CONFIG_SEABIOS_REVISION_ID=$(CONFIG_SEABIOS_REVISION_ID) \
CONFIG_PAYLOAD_CONFIGFILE=$(CONFIG_PAYLOAD_CONFIGFILE) \
CONFIG_SEABIOS_THREAD_OPTIONROMS=$(CONFIG_SEABIOS_THREAD_OPTIONROMS) \
CONFIG_SEABIOS_VGA_COREBOOT=$(CONFIG_SEABIOS_VGA_COREBOOT) \
diff --git a/payloads/external/SeaBIOS/Kconfig b/payloads/external/SeaBIOS/Kconfig
index 70f5ce2..8a8d931 100644
--- a/payloads/external/SeaBIOS/Kconfig
+++ b/payloads/external/SeaBIOS/Kconfig
@@ -12,9 +12,25 @@ config SEABIOS_MASTER
bool "master"
help
Newest SeaBIOS version
+config SEABIOS_REVISION
+ bool "git revision"
+ help
+ Select this option if you have a specific commit or branch
+ that you want to use as the revision from which to
+ build SeaBIOS.
+
+ You will be able to specify the name of a branch or a commit id
+ later.
endchoice
+config SEABIOS_REVISION_ID
+ string "Insert a commit's SHA-1 or a branch name"
+ depends on SEABIOS_REVISION
+ default "origin/master"
+ help
+ The commit's SHA-1 or branch name of the revision to use.
+
config SEABIOS_PS2_TIMEOUT
prompt "PS/2 keyboard controller initialization timeout (milliseconds)"
default 0
diff --git a/payloads/external/SeaBIOS/Makefile.inc b/payloads/external/SeaBIOS/Makefile.inc
index e478a09..a722eed 100644
--- a/payloads/external/SeaBIOS/Makefile.inc
+++ b/payloads/external/SeaBIOS/Makefile.inc
@@ -1,5 +1,6 @@
TAG-$(CONFIG_SEABIOS_MASTER)=origin/master
TAG-$(CONFIG_SEABIOS_STABLE)=01a84bea2d28a19d2405c1ecac4bdef17683cc0c
+TAG-$(CONFIG_SEABIOS_REVISION)=$(CONFIG_SEABIOS_REVISION_ID)
unexport KCONFIG_AUTOHEADER
unexport KCONFIG_AUTOCONFIG
@@ -31,6 +32,12 @@ ifeq ($(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250IO),yy)
else
echo "# CONFIG_DEBUG_SERIAL is not set" >> seabios/.config
endif
+ifeq ($(CONFIG_SEABIOS_REVISION),y)
+ifeq ($(CONFIG_SEABIOS_REVISION_ID),)
+ echo "Error: There is no revision specified for SeaBIOS"
+ false
+endif
+endif
ifneq ($(CONFIG_SEABIOS_THREAD_OPTIONROMS),y)
echo "# CONFIG_THREAD_OPTIONROMS is not set" >> seabios/.config
endif
Antonello Dettori (dev(a)dettori.io) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13937
-gerrit
commit 400cd236fdc010a98103ed69bcf3a499cb551a2d
Author: Antonello Dettori <dev(a)dettori.io>
Date: Mon Mar 7 23:56:57 2016 +0000
payloads/seabios: Added "git revision" to the SeaBIOS version menu
Adds an option to specify a git revision from which to build SeaBIOS.
Change-Id: Ifbf3b82e784f79395ab7cd07c5804f72928d7640
Signed-off-by: Antonello Dettori <dev(a)dettori.io>
---
payloads/external/Makefile.inc | 2 ++
payloads/external/SeaBIOS/Kconfig | 16 ++++++++++++++++
payloads/external/SeaBIOS/Makefile.inc | 7 +++++++
3 files changed, 25 insertions(+)
diff --git a/payloads/external/Makefile.inc b/payloads/external/Makefile.inc
index 557de2a..5eb1062 100644
--- a/payloads/external/Makefile.inc
+++ b/payloads/external/Makefile.inc
@@ -45,6 +45,8 @@ seabios:
AS="$(AS_x86_32)" IASL="$(IASL)" \
CONFIG_SEABIOS_MASTER=$(CONFIG_SEABIOS_MASTER) \
CONFIG_SEABIOS_STABLE=$(CONFIG_SEABIOS_STABLE) \
+ CONFIG_SEABIOS_REVISION=$(CONFIG_SEABIOS_REVISION) \
+ CONFIG_SEABIOS_REVISION_ID=$(CONFIG_SEABIOS_REVISION_ID) \
CONFIG_PAYLOAD_CONFIGFILE=$(CONFIG_PAYLOAD_CONFIGFILE) \
CONFIG_SEABIOS_THREAD_OPTIONROMS=$(CONFIG_SEABIOS_THREAD_OPTIONROMS) \
CONFIG_SEABIOS_VGA_COREBOOT=$(CONFIG_SEABIOS_VGA_COREBOOT) \
diff --git a/payloads/external/SeaBIOS/Kconfig b/payloads/external/SeaBIOS/Kconfig
index 70f5ce2..8a8d931 100644
--- a/payloads/external/SeaBIOS/Kconfig
+++ b/payloads/external/SeaBIOS/Kconfig
@@ -12,9 +12,25 @@ config SEABIOS_MASTER
bool "master"
help
Newest SeaBIOS version
+config SEABIOS_REVISION
+ bool "git revision"
+ help
+ Select this option if you have a specific commit or branch
+ that you want to use as the revision from which to
+ build SeaBIOS.
+
+ You will be able to specify the name of a branch or a commit id
+ later.
endchoice
+config SEABIOS_REVISION_ID
+ string "Insert a commit's SHA-1 or a branch name"
+ depends on SEABIOS_REVISION
+ default "origin/master"
+ help
+ The commit's SHA-1 or branch name of the revision to use.
+
config SEABIOS_PS2_TIMEOUT
prompt "PS/2 keyboard controller initialization timeout (milliseconds)"
default 0
diff --git a/payloads/external/SeaBIOS/Makefile.inc b/payloads/external/SeaBIOS/Makefile.inc
index e478a09..a722eed 100644
--- a/payloads/external/SeaBIOS/Makefile.inc
+++ b/payloads/external/SeaBIOS/Makefile.inc
@@ -1,5 +1,6 @@
TAG-$(CONFIG_SEABIOS_MASTER)=origin/master
TAG-$(CONFIG_SEABIOS_STABLE)=01a84bea2d28a19d2405c1ecac4bdef17683cc0c
+TAG-$(CONFIG_SEABIOS_REVISION)=$(CONFIG_SEABIOS_REVISION_ID)
unexport KCONFIG_AUTOHEADER
unexport KCONFIG_AUTOCONFIG
@@ -31,6 +32,12 @@ ifeq ($(CONFIG_CONSOLE_SERIAL)$(CONFIG_DRIVERS_UART_8250IO),yy)
else
echo "# CONFIG_DEBUG_SERIAL is not set" >> seabios/.config
endif
+ifeq ($(CONFIG_SEABIOS_REVISION),y)
+ifeq ($(CONFIG_SEABIOS_REVISION_ID),)
+ echo "Error: There is no revision specified for SeaBIOS"
+ false
+endif
+endif
ifneq ($(CONFIG_SEABIOS_THREAD_OPTIONROMS),y)
echo "# CONFIG_THREAD_OPTIONROMS is not set" >> seabios/.config
endif
Andrey Petrov (andrey.petrov(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13800
-gerrit
commit 79e7eae6526085988773348499ac12283542f994
Author: Andrey Petrov <andrey.petrov(a)intel.com>
Date: Thu Feb 25 14:19:07 2016 -0800
drivers/intel/fsp2_0: Add Notify Phase API
This adds Notify Phase API. This is an important call that is used
to inform FSP runtimes of different stages of SoC initializations
by the coreboot.
Change-Id: Icec770d0c1c4d239adb2ef342bf6cc9c35666e4d
Signed-off-by: Andrey Petrov <andrey.petrov(a)intel.com>
---
src/drivers/intel/fsp2_0/notify.c | 40 +++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/src/drivers/intel/fsp2_0/notify.c b/src/drivers/intel/fsp2_0/notify.c
new file mode 100644
index 0000000..820bd45
--- /dev/null
+++ b/src/drivers/intel/fsp2_0/notify.c
@@ -0,0 +1,40 @@
+/*
+ * 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 <console/console.h>
+#include <fsp/api.h>
+#include <fsp/util.h>
+#include <string.h>
+
+struct fsp_notify_params {
+ enum fsp_notify_phase phase;
+};
+
+typedef asmlinkage enum fsp_status (*fsp_notify_fn)
+ (struct fsp_notify_params *);
+
+enum fsp_status fsp_notify(enum fsp_notify_phase phase)
+{
+ fsp_notify_fn fspnotify;
+ struct fsp_notify_params notify_params = { .phase = phase };
+
+ if (!fsps_hdr.silicon_init_entry_offset)
+ return FSP_NOT_FOUND;
+
+ fspnotify = (void*) (fsps_hdr.image_base +
+ fsps_hdr.notify_phase_entry_offset);
+
+ printk(BIOS_DEBUG, "FspNotify %x\n", (uint32_t) phase);
+
+ return fspnotify(¬ify_params);
+}
Andrey Petrov (andrey.petrov(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13706
-gerrit
commit 67c0b06219e4fd3d6380572bbe87c4f12333d148
Author: Andrey Petrov <andrey.petrov(a)intel.com>
Date: Fri Feb 12 15:12:43 2016 -0800
soc/intel/apollolake: Add support for memory-mapped boot media
On Apollo Lake SPI flash is memory mapped. The mapping is different
to previous platforms. Only "BIOS" region is mapped in contrast to
whole flash. Also, the 128 KiB right below 4 GiB are being decoded by
readonly SRAM. Fail accesses to those regions, rather than returning
false data.
Change-Id: Iac3fa74cd221a5a46ceb34c2a79470290bcc2d84
Signed-off-by: Andrey Petrov <andrey.petrov(a)intel.com>
---
src/mainboard/intel/apollolake_rvp/Kconfig | 9 ++++
src/soc/intel/apollolake/Kconfig | 5 ++
src/soc/intel/apollolake/Makefile.inc | 3 ++
src/soc/intel/apollolake/mmap_boot.c | 74 ++++++++++++++++++++++++++++++
4 files changed, 91 insertions(+)
diff --git a/src/mainboard/intel/apollolake_rvp/Kconfig b/src/mainboard/intel/apollolake_rvp/Kconfig
index 52d3777..9920b46 100644
--- a/src/mainboard/intel/apollolake_rvp/Kconfig
+++ b/src/mainboard/intel/apollolake_rvp/Kconfig
@@ -17,4 +17,13 @@ config MAINBOARD_VENDOR
string
default "Intel"
+config IFD_BIOS_END
+ hex
+ default 0x6FF000
+
+config IFD_BIOS_START
+ hex
+ default 0x1000
+
+
endif
diff --git a/src/soc/intel/apollolake/Kconfig b/src/soc/intel/apollolake/Kconfig
index c32b80f..2f61015 100644
--- a/src/soc/intel/apollolake/Kconfig
+++ b/src/soc/intel/apollolake/Kconfig
@@ -85,4 +85,9 @@ config C_ENV_BOOTBLOCK_SIZE
hex
default 0x8000
+# This SoC does not map SPI flash like many previous SoC. Therefore we provide
+# a custom media driver that facilitates mapping
+config X86_TOP4G_BOOTMEDIA_MAP
+ bool
+ default n
endif
diff --git a/src/soc/intel/apollolake/Makefile.inc b/src/soc/intel/apollolake/Makefile.inc
index 76fa4c7..e27fd27 100644
--- a/src/soc/intel/apollolake/Makefile.inc
+++ b/src/soc/intel/apollolake/Makefile.inc
@@ -11,6 +11,7 @@ bootblock-y += bootblock/bootblock.c
bootblock-y += bootblock/cache_as_ram.S
bootblock-y += bootblock/bootblock.c
bootblock-y += gpio.c
+bootblock-y += mmap_boot.c
bootblock-y += placeholders.c
bootblock-y += tsc_freq.c
bootblock-$(CONFIG_SOC_UART_DEBUG) += uart_early.c
@@ -18,11 +19,13 @@ bootblock-$(CONFIG_SOC_UART_DEBUG) += uart_early.c
romstage-y += placeholders.c
romstage-y += gpio.c
romstage-$(CONFIG_SOC_UART_DEBUG) += uart_early.c
+romstage-y += mmap_boot.c
smm-y += placeholders.c
ramstage-y += placeholders.c
ramstage-y += gpio.c
ramstage-$(CONFIG_SOC_UART_DEBUG) += uart_early.c
+ramstage-y += mmap_boot.c
CPPFLAGS_common += -I$(src)/soc/intel/apollolake/include
diff --git a/src/soc/intel/apollolake/mmap_boot.c b/src/soc/intel/apollolake/mmap_boot.c
new file mode 100644
index 0000000..3625924
--- /dev/null
+++ b/src/soc/intel/apollolake/mmap_boot.c
@@ -0,0 +1,74 @@
+/*
+ * 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.)
+ * (Written by Alexandru Gagniuc <alexandrux.gagniuc(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 <boot_device.h>
+#include <cbfs.h>
+#include <commonlib/region.h>
+#include <console/console.h>
+#include <fmap.h>
+
+/* The 128 KiB right below 4G are decoded by readonly SRAM, not boot media */
+#define IFD_BIOS_MAX_MAPPED (CONFIG_IFD_BIOS_END - 128 * KiB)
+#define IFD_MAPPED_SIZE (IFD_BIOS_MAX_MAPPED - CONFIG_IFD_BIOS_START)
+#define IFD_BIOS_SIZE (CONFIG_IFD_BIOS_END - CONFIG_IFD_BIOS_START)
+
+/*
+ * If Apollo Lake is configured to boot from SPI flash "BIOS" region
+ * (as defined in descriptor) is mapped below 4GiB. Form a pointer for
+ * the base.
+ */
+#define VIRTUAL_ROM_BASE ((uintptr_t)(0x100000000ULL - IFD_BIOS_SIZE))
+
+static const struct mem_region_device shadow_dev = MEM_REGION_DEV_INIT(
+ VIRTUAL_ROM_BASE, IFD_BIOS_MAX_MAPPED
+);
+
+/*
+ * This is how we translate physical SPI flash address space into CPU memory-mapped space. In
+ * essence this means "BIOS" region (usually starts at flash physical 0x1000 is mapped to
+ * 4G - IFD_BIOS_SIZE.
+ */
+static const struct xlate_region_device real_dev = XLATE_REGION_INIT(
+ &shadow_dev.rdev, CONFIG_IFD_BIOS_START,
+ IFD_MAPPED_SIZE, CONFIG_ROM_SIZE
+);
+
+const struct region_device *boot_device_ro(void)
+{
+ return &real_dev.rdev;
+}
+
+static int iafw_boot_region_properties(struct cbfs_props *props)
+{
+ struct region regn;
+
+ /* use fmap to locate CBFS area */
+ if (fmap_locate_area("COREBOOT", ®n))
+ return -1;
+
+ props->offset = region_offset(®n);
+ props->size = region_sz(®n);
+
+ printk(BIOS_DEBUG, "CBFS @ %zx size %zx\n", props->offset, props->size);
+
+ return 0;
+}
+
+/*
+ * Named cbfs_master_header_locator so that it overrides the default, but
+ * incompatible locator in cbfs.c
+ */
+const struct cbfs_locator cbfs_master_header_locator = {
+ .name = "IAFW Locator",
+ .locate = iafw_boot_region_properties,
+};