Kernel: IDT now confirms that it allocated succesfully
This commit is contained in:
parent
0e77b4dc4e
commit
c9ea22f5e2
|
@ -180,6 +180,7 @@ found:
|
||||||
constexpr size_t idt_size = 0x100 * sizeof(GateDescriptor);
|
constexpr size_t idt_size = 0x100 * sizeof(GateDescriptor);
|
||||||
|
|
||||||
s_idt = (GateDescriptor*)kmalloc(idt_size);
|
s_idt = (GateDescriptor*)kmalloc(idt_size);
|
||||||
|
ASSERT(s_idt);
|
||||||
memset(s_idt, 0x00, idt_size);
|
memset(s_idt, 0x00, idt_size);
|
||||||
|
|
||||||
s_idtr.offset = s_idt;
|
s_idtr.offset = s_idt;
|
||||||
|
|
|
@ -206,6 +206,7 @@ namespace IDT
|
||||||
void initialize()
|
void initialize()
|
||||||
{
|
{
|
||||||
s_idt = (GateDescriptor*)kmalloc(0x100 * sizeof(GateDescriptor));
|
s_idt = (GateDescriptor*)kmalloc(0x100 * sizeof(GateDescriptor));
|
||||||
|
ASSERT(s_idt);
|
||||||
memset(s_idt, 0x00, 0x100 * sizeof(GateDescriptor));
|
memset(s_idt, 0x00, 0x100 * sizeof(GateDescriptor));
|
||||||
|
|
||||||
s_idtr.offset = (uint64_t)s_idt;
|
s_idtr.offset = (uint64_t)s_idt;
|
||||||
|
|
Loading…
Reference in New Issue