diff options
| -rw-r--r-- | dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc | 2 | ||||
| -rw-r--r-- | dev/kernel/HALKit/POWER/HalApplicationProcessor.cc | 9 | ||||
| -rw-r--r-- | docs/tex/hefs.tex | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc b/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc index 64f146f3..df5386e4 100644 --- a/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc +++ b/dev/kernel/HALKit/AMD64/HalApplicationProcessor.cc @@ -4,6 +4,7 @@ ------------------------------------------- */ +/// Different than the MADT, might be confusing to some. #define APIC_MAG "APIC" #define APIC_ICR_LOW 0x300 @@ -145,6 +146,7 @@ Bool mp_is_smp(Void) noexcept { Void mp_init_cores(VoidPtr vendor_ptr) noexcept { if (!vendor_ptr) return; + if (!kHandoverHeader) return; if (!kHandoverHeader->f_HardwareTables.f_MultiProcessingEnabled) { kSMPAware = NO; diff --git a/dev/kernel/HALKit/POWER/HalApplicationProcessor.cc b/dev/kernel/HALKit/POWER/HalApplicationProcessor.cc index daa26e53..c2703af6 100644 --- a/dev/kernel/HALKit/POWER/HalApplicationProcessor.cc +++ b/dev/kernel/HALKit/POWER/HalApplicationProcessor.cc @@ -8,6 +8,8 @@ #include <HALKit/POWER/Processor.h> #include <KernelKit/DebugOutput.h> +/// @note This part of the HAL needs an owner. + namespace Kernel::Detail { STATIC void mp_hang_fn(void) { while (YES) @@ -21,6 +23,9 @@ namespace Kernel { void mp_wakeup_thread(HAL::StackFramePtr stack) { if (!stack) return; + MUST_PASS(stack->R15 > 0); + MUST_PASS(stack->IP > 0); + hal_set_pc_to_hart(reinterpret_cast<HAL_HARDWARE_THREAD*>(stack->R15), reinterpret_cast<VoidPtr>(stack->IP)); } @@ -30,7 +35,9 @@ void mp_wakeup_thread(HAL::StackFramePtr stack) { void mp_hang_thread(HAL::StackFramePtr stack) { if (!stack) return; + MUST_PASS(stack->R15 > 0); + hal_set_pc_to_hart(reinterpret_cast<HAL_HARDWARE_THREAD*>(stack->R15), reinterpret_cast<VoidPtr>(Kernel::Detail::mp_hang_fn)); } -} // namespace Kernel
\ No newline at end of file +} // namespace Kernel diff --git a/docs/tex/hefs.tex b/docs/tex/hefs.tex index 1656e5a9..c35bca53 100644 --- a/docs/tex/hefs.tex +++ b/docs/tex/hefs.tex @@ -93,7 +93,7 @@ The High-throughput Extended File System (HeFS) is a custom filesystem tailored \section{Structures}\label{sec:structures} \subsection{HEFS\_BOOT\_NODE}\label{subsec:hefs_boot_node} -Acts as the superblock. +Acts as the superblock of the filesystem, provides necessary information about the disk and the filesystem itself. \begin{itemize} \item \texttt{fMagic}, \texttt{fVolName}, \texttt{fVersion}, \texttt{fChecksum} |
