Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9162
-gerrit
commit db89495bb6f939e9cdf49e6b2b8492b1ea5dca9a
Author: Vadim Bendebury <vbendeb(a)chromium.org>
Date: Sat Nov 29 22:05:09 2014 -0800
Avoid 64bit math on MIPS platforms
Low level 64 bit division and modulo functions are not available for
MIPS platforms, but are required by the printk formatter.
Modify the code to avoid 64 bit math when building for MIPS. In case
the user does print a value exceeding 2^32, send a few junk characters
to the output to indicate a corrupted value printed.
[pg: add the printed sequence to the comment, so git grep can find it]
BRANCH=none
BUG=none
TEST=startup code on Urara properly prints CBFS address values which
are passed as 64 bit integers.
Change-Id: Ie777019cd8d55c53d5e816fbacfe79893c3d64c7
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Original-Commit-Id: 8347f914a9cceca017668f8387ba679c2c79e66d
Original-Change-Id: I25b8a900b3ba4ec1da3446dcc5f03101d5cdb757
Original-Signed-off-by: Vadim Bendebury <vbendeb(a)chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/232294
Original-Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/console/vtxprintf.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/console/vtxprintf.c b/src/console/vtxprintf.c
index b515fb8..2fcefd2 100644
--- a/src/console/vtxprintf.c
+++ b/src/console/vtxprintf.c
@@ -10,6 +10,10 @@
#define call_tx(x) tx_byte(x, data)
+#if !CONFIG_ARCH_MIPS
+#define SUPPORT_64BIT_INTS
+#endif
+
/* haha, don't need ctype.c */
#define isdigit(c) ((c) >= '0' && (c) <= '9')
#define is_digit isdigit
@@ -33,13 +37,25 @@ static int skip_atoi(const char **s)
#define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */
static int number(void (*tx_byte)(unsigned char byte, void *data),
- unsigned long long num, int base, int size, int precision, int type,
+ unsigned long long inum, int base, int size, int precision, int type,
void *data)
{
char c,sign,tmp[66];
const char *digits="0123456789abcdefghijklmnopqrstuvwxyz";
int i;
int count = 0;
+#ifdef SUPPORT_64BIT_INTS
+ unsigned long long num = inum;
+#else
+ unsigned long num = (long)inum;
+
+ if (num != inum) {
+ /* Alert user to an incorrect result by printing #^!. */
+ call_tx('#');
+ call_tx('^');
+ call_tx('!');
+ }
+#endif
if (type & LARGE)
digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9161
-gerrit
commit 161b3dc4e8d5005a738eaa3c56697b9c30f32ec2
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Fri Mar 27 16:56:23 2015 +0100
build system: generalize src-to-obj
It can now be used on any list of files instead of assuming
to work on $($(class)-src).
This is inspired by the commit listed below, but rewritten to match
upstream, and split in smaller pieces to keep intent clear.
Change-Id: Ib77afedd4c3f847963497beea503f5447a7c6e28
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Based-On-Change-Id: I50af7dacf616e0f8ff4c43f4acc679089ad7022b
Based-On-Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Based-On-Reviewed-on: https://chromium-review.googlesource.com/219170
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 0cc9b6a..c5cbda1 100644
--- a/Makefile
+++ b/Makefile
@@ -203,8 +203,8 @@ endif
# Eliminate duplicate mentions of source files in a class
$(foreach class,$(classes),$(eval $(class)-srcs:=$(sort $($(class)-srcs))))
-src-to-obj=$(addsuffix .$(1).o, $(basename $(patsubst src/%, $(obj)/%, $($(1)-srcs))))
-$(foreach class,$(classes),$(eval $(class)-objs:=$(call src-to-obj,$(class))))
+src-to-obj=$(addsuffix .$(1).o, $(basename $(patsubst src/%, $(obj)/%, $(2))))
+$(foreach class,$(classes),$(eval $(class)-objs:=$(call src-to-obj,$(class),$($(class)-srcs))))
# Save all objs before processing them (for dependency inclusion)
originalobjs:=$(foreach var, $(addsuffix -objs,$(classes)), $($(var)))
the following patch was just integrated into master:
commit 5602f2cd735c3a763a4c8256c1df1e8ee77832db
Author: Patrick Georgi <patrick(a)georgi-clan.de>
Date: Sat Mar 28 15:48:47 2015 +0100
crossgcc: Fix calling outside util/crossgcc
Copy $0 contains the path, and we cd into that early.
Change-Id: If4124d16dea97b5eee4996bdfa3eae3d5d94c5d1
Signed-off-by: Patrick Georgi <patrick(a)georgi-clan.de>
Reviewed-on: http://review.coreboot.org/9145
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin(a)google.com>
See http://review.coreboot.org/9145 for details.
-gerrit
Aaron Durbin (adurbin(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9160
-gerrit
commit 6358791b6cc3568933254982d41a970aba67d37e
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Sun Mar 29 22:16:55 2015 -0500
x86: ensure SMM entry points are defined
With the garbage collect sections patches one needs to
ensure there is a root symbol to root the garbage collection
from. Without this patch many symbols and sections will be
culled incorrectly.
Change-Id: Ibb579d18d4819af666d6ec7dfc30776e8c404b71
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/cpu/x86/smm/smm.ld | 1 +
src/cpu/x86/smm/smm_tseg.ld | 6 ++++--
src/cpu/x86/smm/smmhandler.S | 1 +
src/cpu/x86/smm/smmhandler_tseg.S | 1 +
4 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/cpu/x86/smm/smm.ld b/src/cpu/x86/smm/smm.ld
index 5d316a8..6cbde09 100644
--- a/src/cpu/x86/smm/smm.ld
+++ b/src/cpu/x86/smm/smm.ld
@@ -1,6 +1,7 @@
/* Maximum number of CPUs/cores */
CPUS = 4;
+ENTRY(smm_handler_start);
SECTIONS
{
diff --git a/src/cpu/x86/smm/smm_tseg.ld b/src/cpu/x86/smm/smm_tseg.ld
index 99f2aa0..e8f067d 100644
--- a/src/cpu/x86/smm/smm_tseg.ld
+++ b/src/cpu/x86/smm/smm_tseg.ld
@@ -1,5 +1,6 @@
/* Maximum number of CPUs/cores */
CPUS = 16;
+ENTRY(smm_handler_start);
SECTIONS
{
@@ -52,11 +53,12 @@ SECTIONS
/* C read-write data of the SMM handler */
. = ALIGN(4);
*(.data)
+ *(.data.*)
/* C uninitialized data of the SMM handler */
. = ALIGN(4);
- *(.bss)
- *(.sbss)
+ *(.bss.*)
+ *(.sbss.*)
*(COMMON)
. = ALIGN(4);
diff --git a/src/cpu/x86/smm/smmhandler.S b/src/cpu/x86/smm/smmhandler.S
index 5d3aae3..611c0f3 100644
--- a/src/cpu/x86/smm/smmhandler.S
+++ b/src/cpu/x86/smm/smmhandler.S
@@ -75,6 +75,7 @@
*
* All the bad magic is not all that bad after all.
*/
+.global smm_handler_start
smm_handler_start:
movw $(smm_gdtptr16 - smm_handler_start + SMM_HANDLER_OFFSET), %bx
data32 lgdt %cs:(%bx)
diff --git a/src/cpu/x86/smm/smmhandler_tseg.S b/src/cpu/x86/smm/smmhandler_tseg.S
index c9d78b9..ee8bd26 100644
--- a/src/cpu/x86/smm/smmhandler_tseg.S
+++ b/src/cpu/x86/smm/smmhandler_tseg.S
@@ -91,6 +91,7 @@
*
* All the bad magic is not all that bad after all.
*/
+.global smm_handler_start
smm_handler_start:
movl $(TSEG_BAR), %eax /* Get TSEG base from PCIE */
addr32 movl (%eax), %edx /* Save TSEG_BAR in %edx */
Aaron Durbin (adurbin(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9160
-gerrit
commit 5a93607988de5584c5995a1b2ea38a6e6f1d9ed0
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Sun Mar 29 22:16:55 2015 -0500
x86: ensure SMM entry points are defined
With the garbage collect sections patches one needs to
ensure there is a root symbol to root the garbage collection
from. Without this patch many symbols and sections will be
culled incorrectly.
Change-Id: Ibb579d18d4819af666d6ec7dfc30776e8c404b71
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/cpu/x86/smm/smm.ld | 1 +
src/cpu/x86/smm/smm_tseg.ld | 1 +
src/cpu/x86/smm/smmhandler.S | 1 +
src/cpu/x86/smm/smmhandler_tseg.S | 1 +
4 files changed, 4 insertions(+)
diff --git a/src/cpu/x86/smm/smm.ld b/src/cpu/x86/smm/smm.ld
index 5d316a8..6cbde09 100644
--- a/src/cpu/x86/smm/smm.ld
+++ b/src/cpu/x86/smm/smm.ld
@@ -1,6 +1,7 @@
/* Maximum number of CPUs/cores */
CPUS = 4;
+ENTRY(smm_handler_start);
SECTIONS
{
diff --git a/src/cpu/x86/smm/smm_tseg.ld b/src/cpu/x86/smm/smm_tseg.ld
index 99f2aa0..8a0336f 100644
--- a/src/cpu/x86/smm/smm_tseg.ld
+++ b/src/cpu/x86/smm/smm_tseg.ld
@@ -1,5 +1,6 @@
/* Maximum number of CPUs/cores */
CPUS = 16;
+ENTRY(smm_handler_start);
SECTIONS
{
diff --git a/src/cpu/x86/smm/smmhandler.S b/src/cpu/x86/smm/smmhandler.S
index 5d3aae3..611c0f3 100644
--- a/src/cpu/x86/smm/smmhandler.S
+++ b/src/cpu/x86/smm/smmhandler.S
@@ -75,6 +75,7 @@
*
* All the bad magic is not all that bad after all.
*/
+.global smm_handler_start
smm_handler_start:
movw $(smm_gdtptr16 - smm_handler_start + SMM_HANDLER_OFFSET), %bx
data32 lgdt %cs:(%bx)
diff --git a/src/cpu/x86/smm/smmhandler_tseg.S b/src/cpu/x86/smm/smmhandler_tseg.S
index c9d78b9..ee8bd26 100644
--- a/src/cpu/x86/smm/smmhandler_tseg.S
+++ b/src/cpu/x86/smm/smmhandler_tseg.S
@@ -91,6 +91,7 @@
*
* All the bad magic is not all that bad after all.
*/
+.global smm_handler_start
smm_handler_start:
movl $(TSEG_BAR), %eax /* Get TSEG base from PCIE */
addr32 movl (%eax), %edx /* Save TSEG_BAR in %edx */