Ignore:
Timestamp:
Jul 7, 2017, 3:22:59 PM (7 years ago)
Author:
max@…
Message:

we're gonna use an array of TSSs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/x86_64/core/hal_init.c

    r162 r164  
    440440 * The gdt bitmap must be per-cluster.
    441441 */
    442 int tss_alloc(struct tss *tss)
     442int tss_alloc(struct tss *tss, size_t lid)
    443443{
    444444        int slot;
    445445
    446446        /* Once we have proper SMP support, we will change that */
    447         slot = GDT_CPU0TSS_SEL;
     447        slot = GDT_CPUTSS_SEL + lid;
    448448
    449449        gdt_set_sysseg(GDT_ADDR_SYS(gdtstore, slot), tss,
     
    466466        tss->tss_ist[2] = (uint64_t)cpu_nmfl_stack[lid] + STKSIZE;
    467467        tss->tss_iobase = IOMAP_INVALOFF << 16;
    468         sel = tss_alloc(tss);
     468        sel = tss_alloc(tss, lid);
    469469
    470470        /* Load it */
Note: See TracChangeset for help on using the changeset viewer.