From 2f8c4f829e7eab2563dfb9d17d8c93d9070f7c45 Mon Sep 17 00:00:00 2001 From: Sven Schnelle Date: Wed, 20 Jun 2012 10:23:31 +0200 Subject: [PATCH] mptable: initialize apic/bus arrays with ARRAY_SIZE and increase the busses size to 32, as 16 isn't enough one some systems (i5000 for example) Change-Id: Ie09f451dd82ac25b0de85fd47807136e01da737b Signed-off-by: Sven Schnelle Reviewed-on: http://review.coreboot.org/1114 Tested-by: build bot (Jenkins) --- util/mptable/mptable.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/util/mptable/mptable.c b/util/mptable/mptable.c index e2818610b6..e2845765e6 100644 --- a/util/mptable/mptable.c +++ b/util/mptable/mptable.c @@ -276,7 +276,7 @@ static void pnstr(uint8_t * s, int c); /* global data */ int pfd; /* physical /dev/mem fd */ -int busses[16]; +int busses[32]; int apics[16]; int ncpu; @@ -787,9 +787,10 @@ static void MPConfigTableHeader(uint32_t pap) } /* initialze tables */ - for (x = 0; x < 16; ++x) { - busses[x] = apics[x] = 0xff; - } + for(x = 0; x < ARRAY_SIZE(busses); x++) + busses[x] = UNKNOWN_BUSTYPE; + for(x = 0; x < ARRAY_SIZE(apics); x++) + apics[x] = 0xff; ncpu = 0; nbus = 0;