ReactOS  0.4.14-dev-1034-g1e60116
processor.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS kernel
4  * FILE: hal/halppc/generic/processor.c
5  * PURPOSE: Intel MultiProcessor specification support
6  * PROGRAMMER: David Welch (welch@cwcom.net)
7  * Casper S. Hornstrup (chorns@users.sourceforge.net)
8  * NOTES: Parts adapted from linux SMP code
9  * UPDATE HISTORY:
10  * 22/05/1998 DW Created
11  * 12/04/2001 CSH Added MultiProcessor specification support
12  */
13 
14 /* INCLUDES *****************************************************************/
15 
16 #include <hal.h>
17 #define NDEBUG
18 #include <debug.h>
19 
20 /* FUNCTIONS *****************************************************************/
21 
22 #define INITIAL_STALL_COUNT 0x10000
23 
24 VOID NTAPI
25 HalInitializeProcessor(ULONG ProcessorNumber,
26  PLOADER_PARAMETER_BLOCK LoaderBlock)
27 {
28  DPRINT("HalInitializeProcessor(%lu %p)\n", ProcessorNumber, LoaderBlock);
29  KeGetPcr()->StallScaleFactor = INITIAL_STALL_COUNT;
30 }
31 
34 {
35  DPRINT("HalAllProcessorsStarted()\n");
36 
37  return TRUE;
38 }
39 
41 BOOLEAN
42 NTAPI
44  IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock,
45  IN PKPROCESSOR_STATE ProcessorState
46  )
47 {
48  DPRINT("HalStartNextProcessor(0x%lx 0x%lx)\n", LoaderBlock, ProcessorState);
49 
50  return TRUE;
51 }
52 
53 /*
54  * @implemented
55  */
56 VOID
57 NTAPI
59 {
60  /* Enable interrupts and halt the processor */
61  _enable();
62 }
63 
64 /*
65  * @implemented
66  */
67 VOID
68 NTAPI
70 {
71  /* Not implemented on NT */
72  __debugbreak();
73 }
74 
75 /* EOF */
#define INITIAL_STALL_COUNT
Definition: processor.c:22
#define IN
Definition: typedefs.h:39
#define TRUE
Definition: types.h:120
#define NTHALAPI
Definition: ntoskrnl.h:40
VOID NTAPI HalRequestIpi(KAFFINITY TargetProcessors)
Definition: processor.c:96
void __cdecl _enable(void)
Definition: intrin_arm.h:373
void __cdecl __debugbreak(void)
Definition: intrin_ppc.h:698
#define KeGetPcr()
Definition: ke.h:25
BOOLEAN NTAPI HalStartNextProcessor(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN PKPROCESSOR_STATE ProcessorState)
Definition: processor.c:71
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
VOID NTAPI HalInitializeProcessor(IN ULONG ProcessorNumber, IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: processor.c:48
unsigned char BOOLEAN
void DPRINT(...)
Definition: polytest.cpp:61
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
VOID NTAPI HalProcessorIdle(VOID)
Definition: processor.c:83
BOOLEAN NTAPI HalAllProcessorsStarted(VOID)
Definition: processor.c:60
unsigned int ULONG
Definition: retypes.h:1