summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorfsmp <fsmp@FreeBSD.org>1997-08-09 23:01:03 +0000
committerfsmp <fsmp@FreeBSD.org>1997-08-09 23:01:03 +0000
commit0204bddf7c022f12cf0b578e39be207ed36c0463 (patch)
tree1ef1f388f460c9cd6662958b56230d889852c928 /sys/amd64
parent7ef900f1688269eab5c74e991f3290cb4cf20d01 (diff)
downloadFreeBSD-src-0204bddf7c022f12cf0b578e39be207ed36c0463.zip
FreeBSD-src-0204bddf7c022f12cf0b578e39be207ed36c0463.tar.gz
Some fixes towards making "default configs" work again.
Still not fixed, no idea why. Debug help from: "Thomas D. Dean" <tomdean@ix.netcom.com>
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/mp_machdep.c28
-rw-r--r--sys/amd64/amd64/mptable.c28
-rw-r--r--sys/amd64/include/mptable.h28
3 files changed, 45 insertions, 39 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index cf5078d..db6db90 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.23 1997/07/30 22:51:11 smp Exp smp $
+ * $Id: mp_machdep.c,v 1.26 1997/08/09 22:12:14 smp Exp $
*/
#include "opt_smp.h"
@@ -52,6 +52,12 @@
#include <i386/isa/intr_machdep.h> /* IPIs */
#endif /* APIC_IO */
+#if defined(TEST_DEFAULT_CONFIG)
+#define MPFPS_MPFB1 TEST_DEFAULT_CONFIG
+#else
+#define MPFPS_MPFB1 mpfps->mpfb1
+#endif /* TEST_DEFAULT_CONFIG */
+
#define WARMBOOT_TARGET 0
#define WARMBOOT_OFF (KERNBASE + 0x0467)
#define WARMBOOT_SEG (KERNBASE + 0x0469)
@@ -248,6 +254,7 @@ static void mp_enable(u_int boot_addr);
static int mptable_pass1(void);
static int mptable_pass2(void);
static void default_mp_table(int type);
+static void fix_mp_table(void);
static void init_locks(void);
static int start_all_aps(u_int boot_addr);
static void install_ap_tramp(u_int boot_addr);
@@ -466,6 +473,9 @@ mp_enable(u_int boot_addr)
if (x)
default_mp_table(x);
+ /* post scan cleanup */
+ fix_mp_table();
+
#if defined(APIC_IO)
/* fill the LOGICAL io_apic_versions table */
@@ -608,7 +618,6 @@ io_int io_apic_ints[NINTR];
static int nintrs;
-static void fix_mp_table __P((void));
static int processor_entry __P((proc_entry_ptr entry, int cpu));
static int bus_entry __P((bus_entry_ptr entry, int bus));
static int io_apic_entry __P((io_apic_entry_ptr entry, int apic));
@@ -657,14 +666,14 @@ mptable_pass1(void)
nintrs = 0;
/* check for use of 'default' configuration */
- if (mpfps->mpfb1 != 0) {
+ if (MPFPS_MPFB1 != 0) {
/* use default addresses */
cpu_apic_address = DEFAULT_APIC_BASE;
io_apic_address[0] = DEFAULT_IO_APIC_BASE;
/* fill in with defaults */
mp_naps = 2; /* includes BSP */
- mp_nbusses = default_data[mpfps->mpfb1 - 1][0];
+ mp_nbusses = default_data[MPFPS_MPFB1 - 1][0];
#if defined(APIC_IO)
mp_napics = 1;
nintrs = 16;
@@ -792,12 +801,8 @@ mptable_pass2(void)
picmode = (mpfps->mpfb2 & 0x80) ? 1 : 0;
/* check for use of 'default' configuration */
-#if defined(TEST_DEFAULT_CONFIG)
- return TEST_DEFAULT_CONFIG;
-#else
- if (mpfps->mpfb1 != 0)
- return mpfps->mpfb1; /* return default configuration type */
-#endif /* TEST_DEFAULT_CONFIG */
+ if (MPFPS_MPFB1 != 0)
+ return MPFPS_MPFB1; /* return default configuration type */
if ((cth = mpfps->pap) == 0)
panic("MP Configuration Table Header MISSING!");
@@ -842,9 +847,6 @@ mptable_pass2(void)
if (boot_cpu_id == -1)
panic("NO BSP found!");
- /* post scan cleanup */
- fix_mp_table();
-
/* report fact that its NOT a default configuration */
return 0;
}
diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c
index cf5078d..db6db90 100644
--- a/sys/amd64/amd64/mptable.c
+++ b/sys/amd64/amd64/mptable.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.23 1997/07/30 22:51:11 smp Exp smp $
+ * $Id: mp_machdep.c,v 1.26 1997/08/09 22:12:14 smp Exp $
*/
#include "opt_smp.h"
@@ -52,6 +52,12 @@
#include <i386/isa/intr_machdep.h> /* IPIs */
#endif /* APIC_IO */
+#if defined(TEST_DEFAULT_CONFIG)
+#define MPFPS_MPFB1 TEST_DEFAULT_CONFIG
+#else
+#define MPFPS_MPFB1 mpfps->mpfb1
+#endif /* TEST_DEFAULT_CONFIG */
+
#define WARMBOOT_TARGET 0
#define WARMBOOT_OFF (KERNBASE + 0x0467)
#define WARMBOOT_SEG (KERNBASE + 0x0469)
@@ -248,6 +254,7 @@ static void mp_enable(u_int boot_addr);
static int mptable_pass1(void);
static int mptable_pass2(void);
static void default_mp_table(int type);
+static void fix_mp_table(void);
static void init_locks(void);
static int start_all_aps(u_int boot_addr);
static void install_ap_tramp(u_int boot_addr);
@@ -466,6 +473,9 @@ mp_enable(u_int boot_addr)
if (x)
default_mp_table(x);
+ /* post scan cleanup */
+ fix_mp_table();
+
#if defined(APIC_IO)
/* fill the LOGICAL io_apic_versions table */
@@ -608,7 +618,6 @@ io_int io_apic_ints[NINTR];
static int nintrs;
-static void fix_mp_table __P((void));
static int processor_entry __P((proc_entry_ptr entry, int cpu));
static int bus_entry __P((bus_entry_ptr entry, int bus));
static int io_apic_entry __P((io_apic_entry_ptr entry, int apic));
@@ -657,14 +666,14 @@ mptable_pass1(void)
nintrs = 0;
/* check for use of 'default' configuration */
- if (mpfps->mpfb1 != 0) {
+ if (MPFPS_MPFB1 != 0) {
/* use default addresses */
cpu_apic_address = DEFAULT_APIC_BASE;
io_apic_address[0] = DEFAULT_IO_APIC_BASE;
/* fill in with defaults */
mp_naps = 2; /* includes BSP */
- mp_nbusses = default_data[mpfps->mpfb1 - 1][0];
+ mp_nbusses = default_data[MPFPS_MPFB1 - 1][0];
#if defined(APIC_IO)
mp_napics = 1;
nintrs = 16;
@@ -792,12 +801,8 @@ mptable_pass2(void)
picmode = (mpfps->mpfb2 & 0x80) ? 1 : 0;
/* check for use of 'default' configuration */
-#if defined(TEST_DEFAULT_CONFIG)
- return TEST_DEFAULT_CONFIG;
-#else
- if (mpfps->mpfb1 != 0)
- return mpfps->mpfb1; /* return default configuration type */
-#endif /* TEST_DEFAULT_CONFIG */
+ if (MPFPS_MPFB1 != 0)
+ return MPFPS_MPFB1; /* return default configuration type */
if ((cth = mpfps->pap) == 0)
panic("MP Configuration Table Header MISSING!");
@@ -842,9 +847,6 @@ mptable_pass2(void)
if (boot_cpu_id == -1)
panic("NO BSP found!");
- /* post scan cleanup */
- fix_mp_table();
-
/* report fact that its NOT a default configuration */
return 0;
}
diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h
index cf5078d..db6db90 100644
--- a/sys/amd64/include/mptable.h
+++ b/sys/amd64/include/mptable.h
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.23 1997/07/30 22:51:11 smp Exp smp $
+ * $Id: mp_machdep.c,v 1.26 1997/08/09 22:12:14 smp Exp $
*/
#include "opt_smp.h"
@@ -52,6 +52,12 @@
#include <i386/isa/intr_machdep.h> /* IPIs */
#endif /* APIC_IO */
+#if defined(TEST_DEFAULT_CONFIG)
+#define MPFPS_MPFB1 TEST_DEFAULT_CONFIG
+#else
+#define MPFPS_MPFB1 mpfps->mpfb1
+#endif /* TEST_DEFAULT_CONFIG */
+
#define WARMBOOT_TARGET 0
#define WARMBOOT_OFF (KERNBASE + 0x0467)
#define WARMBOOT_SEG (KERNBASE + 0x0469)
@@ -248,6 +254,7 @@ static void mp_enable(u_int boot_addr);
static int mptable_pass1(void);
static int mptable_pass2(void);
static void default_mp_table(int type);
+static void fix_mp_table(void);
static void init_locks(void);
static int start_all_aps(u_int boot_addr);
static void install_ap_tramp(u_int boot_addr);
@@ -466,6 +473,9 @@ mp_enable(u_int boot_addr)
if (x)
default_mp_table(x);
+ /* post scan cleanup */
+ fix_mp_table();
+
#if defined(APIC_IO)
/* fill the LOGICAL io_apic_versions table */
@@ -608,7 +618,6 @@ io_int io_apic_ints[NINTR];
static int nintrs;
-static void fix_mp_table __P((void));
static int processor_entry __P((proc_entry_ptr entry, int cpu));
static int bus_entry __P((bus_entry_ptr entry, int bus));
static int io_apic_entry __P((io_apic_entry_ptr entry, int apic));
@@ -657,14 +666,14 @@ mptable_pass1(void)
nintrs = 0;
/* check for use of 'default' configuration */
- if (mpfps->mpfb1 != 0) {
+ if (MPFPS_MPFB1 != 0) {
/* use default addresses */
cpu_apic_address = DEFAULT_APIC_BASE;
io_apic_address[0] = DEFAULT_IO_APIC_BASE;
/* fill in with defaults */
mp_naps = 2; /* includes BSP */
- mp_nbusses = default_data[mpfps->mpfb1 - 1][0];
+ mp_nbusses = default_data[MPFPS_MPFB1 - 1][0];
#if defined(APIC_IO)
mp_napics = 1;
nintrs = 16;
@@ -792,12 +801,8 @@ mptable_pass2(void)
picmode = (mpfps->mpfb2 & 0x80) ? 1 : 0;
/* check for use of 'default' configuration */
-#if defined(TEST_DEFAULT_CONFIG)
- return TEST_DEFAULT_CONFIG;
-#else
- if (mpfps->mpfb1 != 0)
- return mpfps->mpfb1; /* return default configuration type */
-#endif /* TEST_DEFAULT_CONFIG */
+ if (MPFPS_MPFB1 != 0)
+ return MPFPS_MPFB1; /* return default configuration type */
if ((cth = mpfps->pap) == 0)
panic("MP Configuration Table Header MISSING!");
@@ -842,9 +847,6 @@ mptable_pass2(void)
if (boot_cpu_id == -1)
panic("NO BSP found!");
- /* post scan cleanup */
- fix_mp_table();
-
/* report fact that its NOT a default configuration */
return 0;
}
OpenPOWER on IntegriCloud