Additional debugging functions and macros.

"spurious INTerrupt" support.
This commit is contained in:
fsmp 1997-07-06 23:40:15 +00:00
parent d56c6e8a3b
commit d157b3e439
4 changed files with 73 additions and 8 deletions

View File

@ -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.12 1997/06/25 20:59:15 fsmp Exp $
* $Id: smp.h,v 1.5 1997/07/06 23:36:49 smp Exp smp $
*
*/
@ -27,8 +27,18 @@
/*
* For sending values to POST displays.
* XXX FIXME: where does this really belong, isa.h/isa.c perhaps?
*/
#define POSTCODE(X) outb(0x80, (X))
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 <machine/apic.h>

View File

@ -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.12 1997/06/25 20:59:15 fsmp Exp $
* $Id: smp.h,v 1.5 1997/07/06 23:36:49 smp Exp smp $
*
*/
@ -27,8 +27,18 @@
/*
* For sending values to POST displays.
* XXX FIXME: where does this really belong, isa.h/isa.c perhaps?
*/
#define POSTCODE(X) outb(0x80, (X))
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 <machine/apic.h>

View File

@ -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/06/26 18:02:47 smp Exp smp $
* $Id: smptests.h,v 1.4 1997/07/06 23:36:49 smp Exp smp $
*/
#ifndef _MACHINE_SMPTESTS_H_
@ -33,12 +33,47 @@
* various 'tests in progress'
*/
/* address of POST hardware port */
/*
* address of POST hardware port
*
#define POST_ADDR 0x80
*/
#ifdef POST_ADDR
/*
* Overwrite the current_postcode low nibble .
*/
#define ASMPOSTCODE_LO(X) \
movl _current_postcode, %eax ; \
andl $0xf0, %eax ; \
orl $X, %eax ; \
outb %al, $POST_ADDR
/*
* Overwrite the current_postcode high nibble .
* Note: this does NOT shift the digit to the high position!
*/
#define ASMPOSTCODE_HI(X) \
movl _current_postcode, %eax ; \
andl $0x0f, %eax ; \
orl $X, %eax ; \
outb %al, $POST_ADDR
#else
#define ASMPOSTCODE_LO(X)
#define ASMPOSTCODE_HI(X)
#endif /* POST_ADDR */
/*
* misc. counters
*
#define COUNT_XINVLTLB_HITS
#define COUNT_SPURIOUS_INTS
*/
/*
* IPI for stop/restart of other CPUs
*
#define TEST_CPUSTOP
#define DEBUG_CPUSTOP
*/

View File

@ -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.12 1997/06/25 20:59:15 fsmp Exp $
* $Id: smp.h,v 1.5 1997/07/06 23:36:49 smp Exp smp $
*
*/
@ -27,8 +27,18 @@
/*
* For sending values to POST displays.
* XXX FIXME: where does this really belong, isa.h/isa.c perhaps?
*/
#define POSTCODE(X) outb(0x80, (X))
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 <machine/apic.h>