summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/pc386/startup
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-06-09 15:42:36 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-06-12 08:01:58 +0200
commit7b0c74ffb085656d67554102857224223ee03f88 (patch)
treed2cf69f695da218e67c6c5cb7d26f82c3fc967be /c/src/lib/libbsp/i386/pc386/startup
parenti386: Move _CPU_Context_Initialize() (diff)
downloadrtems-7b0c74ffb085656d67554102857224223ee03f88.tar.bz2
i386: Support thread-local storage (TLS)
Update #2468.
Diffstat (limited to 'c/src/lib/libbsp/i386/pc386/startup')
-rw-r--r--c/src/lib/libbsp/i386/pc386/startup/ldsegs.S10
1 files changed, 7 insertions, 3 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S b/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
index ea41874a1b..626d5a02d4 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
+++ b/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
@@ -171,8 +171,8 @@ next_step:
/*---------------------------------------------------------------------------+
| GDT itself
+--------------------------------------------------------------------------*/
-#if GDT_SIZE < 3
-#error "GDT_SIZE must be at least 3"
+#if GDT_SIZE < NUM_SYSTEM_GDT_DESCRIPTORS
+#error "GDT_SIZE must be at least NUM_SYSTEM_GDT_DESCRIPTORS"
#endif
BEGIN_DATA
@@ -193,8 +193,12 @@ SYM (_Global_descriptor_table):
.word 0xffff, 0
.byte 0, 0x92, 0xcf, 0
+ /* gs segment */
+ .word 0xffff, 0
+ .byte 0, 0x92, 0xcf, 0
+
/* allocated space for user segments */
- .rept (GDT_SIZE - 3)
+ .rept (GDT_SIZE - NUM_SYSTEM_GDT_DESCRIPTORS)
.word 0,0,0,0
.endr