mirror of
https://github.com/Tom-on64/kern.git
synced 2026-11-04 02:23:10 +00:00
Major libk restructuring, also rewrote drivers/serial.h
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#ifndef _CPU_ISR_H
|
||||
#define _CPU_ISR_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
// Pushed by OS
|
||||
uint32_t esp, ebx, ecx, edx, esi, edi, ebp;
|
||||
uint32_t ds, es, fs, gs, eax;
|
||||
uint32_t interrupt, error;
|
||||
|
||||
// Pushed by CPU
|
||||
uint32_t eip, cs, eflags, user_esp, user_ss;
|
||||
} intFrame_t;
|
||||
typedef void (*HandlerPtr)(intFrame_t* iframe);
|
||||
|
||||
void setupIsrs();
|
||||
void registerIrq(uint8_t id, HandlerPtr handler);
|
||||
int handleInterrupt(intFrame_t iframe);
|
||||
|
||||
// ISR Table
|
||||
extern void* asm_isrRedirectTable[48];
|
||||
|
||||
// Int 0x80 - Syscall
|
||||
extern void isr128();
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user