feat(IDT): IDT and exception handling support

This commit is contained in:
Daniel Hammer
2025-03-08 10:40:12 +01:00
parent 3656df42bc
commit 942adef65f
9 changed files with 245 additions and 9 deletions
+34 -3
View File
@@ -5,8 +5,39 @@ using namespace std;
#if defined (__x86_64__)
namespace System {
struct Registers {
};
struct PanicFrame {
uint64_t IP;
uint64_t CS;
uint64_t Flags;
uint64_t SP;
uint64_t SS;
uint8_t InterruptVector;
}__attribute__((packed));
struct PageFaultErrorCode {
uint8_t Present : 1;
uint8_t Write : 1;
uint8_t User : 1;
uint8_t ReservedWrite : 1;
uint8_t InstructionFetch : 1;
uint8_t ProtectionKey : 1;
uint8_t ShadowStack : 1;
uint8_t SGX : 1;
uint64_t Reserved : 56;
}__attribute__((packed));
struct PageFaultPanicFrame {
PageFaultErrorCode PageFaultError;
uint64_t IP;
uint64_t CS;
uint64_t Flags;
uint64_t SP;
uint64_t SS;
uint8_t InterruptVector;
}__attribute__((packed));
};
#endif