Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11546
-gerrit
commit 142849ef81a8268b5cd8bf11acfb7ef5b0926029
Author: Shawn Nematbakhsh <shawnn(a)chromium.org>
Date: Tue Aug 25 18:03:31 2015 -0700
braswell: acpi: Allow DPTF thresholds to be defined at board-level
Similar to Skylake, allow braswell mainboards to override the default
DPTF thresholds.
BUG=chrome-os-partner:43884
TEST=Build for Strago
BRANCH=Strago
Change-Id: Id2574e98c444b8bf4da8ca36f3eeeb06568e78e0
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Original-Commit-Id: 799a7006e8fcacfea8e8e0de5c99c3ce3c4ac34f
Original-Signed-off-by: Shawn Nematbakhsh <shawnn(a)chromium.org>
Original-Change-Id: If69627163237674a28fb8a26b4ce1886e5dbfc17
Original-Reviewed-on: https://chromium-review.googlesource.com/296033
Original-Commit-Ready: Shawn N <shawnn(a)chromium.org>
Original-Tested-by: Shawn N <shawnn(a)chromium.org>
Original-Reviewed-by: Duncan Laurie <dlaurie(a)chromium.org>
---
src/soc/intel/braswell/acpi/cpu.asl | 11 ------
src/soc/intel/braswell/acpi/dptf/cpu.asl | 63 +++++++++++++++++++++++++-------
2 files changed, 49 insertions(+), 25 deletions(-)
diff --git a/src/soc/intel/braswell/acpi/cpu.asl b/src/soc/intel/braswell/acpi/cpu.asl
index 0ae51f2..c9cb83b 100644
--- a/src/soc/intel/braswell/acpi/cpu.asl
+++ b/src/soc/intel/braswell/acpi/cpu.asl
@@ -18,17 +18,6 @@
* Foundation, Inc.
*/
-/* CPU */
-#define DPTF_CPU_PASSIVE 80
-#define DPTF_CPU_CRITICAL 90
-#define DPTF_CPU_PASSIVE 80
-#define DPTF_CPU_CRITICAL 90
-#define DPTF_CPU_ACTIVE_AC0 90
-#define DPTF_CPU_ACTIVE_AC1 80
-#define DPTF_CPU_ACTIVE_AC2 70
-#define DPTF_CPU_ACTIVE_AC3 60
-#define DPTF_CPU_ACTIVE_AC4 50
-
/* These devices are created at runtime */
External (\_PR.CP00, DeviceObj)
External (\_PR.CP01, DeviceObj)
diff --git a/src/soc/intel/braswell/acpi/dptf/cpu.asl b/src/soc/intel/braswell/acpi/dptf/cpu.asl
index 018144c..3e51c29 100644
--- a/src/soc/intel/braswell/acpi/dptf/cpu.asl
+++ b/src/soc/intel/braswell/acpi/dptf/cpu.asl
@@ -1,3 +1,51 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2015 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.
+ */
+
+#ifndef DPTF_CPU_PASSIVE
+#define DPTF_CPU_PASSIVE 80
+#endif
+
+#ifndef DPTF_CPU_CRITICAL
+#define DPTF_CPU_CRITICAL 90
+#endif
+
+#ifndef DPTF_CPU_ACTIVE_AC0
+#define DPTF_CPU_ACTIVE_AC0 90
+#endif
+
+#ifndef DPTF_CPU_ACTIVE_AC1
+#define DPTF_CPU_ACTIVE_AC1 80
+#endif
+
+#ifndef DPTF_CPU_ACTIVE_AC2
+#define DPTF_CPU_ACTIVE_AC2 70
+#endif
+
+#ifndef DPTF_CPU_ACTIVE_AC3
+#define DPTF_CPU_ACTIVE_AC3 60
+#endif
+
+#ifndef DPTF_CPU_ACTIVE_AC4
+#define DPTF_CPU_ACTIVE_AC4 50
+#endif
+
External (\_PR.CP00._TSS, MethodObj)
External (\_PR.CP00._TPC, MethodObj)
External (\_PR.CP00._PTC, PkgObj)
@@ -127,52 +175,39 @@ Device (B0DB)
{
Return (\_SB.MPPC)
}
-#ifdef DPTF_CPU_CRITICAL
+
Method (_CRT)
{
Return (\_SB.DPTF.CTOK(DPTF_CPU_CRITICAL))
}
-#endif
-#ifdef DPTF_CPU_PASSIVE
Method (_PSV)
{
Return (\_SB.DPTF.CTOK(DPTF_CPU_PASSIVE))
}
-#endif
-#ifdef DPTF_CPU_ACTIVE_AC0
Method (_AC0)
{
Return (\_SB.DPTF.CTOK(DPTF_CPU_ACTIVE_AC0))
}
-#endif
-#ifdef DPTF_CPU_ACTIVE_AC1
Method (_AC1)
{
Return (\_SB.DPTF.CTOK(DPTF_CPU_ACTIVE_AC1))
}
-#endif
-#ifdef DPTF_CPU_ACTIVE_AC2
Method (_AC2)
{
Return (\_SB.DPTF.CTOK(DPTF_CPU_ACTIVE_AC2))
}
-#endif
-#ifdef DPTF_CPU_ACTIVE_AC3
Method (_AC3)
{
Return (\_SB.DPTF.CTOK(DPTF_CPU_ACTIVE_AC3))
}
-#endif
-#ifdef DPTF_CPU_ACTIVE_AC4
Method (_AC4)
{
Return (\_SB.DPTF.CTOK(DPTF_CPU_ACTIVE_AC4))
}
-#endif
}
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11545
-gerrit
commit fc61046cfaaf5ec36bb89ae3a068207b876285cd
Author: Lee Leahy <leroy.p.leahy(a)intel.com>
Date: Wed Aug 26 14:58:29 2015 -0700
FSP: Pass FSP image base address to find_fsp
Add a parameter to find_fsp which is the image base address. Adjust the
fake stack in cache_as_ram.inc to pass in the read-only FSP image base
address. In fsp_notify, pass in the read-only FSP image base address
when the FSP header pointer is NULL. In find_fsp, validate the FSP
binary image starting from the specified image base address.
BRANCH=none
BUG=None
TEST=Build and run on Skylake
Change-Id: Iac43c8aac8491390479af551765b514ca919928a
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Original-Commit-Id: 592dae53f3b32694190cc5cb0fa6ca94df68aa95
Original-Change-Id: I7d6a415458a81f3b6bcdcfc9a90eceb2ac22144e
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy(a)intel.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/295593
Original-Commit-Ready: Leroy P Leahy <leroy.p.leahy(a)intel.com>
Original-Tested-by: Leroy P Leahy <leroy.p.leahy(a)intel.com>
Original-Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/drivers/intel/fsp1_1/cache_as_ram.inc | 1 +
src/drivers/intel/fsp1_1/fsp_util.c | 8 ++++----
src/drivers/intel/fsp1_1/fsp_util.h | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/drivers/intel/fsp1_1/cache_as_ram.inc b/src/drivers/intel/fsp1_1/cache_as_ram.inc
index 6af30ce..d4df67b 100644
--- a/src/drivers/intel/fsp1_1/cache_as_ram.inc
+++ b/src/drivers/intel/fsp1_1/cache_as_ram.inc
@@ -342,6 +342,7 @@ halt3:
.align 4
fake_fsp_stack:
.long find_fsp_ret
+ .long CONFIG_FSP_LOC /* FSP base address */
CAR_init_params:
.long CONFIG_CPU_MICROCODE_CBFS_LOC /* Microcode Location */
diff --git a/src/drivers/intel/fsp1_1/fsp_util.c b/src/drivers/intel/fsp1_1/fsp_util.c
index bce4337..f699569 100644
--- a/src/drivers/intel/fsp1_1/fsp_util.c
+++ b/src/drivers/intel/fsp1_1/fsp_util.c
@@ -25,7 +25,7 @@
#include <timestamp.h>
/* Locate the FSP binary in the coreboot filesystem */
-FSP_INFO_HEADER *find_fsp(void)
+FSP_INFO_HEADER *find_fsp(uintptr_t fsp_base_address)
{
union {
EFI_FFS_FILE_HEADER *ffh;
@@ -40,7 +40,7 @@ FSP_INFO_HEADER *find_fsp(void)
for (;;) {
/* Get the FSP binary base address in CBFS */
- fsp_ptr.u8 = (u8 *)CONFIG_FSP_LOC;
+ fsp_ptr.u32 = fsp_base_address;
/* Check the FV signature, _FVH */
if (fsp_ptr.fvh->Signature != 0x4856465F) {
@@ -74,7 +74,7 @@ FSP_INFO_HEADER *find_fsp(void)
fsp_ptr.u8 += sizeof(EFI_RAW_SECTION);
/* Verify that the FSP base address.*/
- if (fsp_ptr.fih->ImageBase != CONFIG_FSP_LOC) {
+ if (fsp_ptr.fih->ImageBase != fsp_base_address) {
fsp_ptr.u8 = (u8 *)ERROR_IMAGEBASE_MISMATCH;
break;
}
@@ -143,7 +143,7 @@ void fsp_notify(u32 phase)
fsp_header_ptr = fsp_get_fih();
if (fsp_header_ptr == NULL) {
- fsp_header_ptr = (void *)find_fsp();
+ fsp_header_ptr = (void *)find_fsp(CONFIG_FSP_LOC);
if ((u32)fsp_header_ptr < 0xff) {
/* output something in case there is no serial */
post_code(0x4F);
diff --git a/src/drivers/intel/fsp1_1/fsp_util.h b/src/drivers/intel/fsp1_1/fsp_util.h
index 8f6f77a..51ecb98 100644
--- a/src/drivers/intel/fsp1_1/fsp_util.h
+++ b/src/drivers/intel/fsp1_1/fsp_util.h
@@ -42,7 +42,7 @@
#include <soc/chipset_fsp_util.h>
/* find_fsp() should only be called from assembly code. */
-FSP_INFO_HEADER *find_fsp(void);
+FSP_INFO_HEADER *find_fsp(uintptr_t fsp_base_address);
/* Set FSP's runtime information. */
void fsp_set_runtime(FSP_INFO_HEADER *fih, void *hob_list);
/* Use a new FSP_INFO_HEADER at runtime. */