Turnstone Operating System
Loading...
Searching...
No Matches
interrupt.64.c File Reference

Interrupts. More...

#include <types.h>
#include <cpu.h>
#include <cpu/interrupt.h>
#include <cpu/descriptor.h>
#include <cpu/crx.h>
#include <logging.h>
#include <strings.h>
#include <memory/paging.h>
#include <memory.h>
#include <apic.h>
#include <cpu/task.h>
#include <backtrace.h>
#include <debug.h>

Classes

struct  interrupt_irq_list_item_t
 

Typedefs

typedef struct interrupt_irq_list_item_t interrupt_irq_list_item_t
 

Functions

 MODULE ("turnstone.kernel.cpu.interrupt")
 
void video_text_print (const char_t *string)
 
void interrupt_register_dummy_handlers (descriptor_idt_t *)
 
int8_t interrupt_int01_debug_exception (interrupt_frame_ext_t *)
 
int8_t interrupt_int02_nmi_interrupt (interrupt_frame_ext_t *)
 
int8_t interrupt_int03_breakpoint_exception (interrupt_frame_ext_t *)
 
int8_t interrupt_int0D_general_protection_exception (interrupt_frame_ext_t *)
 
int8_t interrupt_int0E_page_fault_exception (interrupt_frame_ext_t *)
 
int8_t interrupt_int13_simd_floating_point_exception (interrupt_frame_ext_t *)
 
int8_t interrupt_init (void)
 interrupt table builder functions More...
 
int8_t interrupt_ist_redirect_main_interrupts (uint8_t ist)
 interrupt redirector for main interrupts More...
 
int8_t interrupt_ist_redirect_interrupt (uint8_t vec, uint8_t ist)
 interrupt redirector for main interrupts More...
 
uint8_t interrupt_get_next_empty_interrupt (void)
 finds not used interrupt for registering More...
 
int8_t interrupt_irq_remove_handler (uint8_t irqnum, interrupt_irq irq)
 remove irq for irq number More...
 
int8_t interrupt_irq_set_handler (uint8_t irqnum, interrupt_irq irq)
 registers irq for irq number, for an irq there can be more irq handlers, loops with return of interrupt_irq More...
 
static void interrupt_print_frame_ext (interrupt_frame_ext_t *frame)
 
void interrupt_generic_handler (interrupt_frame_ext_t *frame)
 

Variables

interrupt_irq_list_item_t ** interrupt_irqs = NULL
 
uint8_t next_empty_interrupt = 0
 
boolean_t KERNEL_PANIC_DISABLE_LOCKS
 
boolean_t we_sended_nmi_to_bsp
 

Detailed Description

Interrupts.

This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.

Function Documentation

◆ interrupt_get_next_empty_interrupt()

uint8_t interrupt_get_next_empty_interrupt ( void  )

finds not used interrupt for registering

Returns
interrupt number

◆ interrupt_init()

int8_t interrupt_init ( void  )

interrupt table builder functions

builds interrupt table at idtr look for descriptor_idt

◆ interrupt_irq_remove_handler()

int8_t interrupt_irq_remove_handler ( uint8_t  irqnum,
interrupt_irq  irq 
)

remove irq for irq number

Parameters
[in]irqnumirq number to handle
[in]irqthe irq handler
Returns
0 if succeed

◆ interrupt_irq_set_handler()

int8_t interrupt_irq_set_handler ( uint8_t  irqnum,
interrupt_irq  irq 
)

registers irq for irq number, for an irq there can be more irq handlers, loops with return of interrupt_irq

Parameters
[in]irqnumirq number to handle
[in]irqthe irq handler
Returns
0 if succeed

◆ interrupt_ist_redirect_interrupt()

int8_t interrupt_ist_redirect_interrupt ( uint8_t  vec,
uint8_t  ist 
)

interrupt redirector for main interrupts

Parameters
[in]istinterrupt stack table index
Returns
0 if succeed

◆ interrupt_ist_redirect_main_interrupts()

int8_t interrupt_ist_redirect_main_interrupts ( uint8_t  ist)

interrupt redirector for main interrupts

Parameters
[in]istinterrupt stack table index
Returns
0 if succeed

Variable Documentation

◆ KERNEL_PANIC_DISABLE_LOCKS

boolean_t KERNEL_PANIC_DISABLE_LOCKS
extern

global kernel panic lock for efi