[HAL] Add Xbox Hardware Abstraction Layer
[reactos.git] / hal / halx86 / xbox / halinit_xbox.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: hal/halx86/xbox/halinit_xbox.c
5 * PURPOSE: Initialize the x86 hal
6 * PROGRAMMER: David Welch (welch@cwcom.net)
7 * UPDATE HISTORY:
8 * 11/06/98: Created
9 */
10
11 /* INCLUDES *****************************************************************/
12
13 #include "halxbox.h"
14
15 #define NDEBUG
16 #include <debug.h>
17
18 /* GLOBALS ******************************************************************/
19
20 const USHORT HalpBuildType = HAL_BUILD_TYPE;
21
22 /* FUNCTIONS ****************************************************************/
23
24 VOID
25 NTAPI
26 HalpInitProcessor(
27 IN ULONG ProcessorNumber,
28 IN PLOADER_PARAMETER_BLOCK LoaderBlock)
29 {
30 /* Set default IDR */
31 KeGetPcr()->IDR = 0xFFFFFFFB;
32 }
33
34 VOID
35 HalpInitPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
36 {
37 /* Initialize Xbox-specific disk hacks */
38 HalpXboxInitPartIo();
39 }
40
41 VOID
42 HalpInitPhase1(VOID)
43 {
44 /* Enable IRQ 0 */
45 HalpEnableInterruptHandler(IDT_DEVICE,
46 0,
47 PRIMARY_VECTOR_BASE,
48 CLOCK2_LEVEL,
49 HalpClockInterrupt,
50 Latched);
51
52 /* Enable IRQ 8 */
53 HalpEnableInterruptHandler(IDT_DEVICE,
54 0,
55 PRIMARY_VECTOR_BASE + 8,
56 PROFILE_LEVEL,
57 HalpProfileInterrupt,
58 Latched);
59
60 /* Initialize DMA. NT does this in Phase 0 */
61 HalpInitDma();
62 }
63
64 /* EOF */