Commit 260ddc369eb582437459201671ea4ff88178583d

Fix non-portable casts in IDT code
  
33
44extern "C"
55{
6 void idt_flush(u32int pointer);
6 void idt_flush(uintptr pointer);
77 void isr_handler(registers_t r);
88 void irq_handler(registers_t r);
99}
4747
4848 // Set the address of the IDT entries in the IDT pointer structure
4949 idt_ptr.limit = sizeof(idt_entry_t) * 256 -1;
50 idt_ptr.base = (u32int)&idt_entries;
50 idt_ptr.base = (uintptr)&idt_entries;
5151
5252 // Clear all descriptors
5353 memset(&idt_entries, 0, sizeof(idt_entry_t) * 256);
8888 set_gate(30, (u32int)isr30, 0x08, 0x8E);
8989 set_gate(31, (u32int)isr31, 0x08, 0x8E);
9090
91 idt_flush((u32int)&idt_ptr);
91 idt_flush((uintptr)&idt_ptr);
9292
9393 // IRQs
9494 set_gate(32, (u32int)irq0 , 0x08, 0x8E);
  
1818
1919 struct idt_entry_struct
2020 {
21 u16int base_lo; // The lower 16 bits of the address to jump to when this interrupt fires.
21 u16int base_lo; // The lower 16 bits of the address to jump to when this interrupt fires.
2222 u16int sel; // Kernel segment selector.
23 u8int always0; // This must always be zero.
23 u8int always0; // This must always be zero.
2424 u8int flags; // More flags. See documentation.
25 u16int base_hi; // The upper 16 bits of the address to jump to.
25 u16int base_hi; // The upper 16 bits of the address to jump to.
2626 } __attribute__((packed));
2727
2828 typedef struct idt_entry_struct idt_entry_t;
3131 struct idt_ptr_struct
3232 {
3333 u16int limit;
34 u32int base; // The address of the first element in our idt_entry_t array.
34 u32int base; // The address of the first element in our idt_entry_t array.
3535 } __attribute__((packed));
3636
3737 typedef struct idt_ptr_struct idt_ptr_t;