From 9dedda25aa3f6dd18f44e322691c1351377f1927 Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 17 Nov 2003 08:58:16 +0000 Subject: Initial landing of SMP support for FreeBSD/amd64. - This is heavily derived from John Baldwin's apic/pci cleanup on i386. - I have completely rewritten or drastically cleaned up some other parts. (in particular, bootstrap) - This is still a WIP. It seems that there are some highly bogus bioses on nVidia nForce3-150 boards. I can't stress how broken these boards are. I have a workaround in mind, but right now the Asus SK8N is broken. The Gigabyte K8NPro (nVidia based) is also mind-numbingly hosed. - Most of my testing has been with SCHED_ULE. SCHED_4BSD works. - the apic and acpi components are 'standard'. - If you have an nVidia nForce3-150 board, you are stuck with 'device atpic' in addition, because they somehow managed to forget to connect the 8254 timer to the apic, even though its in the same silicon! ARGH! This directly violates the ACPI spec. --- sys/kern/kern_switch.c | 4 ++-- sys/kern/subr_witness.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/kern') diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c index 3a71f6e..2dee8e3 100644 --- a/sys/kern/kern_switch.c +++ b/sys/kern/kern_switch.c @@ -97,7 +97,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#if defined(SMP) && defined(__i386__) +#if defined(SMP) && (defined(__i386__) || defined(__amd64__)) #include #endif #include @@ -124,7 +124,7 @@ choosethread(void) struct thread *td; struct ksegrp *kg; -#if defined(SMP) && defined(__i386__) +#if defined(SMP) && (defined(__i386__) || defined(__amd64__)) if (smp_active == 0 && PCPU_GET(cpuid) != 0) { /* Shutting down, run idlethread on AP's */ td = PCPU_GET(idlethread); diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index 6cb5dba..28d5605 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -296,7 +296,7 @@ static struct witness_order_list_entry order_lists[] = { { "icu", &lock_class_mtx_spin }, #ifdef SMP { "smp rendezvous", &lock_class_mtx_spin }, -#ifdef __i386__ +#if defined(__i386__) || defined(__amd64__) { "tlb", &lock_class_mtx_spin }, { "lazypmap", &lock_class_mtx_spin }, #endif -- cgit v1.1