X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fsmp.c;h=8c077a1bab49e2a80b810ab1eb673a5291df5e23;hb=b93739776593eb470bd18ce8f8b028054cee0e3d;hp=40f5451e5fee4ec0276de4a8c5203467892120ae;hpb=4d96edc76ba1e7556700908c10cb0e257cce5573;p=seabios.git diff --git a/src/smp.c b/src/smp.c index 40f5451..8c077a1 100644 --- a/src/smp.c +++ b/src/smp.c @@ -17,15 +17,17 @@ #define APIC_ENABLED 0x0100 -struct { u32 ecx, eax, edx; } smp_mtrr[16] VAR16VISIBLE; +struct { u32 ecx, eax, edx; } smp_mtrr[32] VAR16VISIBLE; u32 smp_mtrr_count VAR16VISIBLE; void wrmsr_smp(u32 index, u64 val) { wrmsr(index, val); - if (smp_mtrr_count >= ARRAY_SIZE(smp_mtrr)) + if (smp_mtrr_count >= ARRAY_SIZE(smp_mtrr)) { + warn_noalloc(); return; + } smp_mtrr[smp_mtrr_count].ecx = index; smp_mtrr[smp_mtrr_count].eax = val; smp_mtrr[smp_mtrr_count].edx = val >> 32;