boot: fix crash on early memory allocations
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
be49cc4839
commit
1d1dad34ce
10 changed files with 120 additions and 32 deletions
|
|
@ -116,10 +116,8 @@ void apic_init()
|
|||
lapic_eoi();
|
||||
|
||||
/* Register timer interrupt handler and enable APIC timer */
|
||||
extern int irq_map(uint8_t irq, void *func);
|
||||
|
||||
void _timer_handler();
|
||||
irq_map(0, _timer_handler);
|
||||
idt_insert(0x20, GATE_INTR, 0, GDT_SEGMENT_CODE_RING0, _timer_handler);
|
||||
|
||||
lapic_write(lapic_addr, LAPIC_TPR, 0);
|
||||
lapic_write(lapic_addr, LAPIC_TIMER_DIV, 0x3);
|
||||
|
|
|
|||
Loading…
Reference in a new issue