Marc Jones (marc.jones(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7655
-gerrit
commit 44e5b6ee51d1681a176113f7d01dfe8d1cc9638e
Author: Gabe Black <gabeblack(a)google.com>
Date: Sat Feb 8 06:30:49 2014 -0800
libpayload: arm: Pass the coreboot table location to the payload.
To find the coreboot tables, the payload has historically searched for their
signature in a predefined region of memory. This is a little clumsy on x86,
but it works because you can assume certain regions are RAM. Also, there are
areas which are set aside for the firmware by convention. On x86 there's a
forwarding entry which goes in one of those fairly small conventional areas
and which points to the CBMEM area at the end of memory.
On ARM there aren't areas like that, so we've left out the forwarding entry and
gone directly to CBMEM. RAM may not start at the beginning of the address space
or go to its end, and that means there isn't really anywhere fixed you can put
the coreboot tables. That's meant that libpayload has to be configured on a
per board basis to know where to look for CBMEM.
Now that we have boards that don't have fixed amounts of memory, the location
of the end of RAM isn't fixed even on a per board level which means even that
workaround will no longer cut it.
This change makes coreboot pass the location of the coreboot tables to
libpayload using r0, the first argument register. That means we'll be able to
find them no matter where CBMEM is, and we can get rid of the per board search
ranges.
We can extend this mechanism to x86 as well, but there may be more
complications and it's less necessary there. It would be a good thing to do
eventually though.
BUG=None
TEST=Built and booted on nyan. Changed the size of memory and saw that the
payload could still find the coreboot tables where before it couldn't. Built
for pit, snow, and big.
BRANCH=None
Original-Change-Id: I7218afd999da1662b0db8172fd8125670ceac471
Original-Signed-off-by: Gabe Black <gabeblack(a)google.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/185572
Original-Reviewed-by: Julius Werner <jwerner(a)chromium.org>
Original-Commit-Queue: Gabe Black <gabeblack(a)chromium.org>
Original-Tested-by: Gabe Black <gabeblack(a)chromium.org>
(cherry picked from commit ca88f39c21158b59abe3001f986207a292359cf5)
Signed-off-by: Marc Jones <marc.jones(a)se-eng.com>
Change-Id: Iab14e9502b6ce7a55f0a72e190fa582f89f11a1e
---
payloads/libpayload/arch/arm/Config.in | 8 --------
payloads/libpayload/arch/arm/coreboot.c | 25 ++++++++++---------------
payloads/libpayload/arch/arm/head.S | 8 +++++++-
src/arch/arm/boot.c | 10 ++++++++--
4 files changed, 25 insertions(+), 26 deletions(-)
diff --git a/payloads/libpayload/arch/arm/Config.in b/payloads/libpayload/arch/arm/Config.in
index b2ee527..b1f2bb4 100644
--- a/payloads/libpayload/arch/arm/Config.in
+++ b/payloads/libpayload/arch/arm/Config.in
@@ -33,12 +33,4 @@ config ARCH_SPECIFIC_OPTIONS # dummy
def_bool y
select LITTLE_ENDIAN
-config COREBOOT_INFO_RANGE_BASE
- hex "Base of the range to search for the coreboot tables"
-
-config COREBOOT_INFO_RANGE_SIZE
- hex "Size of the range to search for the coreboot tables"
- default 0x4000000
-
-
endif
diff --git a/payloads/libpayload/arch/arm/coreboot.c b/payloads/libpayload/arch/arm/coreboot.c
index b91db32..c7f371e 100644
--- a/payloads/libpayload/arch/arm/coreboot.c
+++ b/payloads/libpayload/arch/arm/coreboot.c
@@ -32,6 +32,9 @@
#include <libpayload.h>
#include <coreboot_tables.h>
+/* This pointer gets set in head.S and is passed in from coreboot. */
+void *cb_header_ptr;
+
/*
* Some of this is x86 specific, and the rest of it is generic. Right now,
* since we only support x86, we'll avoid trying to make lots of infrastructure
@@ -169,22 +172,16 @@ static void cb_parse_string(unsigned char *ptr, char **info)
*info = (char *)((struct cb_string *)ptr)->string;
}
-static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
+static int cb_parse_header(void *addr, struct sysinfo_t *info)
{
- struct cb_header *header;
+ struct cb_header *header = addr;
unsigned char *ptr = addr;
void *forward;
int i;
- for (i = 0; i < len; i += 16, ptr += 16) {
- header = (struct cb_header *)ptr;
- if (!strncmp((const char *)header->signature, "LBIO", 4))
- break;
- }
-
- /* We walked the entire space and didn't find anything. */
- if (i >= len)
- return -1;
+ /* No signature found. */
+ if (strncmp((const char *)header->signature, "LBIO", 4))
+ return -1;
if (!header->table_bytes)
return 0;
@@ -209,7 +206,7 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
switch (rec->tag) {
case CB_TAG_FORWARD:
forward = phys_to_virt((void *)(unsigned long)((struct cb_forward *)rec)->forward);
- return cb_parse_header(forward, len, info);
+ return cb_parse_header(forward, info);
continue;
case CB_TAG_MEMORY:
cb_parse_memory(ptr, info);
@@ -304,9 +301,7 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info)
int get_coreboot_info(struct sysinfo_t *info)
{
- int ret = cb_parse_header(
- phys_to_virt(CONFIG_LP_COREBOOT_INFO_RANGE_BASE),
- CONFIG_LP_COREBOOT_INFO_RANGE_SIZE, info);
+ int ret = cb_parse_header(cb_header_ptr, info);
return (ret == 1) ? 0 : -1;
}
diff --git a/payloads/libpayload/arch/arm/head.S b/payloads/libpayload/arch/arm/head.S
index 54fdb5d..c5c96ea 100644
--- a/payloads/libpayload/arch/arm/head.S
+++ b/payloads/libpayload/arch/arm/head.S
@@ -34,12 +34,16 @@
*/
ENTRY(_entry)
+ /* Save off the location of the coreboot tables */
+ ldr r1, 1f
+ str r0, [r1]
+
/* TODO: disable interrupts */
/* TODO: Clear BSS */
/* Setup new stack */
- ldr sp, 1f
+ ldr sp, 2f
/* TODO: Save old stack pointer and link register */
@@ -56,4 +60,6 @@ ENDPROC(_entry)
.align 4
1:
+.word cb_header_ptr
+2:
.word _stack
diff --git a/src/arch/arm/boot.c b/src/arch/arm/boot.c
index d872a79..85b2cce 100644
--- a/src/arch/arm/boot.c
+++ b/src/arch/arm/boot.c
@@ -17,12 +17,18 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <console/console.h>
+#include <arch/cache.h>
#include <arch/stages.h>
+#include <cbmem.h>
+#include <console/console.h>
#include <payload_loader.h>
void arch_payload_run(const struct payload *payload)
{
+ void (*doit)(void *) = payload->entry;
+ void *cb_tables = cbmem_find(CBMEM_ID_CBTABLE);
+
printk(BIOS_SPEW, "entry = %p\n", payload->entry);
- stage_exit(payload->entry);
+ cache_sync_instructions();
+ doit(cb_tables);
}
the following patch was just integrated into master:
commit db3e2f0931a52bee6e59d09df572fd0bfb481ff9
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Wed Apr 9 19:23:54 2014 -0700
ipq8064: Make clock code build in coreboot
Include clock.c in the appropriate coreboot stages, modify the code to
build cleanly. Use proper pointer cast in .h files.
BUG=chrome-os-partner:27784
TEST='emerge-storm coreboot' still succeeds
Original-Change-Id: I227c871b17e571f6a1db3ada3821dbb1ee884e59
Original-Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/196407
(cherry picked from commit 75decceccd97298974891bb98b796eccfe11f46c)
Signed-off-by: Marc Jones <marc.jones(a)se-eng.com>
Change-Id: I7d44464d4ca8153e84407fc05a25e2e79e74901e
Reviewed-on: http://review.coreboot.org/7271
Tested-by: build bot (Jenkins)
Reviewed-by: David Hendricks <dhendrix(a)chromium.org>
See http://review.coreboot.org/7271 for details.
-gerrit
the following patch was just integrated into master:
commit 63956e63ce6e9035aaf0a7f0363d064acb083816
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Tue Apr 22 15:25:10 2014 -0700
ipq8064: prepare UART driver for use in coreboot
These driver needs to be in src/lib, and the include file needs to be
renamed to avoid collision with the top level uart.h.
BUG=chrome-os-partner:27784
TEST=emerge-storm coreboot still works
Original-Change-Id: Ie12f44e055bbef0eb8b1a3ffc8d6742e7a446942
Original-Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/196393
(cherry picked from commit c5618fd418642f5b009582f5f6bc51f7c9d54bec)
Signed-off-by: Marc Jones <marc.jones(a)se-eng.com>
Change-Id: I5e25ae350ac5e71b47a0daef078b03cc5ac35401
Reviewed-on: http://review.coreboot.org/7270
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See http://review.coreboot.org/7270 for details.
-gerrit
Edward O'Callaghan (eocallaghan(a)alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7654
-gerrit
commit 79c073249a42cfa508c9853737cf1f2ff9ce4672
Author: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
Date: Sat Dec 6 05:07:33 2014 +1100
mainboard/lenovo/g505s/buildOpts.c: Trivial variable rename
Minor fix to avoid confusion, nothing to see here.
Change-Id: I89d56a91d2df049e85cf49c23218620caba84880
Signed-off-by: Edward O'Callaghan <eocallaghan(a)alterapraxis.com>
---
src/mainboard/lenovo/g505s/buildOpts.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mainboard/lenovo/g505s/buildOpts.c b/src/mainboard/lenovo/g505s/buildOpts.c
index d6328bc..9ed4c74 100644
--- a/src/mainboard/lenovo/g505s/buildOpts.c
+++ b/src/mainboard/lenovo/g505s/buildOpts.c
@@ -385,7 +385,7 @@ GPIO_CONTROL lenovo_g505s_gpio[] = {
#define SCI_MAP_XHCI_10_0 0x78
#define SCI_MAP_PWRBTN 0x73
-SCI_MAP_CONTROL m6_1035dx_sci_map[] = {
+SCI_MAP_CONTROL lenovo_g505s_sci_map[] = {
{GEVENT_PIN( EC_SCI_GEVENT ), EC_SCI_GPE},
{GEVENT_PIN( EC_LID_GEVENT ), EC_LID_GPE},
{GEVENT_PIN( PCIE_GEVENT ), PCIE_GPE},
@@ -394,7 +394,7 @@ SCI_MAP_CONTROL m6_1035dx_sci_map[] = {
{SCI_MAP_XHCI_10_0, PME_GPE},
{SCI_MAP_PWRBTN, PME_GPE},
};
-#define BLDCFG_FCH_SCI_MAP_LIST (&m6_1035dx_sci_map[0])
+#define BLDCFG_FCH_SCI_MAP_LIST (&lenovo_g505s_sci_map[0])
// The following definitions specify the default values for various parameters in which there are
// no clearly defined defaults to be used in the common file. The values below are based on product
Martin Roth (gaumless(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7647
-gerrit
commit dda733993c6cb91f82781c529232176666176883
Author: Martin Roth <martin.roth(a)se-eng.com>
Date: Thu Dec 4 18:12:20 2014 -0700
fsp_baytrail: Update microcode for Gold 3 FSP release
New microcode for Bay Trail I B2/B3 and D0 parts was released in the
Gold 3 Bay Trail FSP release.
Change the microcode size to an area instead of the exact size of the
patches. This will hopefully reduce updates to the microcode size.
Change-Id: I58b4c57a4bb0e478ffd28bd74a5de6bb61540dfe
Signed-off-by: Martin Roth <martin.roth(a)se-eng.com>
---
src/soc/intel/fsp_baytrail/microcode/microcode_blob.c | 10 ++++++++--
src/soc/intel/fsp_baytrail/microcode/microcode_size.h | 2 +-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/soc/intel/fsp_baytrail/microcode/microcode_blob.c b/src/soc/intel/fsp_baytrail/microcode/microcode_blob.c
index 51b6c19..709ff92 100644
--- a/src/soc/intel/fsp_baytrail/microcode/microcode_blob.c
+++ b/src/soc/intel/fsp_baytrail/microcode/microcode_blob.c
@@ -19,8 +19,14 @@
unsigned microcode[] = {
-/* Size is 0x19800 - update in microcode_size.h when a patch gets changed. */
+/* Region size is 0x30000 - update in microcode_size.h if it gets larger. */
#include "M0230672228.h" // M0230672: Baytrail "Super SKU" B0/B1
-#include "M013067331E.h" // M0130673: Baytrail I B2 / B3
+#include "M0130673322.h" // M0130673: Baytrail I B2 / B3
+#include "M0130679901.h" // M0130679: Baytrail I D0
+ /* Dummy terminator */
+ 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0,
};
diff --git a/src/soc/intel/fsp_baytrail/microcode/microcode_size.h b/src/soc/intel/fsp_baytrail/microcode/microcode_size.h
index df6082d..ec55314 100644
--- a/src/soc/intel/fsp_baytrail/microcode/microcode_size.h
+++ b/src/soc/intel/fsp_baytrail/microcode/microcode_size.h
@@ -1,2 +1,2 @@
/* Maximum size of the area that the FSP will search for the correct microcode */
-#define MICROCODE_REGION_LENGTH 0x19800
+#define MICROCODE_REGION_LENGTH 0x30000
Martin Roth (gaumless(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7648
-gerrit
commit 8213c6b8b14a3185475e045b7548af4c91c8f927
Author: Martin Roth <martin.roth(a)se-eng.com>
Date: Thu Dec 4 20:44:55 2014 -0700
fsp_baytrail: Kconfig update for Gold 3 FSP
The documentation for the FSP gives the name as BAYTRAIL_FSP.fd instead
of the old FvFsp.bin.
Change-Id: I69c7c5ff49afd6552612cf50c9ca9b30cfb003e2
Signed-off-by: Martin Roth <martin.roth(a)se-eng.com>
---
src/soc/intel/fsp_baytrail/fsp/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/soc/intel/fsp_baytrail/fsp/Kconfig b/src/soc/intel/fsp_baytrail/fsp/Kconfig
index 73800d6..cbe3a95 100644
--- a/src/soc/intel/fsp_baytrail/fsp/Kconfig
+++ b/src/soc/intel/fsp_baytrail/fsp/Kconfig
@@ -25,7 +25,7 @@ config BAYTRAIL_FSP_SPECIFIC_OPTIONS
config FSP_FILE
string
- default "../intel/fsp/baytrail/FvFsp.bin"
+ default "../intel/fsp/baytrail/BAYTRAIL_FSP.fd"
help
The path and filename of the Intel FSP binary for this platform.
Martin Roth (gaumless(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7647
-gerrit
commit 9c3ccad770984b7aa2da5d9ed53cbb45a90681e1
Author: Martin Roth <martin.roth(a)se-eng.com>
Date: Thu Dec 4 18:12:20 2014 -0700
fsp_baytrail: Update microcode for Gold 3 FSP release
New microcode for Bay Trail I B2/B3 and D0 parts was released in the
Gold 3 Bay Trail FSP release.
Change the microcode size to an area instead of the exact size of the
patches. This will hopefully reduce updates to the microcode size
Change-Id: I58b4c57a4bb0e478ffd28bd74a5de6bb61540dfe
Signed-off-by: Martin Roth <martin.roth(a)se-eng.com>
---
src/soc/intel/fsp_baytrail/microcode/microcode_blob.c | 10 ++++++++--
src/soc/intel/fsp_baytrail/microcode/microcode_size.h | 2 +-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/soc/intel/fsp_baytrail/microcode/microcode_blob.c b/src/soc/intel/fsp_baytrail/microcode/microcode_blob.c
index 51b6c19..709ff92 100644
--- a/src/soc/intel/fsp_baytrail/microcode/microcode_blob.c
+++ b/src/soc/intel/fsp_baytrail/microcode/microcode_blob.c
@@ -19,8 +19,14 @@
unsigned microcode[] = {
-/* Size is 0x19800 - update in microcode_size.h when a patch gets changed. */
+/* Region size is 0x30000 - update in microcode_size.h if it gets larger. */
#include "M0230672228.h" // M0230672: Baytrail "Super SKU" B0/B1
-#include "M013067331E.h" // M0130673: Baytrail I B2 / B3
+#include "M0130673322.h" // M0130673: Baytrail I B2 / B3
+#include "M0130679901.h" // M0130679: Baytrail I D0
+ /* Dummy terminator */
+ 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0,
};
diff --git a/src/soc/intel/fsp_baytrail/microcode/microcode_size.h b/src/soc/intel/fsp_baytrail/microcode/microcode_size.h
index df6082d..ec55314 100644
--- a/src/soc/intel/fsp_baytrail/microcode/microcode_size.h
+++ b/src/soc/intel/fsp_baytrail/microcode/microcode_size.h
@@ -1,2 +1,2 @@
/* Maximum size of the area that the FSP will search for the correct microcode */
-#define MICROCODE_REGION_LENGTH 0x19800
+#define MICROCODE_REGION_LENGTH 0x30000