summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorfsmp <fsmp@FreeBSD.org>1997-06-27 23:12:31 +0000
committerfsmp <fsmp@FreeBSD.org>1997-06-27 23:12:31 +0000
commit7fa336497afa64b87e33edd06bd3ed2375e32aa4 (patch)
tree846d9968732430e4ce493dfe34e58d2361a454ff /sys
parentf9ac11a9b5343f5b3388d57d83cd47c15be4ed73 (diff)
downloadFreeBSD-src-7fa336497afa64b87e33edd06bd3ed2375e32aa4.zip
FreeBSD-src-7fa336497afa64b87e33edd06bd3ed2375e32aa4.tar.gz
Preliminaries for stop_cpus()/restart_cpus().
Both are turned off by default. Added macro for displaying POST codes from kernel.
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/include/smp.h19
-rw-r--r--sys/i386/include/smp.h19
-rw-r--r--sys/i386/include/smptests.h11
-rw-r--r--sys/sys/smp.h19
4 files changed, 56 insertions, 12 deletions
diff --git a/sys/amd64/include/smp.h b/sys/amd64/include/smp.h
index 38a8cb4..8236b91 100644
--- a/sys/amd64/include/smp.h
+++ b/sys/amd64/include/smp.h
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: smp.h,v 1.3 1997/06/25 20:43:48 smp Exp smp $
+ * $Id: smp.h,v 1.12 1997/06/25 20:59:15 fsmp Exp $
*
*/
@@ -17,7 +17,7 @@
#if defined(SMP) && !defined(APIC_IO)
# error APIC_IO required for SMP, add "options APIC_IO" to your config file.
-#endif /* SMP && NCPU */
+#endif /* SMP && !APIC_IO */
#if defined(SMP) && !defined(NCPU)
# define NCPU 2
@@ -25,6 +25,11 @@
#if defined(SMP) || defined(APIC_IO)
+/*
+ * For sending values to POST displays.
+ */
+#define POSTCODE(X) outb(0x80, (X))
+
#include <machine/apic.h>
/* global data in mpboot.s */
@@ -41,13 +46,16 @@ void get_mplock __P((void));
void rel_mplock __P((void));
void try_mplock __P((void));
+/* global data in apic_vector.s */
+extern volatile u_int stopped_cpus;
+extern volatile u_int started_cpus;
+
/* global data in mp_machdep.c */
extern int mp_ncpus;
extern int mp_naps;
extern int mp_nbusses;
extern int mp_napics;
extern int mp_picmode;
-extern int mpenabled;
extern int boot_cpu_id;
extern vm_offset_t cpu_apic_address;
extern vm_offset_t io_apic_address[];
@@ -56,6 +64,7 @@ extern u_int32_t io_apic_versions[];
extern int cpu_num_to_apic_id[];
extern int io_num_to_apic_id[];
extern int apic_id_to_logical[];
+extern u_int all_cpus;
extern u_int SMP_prvpt[];
extern u_char SMP_ioapic[];
@@ -78,6 +87,8 @@ int apic_polarity __P((int, int));
void configure_local_apic __P((void));
void init_secondary __P((void));
void smp_invltlb __P((void));
+int stop_cpus __P((u_int));
+int restart_cpus __P((u_int));
/* global data in mpapic.c */
extern volatile lapic_t lapic;
@@ -109,8 +120,10 @@ void u_sleep __P((int));
extern int smp_active;
extern int invltlb_ok;
+/* 'private' global data in locore.s */
extern volatile u_int cpuid;
extern volatile u_int cpu_lockid;
+extern volatile u_int other_cpus;
#endif /* SMP || APIC_IO */
#endif /* KERNEL */
diff --git a/sys/i386/include/smp.h b/sys/i386/include/smp.h
index 38a8cb4..8236b91 100644
--- a/sys/i386/include/smp.h
+++ b/sys/i386/include/smp.h
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: smp.h,v 1.3 1997/06/25 20:43:48 smp Exp smp $
+ * $Id: smp.h,v 1.12 1997/06/25 20:59:15 fsmp Exp $
*
*/
@@ -17,7 +17,7 @@
#if defined(SMP) && !defined(APIC_IO)
# error APIC_IO required for SMP, add "options APIC_IO" to your config file.
-#endif /* SMP && NCPU */
+#endif /* SMP && !APIC_IO */
#if defined(SMP) && !defined(NCPU)
# define NCPU 2
@@ -25,6 +25,11 @@
#if defined(SMP) || defined(APIC_IO)
+/*
+ * For sending values to POST displays.
+ */
+#define POSTCODE(X) outb(0x80, (X))
+
#include <machine/apic.h>
/* global data in mpboot.s */
@@ -41,13 +46,16 @@ void get_mplock __P((void));
void rel_mplock __P((void));
void try_mplock __P((void));
+/* global data in apic_vector.s */
+extern volatile u_int stopped_cpus;
+extern volatile u_int started_cpus;
+
/* global data in mp_machdep.c */
extern int mp_ncpus;
extern int mp_naps;
extern int mp_nbusses;
extern int mp_napics;
extern int mp_picmode;
-extern int mpenabled;
extern int boot_cpu_id;
extern vm_offset_t cpu_apic_address;
extern vm_offset_t io_apic_address[];
@@ -56,6 +64,7 @@ extern u_int32_t io_apic_versions[];
extern int cpu_num_to_apic_id[];
extern int io_num_to_apic_id[];
extern int apic_id_to_logical[];
+extern u_int all_cpus;
extern u_int SMP_prvpt[];
extern u_char SMP_ioapic[];
@@ -78,6 +87,8 @@ int apic_polarity __P((int, int));
void configure_local_apic __P((void));
void init_secondary __P((void));
void smp_invltlb __P((void));
+int stop_cpus __P((u_int));
+int restart_cpus __P((u_int));
/* global data in mpapic.c */
extern volatile lapic_t lapic;
@@ -109,8 +120,10 @@ void u_sleep __P((int));
extern int smp_active;
extern int invltlb_ok;
+/* 'private' global data in locore.s */
extern volatile u_int cpuid;
extern volatile u_int cpu_lockid;
+extern volatile u_int other_cpus;
#endif /* SMP || APIC_IO */
#endif /* KERNEL */
diff --git a/sys/i386/include/smptests.h b/sys/i386/include/smptests.h
index cfd837b..a958005 100644
--- a/sys/i386/include/smptests.h
+++ b/sys/i386/include/smptests.h
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: smptests.h,v 1.1 1997/05/26 09:11:25 smp Exp smp $
+ * $Id: smptests.h,v 1.1 1997/06/26 18:02:47 smp Exp smp $
*/
#ifndef _MACHINE_SMPTESTS_H_
@@ -33,10 +33,15 @@
* various 'tests in progress'
*/
+/* address of POST hardware port */
+#define POST_ADDR 0x80
+
+
/*
- * attempt to delay MP startup till after malloc & vm is active.
+ * IPI for stop/restart of other CPUs
+#define TEST_CPUSTOP
+#define DEBUG_CPUSTOP
*/
-#define LATE_START
/*
diff --git a/sys/sys/smp.h b/sys/sys/smp.h
index 38a8cb4..8236b91 100644
--- a/sys/sys/smp.h
+++ b/sys/sys/smp.h
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $Id: smp.h,v 1.3 1997/06/25 20:43:48 smp Exp smp $
+ * $Id: smp.h,v 1.12 1997/06/25 20:59:15 fsmp Exp $
*
*/
@@ -17,7 +17,7 @@
#if defined(SMP) && !defined(APIC_IO)
# error APIC_IO required for SMP, add "options APIC_IO" to your config file.
-#endif /* SMP && NCPU */
+#endif /* SMP && !APIC_IO */
#if defined(SMP) && !defined(NCPU)
# define NCPU 2
@@ -25,6 +25,11 @@
#if defined(SMP) || defined(APIC_IO)
+/*
+ * For sending values to POST displays.
+ */
+#define POSTCODE(X) outb(0x80, (X))
+
#include <machine/apic.h>
/* global data in mpboot.s */
@@ -41,13 +46,16 @@ void get_mplock __P((void));
void rel_mplock __P((void));
void try_mplock __P((void));
+/* global data in apic_vector.s */
+extern volatile u_int stopped_cpus;
+extern volatile u_int started_cpus;
+
/* global data in mp_machdep.c */
extern int mp_ncpus;
extern int mp_naps;
extern int mp_nbusses;
extern int mp_napics;
extern int mp_picmode;
-extern int mpenabled;
extern int boot_cpu_id;
extern vm_offset_t cpu_apic_address;
extern vm_offset_t io_apic_address[];
@@ -56,6 +64,7 @@ extern u_int32_t io_apic_versions[];
extern int cpu_num_to_apic_id[];
extern int io_num_to_apic_id[];
extern int apic_id_to_logical[];
+extern u_int all_cpus;
extern u_int SMP_prvpt[];
extern u_char SMP_ioapic[];
@@ -78,6 +87,8 @@ int apic_polarity __P((int, int));
void configure_local_apic __P((void));
void init_secondary __P((void));
void smp_invltlb __P((void));
+int stop_cpus __P((u_int));
+int restart_cpus __P((u_int));
/* global data in mpapic.c */
extern volatile lapic_t lapic;
@@ -109,8 +120,10 @@ void u_sleep __P((int));
extern int smp_active;
extern int invltlb_ok;
+/* 'private' global data in locore.s */
extern volatile u_int cpuid;
extern volatile u_int cpu_lockid;
+extern volatile u_int other_cpus;
#endif /* SMP || APIC_IO */
#endif /* KERNEL */
OpenPOWER on IntegriCloud