summaryrefslogtreecommitdiff
path: root/src/northbridge/intel
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2010-04-11 20:04:50 +0000
committerStefan Reinauer <stepan@openbios.org>2010-04-11 20:04:50 +0000
commitd9466493ec85045659336d11868ddd626944b650 (patch)
treef0c6e55e1c890433308e0fabb8ca35a364b86324 /src/northbridge/intel
parent4cc5af95b510141214fb454ffbf7796d4e086813 (diff)
add int15 handler for thomson ip1000
fix mbi length detection, this will remove what looked like an endless loop during vga init in some cases. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5408 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/northbridge/intel')
-rw-r--r--src/northbridge/intel/i82830/i82830_smihandler.c8
-rw-r--r--src/northbridge/intel/i82830/vga.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/northbridge/intel/i82830/i82830_smihandler.c b/src/northbridge/intel/i82830/i82830_smihandler.c
index e53d283b4b..733e624c26 100644
--- a/src/northbridge/intel/i82830/i82830_smihandler.c
+++ b/src/northbridge/intel/i82830/i82830_smihandler.c
@@ -187,7 +187,7 @@ static void mbi_call(u8 subf, banner_id_t *banner_id)
int i, count=0;
obj_header->banner.retsts = MSH_IF_NOT_FOUND;
- for (i=0; i< mbi_len;) {
+ for (i=0; i<mbi_len;) {
int len;
if (!(mbi[i] == 0xf0 && mbi [i+1] == 0xf6)) {
@@ -199,6 +199,12 @@ static void mbi_call(u8 subf, banner_id_t *banner_id)
len = ALIGN((mbi_header->size * 16) + sizeof(mbi_header) + mbi_header->name_len, 16);
if (obj_header->objnum == count) {
+#ifdef DEBUG_SMI_I82830
+ if (mbi_header->name_len == 0xff) {
+ printk(BIOS_DEBUG, "| |- corrupt.\n");
+ break;
+ }
+#endif
int headerlen = ALIGN(sizeof(mbi_header) + mbi_header->name_len + 15, 16);
#ifdef DEBUG_SMI_I82830
printk(BIOS_DEBUG, "| |- headerlen = %d\n", headerlen);
diff --git a/src/northbridge/intel/i82830/vga.c b/src/northbridge/intel/i82830/vga.c
index 37c967414b..66b591b548 100644
--- a/src/northbridge/intel/i82830/vga.c
+++ b/src/northbridge/intel/i82830/vga.c
@@ -42,7 +42,7 @@ static void vga_init(device_t dev)
"type %x\n", file->type, CBFS_TYPE_MBI);
} else {
mbi = (void *) CBFS_SUBHEADER(file);
- mbi_len = file->len;
+ mbi_len = ntohl(file->len);
}
} else {
printk(BIOS_INFO, "Could not find MBI.\n");