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 a83016fa3656075b46e0a144633fa237a1f4e493
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 640026a..9dcb26a 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 <fsp/api.h>
#include <fsp/util.h>
@@ -81,6 +83,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");
@@ -122,6 +125,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);
}
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 3a05d06de4ebff3a7b6780438938c2ca7c4b094c
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 640026a..9dcb26a 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 <fsp/api.h>
#include <fsp/util.h>
@@ -81,6 +83,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");
@@ -122,6 +125,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);
}
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14520
-gerrit
commit 4750ee1e2b43f8ebe04e3f43cb09a89f1f8d4500
Author: Martin Roth <martinroth(a)google.com>
Date: Tue Apr 26 09:51:41 2016 -0600
payloads: Add a stable version of Memtest86+ for reproducibility
Memtest86+ was pulling origin/master which will change over time. This
adds a commit-id as a stable version to allow it to be reproducible.
The other secondary payloads, coreinfo and nvramcui, do not need this
because they are part of the coreboot repo and not fetched from an
external source.
Change-Id: I20c516010f76cf03342bd8883d0ee7ac5f8bc7e4
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
payloads/Kconfig | 21 +++++++++++++++++++++
payloads/external/Makefile.inc | 2 ++
payloads/external/Memtest86Plus/Makefile | 8 +++++---
3 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/payloads/Kconfig b/payloads/Kconfig
index 00d5d88..6c178d4 100644
--- a/payloads/Kconfig
+++ b/payloads/Kconfig
@@ -77,6 +77,27 @@ config MEMTEST_SECONDARY_PAYLOAD
Memtest86+ can be loaded as a secondary payload under SeaBIOS, GRUB,
or any other payload that can load additional payloads.
+choice
+ prompt "Memtest86+ version"
+ default MEMTEST_STABLE
+ depends on MEMTEST_SECONDARY_PAYLOAD
+
+config MEMTEST_STABLE
+ bool "Stable"
+ help
+ Stable Memtest86+ version.
+
+ For reproducible builds, this option must be selected.
+config MEMTEST_MASTER
+ bool "Master"
+ help
+ Newest Memtest86+ version.
+
+ This option will fetch the newest version of the Memtest86+ code,
+ updating as new changes are committed. This makes the build
+ non-reproducible, as it can fetch different code each time.
+endchoice
+
config NVRAMCUI_SECONDARY_PAYLOAD
bool "Load nvramcui as a secondary payload"
default n
diff --git a/payloads/external/Makefile.inc b/payloads/external/Makefile.inc
index 26a5613..5ae9f7e 100644
--- a/payloads/external/Makefile.inc
+++ b/payloads/external/Makefile.inc
@@ -122,6 +122,8 @@ payloads/external/Memtest86Plus/memtest86plus/memtest: $(top)/$(DOTCONFIG)
LD="$(LD_x86_32)" \
OBJCOPY="$(OBJCOPY_x86_32)" \
AS="$(AS_x86_32)" \
+ CONFIG_MEMTEST_MASTER=$(CONFIG_MEMTEST_MASTER) \
+ CONFIG_MEMTEST_STABLE=$(CONFIG_MEMTEST_STABLE) \
$(MEMTEST_SERIAL_OPTIONS) \
MFLAGS= MAKEFLAGS=
diff --git a/payloads/external/Memtest86Plus/Makefile b/payloads/external/Memtest86Plus/Makefile
index f77fa38..90ea5e8 100644
--- a/payloads/external/Memtest86Plus/Makefile
+++ b/payloads/external/Memtest86Plus/Makefile
@@ -13,8 +13,10 @@
## GNU General Public License for more details.
##
-TAG-y=origin/master
-NAME-y=MASTER
+TAG-$(CONFIG_MEMTEST_MASTER)=origin/master
+NAME-$(CONFIG_MEMTEST_MASTER)=Master
+TAG-$(CONFIG_MEMTEST_STABLE)=ca352c9a6bd8c1bba16ea22cbfc7028d97bacec9
+NAME-$(CONFIG_MEMTEST_STABLE)=Stable
project_name=Memtest86+
project_dir=$(CURDIR)/memtest86plus
@@ -33,7 +35,7 @@ fetch: $(project_dir)
git fetch; fi
checkout: fetch
- echo " Checking out $(project_name) revision $(NAME-y)"
+ echo " Checking out $(project_name) revision $(NAME-y) ($(TAG-y))"
cd $(project_dir); \
git checkout master; \
git branch -D coreboot 2>/dev/null; \
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14152
-gerrit
commit 4f498067f77a3338d907df5ba06ed02195b45b23
Author: Martin Roth <martinroth(a)google.com>
Date: Wed Mar 16 15:00:37 2016 -0600
Memtest86Plus/Makefile: Update to common payload makefile format
This series of patches attempts to update all of the external payload
makefiles to be as similar as possible.
- Add .git to the git repo URL to show that it's a git repo.
- Use the common checkout, fetch, and clone ($(project dir)) targets
- Add TAG-y and NAME-y variables - just with origin/master for now.
Stable will be added shortly.
- Make sure all phony targets are in .PHONY
Change-Id: If83c100841d5f91a9fab7ac44ba20ec2271c0594
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
payloads/external/Memtest86Plus/Makefile | 24 +++++++++++++++++-------
1 file changed, 17 insertions(+), 7 deletions(-)
diff --git a/payloads/external/Memtest86Plus/Makefile b/payloads/external/Memtest86Plus/Makefile
index db8a51d..f77fa38 100644
--- a/payloads/external/Memtest86Plus/Makefile
+++ b/payloads/external/Memtest86Plus/Makefile
@@ -13,9 +13,12 @@
## GNU General Public License for more details.
##
+TAG-y=origin/master
+NAME-y=MASTER
+
project_name=Memtest86+
project_dir=$(CURDIR)/memtest86plus
-project_git_repo=https://review.coreboot.org/memtest86plus
+project_git_repo=https://review.coreboot.org/memtest86plus.git
all: build
@@ -24,13 +27,20 @@ $(project_dir):
git clone $(project_git_repo) $(project_dir)
fetch: $(project_dir)
+ -cd $(project_dir); git show $(TAG-y) >/dev/null 2>&1 ; \
+ if [ $$? -ne 0 ] || [ "$(TAG-y)" = "origin/master" ]; then \
+ echo " Fetching new commits from the $(project_name) git repo"; \
+ git fetch; fi
+
+checkout: fetch
+ echo " Checking out $(project_name) revision $(NAME-y)"
cd $(project_dir); \
- test -e '.git' && \
- git fetch && \
- git checkout origin/master
+ git checkout master; \
+ git branch -D coreboot 2>/dev/null; \
+ git checkout -b coreboot $(TAG-y)
-build: fetch
- echo " MAKE $(project_name)"
+build: checkout
+ echo " MAKE $(project_name) $(NAME-y)"
$(MAKE) -C $(project_dir) all
clean:
@@ -42,4 +52,4 @@ distclean:
print-repo-info:
echo "$(project_git_repo) $(project_dir)"
-.PHONY: all build fetch clean distclean print-repo-info
+.PHONY: all build checkout clean distclean fetch print-repo-info