Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14977
-gerrit
commit 0a6100816c2e1a90891c040f0bd57efa5cc4838a
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Thu May 26 14:22:34 2016 -0500
soc/intel/apollolake: provide SMM dependency requirements
Depending on which options are selected there needs to be certain
functions supplied. However, the spi, mmap_boot, and tsc_freq modules
were not included in the SMM builds. Fix the omission.
Change-Id: I25ab42886cfd46770ce0f4beee65f2f4d15649f3
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/soc/intel/apollolake/Makefile.inc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/soc/intel/apollolake/Makefile.inc b/src/soc/intel/apollolake/Makefile.inc
index b8f0c18..1ea21f6 100644
--- a/src/soc/intel/apollolake/Makefile.inc
+++ b/src/soc/intel/apollolake/Makefile.inc
@@ -29,8 +29,11 @@ romstage-y += mmap_boot.c
romstage-y += tsc_freq.c
romstage-y += pmutil.c
+smm-y += mmap_boot.c
smm-y += pmutil.c
smm-y += smihandler.c
+smm-y += spi.c
+smm-y += tsc_freq.c
ramstage-$(CONFIG_HAVE_ACPI_TABLES) += acpi.c
ramstage-y += cpu.c
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14974
-gerrit
commit 73d62aaf62b68f4161af9ac659385caef17bec8c
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Thu May 26 12:01:19 2016 -0500
mainboard/google/reef: increase BIOS region size
An updated descriptor expands the BIOS region while descreasing
the 'device expansion region' utilized by the CSE. Update the
end region marker to reflect this new size as well as the
chromeos.fmd file which needs to be adjusted for logical boot
parition 2 requirement which resides halfway through the BIOS
region. The GBB was moved and shunk to accommodate the change.
Change-Id: I7baa5282d7c608af648b5773c4dfa123060a6e45
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/mainboard/google/reef/Kconfig | 2 +-
src/mainboard/google/reef/chromeos.fmd | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/mainboard/google/reef/Kconfig b/src/mainboard/google/reef/Kconfig
index e49e8b6..5d8ded6 100644
--- a/src/mainboard/google/reef/Kconfig
+++ b/src/mainboard/google/reef/Kconfig
@@ -19,7 +19,7 @@ config BOOT_MEDIA_SPI_BUS
config IFD_BIOS_END
hex
- default 0x6FF000
+ default 0x77F000
config IFD_BIOS_START
hex
diff --git a/src/mainboard/google/reef/chromeos.fmd b/src/mainboard/google/reef/chromeos.fmd
index a3fb8b5..3f7c3aa 100644
--- a/src/mainboard/google/reef/chromeos.fmd
+++ b/src/mainboard/google/reef/chromeos.fmd
@@ -10,9 +10,9 @@ FLASH 8M {
RO_FRID@0x4800 0x40
RO_FRID_PAD@0x4840 0x7c0
COREBOOT(CBFS)@0x5000 0x17b000
+ GBB@0x180000 0x40000
# logical boot partition 2. Remove with updated CSE
- SIGN_CSE@0x180000 0x10000
- GBB@0x190000 0x70000
+ SIGN_CSE@0x1c0000 0x10000
}
}
MISC_RW@0x400000 0x1a000 {
@@ -34,6 +34,6 @@ FLASH 8M {
FW_MAIN_B(CBFS)@0x10000 0x162fc0
RW_FWID_B@0x172fc0 0x40
}
- DEVICE_EXTENSION@0x700000 0x100000
+ DEVICE_EXTENSION@0x77f000 0x80000
}
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14977
-gerrit
commit 49ddda81915fc702d2f1fe65987f231f0f59bbe8
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Thu May 26 14:22:34 2016 -0500
soc/intel/apollolake: provide SMM dependency requirements
Depending on which options are selected there needs to be certain
functions supplied. However, the spi, mmap_boot, and tsc_freq modules
were not included in the SMM builds. Fix the omission.
Change-Id: I25ab42886cfd46770ce0f4beee65f2f4d15649f3
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/soc/intel/apollolake/Makefile.inc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/soc/intel/apollolake/Makefile.inc b/src/soc/intel/apollolake/Makefile.inc
index b8f0c18..1ea21f6 100644
--- a/src/soc/intel/apollolake/Makefile.inc
+++ b/src/soc/intel/apollolake/Makefile.inc
@@ -29,8 +29,11 @@ romstage-y += mmap_boot.c
romstage-y += tsc_freq.c
romstage-y += pmutil.c
+smm-y += mmap_boot.c
smm-y += pmutil.c
smm-y += smihandler.c
+smm-y += spi.c
+smm-y += tsc_freq.c
ramstage-$(CONFIG_HAVE_ACPI_TABLES) += acpi.c
ramstage-y += cpu.c
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14973
-gerrit
commit 4efa5182a125969ef974cf2660874111edfef2b5
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Thu May 26 11:02:56 2016 -0500
mainboard/google/reef: support verstage
The chromeos.c suport needs to be linked into verstage so it will
link.
Change-Id: If85e232a3721443edfbbd278b32f72302f13f3a8
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/mainboard/google/reef/Makefile.inc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/mainboard/google/reef/Makefile.inc b/src/mainboard/google/reef/Makefile.inc
index b38a4e6..f8fbbf3 100644
--- a/src/mainboard/google/reef/Makefile.inc
+++ b/src/mainboard/google/reef/Makefile.inc
@@ -6,3 +6,5 @@ romstage-$(CONFIG_CHROMEOS) += chromeos.c
ramstage-$(CONFIG_CHROMEOS) += chromeos.c
ramstage-y += ec.c
ramstage-y += mainboard.c
+
+verstage-$(CONFIG_CHROMEOS) += chromeos.c
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14972
-gerrit
commit 6ea57b993465cb7f47046315aeea023c496a613c
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Thu May 26 11:00:44 2016 -0500
soc/intel/apollolake: add support for verstage
There previously was no support for building verstage on apollolake.
Add that suport by linking in the appropriate modules as well as
providing vboot_platform_is_resuming(). The link address for verstage
is the same as FSP-M because they would never be in CAR along side
each other. Additionally, program the ACPI I/O BAR and enable decoding
so sleep state can be determined for early firmware verification.
Change-Id: I1a0baab342ac55fd82dbed476abe0063787e3491
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/soc/intel/apollolake/Kconfig | 6 ++++++
src/soc/intel/apollolake/Makefile.inc | 6 ++++++
src/soc/intel/apollolake/bootblock/bootblock.c | 6 ++++++
src/soc/intel/apollolake/pmutil.c | 12 ++++++++++++
4 files changed, 30 insertions(+)
diff --git a/src/soc/intel/apollolake/Kconfig b/src/soc/intel/apollolake/Kconfig
index 4643887..d6c5ffc 100644
--- a/src/soc/intel/apollolake/Kconfig
+++ b/src/soc/intel/apollolake/Kconfig
@@ -123,6 +123,12 @@ config ROMSTAGE_ADDR
help
The base address (in CAR) where romstage should be linked
+config VERSTAGE_ADDR
+ hex
+ default 0xfef60000
+ help
+ The base address (in CAR) where verstage should be linked
+
config CACHE_MRC_SETTINGS
bool
default y
diff --git a/src/soc/intel/apollolake/Makefile.inc b/src/soc/intel/apollolake/Makefile.inc
index 80617a7..b8f0c18 100644
--- a/src/soc/intel/apollolake/Makefile.inc
+++ b/src/soc/intel/apollolake/Makefile.inc
@@ -56,6 +56,12 @@ postcar-y += mmap_boot.c
postcar-$(CONFIG_SOC_UART_DEBUG) += uart_early.c
postcar-y += tsc_freq.c
+verstage-y += memmap.c
+verstage-y += mmap_boot.c
+verstage-$(CONFIG_SOC_UART_DEBUG) += uart_early.c
+verstage-y += tsc_freq.c
+verstage-y += pmutil.c
+
CPPFLAGS_common += -I$(src)/soc/intel/apollolake/include
# Since FSP-M runs in CAR we need to relocate it to a specific address
diff --git a/src/soc/intel/apollolake/bootblock/bootblock.c b/src/soc/intel/apollolake/bootblock/bootblock.c
index 8279432..b8d6f22 100644
--- a/src/soc/intel/apollolake/bootblock/bootblock.c
+++ b/src/soc/intel/apollolake/bootblock/bootblock.c
@@ -67,6 +67,12 @@ void asmlinkage bootblock_c_entry(uint32_t tsc_hi, uint32_t tsc_lo)
pci_write_config32(dev, PCI_BASE_ADDRESS_1, 0);
pci_write_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY);
+ /* Decode the ACPI I/O port range for early firmware verification.*/
+ dev = PMC_DEV;
+ pci_write_config16(dev, PCI_BASE_ADDRESS_4, ACPI_PMIO_BASE);
+ pci_write_config16(dev, PCI_COMMAND,
+ PCI_COMMAND_IO | PCI_COMMAND_MASTER);
+
/* Call lib/bootblock.c main */
bootblock_main_with_timestamp(((uint64_t)tsc_hi << 32) | tsc_lo);
}
diff --git a/src/soc/intel/apollolake/pmutil.c b/src/soc/intel/apollolake/pmutil.c
index 16c8a04..9340ba5 100644
--- a/src/soc/intel/apollolake/pmutil.c
+++ b/src/soc/intel/apollolake/pmutil.c
@@ -26,6 +26,7 @@
#include <soc/pm.h>
#include <device/device.h>
#include <device/pci.h>
+#include <vendorcode/google/chromeos/vboot_common.h>
static uintptr_t read_pmc_mmio_bar(void)
{
@@ -336,3 +337,14 @@ int fill_power_state(struct chipset_power_state *ps)
printk(BIOS_DEBUG, "prev_sleep_state %d\n", ps->prev_sleep_state);
return ps->prev_sleep_state;
}
+
+int vboot_platform_is_resuming(void)
+{
+ int typ;
+
+ if (!(inw(ACPI_PMIO_BASE + PM1_STS) & WAK_STS))
+ return 0;
+
+ typ = (inl(ACPI_PMIO_BASE + PM1_CNT) & SLP_TYP) >> SLP_TYP_SHIFT;
+ return typ == SLP_TYP_S3;
+}
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14971
-gerrit
commit 8a64bd14d4438a12173f25d86832f91d9bddfb53
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Thu May 26 10:55:48 2016 -0500
arch/x86: provide verstage support for CONFIG_C_ENVIRONMENT_BOOTBLOCK
When CONFIG_C_ENVIRONMENT_BOOTBLOCK is employed there's no need for
a chipset specific verstage entry point because cache-as-ram has
already been initialized. Therefore, provide a default entry point
for verstage in that environment.
Change-Id: Idd8f45bd58d3e5b251d1e38cca7ae794b8b77a28
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/arch/x86/Makefile.inc | 4 ++++
src/arch/x86/verstage.c | 23 +++++++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 536caa3..28bb8ea 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -178,6 +178,10 @@ verstage-y += memset.c
verstage-y += memcpy.c
verstage-y += memmove.c
verstage-$(CONFIG_X86_TOP4G_BOOTMEDIA_MAP) += mmap_boot.c
+# If C environment is used for bootblock it means there's no need
+# for a chipset-specific car_stage_entry() so use the generic one
+# which just calls verstage().
+verstage-$(CONFIG_C_ENVIRONMENT_BOOTBLOCK) += verstage.c
verstage-$(CONFIG_COLLECT_TIMESTAMPS) += timestamp.c
diff --git a/src/arch/x86/verstage.c b/src/arch/x86/verstage.c
new file mode 100644
index 0000000..a44bf0f
--- /dev/null
+++ b/src/arch/x86/verstage.c
@@ -0,0 +1,23 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * 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; 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.
+ */
+
+#include <arch/cpu.h>
+#include <vendorcode/google/chromeos/chromeos.h>
+
+/* Provide an entry point for verstage when it's a separate stage. */
+void asmlinkage car_stage_entry(void)
+{
+ verstage();
+}