PERFORCE change 28686 for review
Peter Wemm
peter at FreeBSD.org
Wed Apr 9 20:56:05 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=28686
Change 28686 by peter at peter_daintree on 2003/04/09 20:55:38
create a %cs for userland
Affected files ...
.. //depot/projects/hammer/sys/x86_64/include/segments.h#14 edit
.. //depot/projects/hammer/sys/x86_64/x86_64/machdep.c#60 edit
Differences ...
==== //depot/projects/hammer/sys/x86_64/include/segments.h#14 (text+ko) ====
@@ -178,7 +178,8 @@
#define GDATA_SEL 2 /* Kernel Data Descriptor */
#define GPROC0_SEL 3 /* Task state process slot zero and up */
/* slot 4 is second half of GPROC0_SEL */
-#define NGDT 5
+#define GUCODE_SEL 5 /* Kernel Code Descriptor */
+#define NGDT 6
#ifdef _KERNEL
extern struct user_segment_descriptor gdt[];
==== //depot/projects/hammer/sys/x86_64/x86_64/machdep.c#60 (text+ko) ====
@@ -573,7 +573,7 @@
{ 0x0, /* segment base address */
0xfffff, /* length - all address space */
SDT_MEMERA, /* segment type */
- 0, /* segment descriptor priority level */
+ SEL_KPL, /* segment descriptor priority level */
1, /* segment descriptor present */
1, /* long */
0, /* default 32 vs 16 bit size */
@@ -582,7 +582,7 @@
{ 0x0, /* segment base address */
0xfffff, /* length - all address space */
SDT_MEMRWA, /* segment type */
- 0, /* segment descriptor priority level */
+ SEL_KPL, /* segment descriptor priority level */
1, /* segment descriptor present */
1, /* long */
1, /* default 32 vs 16 bit size */
@@ -592,7 +592,7 @@
0x0, /* segment base address */
sizeof(struct x86_64tss)-1,/* length - all address space */
SDT_SYSTSS, /* segment type */
- 0, /* segment descriptor priority level */
+ SEL_KPL, /* segment descriptor priority level */
1, /* segment descriptor present */
0, /* long */
0, /* unused - default 32 vs 16 bit size */
@@ -606,6 +606,15 @@
0, /* long */
0, /* default 32 vs 16 bit size */
0 /* limit granularity (byte/page units)*/ },
+/* GUCODE_SEL 5 Code Descriptor for user */
+{ 0x0, /* segment base address */
+ 0xfffff, /* length - all address space */
+ SDT_MEMERA, /* segment type */
+ SEL_UPL, /* segment descriptor priority level */
+ 1, /* segment descriptor present */
+ 1, /* long */
+ 0, /* default 32 vs 16 bit size */
+ 1 /* limit granularity (byte/page units)*/ },
};
void
More information about the p4-projects
mailing list