SCCS-vsn: sys/kern/kern_physio.c 7.15
SCCS-vsn: sys/kern/kern_exec.c 7.30
SCCS-vsn: sys/kern/subr_prof.c 7.9
SCCS-vsn: sys/kern/kern_clock.c 7.10
* 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.
*
- * @(#)kern_clock.c 7.9 (Berkeley) %G%
+ * @(#)kern_clock.c 7.10 (Berkeley) %G%
#if defined(hp300)
#include "machine/mtpr.h"
#endif
#if defined(hp300)
#include "machine/mtpr.h"
#endif
+#ifdef i386
+#include "machine/frame.h"
+#include "machine/segments.h"
+#endif
#ifdef GPROF
#include "gprof.h"
#ifdef GPROF
#include "gprof.h"
* we run through the statistics gathering routine as well.
*/
/*ARGSUSED*/
* we run through the statistics gathering routine as well.
*/
/*ARGSUSED*/
hardclock(pc, ps)
caddr_t pc;
int ps;
hardclock(pc, ps)
caddr_t pc;
int ps;
+#else
+hardclock(frame)
+ struct intrframe frame;
+#define pc frame.if_eip
+#endif
{
register struct callout *p1;
register struct proc *p = u.u_procp;
{
register struct callout *p1;
register struct proc *p = u.u_procp;
* assuming that the current state has been around at least
* one tick.
*/
* assuming that the current state has been around at least
* one tick.
*/
+#ifdef i386
+ if (ISPL(frame.if_cs) == SEL_UPL) {
+#else
/*
* CPU was in user state. Increment
* user time counter, and process process-virtual time
/*
* CPU was in user state. Increment
* user time counter, and process process-virtual time
* we must gather the statistics.
*/
if (phz == 0)
* we must gather the statistics.
*/
if (phz == 0)
+#ifdef i386
+ gatherstats(pc, ISPL(frame.if_cs), frame.if_ppl);
+#else
/*
* Increment the time-of-day, and schedule
/*
* Increment the time-of-day, and schedule
* update statistics accordingly.
*/
/*ARGSUSED*/
* update statistics accordingly.
*/
/*ARGSUSED*/
+#ifdef i386
+#undef pc
+gatherstats(pc, ps, ppl)
+#else
/*
* Determine what state the cpu is in.
*/
/*
* Determine what state the cpu is in.
*/
+#ifdef i386
+ if (ps == SEL_UPL) {
+#else
/*
* CPU was in user state.
*/
/*
* CPU was in user state.
*/
* timers makes doing anything else difficult.
*/
cpstate = CP_SYS;
* timers makes doing anything else difficult.
*/
cpstate = CP_SYS;
+#if defined(i386)
+ if (noproc && ps == 0)
+#else
if (noproc && BASEPRI(ps))
if (noproc && BASEPRI(ps))
cpstate = CP_IDLE;
#ifdef GPROF
s = pc - s_lowpc;
cpstate = CP_IDLE;
#ifdef GPROF
s = pc - s_lowpc;
* Run periodic events from timeout queue.
*/
/*ARGSUSED*/
* Run periodic events from timeout queue.
*/
/*ARGSUSED*/
+#ifdef i386
+softclock(frame)
+ struct intrframe frame;
+#define pc frame.if_eip
+#else
softclock(pc, ps)
caddr_t pc;
int ps;
softclock(pc, ps)
caddr_t pc;
int ps;
* If trapped user-mode and profiling, give it
* a profiling tick.
*/
* If trapped user-mode and profiling, give it
* a profiling tick.
*/
+#ifdef i386
+ if (ISPL(frame.if_cs) == SEL_UPL) {
+#else
register struct proc *p = u.u_procp;
if (u.u_prof.pr_scale) {
register struct proc *p = u.u_procp;
if (u.u_prof.pr_scale) {
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)kern_exec.c 7.29 (Berkeley) %G%
+ * @(#)kern_exec.c 7.30 (Berkeley) %G%
#ifdef hp300
TBIAU();
#endif
#ifdef hp300
TBIAU();
#endif
+#if defined(i386)
+ tlbflush();
+#endif
/*
* set SUID/SGID protections, if no tracing
/*
* set SUID/SGID protections, if no tracing
* 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.
*
- * @(#)kern_physio.c 7.14 (Berkeley) %G%
+ * @(#)kern_physio.c 7.15 (Berkeley) %G%
#ifdef TRACE
trace(TR_SWAPIO, vp, bp->b_blkno);
#endif
#ifdef TRACE
trace(TR_SWAPIO, vp, bp->b_blkno);
#endif
+#if defined(hp300) || defined(i386)
vmapbuf(bp);
#endif
VOP_STRATEGY(bp);
vmapbuf(bp);
#endif
VOP_STRATEGY(bp);
panic("big push");
return (0);
}
panic("big push");
return (0);
}
+#if defined(hp300) || defined(i386)
vunmapbuf(bp);
#endif
bp->b_un.b_addr += c;
vunmapbuf(bp);
#endif
bp->b_un.b_addr += c;
bclnlist = bp;
if (bswlist.b_flags & B_WANTED)
wakeup((caddr_t)&proc[2]);
bclnlist = bp;
if (bswlist.b_flags & B_WANTED)
wakeup((caddr_t)&proc[2]);
+#if defined(hp300) || defined(i386)
vunmapbuf(bp);
#endif
splx(s);
vunmapbuf(bp);
#endif
splx(s);
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)subr_prof.c 7.8 (Berkeley) %G%
+ * @(#)subr_prof.c 7.9 (Berkeley) %G%
u_short *froms;
struct tostruct *tos = 0;
long tolimit = 0;
u_short *froms;
struct tostruct *tos = 0;
long tolimit = 0;
-#if defined(vax)
-char *s_lowpc = (char *)0x80000000;
-#endif
-#if defined(tahoe)
-char *s_lowpc = (char *)0xc0000000;
-#endif
-#if defined(hp300)
-char *s_lowpc = (char *)0x00000000;
-#endif
+char *s_lowpc = (char *)KERNBASE;
extern char etext;
char *s_highpc = &etext;
u_long s_textsize = 0;
extern char etext;
char *s_highpc = &etext;
u_long s_textsize = 0;