Made changes that allow for one cpu to be plugged into a SMP board.
This commit is contained in:
parent
e996d0bb05
commit
8cdc0de093
4 changed files with 24 additions and 20 deletions
|
|
@ -90,16 +90,23 @@ static void print_whami(void)
|
|||
static void check_cpus(void)
|
||||
{
|
||||
struct pci_dev *dev;
|
||||
u32 biu1;
|
||||
u32 biu0,biu1;
|
||||
|
||||
/* Find out which processor I'm running on, and if it was the boot
|
||||
* procesor so I can verify everything was setup correctly
|
||||
*/
|
||||
dev = pci_find_device(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_FE_GATE_700C,0);
|
||||
if (dev != NULL) {
|
||||
pci_read_config_dword(dev, 0x60, &biu0);
|
||||
if( !(biu0 & 0x80000000)) {
|
||||
initial_apicid[0] = -1;
|
||||
}
|
||||
pci_read_config_dword(dev, 0x68, &biu1);
|
||||
if( !(biu1 & 0x80000000)) {
|
||||
initial_apicid[1] = -1;
|
||||
}
|
||||
printk_debug("biu0 = 0x%08lx, apicid[0] = %d\n", biu0,
|
||||
initial_apicid[0]);
|
||||
printk_debug("biu1 = 0x%08lx, apicid[1] = %d\n", biu1,
|
||||
initial_apicid[1]);
|
||||
}
|
||||
|
|
@ -234,14 +241,6 @@ static void hide_devices(void)
|
|||
|
||||
void mainboard_cpu_fixup(int cpu)
|
||||
{
|
||||
if(cpu == 1) {
|
||||
check_cpus();
|
||||
if(initial_apicid[1] == -1) {
|
||||
printk_err("Only one CPU installed. Linux Bios requires 2\n");
|
||||
while(1); /* print error and spin */
|
||||
return; /* no apic because no cpu */
|
||||
}
|
||||
}
|
||||
/* This is an error, something is locked up */
|
||||
full_reset();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,12 +42,16 @@ void *smp_write_config_table(void *v, unsigned long * processor_map)
|
|||
smp_write_bus(mc, 1, "PCI ");
|
||||
smp_write_bus(mc, 2, "PCI ");
|
||||
smp_write_bus(mc, 3, "ISA ");
|
||||
|
||||
#if 0
|
||||
for(i=apic=0;i<MAX_CPUS;i++)
|
||||
if(processor_map[i])
|
||||
apic++;
|
||||
#endif
|
||||
|
||||
apic=2;
|
||||
|
||||
smp_write_ioapic(mc, apic, 0x11, 0xfec00000);
|
||||
|
||||
smp_write_intsrc(mc, mp_ExtINT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH,
|
||||
0x03, 0x00, apic, 0x00);
|
||||
smp_write_intsrc(mc, mp_INT, MP_IRQ_TRIGGER_EDGE|MP_IRQ_POLARITY_HIGH,
|
||||
|
|
|
|||
|
|
@ -90,16 +90,23 @@ static void print_whami(void)
|
|||
static void check_cpus(void)
|
||||
{
|
||||
struct pci_dev *dev;
|
||||
u32 biu1;
|
||||
u32 biu0, biu1;
|
||||
|
||||
/* Find out which processor I'm running on, and if it was the boot
|
||||
* procesor so I can verify everything was setup correctly
|
||||
*/
|
||||
dev = pci_find_device(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_FE_GATE_700C,0);
|
||||
if (dev != NULL) {
|
||||
pci_read_config_dword(dev, 0x60, &biu0);
|
||||
if( !(biu0 & 0x80000000)) {
|
||||
initial_apicid[0] = -1;
|
||||
}
|
||||
pci_read_config_dword(dev, 0x68, &biu1);
|
||||
if( !(biu1 & 0x80000000)) {
|
||||
initial_apicid[1] = -1;
|
||||
}
|
||||
printk_debug("biu0 = 0x%08lx, apicid[0] = %d\n", biu0,
|
||||
initial_apicid[0]);
|
||||
printk_debug("biu1 = 0x%08lx, apicid[1] = %d\n", biu1,
|
||||
initial_apicid[1]);
|
||||
}
|
||||
|
|
@ -234,14 +241,6 @@ static void hide_devices(void)
|
|||
|
||||
void mainboard_cpu_fixup(int cpu)
|
||||
{
|
||||
if(cpu == 1) {
|
||||
check_cpus();
|
||||
if(initial_apicid[1] == -1) {
|
||||
printk_err("Only one CPU installed, Linux Bios requires 2\n");
|
||||
while(1); /* print error and spin */
|
||||
return; /* no apic because no cpu */
|
||||
}
|
||||
}
|
||||
/* This is an error, something is locked up */
|
||||
full_reset();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,10 +42,12 @@ void *smp_write_config_table(void *v, unsigned long * processor_map)
|
|||
smp_write_bus(mc, 1, "PCI ");
|
||||
smp_write_bus(mc, 2, "PCI ");
|
||||
smp_write_bus(mc, 3, "ISA ");
|
||||
|
||||
#if 0
|
||||
for(i=apic=0;i<MAX_CPUS;i++)
|
||||
if(processor_map[i])
|
||||
apic++;
|
||||
#endif
|
||||
apic=2;
|
||||
|
||||
smp_write_ioapic(mc, apic, 0x11, 0xfec00000);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue