the following patch was just integrated into master:
commit 7bcffa511dee2782702cc2920580d15b34073e1c
Author: Zheng Bao <fishbaozi(a)gmail.com>
Date: Wed Nov 28 11:36:52 2012 +0800
AMD S3: Leverage the public SPI routine
Remove the old, unflexible code for storing S3 data in SPI flash.
Refer to flashrom. Tested on Parmer.
Change-Id: I60a10476befb4afab2b4241f01a988f4a8bb22cd
Signed-off-by: Zheng Bao <zheng.bao(a)amd.com>
Signed-off-by: zbao <fishbaozi(a)gmail.com>
Reviewed-on: http://review.coreboot.org/1920
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Reviewed-by: Marc Jones <marcj303(a)gmail.com>
Build-Tested: build bot (Jenkins) at Wed Nov 28 03:15:16 2012, giving +1
Reviewed-By: Stefan Reinauer <stefan.reinauer(a)coreboot.org> at Thu Nov 29 01:27:11 2012, giving +2
Reviewed-By: Marc Jones <marcj303(a)gmail.com> at Fri Nov 30 20:03:30 2012, giving +2
See http://review.coreboot.org/1920 for details.
-gerrit
Ronald G. Minnich (rminnich(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1954
-gerrit
commit 294bcfe9872c072b943ffd23f4fc4cfc0a4a5f66
Author: Ronald G. Minnich <rminnich(a)gmail.com>
Date: Fri Nov 30 10:54:13 2012 -0800
Make set_boot_successful depend on ARCH_X86
Set_boot_successful depends on CMOS parts that non-x86
platforms do not have. For now, make the current path
depend on ARCH_X86, and make the alternative empty.
While this might argue for Another Config Variable
I'm not sure it's warranted.
Change-Id: I68cf63367c8054d09a7a22303e7c04fb35ad0153
Signed-off-by: Ronald G. Minnich <rminnich(a)gmail.com>
---
src/include/fallback.h | 1 -
src/lib/fallback_boot.c | 8 ++++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/include/fallback.h b/src/include/fallback.h
index ffcbafb..7f3c823 100644
--- a/src/include/fallback.h
+++ b/src/include/fallback.h
@@ -3,7 +3,6 @@
#if !defined(__ASSEMBLER__) && !defined(__PRE_RAM__)
-void set_boot_successful(void);
void boot_successful(void);
#endif /* __ASSEMBLER__ */
diff --git a/src/lib/fallback_boot.c b/src/lib/fallback_boot.c
index b5ec6c3..27408fe 100644
--- a/src/lib/fallback_boot.c
+++ b/src/lib/fallback_boot.c
@@ -1,11 +1,12 @@
#include <console/console.h>
#include <fallback.h>
#include <watchdog.h>
-#include <pc80/mc146818rtc.h>
#include <arch/io.h>
+#if IS_ENABLED(CONFIG_ARCH_X86)
+#include <pc80/mc146818rtc.h>
-void set_boot_successful(void)
+static inline void set_boot_successful(void)
{
/* Remember I succesfully booted by setting
* the initial boot direction
@@ -25,6 +26,9 @@ void set_boot_successful(void)
byte &= 0x0f;
outb(byte, RTC_PORT(1));
}
+#else
+static inline void set_boot_successful(void) {}
+#endif
void boot_successful(void)
{
the following patch was just integrated into master:
commit 78a1667cbc0a26c09079c81aa7b8f4387c5f3774
Author: Ronald G. Minnich <rminnich(a)gmail.com>
Date: Thu Nov 29 16:28:21 2012 -0800
Create a a new configuration variable for PCI
Not all architectures have PCI. This new config variable allows control
of whether PCI support is configued in. It is selected for ARCH_X86.
Signed-off-by: Ronald G. Minnich <rminnich(a)gmail.com>
Change-Id: Ic5fe777b14fd6a16ba605ada1e22acf3e8a2c783
Signed-off-by: Ronald G. Minnich <rminnich(a)gmail.com>
Reviewed-on: http://review.coreboot.org/1947
Tested-by: build bot (Jenkins)
Build-Tested: build bot (Jenkins) at Fri Nov 30 18:58:34 2012, giving +1
Reviewed-By: Ronald G. Minnich <rminnich(a)gmail.com> at Fri Nov 30 19:02:57 2012, giving +2
See http://review.coreboot.org/1947 for details.
-gerrit
Ronald G. Minnich (rminnich(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1953
-gerrit
commit bc431789e24c8b1b81c07267ca1757373417d5b8
Author: Ronald G. Minnich <rminnich(a)gmail.com>
Date: Fri Nov 30 08:32:36 2012 -0800
Extend xcompile support for strange names
Some compilers report littlearm instead of arm. But the compiler names
itself arm. Recognize this strange convention and do the right thing.
Note we assume "littlearm" and "arm" are the same -- a safe assumption.
If we can find the person who runs ARM in big-endian mode someday,
we can ask them why.
Change-Id: I39cb74b8c7ebf2e560c1f76efa0e2d28cc017d5c
Signed-off-by: Ronald G. Minnich <rminnich(a)gmail.com>
---
util/xcompile/xcompile | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index cc01631..32b877e 100644
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -51,6 +51,7 @@ testas() {
local use_dash_twidth="$4"
local obj_file="$TMPFILE.o"
local full_arch="elf$twidth-$arch"
+ local little_full_arch="elf$twidth-little$arch"
rm -f "$obj_file"
[ -n "$use_dash_twidth" ] && use_dash_twidth="--$twidth"
@@ -60,7 +61,9 @@ testas() {
# Check output content type.
local obj_type="$(${gccprefixes}objdump -p $obj_file)"
local obj_arch="$(expr "$obj_type" : '.*format \(.[a-z0-9-]*\)')"
- [ "$obj_arch" = "$full_arch" ] || return 1
+ [ "$obj_arch" = "$full_arch" ] || \
+ [ "$obj_arch" = "$little_full_arch" ] || \
+ return 1
# Architecture matched.
GCCPREFIX="$gccprefixes"
@@ -111,9 +114,9 @@ detect_special_flags() {
# CFLAGS="$CFLAGS -mcpu=cortex-a9"
testcc "$CC" "\
$CFLAGS -ffixed-r8 -msoft-float -marm -mabi=aapcs-linux \
--mno-thumb-interwork -march=armv7 -mno-thumb-interwork" && CFLAGS="\
+-mno-thumb-interwork -march=arm -mno-thumb-interwork" && CFLAGS="\
$CFLAGS -ffixed-r8 -msoft-float -marm -mabi=aapcs-linux \
--mno-thumb-interwork -march=armv7 -mno-thumb-interwork"
+-mno-thumb-interwork -march=arm -mno-thumb-interwork"
;;
esac
}
@@ -143,8 +146,8 @@ trap clean_up EXIT
SUPPORTED_ARCHITECTURE="x86 arm"
# ARM Architecture
-TARCH_arm="littlearm"
-TCLIST_arm="littlearm"
+TARCH_arm="arm"
+TCLIST_arm="arm"
TWIDTH_arm="32"
# X86 Architecture
@@ -155,6 +158,7 @@ XGCCPATH=${1:-"`pwd`/util/crossgcc/xgcc/bin/"}
# This loops over all supported architectures.
for architecture in $SUPPORTED_ARCHITECTURE; do
+echo $architecture
GCCPREFIX="invalid"
TARCH="$(eval echo \$TARCH_$architecture)"
TCLIST="$(eval echo \$TCLIST_$architecture)"
@@ -164,7 +168,7 @@ for architecture in $SUPPORTED_ARCHITECTURE; do
# To override toolchain, define CROSS_COMPILE_$arch or CROSS_COMPILE as
# environment variable.
- # Ex: CROSS_COMPILE_arm="armv7a-cros-linux-gnueabi-"
+ # Ex: CROSS_COMPILE_arm="arma-cros-linux-gnueabi-"
# CROSS_COMPILE_x86="i686-pc-linux-gnu-"
search="$(eval echo \$CROSS_COMPILE_$architecture 2>/dev/null)"
search="$search $CROSS_COMPILE"
just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1950
-gerrit
commit 3665ace13de68e798de31499197cc600d2426967
Author: Nico Huber <nico.huber(a)secunet.com>
Date: Mon Oct 8 15:03:35 2012 +0200
libpayload: Remove unused FLAG_USED from memory allocator
The FLAG_USED bit in the memory allocator's header type was never
read. This removes it to save one bit for the region size so we can
have heaps of up to 32MiB.
Change-Id: Ibd78e67d79e872d6df426516667c795fd52326d5
Signed-off-by: Nico Huber <nico.huber(a)secunet.com>
Reviewed-on: http://review.coreboot.org/1942
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
---
payloads/libpayload/libc/malloc.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/payloads/libpayload/libc/malloc.c b/payloads/libpayload/libc/malloc.c
index 82bae3c..7756a3b 100644
--- a/payloads/libpayload/libc/malloc.c
+++ b/payloads/libpayload/libc/malloc.c
@@ -37,6 +37,9 @@
* We're also susceptible to the usual buffer overrun poisoning, though the
* risk is within acceptable ranges for this implementation (don't overrun
* your buffers, kids!).
+ *
+ * The header format (hdrtype_t) supports heaps of up to 32MiB (given that int
+ * is 32 bits long).
*/
#define IN_MALLOC_C
@@ -51,14 +54,15 @@ typedef unsigned int hdrtype_t;
#define MAGIC (0x2a << 26)
#define FLAG_FREE (1 << 25)
-#define FLAG_USED (1 << 24)
+#define SIZE_BITS 25
+#define MAX_SIZE ((1 << SIZE_BITS) - 1)
-#define SIZE(_h) ((_h) & 0xFFFFFF)
+#define SIZE(_h) ((_h) & MAX_SIZE)
-#define _HEADER(_s, _f) ((hdrtype_t) (MAGIC | (_f) | ((_s) & 0xFFFFFF)))
+#define _HEADER(_s, _f) ((hdrtype_t) (MAGIC | (_f) | ((_s) & MAX_SIZE)))
#define FREE_BLOCK(_s) _HEADER(_s, FLAG_FREE)
-#define USED_BLOCK(_s) _HEADER(_s, FLAG_USED)
+#define USED_BLOCK(_s) _HEADER(_s, 0)
#define HDRSIZE (sizeof(hdrtype_t))
@@ -91,7 +95,7 @@ static void *alloc(int len)
/* Align the size. */
len = (len + 3) & ~3;
- if (!len || len > 0xffffff)
+ if (!len || len > MAX_SIZE)
return (void *)NULL;
/* Make sure the region is setup correctly. */