Expose installed CPU count and rename state save function
Some checks failed
Builds / ExectOS (amd64, debug) (push) Failing after 24s
Builds / ExectOS (i686, debug) (push) Failing after 24s
Builds / ExectOS (amd64, release) (push) Failing after 39s
Builds / ExectOS (i686, release) (push) Failing after 36s

This commit is contained in:
2026-06-07 13:05:31 +02:00
parent f82562f450
commit 9c2357dfe6
3 changed files with 34 additions and 3 deletions

View File

@@ -66,6 +66,21 @@ KE::Processor::GetCurrentThread(VOID)
return (PKTHREAD)AR::CpuFunctions::ReadGSQuadWord(FIELD_OFFSET(KPROCESSOR_BLOCK, Prcb.CurrentThread));
}
/**
* Retrieves the number of installed and enabled CPUs in the system.
*
* @return This routine returns the number of installed CPUs in the system.
*
* @since XT 1.0
*/
XTAPI
ULONG
KE::Processor::GetInstalledCpus(VOID)
{
/* Return number of installed CPUs */
return InstalledCpus;
}
/**
* Gets the processor block for the specified processor number.
*
@@ -189,7 +204,7 @@ KE::Processor::RegisterProcessorBlock(ULONG CpuNumber,
*/
XTAPI
VOID
KE::Processor::SaveProcessorState(OUT PKPROCESSOR_STATE CpuState)
KE::Processor::SaveProcessorControlState(OUT PKPROCESSOR_STATE CpuState)
{
/* Save CR registers */
CpuState->SpecialRegisters.Cr0 = AR::CpuFunctions::ReadControlRegister(0);