masterpaddr added
authorBill Joy <root@ucbvax.Berkeley.EDU>
Sat, 16 May 1981 01:32:39 +0000 (17:32 -0800)
committerBill Joy <root@ucbvax.Berkeley.EDU>
Sat, 16 May 1981 01:32:39 +0000 (17:32 -0800)
SCCS-vsn: sys/vax/vax/Locore.c 4.11
SCCS-vsn: sys/vax/vax/locore.s 4.49

usr/src/sys/vax/vax/Locore.c
usr/src/sys/vax/vax/locore.s

index 7127497..08fc4d1 100644 (file)
@@ -1,4 +1,4 @@
-/*     Locore.c        4.10    81/05/05        */
+/*     Locore.c        4.11    81/05/15        */
 
 #include "dz.h"
 
 
 #include "dz.h"
 
@@ -25,6 +25,8 @@ int   (*UNIvec[128])();
 struct rpb rpb;
 int    intstack[3*128];
 
 struct rpb rpb;
 int    intstack[3*128];
 
+int    masterpaddr;            /* p_addr of current process on master cpu */
+
 struct user u;
 
 doadump() { dumpsys(); }
 struct user u;
 
 doadump() { dumpsys(); }
index eaee371..d4578bd 100644 (file)
@@ -1,4 +1,4 @@
-/*     locore.s        4.48    81/05/13        */
+/*     locore.s        4.49    81/05/15        */
 
 #include "../h/mtpr.h"
 #include "../h/trap.h"
 
 #include "../h/mtpr.h"
 #include "../h/trap.h"
@@ -53,8 +53,8 @@ _doadump:
 #define        _rpbmap _Sysmap+8                       # scb, UNIvec, rpb, istack*4
        bicl2   $PG_PROT,_rpbmap
        bisl2   $PG_KW,_rpbmap
 #define        _rpbmap _Sysmap+8                       # scb, UNIvec, rpb, istack*4
        bicl2   $PG_PROT,_rpbmap
        bisl2   $PG_KW,_rpbmap
-       tstl    _rpb_RP_FLAG                    # dump only once!
-       bne     1f
+       tstl    _rpb+RP_FLAG                    # dump only once!
+       bneq    1f
        incl    _rpb+RP_FLAG
        mtpr    $0,$TBIA
        movl    sp,erpb
        incl    _rpb+RP_FLAG
        mtpr    $0,$TBIA
        movl    sp,erpb
@@ -338,6 +338,7 @@ _/**/mname: .globl  _/**/mname;             \
 #endif
 
 eSysmap:
 #endif
 
 eSysmap:
+       .globl  _Syssize
        .set    _Syssize,(eSysmap-_Sysmap)/4
        .text
 
        .set    _Syssize,(eSysmap-_Sysmap)/4
        .text
 
@@ -680,6 +681,17 @@ rem2:
 
 rem3:  .asciz  "remrq"
 
 
 rem3:  .asciz  "remrq"
 
+/*
+ * Materpaddr is the p->p_addr of the running process on the master
+ * processor.  When a multiprocessor system, the slave processors will have
+ * an array of spavepaddr's.
+ */
+       .globl  _masterpaddr
+       .data
+_masterpaddr:
+       .long   0
+
+       .text
 sw0:   .asciz  "swtch"
 /*
  * Swtch(), using fancy VAX instructions
 sw0:   .asciz  "swtch"
 /*
  * Swtch(), using fancy VAX instructions
@@ -726,6 +738,7 @@ _Resume:
        svpctx
        mtpr    r0,$PCBB
        ldpctx
        svpctx
        mtpr    r0,$PCBB
        ldpctx
+       mfpr    $PCBB,_masterpcbb
        movl    _u+PCB_CMAP2,_CMAP2     # yech
 res0:
        tstl    _u+PCB_SSWAP
        movl    _u+PCB_CMAP2,_CMAP2     # yech
 res0:
        tstl    _u+PCB_SSWAP