Wrote new ISR for AP entry
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
enum exception_code_t
|
enum interrupt_code_t
|
||||||
{
|
{
|
||||||
EXCEPTION_DIV_BY_0 = 0,
|
EXCEPTION_DIV_BY_0 = 0,
|
||||||
EXCEPTION_DEBUG = 1,
|
EXCEPTION_DEBUG = 1,
|
||||||
@@ -23,7 +23,9 @@ enum exception_code_t
|
|||||||
EXCEPTION_MACHINE_CHECK = 18,
|
EXCEPTION_MACHINE_CHECK = 18,
|
||||||
EXCEPTION_SIMD_FLOATING_POINT = 19,
|
EXCEPTION_SIMD_FLOATING_POINT = 19,
|
||||||
EXCEPTION_VIRTUALIZATION = 20,
|
EXCEPTION_VIRTUALIZATION = 20,
|
||||||
EXCEPTION_SECURITY = 30
|
EXCEPTION_SECURITY = 30,
|
||||||
|
ISR_AP_START = 127,
|
||||||
|
ISR_SYSCALL = 128
|
||||||
};
|
};
|
||||||
|
|
||||||
enum isr_type_t
|
enum isr_type_t
|
||||||
|
|||||||
@@ -24,6 +24,15 @@ void isr_double_fault(void* frame, unsigned int error)
|
|||||||
asm("hlt");
|
asm("hlt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__attribute__ ((interrupt, naked))
|
||||||
|
void isr_ap_start(void* frame)
|
||||||
|
{
|
||||||
|
asm(".code16");
|
||||||
|
//...
|
||||||
|
asm(".code32");
|
||||||
|
// do something useful
|
||||||
|
}
|
||||||
|
|
||||||
__attribute__ ((interrupt))
|
__attribute__ ((interrupt))
|
||||||
void isr_syscall(void* frame)
|
void isr_syscall(void* frame)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,5 +12,8 @@ void isr_page_fault(void* frame, unsigned int error);
|
|||||||
__attribute__ ((interrupt))
|
__attribute__ ((interrupt))
|
||||||
void isr_double_fault(void* frame, unsigned int error);
|
void isr_double_fault(void* frame, unsigned int error);
|
||||||
|
|
||||||
|
__attribute__ ((interrupt, naked))
|
||||||
|
void isr_ap_start(void* frame);
|
||||||
|
|
||||||
__attribute__ ((interrupt))
|
__attribute__ ((interrupt))
|
||||||
void isr_syscall(void* frame);
|
void isr_syscall(void* frame);
|
||||||
Reference in New Issue
Block a user