feat(IDT): IDT and exception handling support
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user