Changeset 292 for trunk/hal/x86_64/core


Ignore:
Timestamp:
Jul 31, 2017, 10:16:33 AM (7 years ago)
Author:
max@…
Message:

Use different stacks for NMIs and Double Faults.

File:
1 edited

Legend:

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

    r283 r292  
    555555        struct idt_seg *idt;
    556556        size_t i;
     557        int ist;
    557558
    558559        memset(&idt_bitmap, 0, sizeof(idt_bitmap));
     
    567568        /* General exceptions */
    568569        for (i = CPUVEC_MIN; i < CPUVEC_MAX; i++) {
     570                if (i == 2) { /* NMI */
     571                        ist = 3;
     572                } else if (i == 8) { /* Double Fault */
     573                        ist = 2;
     574                } else {
     575                        ist = 0;
     576                }
    569577                idt_set_seg(&idt[i], (void *)x86_traps[i - CPUVEC_MIN], 0,
    570578                    SDT_SYS386IGT, SEL_KPL, GDT_FIXED_SEL(GDT_KCODE_SEL, SEL_KPL));
     579
    571580                idt_bitmap.busy[i] = true;
    572581        }
Note: See TracChangeset for help on using the changeset viewer.