Ejemplo n.º 1
0
void setIdt()
{
  /* Program interrups/exception service routines */
  idtR.base  = (DWord)idt;
  idtR.limit = IDT_ENTRIES * sizeof(Gate) - 1;
  /* ADD INITIALIZATION CODE FOR INTERRUPT VECTOR */
	/*EXCEPCIONES*/
  setInterruptHandler(0,divide_error_handler, 0);
  setInterruptHandler(1,debug_handler , 3);
  setInterruptHandler(2,nm1_handler ,0);
  setInterruptHandler(3,breakpoint_handler , 3);
  setInterruptHandler(4,overflow_handler , 0);
  setInterruptHandler(5,bounds_check_handler , 0);
  setInterruptHandler(6,invalid_opcode_handler , 0);
  setInterruptHandler(7,device_not_available_handler , 0);
  setInterruptHandler(8,double_fault_handler , 0);
  setInterruptHandler(9,coprocessor_segment_overrun_handler ,0);
  setInterruptHandler(10,invalid_tss_handler , 0);
  setInterruptHandler(11,segment_not_present_handler , 0);
  setInterruptHandler(12,stack_exception_handler , 0);
  setInterruptHandler(13,general_protection_handler, 0);
  setInterruptHandler(14,page_fault_handler, 0);
  setInterruptHandler(16,floating_point_error_handler , 0);
  setInterruptHandler(17,alignment_check_handler , 0);

	/*INTERRUPCIONES*/
  setInterruptHandler(32,clock_handler, 0);
  setInterruptHandler(33,keyboard_handler, 0);
  
  /*CRIDES A SISTEMA: */

  setTrapHandler(0x80,system_call,3);

  set_idt_reg(&idtR);
}
Ejemplo n.º 2
0
void setIdt()
{
	idtR.base  = (DWord)idt;
	idtR.limit = IDT_ENTRIES*sizeof(Gate) - 1;

	set_handlers();
	setInterruptHandler(32, clock_handler, 0);
	setInterruptHandler(33, keyboard_handler, 0);
	setTrapHandler(0x80, syscall_handler, 3); // 3 = user privilege level

	set_idt_reg(&idtR);
}
Ejemplo n.º 3
0
void setIdt()
{
  /* Program interrups/exception service routines */
  idtR.base  = (DWord)idt;
  idtR.limit = IDT_ENTRIES * sizeof(Gate) - 1;
  
  set_handlers();

  /* ADD INITIALIZATION CODE FOR INTERRUPT VECTOR */

  set_idt_reg(&idtR);
}
Ejemplo n.º 4
0
void setIdt()
{
  /* Program interrups/exception service routines */
  idtR.base  = (DWord)idt;
  idtR.limit = IDT_ENTRIES * sizeof(Gate) - 1;
  
  set_handlers();
  setInterruptHandler(32, clock_handler /*void (*handler)()*/, 0/*int privLevel*/);
  setInterruptHandler(33, keyboard_handler /*void (*handler)()*/, 0/*int privLevel*/);
  setTrapHandler(0x80, system_call_handler, 3);
  /* ADD INITIALIZATION CODE FOR INTERRUPT VECTOR */

  set_idt_reg(&idtR);
}
Ejemplo n.º 5
0
void setIdt()
{
  /* Program interrupts/exception service routines */
  idtR.base  = (DWord)idt;
  idtR.limit = IDT_ENTRIES * sizeof(Gate) - 1;
  /* ADD INITIALIZATION CODE FOR INTERRUPT VECTOR (IDT)*/

  set_handlers();
  
  setInterruptHandler(32, clock_handler, 0);
  setInterruptHandler(33, keyboard_handler, 0);
  
  set_idt_reg(&idtR);
}
Ejemplo n.º 6
0
void setIdt()
{
  /* Program interrups/exception service routines */
  idtR.base  = (DWord)idt;
  idtR.limit = IDT_ENTRIES * sizeof(Gate) - 1;
  
  set_handlers();

  /* ADD INITIALIZATION CODE FOR INTERRUPT VECTOR */
  setInterruptHandler(33, keyboard_handler, 0);
  setInterruptHandler(0x80, system_call_handler, 3);
  setInterruptHandler(32, clock_handler, 0); // is in this privileged mode???

  set_idt_reg(&idtR);
}
Ejemplo n.º 7
0

void setIdt()
{
  /* Program interrups/exception service routines */
  idtR.base  = (DWord)idt;
  idtR.limit = IDT_ENTRIES * sizeof(Gate) - 1;

  /* ADD INITIALIZATION CODE FOR INTERRUPT VECTOR */
  setInterruptHandler(0x21, keyboard_handler, 0); // IDT entry 33  
  setInterruptHandler(0x20, clock_handler, 0);	//   IDT 32

  setTrapHandler(0x80, system_call_handler, 3);

  set_handlers();
Ejemplo n.º 8
0
void setIdt()
{
  /* Program interrups/exception service routines */
  idtR.base  = (DWord)idt;
  idtR.limit = IDT_ENTRIES * sizeof(Gate) - 1;
  
  set_handlers();

  void clock_handler(void); //Header clock_handler (Defined at entry.S)

  void keyboard_handler(void); //Header keyboard_handler (Defined at entry.S)

  void system_call_handler(void);
  
  setInterruptHandler(32, clock_handler, 0); //Entrada IDT interrupcio clock
  setInterruptHandler(33, keyboard_handler, 0); //Entrada IDT interrupcio keyboard
  setTrapHandler(0x80, system_call_handler, 3);
  
  /* ADD INITIALIZATION CODE FOR INTERRUPT VECTOR */

  set_idt_reg(&idtR);
}
Ejemplo n.º 9
0
void setIdt()
{
  /* Program interrups/exception service routines */
  idtR.base  = (DWord)idt;
  idtR.limit = IDT_ENTRIES * sizeof(Gate) - 1;

  // in exceptions.c
  init_except();

  // Ints
  setInterruptHandler (32, clock_handler, 0);  // int 0x20
  //setInterruptHandler (33, kbd_handler, 0);  // int 0x21

  init_kbd();

  //syscals
  setTrapHandler (128, syscall_handler, 3);  // int 0x80
  

  /* ADD INITIALIZATION CODE FOR INTERRUPT VECTOR */
  set_idt_reg(&idtR);

}