/// Create a very simple IDT table that always ends up in
/// `handle_generic_exception_early` which then aborts.
Create a very simple IDT table that always ends up in
`handle_generic_exception_early` which then aborts.
Create a very simple IDT table that always ends up in ` handle_generic_exception_early ` which then aborts .
fn early() -> IdtTable {
        let mut table = IdtTable([Descriptor64::NULL; IDT_SIZE]);
        idt_set!(table.0, DIVIDE_ERROR_VECTOR, isr_handler_early0, 0);
        idt_set!(table.0, DEBUG_VECTOR, isr_handler_early1, 2);
        idt_set!(table.0, NONMASKABLE_INTERRUPT_VECTOR, isr_handler_early2, 0);
        idt_set!(table.0, BREAKPOINT_VECTOR, isr_handler_early3, 2);
        idt_set!(table.0, OVERFLOW_VECTOR, isr_handler_early4, 0);
        idt_set!(table.0, BOUND_RANGE_EXCEEDED_VECTOR, isr_handler_early5, 0);
        idt_set!(table.0, INVALID_OPCODE_VECTOR, isr_handler_early6, 0);
        idt_set!(table.0, DEVICE_NOT_AVAILABLE_VECTOR, isr_handler_early7, 0);
        // For double-faults, we use the
        // _early handler to abort in any case:
        idt_set!(table.0, DOUBLE_FAULT_VECTOR, isr_handler_early8, 1);
        idt_set!(
            table.0,
            COPROCESSOR_SEGMENT_OVERRUN_VECTOR,
            isr_handler_early9,
            0
        );
        idt_set!(table.0, INVALID_TSS_VECTOR, isr_handler_early10, 0);
        idt_set!(table.0, SEGMENT_NOT_PRESENT_VECTOR, isr_handler_early11, 0);
        idt_set!(table.0, STACK_SEGEMENT_FAULT_VECTOR, isr_handler_early12, 0);
        idt_set!(
            table.0,
            GENERAL_PROTECTION_FAULT_VECTOR,
            isr_handler_early13,
            0
        );
        idt_set!(table.0, PAGE_FAULT_VECTOR, isr_handler_early14, 0);
        idt_set!(table.0, X87_FPU_VECTOR, isr_handler_early16, 0);
        idt_set!(table.0, ALIGNMENT_CHECK_VECTOR, isr_handler_early17, 0);
        // For machine-check exceptions, we use the
        // _early handler to abort in any case:
        idt_set!(table.0, MACHINE_CHECK_VECTOR, isr_handler_early18, 1);
        idt_set!(table.0, SIMD_FLOATING_POINT_VECTOR, isr_handler_early19, 0);
        idt_set!(table.0, VIRTUALIZATION_VECTOR, isr_handler_early20, 0);
        idt_set!(table.0, TLB_WORK_PENDING as usize, isr_handler_early251, 0);
        idt_set!(table.0, MLNR_GC_INIT as usize, isr_handler_early250, 0);
        idt_set!(
            table.0,
            apic::TSC_TIMER_VECTOR as usize,
            isr_handler_early252,
            0
        );
        table
    }
fn early ( ) -> IdtTable { let mut table = IdtTable ( [ Descriptor64 :: NULL ; IDT_SIZE ] ) ; idt_set ! ( table 0 DIVIDE_ERROR_VECTOR isr_handler_early0 0 ) ; idt_set ! ( table 0 DEBUG_VECTOR isr_handler_early1 2 ) ; idt_set ! ( table 0 NONMASKABLE_INTERRUPT_VECTOR isr_handler_early2 0 ) ; idt_set ! ( table 0 BREAKPOINT_VECTOR isr_handler_early3 2 ) ; idt_set ! ( table 0 OVERFLOW_VECTOR isr_handler_early4 0 ) ; idt_set ! ( table 0 BOUND_RANGE_EXCEEDED_VECTOR isr_handler_early5 0 ) ; idt_set ! ( table 0 INVALID_OPCODE_VECTOR isr_handler_early6 0 ) ; idt_set ! ( table 0 DEVICE_NOT_AVAILABLE_VECTOR isr_handler_early7 0 ) ; // For double-faults, we use the // _early handler to abort in any case: idt_set ! ( table 0 DOUBLE_FAULT_VECTOR isr_handler_early8 1 ) ; idt_set ! ( table 0 COPROCESSOR_SEGMENT_OVERRUN_VECTOR isr_handler_early9 0 ) ; idt_set ! ( table 0 INVALID_TSS_VECTOR isr_handler_early10 0 ) ; idt_set ! ( table 0 SEGMENT_NOT_PRESENT_VECTOR isr_handler_early11 0 ) ; idt_set ! ( table 0 STACK_SEGEMENT_FAULT_VECTOR isr_handler_early12 0 ) ; idt_set ! ( table 0 GENERAL_PROTECTION_FAULT_VECTOR isr_handler_early13 0 ) ; idt_set ! ( table 0 PAGE_FAULT_VECTOR isr_handler_early14 0 ) ; idt_set ! ( table 0 X87_FPU_VECTOR isr_handler_early16 0 ) ; idt_set ! ( table 0 ALIGNMENT_CHECK_VECTOR isr_handler_early17 0 ) ; // For machine-check exceptions, we use the // _early handler to abort in any case: idt_set ! ( table 0 MACHINE_CHECK_VECTOR isr_handler_early18 1 ) ; idt_set ! ( table 0 SIMD_FLOATING_POINT_VECTOR isr_handler_early19 0 ) ; idt_set ! ( table 0 VIRTUALIZATION_VECTOR isr_handler_early20 0 ) ; idt_set ! ( table 0 TLB_WORK_PENDING as usize isr_handler_early251 0 ) ; idt_set ! ( table 0 MLNR_GC_INIT as usize isr_handler_early250 0 ) ; idt_set ! ( table 0 apic TSC_TIMER_VECTOR as usize isr_handler_early252 0 ) ; table }
Create a very simple IDT table that always ends up in
`handle_generic_exception_early` which then aborts.
Create a very simple IDT table that always ends up in ` handle_generic_exception_early ` which then aborts .