1
0
Fork 0

feat/kernel: Broadcast PIT to all CPUs

This commit is contained in:
Kevin Alavik 2025-06-02 16:46:35 +02:00
parent 2b29a1afa1
commit 9c62518033
Signed by: cmpsb
GPG key ID: 10D1CC0526FDC6D7
4 changed files with 23 additions and 13 deletions

View file

@ -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();
}