mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
The kernel/main.cpp and kernel/memory_bootstrap.cpp files had become something of a junk drawer. This change cleans them up in the following ways: - Most CPU initialization has moved to cpu.cpp, allowing several functions to be made static and removed from cpu.h - Multi-core startup code has moved to the new smp.h and smp.cpp, and ap_startup.s has been renamed smp.s to match. - run_constructors() has moved to memory_bootstrap.cpp, and all the functionality of that file has been hidden behind a new public interface mem::initialize(). - load_init_server() has moved from memory_bootstrap.cpp to main.cpp
19 lines
411 B
C++
19 lines
411 B
C++
#pragma once
|
|
/// \file smp.h
|
|
/// Multi-core / multi-processor startup code
|
|
|
|
struct cpu_data;
|
|
|
|
namespace smp {
|
|
|
|
/// Start all APs and have them wait for the BSP to
|
|
/// call smp::ready().
|
|
/// \arg bsp The cpu_data struct representing the BSP
|
|
/// \arg kpml4 The kernel PML4
|
|
unsigned start(cpu_data &bsp, void *kpml4);
|
|
|
|
/// Unblock all APs and let them start their schedulers.
|
|
void ready();
|
|
|
|
} // namespace smp
|