diff options
| author | cpplover0 <osdev555@yandex.com> | 2026-03-30 18:21:18 +0300 |
|---|---|---|
| committer | cpplover0 <osdev555@yandex.com> | 2026-03-30 18:21:18 +0300 |
| commit | 8844a7888ea94a11939b1c92915162f2e5acd378 (patch) | |
| tree | 1b4ef74fde17d6f8bb6e054f3266e9342b41c836 /kernel/src/generic/mp.cpp | |
| parent | be997311c240f49db247ccce05ecb8ea5d3bfc31 (diff) | |
Diffstat (limited to 'kernel/src/generic/mp.cpp')
| -rw-r--r-- | kernel/src/generic/mp.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/src/generic/mp.cpp b/kernel/src/generic/mp.cpp index 0ab4678..89be3c8 100644 --- a/kernel/src/generic/mp.cpp +++ b/kernel/src/generic/mp.cpp @@ -34,6 +34,7 @@ void mp::sync() { } void smptrampoline(limine_mp_info* smp_info) { + smp_lock.lock(); std::uint32_t enum_cpu = smp_info->processor_id; arch::init(ARCH_INIT_MP); @@ -41,7 +42,7 @@ void smptrampoline(limine_mp_info* smp_info) { x86_64::cpu_data()->cpu = balance_how_much_cpus++; enum_cpu = x86_64::cpu_data()->cpu; #endif - klibc::printf("SMP: Cpu %d is online (%d)\r\n",smp_info->lapic_id,enum_cpu); + log("smp", "cpu %d is online (%d)",smp_info->lapic_id,enum_cpu); smp_lock.unlock(); mp::sync(); if(time::timer) time::timer->sleep(10000); @@ -63,4 +64,5 @@ void mp::init() { mp_info->cpus[i]->goto_address = smptrampoline; } } + log("mp", "detected %d cpus", mp_info->cpu_count); }
\ No newline at end of file |
