aboutsummaryrefslogtreecommitdiffstats
path: root/src/mptable.c
diff options
context:
space:
mode:
authorMagnus Christensson <mch@virtutech.com>2009-11-23 14:01:19 +0100
committerKevin O'Connor <kevin@koconnor.net>2010-01-18 00:26:25 -0500
commit41c09574829b1f290b7f013ab1e86cb9c559b2f4 (patch)
treefc69c4333077ffaf8dc0801849b5b4dff70b3f78 /src/mptable.c
parent7a98fd0d20ddd04fabf038f77e5e6d3bfba891ce (diff)
downloadseabios-41c09574829b1f290b7f013ab1e86cb9c559b2f4.tar.gz
Read APIC version from APIC instead of using a hard-coded value.
Signed-off-by: Magnus Christensson <mch@virtutech.com>
Diffstat (limited to 'src/mptable.c')
-rw-r--r--src/mptable.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mptable.c b/src/mptable.c
index f65bbebd..5357c032 100644
--- a/src/mptable.c
+++ b/src/mptable.c
@@ -36,6 +36,7 @@ mptable_init(void)
// Detect cpu info
u32 cpuid_signature, ebx, ecx, cpuid_features;
cpuid(1, &cpuid_signature, &ebx, &ecx, &cpuid_features);
+ u8 apic_version = readl((u8*)BUILD_APIC_ADDR + 0x30) & 0xff;
int pkgcpus = 1;
if (cpuid_features & (1 << 28)) {
/* Only populate the MPS tables with the first logical CPU in
@@ -51,7 +52,7 @@ mptable_init(void)
memset(cpu, 0, sizeof(*cpu));
cpu->type = MPT_TYPE_CPU;
cpu->apicid = i;
- cpu->apicver = 0x11;
+ cpu->apicver = apic_version;
/* cpu flags: enabled, bootstrap cpu */
cpu->cpuflag = (i < CountCPUs) | ((i == 0) << 1);
if (cpuid_signature) {