Added timer ISR

This commit is contained in:
2021-04-15 07:22:01 -05:00
parent 83abc11b09
commit 50fcaa2673
2 changed files with 11 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
#include "isr.h"
#include "stdio.h"
#include "apic.h"
__attribute__ ((interrupt))
void isr_division_by_zero(void* frame)
@@ -25,6 +26,13 @@ void isr_double_fault(void* frame, unsigned int error)
asm("hlt");
}
__attribute__ ((interrupt))
void isr_timer(void* frame)
{
printf("Timer tick.\n");
apic_eoi();
}
__attribute__ ((naked))
void isr_ap_start(void* frame)
{

View File

@@ -12,6 +12,9 @@ void isr_page_fault(void* frame, unsigned int error);
__attribute__ ((interrupt))
void isr_double_fault(void* frame, unsigned int error);
__attribute__ ((interrupt))
void isr_timer(void* frame);
__attribute__ ((naked))
void isr_ap_start(void* frame);