From a09f925c1cd3254a530841ba80c893ed5c0c282b Mon Sep 17 00:00:00 2001 From: Justin Miller Date: Sat, 26 Mar 2022 10:01:21 -0700 Subject: [PATCH] [HALX86] Implement HalpSetupProcessorsTable Add a helper function for getting a pointer to the PRCB of every processor in the system and assign it to the PROCESSOR_IDENTITY struct. --- hal/halx86/smp/smp.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hal/halx86/smp/smp.c b/hal/halx86/smp/smp.c index 8950aa83cfe..f8e2f9e4cdf 100644 --- a/hal/halx86/smp/smp.c +++ b/hal/halx86/smp/smp.c @@ -14,11 +14,20 @@ /* GLOBALS *******************************************************************/ +extern PPROCESSOR_IDENTITY HalpProcessorIdentity; + /* FUNCTIONS *****************************************************************/ VOID HalpSetupProcessorsTable( _In_ UINT32 NTProcessorNumber) { - UNIMPLEMENTED; + PKPRCB CurrentPrcb; + + /* + * Link the Prcb of the current CPU to + * the current CPUs entry in the global ProcessorIdentity + */ + CurrentPrcb = KeGetCurrentPrcb(); + HalpProcessorIdentity[NTProcessorNumber].ProcessorPrcb = CurrentPrcb; }