Working IDT
This commit is contained in:
parent
35e26c413d
commit
8221396eff
@ -61,7 +61,7 @@ t_error architecture_idt_dump(void)
|
|||||||
|
|
||||||
privilege = ARCHITECTURE_IDTE_DPL_GET(_idt[i]);
|
privilege = ARCHITECTURE_IDTE_DPL_GET(_idt[i]);
|
||||||
|
|
||||||
if (_idt[i] & ARCHITECTURE_GDTE_32BIT)
|
if (_idt[i] & ARCHITECTURE_IDTE_32BIT)
|
||||||
flag = 's';
|
flag = 's';
|
||||||
else
|
else
|
||||||
flag = '.';
|
flag = '.';
|
||||||
@ -145,7 +145,6 @@ t_error architecture_idt_insert(t_uint16 index,
|
|||||||
t_uint16 sselector;
|
t_uint16 sselector;
|
||||||
architecture_gdt_selector(1, ARCHITECTURE_PRIVILEGE_RING0, &sselector);
|
architecture_gdt_selector(1, ARCHITECTURE_PRIVILEGE_RING0, &sselector);
|
||||||
|
|
||||||
//*
|
|
||||||
_idt[index] =
|
_idt[index] =
|
||||||
ARCHITECTURE_IDTE_INTERRUPT |
|
ARCHITECTURE_IDTE_INTERRUPT |
|
||||||
ARCHITECTURE_IDTE_PRESENT |
|
ARCHITECTURE_IDTE_PRESENT |
|
||||||
@ -153,7 +152,7 @@ t_error architecture_idt_insert(t_uint16 index,
|
|||||||
ARCHITECTURE_IDTE_SEGMENT_SET(sselector) |
|
ARCHITECTURE_IDTE_SEGMENT_SET(sselector) |
|
||||||
ARCHITECTURE_IDTE_32BIT |
|
ARCHITECTURE_IDTE_32BIT |
|
||||||
flags;
|
flags;
|
||||||
//*/
|
|
||||||
MACHINE_LEAVE();
|
MACHINE_LEAVE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@
|
|||||||
|
|
||||||
#define ARCHITECTURE_IDTE_OFFSET_GET(_idte_) \
|
#define ARCHITECTURE_IDTE_OFFSET_GET(_idte_) \
|
||||||
(t_paddr)((((_idte_) >> 0) & 0x0000ffff) | \
|
(t_paddr)((((_idte_) >> 0) & 0x0000ffff) | \
|
||||||
(((_idte_) >> 16) & 0xffff0000))
|
(((_idte_) >> 32) & 0xffff0000))
|
||||||
|
|
||||||
#define ARCHITECTURE_IDTE_DPL_SET(_privilege_) \
|
#define ARCHITECTURE_IDTE_DPL_SET(_privilege_) \
|
||||||
(((at_idte)(_privilege_) & 0x3) << 45)
|
(((at_idte)(_privilege_) & 0x3) << 45)
|
||||||
@ -128,8 +128,8 @@
|
|||||||
#define ARCHITECTURE_IDTE_DPL_GET(_idte_) \
|
#define ARCHITECTURE_IDTE_DPL_GET(_idte_) \
|
||||||
(((_idte_) >> 45) & 0x3)
|
(((_idte_) >> 45) & 0x3)
|
||||||
|
|
||||||
#define ARCHITECTURE_IDTE_SEGMENT_SET(_segment_) \
|
#define ARCHITECTURE_IDTE_SEGMENT_SET(_segment_) \
|
||||||
((((t_uint32) _segment_) & 0xffff) << 32)
|
((((t_uint32) _segment_) & 0xffff) << 16)
|
||||||
|
|
||||||
/* EOFIXME */
|
/* EOFIXME */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user