~kris/9p

9hist

ref: feb23feaab71b2da26b9ffa653a7b2f56902018c 9hist/pc/mmu.c -rw-r--r-- 493 bytes
feb23fea — David du Colombier Plan 9 from Bell Labs 1991-06-22 35 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include	"u.h"
#include	"lib.h"
#include	"mem.h"
#include	"dat.h"
#include	"fns.h"
#include	"io.h"

/*
 *  global descriptor table describing all segments
 */
Segdesc gdt[1024] =
{
[NULLSEG]	{ 0, 0},		/* null descriptor */
[KESEG]		EXECSEG(0),		/* kernel code */
[KDSEG]		DATASEG(0),		/* kernel data/stack */
[UESEG]		EXECSEG(3),		/* user code */
[UDSEG]		DATASEG(3),		/* user data/stack */
[SYSGATE]	CALLGATE(KESEG, syscall, 3),	/* call gate for system calls */
		{ 0, 0},		/* the rest */
};