From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 25-JUL-1989 07:06
To:	MRGATE::"ARISIA::EVERHART"
Subj:	Program Nulltime, VMS 5.x, Part 2 of 2

Message-Id:  <8907251053.AA17984@crdgw1.ge.com>
Received: From KL.SRI.COM by CRVAX.SRI.COM with TCP; Tue, 25 JUL 89 03:04:14 PDT
Received: from CUNYVM.CUNY.EDU by KL.SRI.COM with TCP; Tue, 25 Jul 89 02:36:59 PDT
Received: from DBTHRZ5.BITNET by CUNYVM.CUNY.EDU (IBM VM SMTP R1.1) with BSMTP id 6486; Tue, 25 Jul 89 05:38:11 EDT
Date: 25 JUL 89 11:15-MEZ
From: BTR011%DBTHRZ5.BITNET@CUNYVM.CUNY.EDU
To: INFO-VAX@KL.SRI.COM
Subject: Program Nulltime, VMS 5.x, Part 2 of 2

Date: 25-JUL-1989 11:15:02.47
From: Tom Rueger, HRZ Uni Bayreuth BTR011 AT DBTHRZ5
To:   BITNET::"INFO-VAX@KL.SRI.COM"
Subj: Program Nulltime, VMS 5.x, Part 2 of 2
+-+-+-+ Beginning of part 2 +-+-+-+
X`009PARAMETER ( CPU$M_CPUSPEC4                  = '80000000'X )
X`009PARAMETER ( CPU$M_INV_TBA                   = '00000002'X )
X`009PARAMETER ( CPU$M_INV_TBS                   = '00000001'X )
X`009PARAMETER ( CPU$M_IOPOST                    = '00001000'X )
X`009PARAMETER ( CPU$M_QLOST                     = '00000200'X )
X`009PARAMETER ( CPU$M_RECALSCHD                 = '00000020'X )
X`009PARAMETER ( CPU$M_RESCHED                   = '00000400'X )
X`009PARAMETER ( CPU$M_TBACK                     = '00000004'X )
X`009PARAMETER ( CPU$M_UPDASTLVL                 = '00000040'X )
X`009PARAMETER ( CPU$M_UPDTODR                   = '00000080'X )
X`009PARAMETER ( CPU$M_VIRTCONS                  = '00000800'X )
X`009PARAMETER ( CPU$M_WORK_FQP                  = '00000100'X )
X`009PARAMETER ( CPU$M_XCCFILL_1                 = '0FFFFFFF'X )
X`009PARAMETER ( CPU$M_XCCSPEC1                  = '10000000'X )
X`009PARAMETER ( CPU$M_XCCSPEC2                  = '20000000'X )
X`009PARAMETER ( CPU$M_XCCSPEC3                  = '40000000'X )
X`009PARAMETER ( CPU$M_XCCSPEC4                  = '80000000'X )
X`009PARAMETER ( CPU$M_XNNFILL_1                 = '0FFFFFFF'X )
X`009PARAMETER ( CPU$M_XNNSPEC1                  = '10000000'X )
X`009PARAMETER ( CPU$M_XNNSPEC2                  = '20000000'X )
X`009PARAMETER ( CPU$M_XNNSPEC3                  = '40000000'X )
X`009PARAMETER ( CPU$M_XNNSPEC4                  = '80000000'X )
X`009PARAMETER ( CPU$M_XSSFILL_1                 = '0FFFFFFF'X )
X`009PARAMETER ( CPU$M_XSSSPEC1                  = '10000000'X )
X`009PARAMETER ( CPU$M_XSSSPEC2                  = '20000000'X )
X`009PARAMETER ( CPU$M_XSSSPEC3                  = '40000000'X )
X`009PARAMETER ( CPU$M_XSSSPEC4                  = '80000000'X )
X`009PARAMETER ( CPU$Q_BOOT_TIME                 = '00000258'X )
X`009PARAMETER ( CPU$Q_CPUID_MASK                = '00000260'X )
X`009PARAMETER ( CPU$Q_SWIQFL                    = '00000200'X )
X`009PARAMETER ( CPU$Q_WORK_FQFL                 = '00000238'X )
X`009PARAMETER ( CPU$Q_WORK_IFQ                  = '00000238'X )
X`009PARAMETER ( CPU$R_CPUSPEC_OVERLAY           = '00000014'X )
X`009PARAMETER ( CPU$R_WORK_REQ_OVERLAY          = '00000014'X )
X`009PARAMETER ( CPU$S_BOOT_TIME                 = '00000008'X )
X`009PARAMETER ( CPU$S_CPUDATA                   = '00000020'X )
X`009PARAMETER ( CPU$S_CPUDEF_PAGE0              = '00000200'X )
X`009PARAMETER ( CPU$S_CPUFILL_1                 = '0000001C'X )
X`009PARAMETER ( CPU$S_CPUID_MASK                = '00000008'X )
X`009PARAMETER ( CPU$S_IPL_ARRAY                 = '00000080'X )
X`009PARAMETER ( CPU$S_KERNEL                    = '0000001C'X )
X`009PARAMETER ( CPU$S_SWIQFL                    = '00000030'X )
X`009PARAMETER ( CPU$S_UKERNEL                   = '0000000E'X )
X`009PARAMETER ( CPU$S_WORK_FQFL                 = '00000008'X )
X`009PARAMETER ( CPU$S_WORK_IFQ                  = '00000008'X )
X`009PARAMETER ( CPU$S_XCCFILL_1                 = '0000001C'X )
X`009PARAMETER ( CPU$S_XNNFILL_1                 = '0000001C'X )
X`009PARAMETER ( CPU$S_XSSFILL_1                 = '0000001C'X )
X`009PARAMETER ( CPU$T_CPUDEF_PAGE0              = '00000000'X )
X`009PARAMETER ( CPU$V_BUGCHK                    = '00000003'X )
X`009PARAMETER ( CPU$V_BUGCHKACK                 = '00000004'X )
X`009PARAMETER ( CPU$V_CPUFILL_1                 = '00000000'X )
X`009PARAMETER ( CPU$V_CPUSPEC1                  = '0000001C'X )
X`009PARAMETER ( CPU$V_CPUSPEC2                  = '0000001D'X )
X`009PARAMETER ( CPU$V_CPUSPEC3                  = '0000001E'X )
X`009PARAMETER ( CPU$V_CPUSPEC4                  = '0000001F'X )
X`009PARAMETER ( CPU$V_INV_TBA                   = '00000001'X )
X`009PARAMETER ( CPU$V_INV_TBS                   = '00000000'X )
X`009PARAMETER ( CPU$V_IOPOST                    = '0000000C'X )
X`009PARAMETER ( CPU$V_QLOST                     = '00000009'X )
X`009PARAMETER ( CPU$V_RECALSCHD                 = '00000005'X )
X`009PARAMETER ( CPU$V_RESCHED                   = '0000000A'X )
X`009PARAMETER ( CPU$V_TBACK                     = '00000002'X )
X`009PARAMETER ( CPU$V_UPDASTLVL                 = '00000006'X )
X`009PARAMETER ( CPU$V_UPDTODR                   = '00000007'X )
X`009PARAMETER ( CPU$V_VIRTCONS                  = '0000000B'X )
X`009PARAMETER ( CPU$V_WORK_FQP                  = '00000008'X )
X`009PARAMETER ( CPU$V_XCCFILL_1                 = '00000000'X )
X`009PARAMETER ( CPU$V_XCCSPEC1                  = '0000001C'X )
X`009PARAMETER ( CPU$V_XCCSPEC2                  = '0000001D'X )
X`009PARAMETER ( CPU$V_XCCSPEC3                  = '0000001E'X )
X`009PARAMETER ( CPU$V_XCCSPEC4                  = '0000001F'X )
X`009PARAMETER ( CPU$V_XNNFILL_1                 = '00000000'X )
X`009PARAMETER ( CPU$V_XNNSPEC1                  = '0000001C'X )
X`009PARAMETER ( CPU$V_XNNSPEC2                  = '0000001D'X )
X`009PARAMETER ( CPU$V_XNNSPEC3                  = '0000001E'X )
X`009PARAMETER ( CPU$V_XNNSPEC4                  = '0000001F'X )
X`009PARAMETER ( CPU$V_XSSFILL_1                 = '00000000'X )
X`009PARAMETER ( CPU$V_XSSSPEC1                  = '0000001C'X )
X`009PARAMETER ( CPU$V_XSSSPEC2                  = '0000001D'X )
X`009PARAMETER ( CPU$V_XSSSPEC3                  = '0000001E'X )
X`009PARAMETER ( CPU$V_XSSSPEC4                  = '0000001F'X )
X`009PARAMETER ( CPU$W_8SS_BOOTCNT               = '00000050'X )
X`009PARAMETER ( CPU$W_8SS_IPINTR                = '00000052'X )
X`009PARAMETER ( CPU$W_CLKUTICS                  = '000002A8'X )
X`009PARAMETER ( CPU$W_HARDAFF                   = '000002AA'X )
X`009PARAMETER ( CPU$W_QLOST_SIZE                = '00000248'X )
X`009PARAMETER ( CPU$W_SANITY_TICKS              = '0000033A'X )
X`009PARAMETER ( CPU$W_SANITY_TIMER              = '00000338'X )
X`009PARAMETER ( CPU$W_SIZE                      = '00000008'X )
X`009PARAMETER ( CPU$W_UKERNEL                   = '00000298'X )
X`009PARAMETER ( CPU$W_UNULLCPU                  = '000002A6'X )
XC
X`009External Smp$Gl_Cpu_Data,`009! Data about each CPU
X`0091`009 Smp$Gl_Active_Cpus`009! Bitmask of active CPUs
XC
X`009Inull = 0
XC
X`009Processormask = Value(Smp$Gl_Active_Cpus)
X`009Do K = 0, 15
XC
XC`009Which CPUs are active?
XC
X`009  If(Btest(Processormask,K)) Then
X`009`009Active_Cpus = Active_Cpus + 1
X`009   `009Cpudata=%Loc(SMP$GL_CPU_DATA)+4*K
X`009  `009Baseadr = Value(%Val(Cpudata))
XC
XC`009 Assignment of the addresses of the modes:
XC`009 for each active CPU there are:
XC`009 @SMP$GL_CPUDATA + CPU$L_KERNEL + 0*4 : Kernel-Mode
XC`009 @SMP$GL_CPUDATA + CPU$L_KERNEL + 1*4 : Exec-Mode
XC`009 @SMP$GL_CPUDATA + CPU$L_KERNEL + 2*4 : Supervisor-Mode
XC`009 @SMP$GL_CPUDATA + CPU$L_KERNEL + 3*4 : User-mode
XC`009 @SMP$GL_CPUDATA + CPU$L_KERNEL + 4*4 : Interrupt-Stack
XC`009 @SMP$GL_CPUDATA + CPU$L_KERNEL + 5*4 : Compatibility-Mode
XC`009 @SMP$GL_CPUDATA + CPU$L_KERNEL + 6*4 : MP-Synchronisation
XC`009 @SMP$GL_CPUDATA + CPU$L_NULLCPU      : Idle-Time
XC
XC
X`009`009Anull = Baseadr+CPU$L_Nullcpu
XC
X`009`009Inull = Inull+Value(%Val(Anull))
X`009    End If
X`009End Do
XC`009
X`009Return
X`009End
$ GOSUB UNPACK_FILE
$ EXIT
-+-+-+-+-+ End of part 2 +-+-+-+-+-

