Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1397
-gerrit
commit dd9e9f1786dbdb314ce0c4244dee85357e2ae58a
Author: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
Date: Fri Aug 3 13:20:57 2012 -0500
Add a capability for mainboard-specific posting.
Some mainboards have really nice capabilities for posting, beyond
simple POST cards. Further, some can not use a POST card. This
change defines a weak symbol (mainboard_post) that can be overridden
by a real mainboard_post function.
If, for example, you'd like to do something fancy before the payload starts,
you can add this to mainboard.c:
void mainboard_post(u8 value)
{
switch(value){
case POST_TIME_TO_PARTY: some_fancy_lights();
break;
}
}
Maybe the post function should be an entry in the device. We're beginning to over-use
weak symbols.
BUG=None
TEST=Build and boot a google chromebook. Observe that it still works. Use it to drive
some pretty lights.
Change-Id: I3512d2ec34a66c747287191851c3f68b6a7cc1b2
Signed-off-by: Ronald G. Minnich <rminnich(a)gmail.com>
Signed-off-by: Alexandru Gagniuc <mr.nuke.me(a)gmail.com>
---
src/console/post.c | 15 +++++++++++++++
src/include/console/console.h | 2 ++
2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/src/console/post.c b/src/console/post.c
index 08336a2..be2d0e9 100644
--- a/src/console/post.c
+++ b/src/console/post.c
@@ -24,6 +24,20 @@
/* Write POST information */
+/* someday romcc will be gone. */
+#ifndef __ROMCC__
+/* Some mainboards have very nice features beyond just a simple display.
+ * They can override this function.
+ */
+void __attribute__((weak)) mainboard_post(uint8_t value)
+{
+}
+
+#else
+/* This just keeps the number of #ifs to a minimum */
+#define mainboard_post(x)
+#endif
+
void post_code(uint8_t value)
{
#if !CONFIG_NO_POST
@@ -34,4 +48,5 @@ void post_code(uint8_t value)
#endif
outb(value, CONFIG_POST_PORT);
#endif
+ mainboard_post(value);
}
diff --git a/src/include/console/console.h b/src/include/console/console.h
index 56e202d..00be96f 100644
--- a/src/include/console/console.h
+++ b/src/include/console/console.h
@@ -69,6 +69,8 @@ extern int console_loglevel;
#ifndef __ROMCC__
void console_init(void);
void post_code(u8 value);
+/* this function is weak and can be overridden by a mainboard function. */
+void mainboard_post(u8 value);
void __attribute__ ((noreturn)) die(const char *msg);
int do_printk(int msg_level, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
the following patch was just integrated into master:
commit ea09f9b62ad0fe5f0a40e1bf6c76fd411c6794fa
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Thu Aug 2 09:43:48 2012 +0300
VIA Epia-N: drop add_mainboard_resources()
The board had HAVE_MAINBOARD_RESOURCES=0 so this was never
called. Drop unnecessary includes too.
Change-Id: Ia7bddf29a16966c052b5cabbb47029299e6dbd12
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Build-Tested: build bot (Jenkins) at Thu Aug 2 14:23:42 2012, giving +1
Reviewed-By: Anton Kochkov <anton.kochkov(a)gmail.com> at Fri Aug 3 12:25:51 2012, giving +2
See http://review.coreboot.org/1392 for details.
-gerrit
the following patch was just integrated into master:
commit 850fd7a8379c49ec961dda12c8119f405c0d3cec
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Wed Jul 4 12:02:58 2012 +0300
Intel CPUs: Fix counting of CPU cores
Detection for a hyper-threading CPU was not compatible with multicore
CPUs. When using CPUID eax==4, also need to set ecx=0.
CAR init tested on real hardware with hyper-threading model_f25 and
under qemu 0.15.1 with multicore CPU.
Change-Id: I28ac8790f94652e4ba8ff88fe7812c812f967608
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Build-Tested: build bot (Jenkins) at Tue Jul 31 22:27:13 2012, giving +1
Reviewed-By: Anton Kochkov <anton.kochkov(a)gmail.com> at Fri Aug 3 12:19:31 2012, giving +2
See http://review.coreboot.org/1172 for details.
-gerrit