42,6 → 42,8 |
#include "aux_print/printf.h" |
#include <print.h> |
#include <config.h> |
#include <interrupt.h> |
|
bootinfo_t bootinfo; |
|
void arch_pre_main(void) |
59,17 → 61,8 |
// aux_printf("%L, %d\n", bootinfo.tasks[i].addr, bootinfo.tasks[i].size); |
} |
|
/* TODO this code just setups irq testing bed |
*/ |
/* TODO this code just setups irq testing bed */ |
setup_exception_stacks(); |
exception_init(); |
install_exception_handlers(); |
interrupts_enable(); |
/* activate timer interrupts */ |
*(uint32_t*)0x15000100 = 1; |
|
while(1) ; |
|
} |
|
#include <ddi/irq.h> |
76,6 → 69,12 |
void arch_pre_mm_init(void) |
{ |
aux_printf("arch_pre_mm_init\n"); |
|
/* It is not assumed by default */ |
interrupts_disable(); |
|
/* Initialize dispatch table */ |
exception_init(); |
|
|
} |
83,10 → 82,13 |
void arch_post_mm_init(void) |
{ |
aux_printf("arch_post_mm_init\n"); |
// irq_init(8, 8); /// needs malloc ... so after mm init |
// console_init(device_assign_devno()); // need hash table of irq ... so after irq_init |
interrupt_init(); // needs malloc ... so after mm init |
console_init(device_assign_devno()); // need hash table of irq ... so after irq_init |
|
/* TODO */ |
|
interrupts_enable(); |
while(1); |
} |
|
void arch_post_cpu_init(void) |