StuBS
core_interrupt.h File Reference

Interrupt control and interrupt vector list More...

#include "types.h"
Include dependency graph for core_interrupt.h:
This graph shows which files directly or indirectly include this file:

Namespaces

namespace  Core
 Implements an abstraction for CPU internals.
 
namespace  Core::Interrupt
 Exception and Interrupt control.
 

Enumerations

enum  Core::Interrupt::Vector {
  Core::Interrupt::DIVISON_BY_ZERO = 0 , Core::Interrupt::DEBUG = 1 , Core::Interrupt::NON_MASKABLE_INTERRUPT = 2 , Core::Interrupt::BREAKPOINT = 3 ,
  Core::Interrupt::OVERFLOW = 4 , Core::Interrupt::BOUND_RANGE_EXCEEDED = 5 , Core::Interrupt::INVALID_OPCODE = 6 , Core::Interrupt::DEVICE_NOT_AVAILABLE = 7 ,
  Core::Interrupt::DOUBLE_FAULT = 8 , Core::Interrupt::INVALID_TSS = 10 , Core::Interrupt::SEGMENT_NOT_PRESENT = 11 , Core::Interrupt::STACK_SEGMENT_FAULT = 12 ,
  Core::Interrupt::GENERAL_PROTECTION_FAULT = 13 , Core::Interrupt::PAGE_FAULT = 14 , Core::Interrupt::FLOATING_POINT_EXCEPTION = 16 , Core::Interrupt::ALIGNMENT_CHECK = 17 ,
  Core::Interrupt::MACHINE_CHECK = 18 , Core::Interrupt::SIMD_FP_EXCEPTION = 19 , SECURITY_EXCEPTION = 31 , Core::Interrupt::TIMER = 32 ,
  Core::Interrupt::KEYBOARD = 33 , Core::Interrupt::SERIAL = 34 , Core::Interrupt::MOUSE = 44 , Core::Interrupt::PANIC = 99 ,
  Core::Interrupt::ASSASSIN = 100 , Core::Interrupt::WAKEUP = 101 , Core::Interrupt::VECTORS = 256
}
 List of used interrupt vectors. More...
 

Functions

bool Core::Interrupt::isEnabled ()
 Check if interrupts are enabled on this CPU.
 
void Core::Interrupt::enable ()
 Allow interrupts.
 
bool Core::Interrupt::disable ()
 Forbid interrupts.
 
void Core::Interrupt::restore (bool val)
 Restore interrupt.
 

Variables

const uintptr_t Core::Interrupt::FLAG_ENABLE = 1 << 9
 Bit in FLAGS register corresponding to the current interrupt state.
 

Detailed Description