just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1949
-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. */
I've managed to get it to boot into grub now. Seems like the problem was
that I forgot to init rs780 in romstage. However now the linux kernel panics
because it seems like it can find the hdds.
I also managed to solve the AGESA arrests that was happening. But it doesn't
seem to have any effect on the boot process.
I've attatched the boot log. It would be really helpful if I could get some
help as I have no idea why it can load grub and read the kernel image from
disk but not read the disk themselfs for the linux kernel.
Note also that it doesn't matter if I boot the disks in IDE or AHCI mode.
The same error happens.
the following patch was just integrated into master:
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>
See http://review.coreboot.org/1942 for details.
-gerrit
the following patch was just integrated into master:
commit 0227dec291ac825aae514b7841bb39a936bcec77
Author: Nico Huber <nico.huber(a)secunet.com>
Date: Fri Nov 9 18:12:21 2012 +0100
libpayload: Fix lookup by label in CMOS layouts
The condition to compare the labels was twisted.
Change-Id: I34a665aa87e2ff0480eda0f249bbbea8a8fe68d8
Signed-off-by: Nico Huber <nico.huber(a)secunet.com>
Reviewed-on: http://review.coreboot.org/1941
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See http://review.coreboot.org/1941 for details.
-gerrit
the following patch was just integrated into master:
commit 48e21ec430cf83f540bf189b1dfa372938cc9b36
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Wed Nov 14 08:08:50 2012 +0200
Add mainboard hook to bootblock
Change allows to override default bootblock_mainboard_init() with
mainboard-specific code.
If the default bootblock_mainboard_init() handler is replaced, with
one from file BOOTBLOCK_MAINBOARD_INIT, one needs to take care the
replacement calls all the necessary bootblock_x_init() functions.
Change-Id: Ie8c667cdba7cafe9ed2d4b19ab2bd21d941ad4ca
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-on: http://review.coreboot.org/1845
Reviewed-by: Patrick Georgi <patrick(a)georgi-clan.de>
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Reviewed-By: Patrick Georgi <patrick(a)georgi-clan.de> at Wed Nov 14 09:24:00 2012, giving +1
Build-Tested: build bot (Jenkins) at Wed Nov 14 10:15:23 2012, giving +1
Reviewed-By: Stefan Reinauer <stefan.reinauer(a)coreboot.org> at Fri Nov 30 00:57:06 2012, giving +2
See http://review.coreboot.org/1845 for details.
-gerrit
the following patch was just integrated into master:
commit f90224845d5a916863c3b060a58fd82ff8d6bec0
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Wed Nov 14 08:01:44 2012 +0200
Refactor bootblock initialisation
Makes it a bit easier to implement mainboard-specific behaviour
while executing the bootblock.
Change-Id: I04e87f89efb4fad1c0e20b62ea6a50329a286205
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-on: http://review.coreboot.org/1844
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Build-Tested: build bot (Jenkins) at Wed Nov 14 09:53:52 2012, giving +1
Reviewed-By: Stefan Reinauer <stefan.reinauer(a)coreboot.org> at Fri Nov 30 00:57:57 2012, giving +2
See http://review.coreboot.org/1844 for details.
-gerrit