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/include/bsp/tblsizes.h | |
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/include/bsp/tblsizes.h')
-rw-r--r-- | bsps/i386/pc386/include/bsp/tblsizes.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bsps/i386/pc386/include/bsp/tblsizes.h b/bsps/i386/pc386/include/bsp/tblsizes.h index 13429dc85f..978cde2b3e 100644 --- a/bsps/i386/pc386/include/bsp/tblsizes.h +++ b/bsps/i386/pc386/include/bsp/tblsizes.h @@ -20,5 +20,11 @@ #include <bspopts.h> #define IDT_SIZE (256) -#define NUM_SYSTEM_GDT_DESCRIPTORS 4 +/* We have 3 fixed segments (NULL, text, data) + a GS segment for TLS */ +#ifdef RTEMS_SMP +/* Need one GS segment for each processor (x86 can have up to 256 processors) */ +#define NUM_SYSTEM_GDT_DESCRIPTORS 3+256 +#else +#define NUM_SYSTEM_GDT_DESCRIPTORS 3+1 +#endif #define GDT_SIZE (NUM_SYSTEM_GDT_DESCRIPTORS + NUM_APP_DRV_GDT_DESCRIPTORS) |