- Timestamp:
- Jul 7, 2017, 3:22:59 PM (7 years ago)
- Location:
- trunk/hal/x86_64/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/core/hal_init.c
r162 r164 440 440 * The gdt bitmap must be per-cluster. 441 441 */ 442 int tss_alloc(struct tss *tss )442 int tss_alloc(struct tss *tss, size_t lid) 443 443 { 444 444 int slot; 445 445 446 446 /* Once we have proper SMP support, we will change that */ 447 slot = GDT_CPU 0TSS_SEL;447 slot = GDT_CPUTSS_SEL + lid; 448 448 449 449 gdt_set_sysseg(GDT_ADDR_SYS(gdtstore, slot), tss, … … 466 466 tss->tss_ist[2] = (uint64_t)cpu_nmfl_stack[lid] + STKSIZE; 467 467 tss->tss_iobase = IOMAP_INVALOFF << 16; 468 sel = tss_alloc(tss );468 sel = tss_alloc(tss, lid); 469 469 470 470 /* Load it */ -
trunk/hal/x86_64/core/hal_segmentation.h
r162 r164 31 31 #define NGDT_MEM 6 /* aligned */ 32 32 33 #define GDT_CPU 0TSS_SEL 0 /* cpu0's tss*/34 #define NGDT_DYN (256 - (NGDT_MEM / 2) * 16)33 #define GDT_CPUTSS_SEL 0 /* cpu TSS base index */ 34 #define NGDT_DYN CONFIG_MAX_LOCAL_CORES /* one TSS per core */ 35 35 36 36 /*
Note: See TracChangeset
for help on using the changeset viewer.