Working IDT

This commit is contained in:
Mercier Pierre-Olivier 2013-02-17 04:30:09 +01:00
parent 35e26c413d
commit 8221396eff
2 changed files with 5 additions and 6 deletions

View File

@ -61,7 +61,7 @@ t_error architecture_idt_dump(void)
privilege = ARCHITECTURE_IDTE_DPL_GET(_idt[i]);
if (_idt[i] & ARCHITECTURE_GDTE_32BIT)
if (_idt[i] & ARCHITECTURE_IDTE_32BIT)
flag = 's';
else
flag = '.';
@ -145,7 +145,6 @@ t_error architecture_idt_insert(t_uint16 index,
t_uint16 sselector;
architecture_gdt_selector(1, ARCHITECTURE_PRIVILEGE_RING0, &sselector);
//*
_idt[index] =
ARCHITECTURE_IDTE_INTERRUPT |
ARCHITECTURE_IDTE_PRESENT |
@ -153,7 +152,7 @@ t_error architecture_idt_insert(t_uint16 index,
ARCHITECTURE_IDTE_SEGMENT_SET(sselector) |
ARCHITECTURE_IDTE_32BIT |
flags;
//*/
MACHINE_LEAVE();
}

View File

@ -120,7 +120,7 @@
#define ARCHITECTURE_IDTE_OFFSET_GET(_idte_) \
(t_paddr)((((_idte_) >> 0) & 0x0000ffff) | \
(((_idte_) >> 16) & 0xffff0000))
(((_idte_) >> 32) & 0xffff0000))
#define ARCHITECTURE_IDTE_DPL_SET(_privilege_) \
(((at_idte)(_privilege_) & 0x3) << 45)
@ -128,8 +128,8 @@
#define ARCHITECTURE_IDTE_DPL_GET(_idte_) \
(((_idte_) >> 45) & 0x3)
#define ARCHITECTURE_IDTE_SEGMENT_SET(_segment_) \
((((t_uint32) _segment_) & 0xffff) << 32)
#define ARCHITECTURE_IDTE_SEGMENT_SET(_segment_) \
((((t_uint32) _segment_) & 0xffff) << 16)
/* EOFIXME */