-/* init_main.c 3.6 %G% */
+/* init_main.c 4.1 %G% */
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/clock.h"
#include "../h/vm.h"
#include "../h/cmap.h"
+#include "../h/text.h"
+#include "../h/vlimit.h"
/*
* Initialization code.
*/
main(firstaddr)
{
+ register int i;
cpusid = mfpr(SID); /* get system identification */
#ifdef FASTVAX
proc[0].p_nice = NZERO;
u.u_procp = &proc[0];
u.u_cmask = CMASK;
+ for (i = 1; i < sizeof(u.u_limit)/sizeof(u.u_limit[0]); i++)
+ switch (i) {
+
+ case LIM_STACK:
+ u.u_limit[i] = 512*1024;
+ continue;
+ case LIM_DATA:
+ u.u_limit[i] = ctob(MAXDSIZ);
+ continue;
+ default:
+ u.u_limit[i] = INFINITY;
+ continue;
+ }
clkstart();
/*
proc[0].p_szpt = CLSIZE;
if (newproc(0)) {
expand(clrnd((int)btoc(szicode)), P0BR);
+ swpexpand(u.u_dsize, 0, &u.u_dmap, &u.u_smap);
(void) copyout((caddr_t)icode, (caddr_t)0, (unsigned)szicode);
/*
* Return goes to loc. 0 of user init
{
register struct buf *cp, *bp;
register struct filsys *fp;
- register unsigned i, j;
(*bdevsw[major(rootdev)].d_open)(rootdev, 1);
bp = bread(rootdev, SUPERB);
fp->s_ronly = 0;
fp->s_lasti = 1;
fp->s_nbehind = 0;
- /* on boot, read VAX TODR register (GMT 10 ms.
- * clicks into current year) and set software time
- * in 'int time' (GMT seconds since year YRREF)
- */
- for (i = 0 , j = YRREF ; j < YRCURR ; j++)
- i += (SECYR + (j%4?0:SECDAY)) ;
- time = udiv(mfpr(TODR),100) + i ;
+ clkinit(fp->s_time);
bootime = time;
}
* as arguments to the I/O routines to describe
* I/O to be done-- e.g. swap headers swbuf[] for
* swapping.
+ *
+ * These are actually allocated kernel map slots and space is
+ * allocated in locore.s for them.
*/
char buffers[NBUF][BSIZE];
/*
* Initialize the buffer I/O system by freeing
* all buffers and setting all device buffer lists to empty.
- *
- * SHOULD USE MEMALL HERE!!!
*/
binit()
{