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

1991/0703/pc/mmu.c (diff list | history)

1991/0703/sys/src/9/pc/mmu.c:49,591991/0706/sys/src/9/pc/mmu.c:49,61 (short | long | prev | next)
1991/0703    
#define	DATASEG(p) 	{ 0xFFFF, SEGG|SEGB|(0xF<<16)|SEGP|SEGPL(p)|SEGDATA|SEGW } 
#define	EXECSEG(p) 	{ 0xFFFF, SEGG|SEGD|(0xF<<16)|SEGP|SEGPL(p)|SEGEXEC|SEGR } 
#define CALLGATE(s,o,p)	{ (o)&0xFFFF|((s)<<16), (o)&0xFFFF0000|SEGP|SEGPL(p)|SEGCG } 
1991/0706    
#define	D16SEG(p) 	{ 0xFFFF, (0x0<<16)|SEGP|SEGPL(p)|SEGDATA|SEGW } 
#define	E16SEG(p) 	{ 0xFFFF, (0x0<<16)|SEGP|SEGPL(p)|SEGEXEC|SEGR } 
1991/0703    
 
/* 
1991/0613    
 *  global descriptor table describing all segments 
 */ 
1991/0703    
Segdesc gdt[6] = 
1991/0706    
Segdesc gdt[] = 
1991/0612    
{ 
1991/0613    
[NULLSEG]	{ 0, 0},		/* null descriptor */ 
[KDSEG]		DATASEG(0),		/* kernel data/stack */ 
1991/0703/sys/src/9/pc/mmu.c:61,661991/0706/sys/src/9/pc/mmu.c:63,70
1991/0613    
[UDSEG]		DATASEG(3),		/* user data/stack */ 
1991/0703    
[UESEG]		EXECSEG(3),		/* user code */ 
[SYSGATE]	CALLGATE(KESEL,0,3),	/* call gate for system calls */ 
1991/0706    
[RDSEG]		D16SEG(0),		/* reboot data/stack */ 
[RESEG]		E16SEG(0),		/* reboot code */ 
1991/0613    
}; 
1991/0703    
 
void 


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