feat/kernel: Broadcast PIT to all CPUs
This commit is contained in:
parent
2b29a1afa1
commit
9c62518033
4 changed files with 23 additions and 13 deletions
|
@ -68,11 +68,6 @@ struct limine_mp_response *mp_response = NULL;
|
|||
struct flanterm_context *ft_ctx = NULL;
|
||||
#endif // FLANTERM_SUPPORT
|
||||
|
||||
void tick(struct register_ctx *)
|
||||
{
|
||||
log_early("tick on CPU %d", get_cpu_local()->cpu_index);
|
||||
}
|
||||
|
||||
void emk_entry(void)
|
||||
{
|
||||
__asm__ volatile("movq %%rsp, %0" : "=r"(kstack_top));
|
||||
|
@ -207,16 +202,11 @@ void emk_entry(void)
|
|||
lapic_init();
|
||||
smp_init();
|
||||
|
||||
/* Setup IOAPIC */
|
||||
ioapic_init();
|
||||
|
||||
/* Setup timer */
|
||||
pit_init(tick);
|
||||
|
||||
/* Finished */
|
||||
log_early("%s", LOG_SEPARATOR);
|
||||
log_early("Finished initializing EMK v1.0, took ? seconds"); /* Still not running in usermode, so keep using log_early */
|
||||
|
||||
ioapic_unmask(0); // start the timer
|
||||
__asm__ volatile("sti");
|
||||
hlt();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue