Add m5op to the build process
use quiesceNs on other CPUs panic rather than spin on an error console/Makefile: Add m5op to the build process console/dbmentry.S: use quiesceNs on other CPUs console/printf.c: panic rather than spin on an error.
This commit is contained in:
parent
a50e054ced
commit
576196c13c
3 changed files with 14 additions and 6 deletions
|
@ -35,8 +35,8 @@ AS=$(CROSS_COMPILE)as
|
||||||
LD=$(CROSS_COMPILE)ld
|
LD=$(CROSS_COMPILE)ld
|
||||||
|
|
||||||
DBMENTRY= fffffc0000010000
|
DBMENTRY= fffffc0000010000
|
||||||
CFLAGS=-I . -I ../h -I$(M5)/dev -fno-builtin -Wa,-m21164
|
CFLAGS=-I . -I ../h -I$(M5)/dev -I$(M5)/util/m5/ -fno-builtin -Wa,-m21164
|
||||||
OBJS=dbmentry.o printf.o paljtokern.o paljtoslave.o console.o
|
OBJS=dbmentry.o printf.o paljtokern.o paljtoslave.o console.o m5op.o
|
||||||
|
|
||||||
### Make sure that the M5 variable is set ###
|
### Make sure that the M5 variable is set ###
|
||||||
ifndef M5
|
ifndef M5
|
||||||
|
@ -45,6 +45,9 @@ endif
|
||||||
|
|
||||||
all: console
|
all: console
|
||||||
|
|
||||||
|
m5op.o: $(M5)/util/m5/m5op.S
|
||||||
|
$(CC) $(CFLAGS) -nostdinc -o $@ -c $<
|
||||||
|
|
||||||
%.o: %.S
|
%.o: %.S
|
||||||
$(CC) $(CFLAGS) -nostdinc -o $@ -c $<
|
$(CC) $(CFLAGS) -nostdinc -o $@ -c $<
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,9 @@ _entry:
|
||||||
bis zero,8,t4
|
bis zero,8,t4
|
||||||
mulq t4,v0,t4
|
mulq t4,v0,t4
|
||||||
addq t3,t4,t3
|
addq t3,t4,t3
|
||||||
cpuwait: ldq t4, 0(t3)
|
ldah a0, 3(zero) # load arg0 with 65536*3
|
||||||
|
cpuwait: .long 0x6000002 # jsr quiesceNs
|
||||||
|
ldq t4, 0(t3)
|
||||||
beq t4, cpuwait
|
beq t4, cpuwait
|
||||||
bis t4,t4,sp
|
bis t4,t4,sp
|
||||||
|
|
||||||
|
@ -220,8 +222,9 @@ SlaveSpin: # using any stack space
|
||||||
mov a0, t0 # cpu number
|
mov a0, t0 # cpu number
|
||||||
mov a1, t1 # cpu rpb pointer (virtual)
|
mov a1, t1 # cpu rpb pointer (virtual)
|
||||||
mov a2, t2 # what to spin on
|
mov a2, t2 # what to spin on
|
||||||
|
ldah a0, 3(zero) # load arg0 with 65536
|
||||||
test: ldl t3, 0(t2)
|
test: .long 0x6000002 # jsr quiesceNs # wait 65us*3
|
||||||
|
ldl t3, 0(t2)
|
||||||
beq t3, test
|
beq t3, test
|
||||||
zapnot t1,0x1f,a0 # make rpb physical
|
zapnot t1,0x1f,a0 # make rpb physical
|
||||||
call_pal PAL_SWPCTX_ENTRY # switch to pcb
|
call_pal PAL_SWPCTX_ENTRY # switch to pcb
|
||||||
|
|
|
@ -54,6 +54,8 @@
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include "m5op.h"
|
||||||
|
|
||||||
/* The string s is terminated by a '\0' */
|
/* The string s is terminated by a '\0' */
|
||||||
void
|
void
|
||||||
|
@ -320,5 +322,5 @@ panic(const char *f, ...)
|
||||||
}
|
}
|
||||||
|
|
||||||
va_end(ap); /* clean up */
|
va_end(ap); /* clean up */
|
||||||
while(1);
|
m5_panic();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue