Commit 682b7ff3 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] generalise mptable access

parent 438a8790
......@@ -33,6 +33,7 @@
#include <mach_apic.h>
#include <mach_mpparse.h>
#include <bios_ebda.h>
/* Have we found an MP table */
int smp_found_config;
......@@ -708,8 +709,23 @@ static int __init smp_scan_config (unsigned long base, unsigned long length)
printk(KERN_INFO "found SMP MP-table at %08lx\n",
virt_to_phys(mpf));
reserve_bootmem(virt_to_phys(mpf), PAGE_SIZE);
if (mpf->mpf_physptr)
reserve_bootmem(mpf->mpf_physptr, PAGE_SIZE);
if (mpf->mpf_physptr) {
/*
* We cannot access to MPC table to compute
* table size yet, as only few megabytes from
* the bottom is mapped now.
* PC-9800's MPC table places on the very last
* of physical memory; so that simply reserving
* PAGE_SIZE from mpg->mpf_physptr yields BUG()
* in reserve_bootmem.
*/
unsigned long size = PAGE_SIZE;
unsigned long end = max_low_pfn * PAGE_SIZE;
if (mpf->mpf_physptr + size > end)
size = end - mpf->mpf_physptr;
reserve_bootmem(mpf->mpf_physptr, size);
}
mpf_found = mpf;
return 1;
}
......@@ -752,8 +768,8 @@ void __init find_smp_config (void)
* MP1.4 SPEC states to only scan first 1K of 4K EBDA.
*/
address = *(unsigned short *)phys_to_virt(0x40E);
address <<= 4;
address = get_bios_ebda();
if (address)
smp_scan_config(address, 0x400);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment