diff options
author | Jan Sommer <jan.sommer@dlr.de> | 2020-05-31 16:22:53 +0200 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2020-06-11 13:28:55 +1000 |
commit | 85d6a760f57e6f53c72cf8d15be20e3e4eaf4734 (patch) | |
tree | 21f2a8582414ad8810c8a52e553d27e1a790d9f1 /bsps/i386/pc386/start/ldsegs.S | |
parent | bsp/pc386: Turn start16.S into a startAP.S (diff) | |
download | rtems-85d6a760f57e6f53c72cf8d15be20e3e4eaf4734.tar.bz2 |
bsp/pc386: Update GDT to work for SMP
Create a GS segment in the GDT for each processor for storing TLS.
This makes the GDT in startAP.S obsolete as all processors now share the
same GDT, which is passed to each AP at startup.
The correct segment for each processor is calculated in cpu_asm.S.
Update #3335
Diffstat (limited to 'bsps/i386/pc386/start/ldsegs.S')
-rw-r--r-- | bsps/i386/pc386/start/ldsegs.S | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bsps/i386/pc386/start/ldsegs.S b/bsps/i386/pc386/start/ldsegs.S index b56bf836f0..9ed66ef1a3 100644 --- a/bsps/i386/pc386/start/ldsegs.S +++ b/bsps/i386/pc386/start/ldsegs.S @@ -191,9 +191,11 @@ SYM (_Global_descriptor_table): .word 0xffff, 0 .byte 0, 0x92, 0xcf, 0 - /* gs segment */ + /* gs segment(s) */ + .rept (NUM_SYSTEM_GDT_DESCRIPTORS - 3) .word 0xffff, 0 .byte 0, 0x92, 0xcf, 0 + .endr /* allocated space for user segments */ .rept (GDT_SIZE - NUM_SYSTEM_GDT_DESCRIPTORS) |