plan 9 kernel history: overview | file list | diff list

1999/0515/alphapc/main.c (diff list | history)

1999/0514/sys/src/9/alphapc/main.c:15,201999/0515/sys/src/9/alphapc/main.c:15,21 (short | long | prev | next)
1999/0415    
Bootconf *bootconf; 
Conf	conf; 
FPsave	initfp; 
1999/0515    
uvlong initfpcr = 0x2800800000000000LL; 
1999/0415    
 
void 
main(void) 
1999/0514/sys/src/9/alphapc/main.c:26,331999/0515/sys/src/9/alphapc/main.c:27,32
1999/0415    
	clockinit(); 
	confinit(); 
	archinit(); 
	savefpregs(&initfp); 
1999/0514    
	fpenab(0); 
1999/0415    
	mmuinit(); 
	xinit(); 
	printinit(); 
1999/0514/sys/src/9/alphapc/main.c:47,541999/0515/sys/src/9/alphapc/main.c:46,53
1999/0415    
 
#ifdef	NEVER 
	percpu = hwrpb + (hwrpb[40]>>2); 
//	percpu[32] |= 2;			/* restart capable */ 
	percpu[32] &= ~1;			/* boot in progress - not */ 
1999/0515    
//	percpu[32] |= 2;		/* restart capable */ 
	percpu[32] &= ~1;		/* boot in progress - not */ 
1999/0415    
//	percpu[32] |= (3<<16);		/* warm boot requested */ 
//	percpu[32] |= (2<<16);		/* cold boot requested */ 
//	percpu[32] |= (4<<16);		/* stay halted */ 
1999/0514/sys/src/9/alphapc/main.c:61,661999/0515/sys/src/9/alphapc/main.c:60,67
1999/0415    
	chandevreset(); 
1999/0423    
	pageinit(); 
1999/0415    
	swapinit(); 
1999/0515    
	savefpregs(&initfp); 
initfp.fpstatus = 0x68028000; 
1999/0415    
	userinit(); 
	schedinit(); 
} 
1999/0514/sys/src/9/alphapc/main.c:131,1391999/0515/sys/src/9/alphapc/main.c:132,138
1999/0415    
	strcpy(p->text, "*init*"); 
	strcpy(p->user, eve); 
 
	p->fpstate = FPinit; 
	p->fpsave.fpstatus = initfp.fpstatus; 
	fpenab(0); 
1999/0515    
	procsetup(p); 
1999/0415    
 
	/* 
	 * Kernel Stack 
1999/0514/sys/src/9/alphapc/main.c:168,1731999/0515/sys/src/9/alphapc/main.c:167,210
1999/0415    
	kunmap(k); 
 
	ready(p); 
1999/0515    
} 
 
void 
procsetup(Proc *p) 
{ 
	p->fpstate = FPinit; 
	fpenab(0); 
} 
 
void 
procsave(Proc *p) 
{ 
	if(p->fpstate == FPactive){ 
		if(p->state == Moribund) 
			fpenab(0); 
		else{ 
			/* 
			 * Fpsave() stores without handling pending 
			 * unmasked exeptions. Postnote() can't be called 
			 * here as sleep() already has up->rlock, so 
			 * the handling of pending exceptions is delayed 
			 * until the process runs again and generates an 
			 * emulation fault to activate the FPU. 
			 */ 
			savefpregs(&up->fpsave); 
//print("PS=%lux+", up->fpsave.fpstatus); 
		} 
		p->fpstate = FPinactive; 
	} 
 
	/* 
	 * Switch to the prototype page tables for this processor. 
	 * While this processor is in the scheduler, the process could run 
	 * on another processor and exit, returning the page tables to 
	 * the free list where they could be reallocated and overwritten. 
	 * When this processor eventually has to get an entry from the 
	 * trashed page tables it will crash. 
	 */ 
1999/0415    
} 
 
void 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)