SCCS-vsn: sys/vax/vax/autoconf.c 6.15
SCCS-vsn: sys/vax/include/cpu.h 6.5
SCCS-vsn: sys/vax/vax/cpudata.c 6.5
SCCS-vsn: sys/vax/include/param.h 6.4
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)cpu.h 6.4 (Berkeley) %G%
+ * @(#)cpu.h 6.5 (Berkeley) %G%
*/
struct percpu {
short pc_cputype; /* cpu type code */
*/
struct percpu {
short pc_cputype; /* cpu type code */
+ short pc_cpuspeed; /* relative speed of cpu */
short pc_nioa; /* number of IO adaptors/SBI's */
caddr_t *pc_ioaaddr; /* phys addresses of IO adaptors */
short pc_nioa; /* number of IO adaptors/SBI's */
caddr_t *pc_ioaaddr; /* phys addresses of IO adaptors */
- int pc_ioasize; /* size of a IO adaptor */
+ int pc_ioasize; /* size of an IO adaptor */
short *pc_ioatype; /* io adaptor types if no cfg reg */
};
short *pc_ioatype; /* io adaptor types if no cfg reg */
};
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)param.h 6.3 (Berkeley) %G%
+ * @(#)param.h 6.4 (Berkeley) %G%
#define USERMODE(ps) (((ps) & PSL_CURMOD) == PSL_CURMOD)
#define BASEPRI(ps) (((ps) & PSL_IPL) == 0)
#define USERMODE(ps) (((ps) & PSL_CURMOD) == PSL_CURMOD)
#define BASEPRI(ps) (((ps) & PSL_IPL) == 0)
+#ifdef KERNEL
+#ifndef LOCORE
+int cpuspeed;
+#endif
+#define DELAY(n) { register int N = cpuspeed * (n); while (--N > 0); }
+
+#else KERNEL
#define DELAY(n) { register int N = (n); while (--N > 0); }
#define DELAY(n) { register int N = (n); while (--N > 0); }
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)autoconf.c 6.14 (Berkeley) %G%
+ * @(#)autoconf.c 6.15 (Berkeley) %G%
int nexnum; /* current nexus number */
int nsbi; /* current sbi number */
int dkn; /* number of iostat dk numbers assigned so far */
int nexnum; /* current nexus number */
int nsbi; /* current sbi number */
int dkn; /* number of iostat dk numbers assigned so far */
+int cpuspeed = 1; /* relative cpu speed */
/*
* Addresses of the (locore) routines which bootstrap us from
/*
* Addresses of the (locore) routines which bootstrap us from
cpusid.cpusid = mfpr(SID);
for (ocp = percpu; ocp->pc_cputype; ocp++)
if (ocp->pc_cputype == cpusid.cpuany.cp_type) {
cpusid.cpusid = mfpr(SID);
for (ocp = percpu; ocp->pc_cputype; ocp++)
if (ocp->pc_cputype == cpusid.cpuany.cp_type) {
+ cpuspeed = ocp->pc_cpuspeed;
probeioa(ocp);
/*
* Write protect the scb and UNIBUS interrupt vectors.
probeioa(ocp);
/*
* Write protect the scb and UNIBUS interrupt vectors.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)cpudata.c 6.4 (Berkeley) %G%
+ * @(#)cpudata.c 6.5 (Berkeley) %G%
struct percpu percpu[] = {
#if VAX8600
struct percpu percpu[] = {
#if VAX8600
- { VAX_8600, 2, ioaaddr8600, 512, (short *)0 },
+ { VAX_8600, 4, 2, ioaaddr8600, 512, (short *)0 },
- { VAX_780, 1, (caddr_t *)0, 0, ioa780 },
+ { VAX_780, 2, 1, (caddr_t *)0, 0, ioa780 },
- { VAX_750, 1, (caddr_t *)0, 0, ioa750 },
+ { VAX_750, 1, 1, (caddr_t *)0, 0, ioa750 },
- { VAX_730, 1, (caddr_t *)0, 0, ioa730 },
+ { VAX_730, 1, 1, (caddr_t *)0, 0, ioa730 },