summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-11-22 22:34:14 +0000
committerjhb <jhb@FreeBSD.org>2005-11-22 22:34:14 +0000
commitfb5f967d56f0f81cec1cc786445b3ea906f43659 (patch)
tree23624df2c0638e9719e282bd0a2c73ec77e64db3 /sys
parent8206c3e00bb653b5f2ba855f79e1f03a6a686e4e (diff)
downloadFreeBSD-src-fb5f967d56f0f81cec1cc786445b3ea906f43659.zip
FreeBSD-src-fb5f967d56f0f81cec1cc786445b3ea906f43659.tar.gz
Garbage collect the code to store diagnostics codes in a CMOS register
during SMP startup. We haven't had any issues with starting up the APs on i386 in quite a while now which is all this code is really useful for. If someone ever does really need it they can always dig it up out of the attic.
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/i386/mp_machdep.c31
-rw-r--r--sys/i386/include/smp.h14
-rw-r--r--sys/i386/include/smptests.h62
3 files changed, 0 insertions, 107 deletions
diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c
index fab5e0f0..336b4dd 100644
--- a/sys/i386/i386/mp_machdep.c
+++ b/sys/i386/i386/mp_machdep.c
@@ -126,29 +126,9 @@ __FBSDID("$FreeBSD$");
#endif /* CHECK_POINTS */
-/*
- * Values to send to the POST hardware.
- */
-#define MP_BOOTADDRESS_POST 0x10
-#define MP_PROBE_POST 0x11
-#define MPTABLE_PASS1_POST 0x12
-
-#define MP_START_POST 0x13
-#define MP_ENABLE_POST 0x14
-#define MPTABLE_PASS2_POST 0x15
-
-#define START_ALL_APS_POST 0x16
-#define INSTALL_AP_TRAMP_POST 0x17
-#define START_AP_POST 0x18
-
-#define MP_ANNOUNCE_POST 0x19
-
/* lock region used by kernel profiling */
int mcount_lock;
-/** XXX FIXME: where does this really belong, isa.h/isa.c perhaps? */
-int current_postcode;
-
int mp_naps; /* # of Applications processors */
int boot_cpu_id = -1; /* designated BSP */
extern int nkpt;
@@ -302,7 +282,6 @@ mp_topology(void)
u_int
mp_bootaddress(u_int basemem)
{
- POSTCODE(MP_BOOTADDRESS_POST);
boot_address = trunc_page(basemem); /* round down to 4k boundary */
if ((basemem - boot_address) < bootMP_size)
@@ -385,8 +364,6 @@ cpu_mp_start(void)
int i;
u_int threads_per_cache, p[4];
- POSTCODE(MP_START_POST);
-
/* Initialize the logical ID to APIC ID table. */
for (i = 0; i < MAXCPU; i++) {
cpu_apic_ids[i] = -1;
@@ -489,8 +466,6 @@ cpu_mp_announce(void)
{
int i, x;
- POSTCODE(MP_ANNOUNCE_POST);
-
/* List CPUs */
printf(" cpu0 (BSP): APIC ID: %2d\n", boot_cpu_id);
for (i = 1, x = 0; x < MAXCPU; x++) {
@@ -715,8 +690,6 @@ start_all_aps(void)
u_int32_t mpbioswarmvec;
int apic_id, cpu, i, pg;
- POSTCODE(START_ALL_APS_POST);
-
mtx_init(&ap_boot_mtx, "ap boot", NULL, MTX_SPIN);
/* install the AP 1st level boot code */
@@ -860,8 +833,6 @@ install_ap_tramp(void)
u_int16_t *dst16;
u_int32_t *dst32;
- POSTCODE(INSTALL_AP_TRAMP_POST);
-
KASSERT (size <= PAGE_SIZE,
("'size' do not fit into PAGE_SIZE, as expected."));
pmap_kenter(va, boot_address);
@@ -912,8 +883,6 @@ start_ap(int apic_id)
int vector, ms;
int cpus;
- POSTCODE(START_AP_POST);
-
/* calculate the vector */
vector = (boot_address >> 12) & 0xff;
diff --git a/sys/i386/include/smp.h b/sys/i386/include/smp.h
index d2482fe..9cb5673 100644
--- a/sys/i386/include/smp.h
+++ b/sys/i386/include/smp.h
@@ -19,20 +19,6 @@
#ifndef LOCORE
-/*
- * For sending values to POST displays.
- * XXX FIXME: where does this really belong, isa.h/isa.c perhaps?
- */
-extern int current_postcode; /** XXX currently in mp_machdep.c */
-#define POSTCODE(X) current_postcode = (X), \
- outb(0x80, current_postcode)
-#define POSTCODE_LO(X) current_postcode &= 0xf0, \
- current_postcode |= ((X) & 0x0f), \
- outb(0x80, current_postcode)
-#define POSTCODE_HI(X) current_postcode &= 0x0f, \
- current_postcode |= (((X) << 4) & 0xf0), \
- outb(0x80, current_postcode)
-
#include <sys/bus.h>
#include <machine/frame.h>
#include <machine/intr_machdep.h>
diff --git a/sys/i386/include/smptests.h b/sys/i386/include/smptests.h
index 3d60740..cf755f6 100644
--- a/sys/i386/include/smptests.h
+++ b/sys/i386/include/smptests.h
@@ -51,66 +51,4 @@
#define COUNT_IPIS
*/
-/*
- * Address of POST hardware port.
- * Defining this enables POSTCODE macros.
- *
-#define POST_ADDR 0x80
- */
-
-
-/*
- * POST hardware macros.
- */
-#ifdef POST_ADDR
-#define ASMPOSTCODE_INC \
- pushl %eax ; \
- movl _current_postcode, %eax ; \
- incl %eax ; \
- andl $0xff, %eax ; \
- movl %eax, _current_postcode ; \
- outb %al, $POST_ADDR ; \
- popl %eax
-
-/*
- * Overwrite the current_postcode value.
- */
-#define ASMPOSTCODE(X) \
- pushl %eax ; \
- movl $X, %eax ; \
- movl %eax, _current_postcode ; \
- outb %al, $POST_ADDR ; \
- popl %eax
-
-/*
- * Overwrite the current_postcode low nibble.
- */
-#define ASMPOSTCODE_LO(X) \
- pushl %eax ; \
- movl _current_postcode, %eax ; \
- andl $0xf0, %eax ; \
- orl $X, %eax ; \
- movl %eax, _current_postcode ; \
- outb %al, $POST_ADDR ; \
- popl %eax
-
-/*
- * Overwrite the current_postcode high nibble.
- */
-#define ASMPOSTCODE_HI(X) \
- pushl %eax ; \
- movl _current_postcode, %eax ; \
- andl $0x0f, %eax ; \
- orl $(X<<4), %eax ; \
- movl %eax, _current_postcode ; \
- outb %al, $POST_ADDR ; \
- popl %eax
-#else
-#define ASMPOSTCODE_INC
-#define ASMPOSTCODE(X)
-#define ASMPOSTCODE_LO(X)
-#define ASMPOSTCODE_HI(X)
-#endif /* POST_ADDR */
-
-
#endif /* _MACHINE_SMPTESTS_H_ */
OpenPOWER on IntegriCloud