Fix 32-bit compilation

This commit is contained in:
Alex
2023-08-23 16:59:21 +03:00
parent 8898791257
commit bef0897442
58 changed files with 4419 additions and 3418 deletions

View File

@@ -22,49 +22,49 @@
namespace InterruptDescriptorTable
{
typedef enum _InterruptGateType
{
TASK = 0b101,
INT_16BIT = 0b110,
TRAP_16BIT = 0b111,
INT_32BIT = 0b1110,
TRAP_32BIT = 0b1111,
} InterruptGateType;
typedef enum _InterruptGateType
{
TASK = 0b101,
INT_16BIT = 0b110,
TRAP_16BIT = 0b111,
INT_32BIT = 0b1110,
TRAP_32BIT = 0b1111,
} InterruptGateType;
typedef enum _InterruptRingType
{
RING0 = 0b0,
RING1 = 0b1,
RING2 = 0b10,
RING3 = 0b11,
} InterruptRingType;
typedef enum _InterruptRingType
{
RING0 = 0b0,
RING1 = 0b1,
RING2 = 0b10,
RING3 = 0b11,
} InterruptRingType;
typedef struct _InterruptDescriptorTableEntry
{
uint32_t LowOffset : 16;
uint32_t SegmentSelector : 16;
uint32_t Reserved0 : 5;
uint32_t Flags : 4;
uint32_t Reserved1 : 1;
uint32_t Ring : 2;
uint32_t Present : 1;
uint32_t HighOffset : 16;
} __packed InterruptDescriptorTableEntry;
typedef struct _InterruptDescriptorTableEntry
{
uint32_t LowOffset : 16;
uint32_t SegmentSelector : 16;
uint32_t Reserved0 : 5;
uint32_t Flags : 4;
uint32_t Reserved1 : 1;
uint32_t Ring : 2;
uint32_t Present : 1;
uint32_t HighOffset : 16;
} __packed InterruptDescriptorTableEntry;
typedef struct _InterruptDescriptorTableDescriptor
{
uint16_t Length;
InterruptDescriptorTableEntry *Entries;
} __packed InterruptDescriptorTableDescriptor;
typedef struct _InterruptDescriptorTableDescriptor
{
uint16_t Length;
InterruptDescriptorTableEntry *Entries;
} __packed InterruptDescriptorTableDescriptor;
void SetEntry(uint8_t Index,
void (*Base)(),
InterruptGateType Gate,
InterruptRingType Ring,
bool Present,
uint16_t SegmentSelector);
void SetEntry(uint8_t Index,
void (*Base)(),
InterruptGateType Gate,
InterruptRingType Ring,
bool Present,
uint16_t SegmentSelector);
void Init(int Core);
void Init(int Core);
}
#endif // !__FENNIX_KERNEL_IDT_H__