forked from PoliEcho-holding-org/kern
The great 64-bit rewrite
* We did loose tasking and only have a paging skeleton, but hey it took like 4 months so i'm happy that there's something :p
This commit is contained in:
+12
-8
@@ -3,25 +3,29 @@
|
||||
|
||||
#include <kernel.h>
|
||||
|
||||
#define ISR_COUNT 16
|
||||
|
||||
// Interrupt frame (ie. what's on the stack on interrupt)
|
||||
struct isr_int_frame {
|
||||
// Pushed by OS
|
||||
uint32_t gs, fs, es, ds;
|
||||
uint32_t edi, esi, ebp, esp, ebx, edx, ecx, eax;
|
||||
uint32_t interrupt, error;
|
||||
uint64_t ds; // + es
|
||||
uint64_t r15, r14, r13, r12, r11, r10, r9, r8;
|
||||
uint64_t rbp, rdi, rsi, rdx, rcx, rbx, rax;
|
||||
uint64_t interrupt, error;
|
||||
|
||||
// Pushed by CPU
|
||||
uint32_t eip, cs, eflags, user_esp, user_ss;
|
||||
uint64_t rip, cs, rflags, user_rsp, user_ss;
|
||||
};
|
||||
typedef void (*isr_handler_ptr)(struct isr_int_frame* iframe);
|
||||
|
||||
int isr_init(void);
|
||||
int isr_init(void);
|
||||
void isr_register(uint8_t i, isr_handler_ptr handler);
|
||||
void isr_handle_interrupt(struct isr_int_frame iframe);
|
||||
void isr_handle_interrupt(size_t rsp);
|
||||
|
||||
// Assembly definitions (isr.s)
|
||||
extern void isr_return(void);
|
||||
extern void isr_return(void);
|
||||
extern void* isr_redirect_table[48]; // ISR Table
|
||||
extern void isr128(void); // int 0x80 - syscall
|
||||
extern void isr128(void); // int 0x80 - syscall
|
||||
extern void isr255(void); // int 0xFF -
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user