[HAL]
[reactos.git] / reactos / hal / halx86 / generic / legacy / halpcat.c
1 /*
2 * PROJECT: ReactOS HAL
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: hal/halx86/generic/legacy/halpcat.c
5 * PURPOSE: HAL Legacy Support Code
6 * PROGRAMMERS: ReactOS Portable Systems Group
7 */
8
9 /* INCLUDES *******************************************************************/
10
11 #include <hal.h>
12 #define NDEBUG
13 #include <debug.h>
14
15 /* GLOBALS ********************************************************************/
16
17 /* This determines the HAL type */
18 BOOLEAN HalDisableFirmwareMapper = FALSE;
19 PWCHAR HalHardwareIdString = L"e_isa_up";
20 PWCHAR HalName = L"PC Compatible Eisa/Isa HAL";
21
22 /* PRIVATE FUNCTIONS **********************************************************/
23
24 NTSTATUS
25 NTAPI
26 INIT_FUNCTION
27 HalpSetupAcpiPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
28 {
29 /* There is no ACPI on these HALs */
30 return STATUS_NO_SUCH_DEVICE;
31 }
32
33 VOID
34 NTAPI
35 INIT_FUNCTION
36 HalpBuildAddressMap(VOID)
37 {
38 /* FIXME: Inherit ROM blocks from the registry */
39 //HalpInheritROMBlocks();
40
41 /* FIXME: Add the ROM blocks to our ranges */
42 //HalpAddROMRanges();
43 }
44
45 BOOLEAN
46 NTAPI
47 INIT_FUNCTION
48 HalpGetDebugPortTable(VOID)
49 {
50 /* No ACPI */
51 return FALSE;
52 }
53
54 ULONG
55 NTAPI
56 INIT_FUNCTION
57 HalpIs16BitPortDecodeSupported(VOID)
58 {
59 /* Only EISA systems support this */
60 return (HalpBusType == MACHINE_TYPE_EISA) ? CM_RESOURCE_PORT_16_BIT_DECODE : 0;
61 }
62
63 #if 0
64 NTSTATUS
65 NTAPI
66 INIT_FUNCTION
67 HaliInitPnpDriver(VOID)
68 {
69 /* On PC-AT, this will interface with the PCI driver */
70 //HalpDebugPciBus();
71 return STATUS_SUCCESS;
72 }
73 #endif
74
75 /*
76 * @implemented
77 */
78 VOID
79 NTAPI
80 INIT_FUNCTION
81 HalReportResourceUsage(VOID)
82 {
83 INTERFACE_TYPE InterfaceType;
84 UNICODE_STRING HalString;
85
86 /* FIXME: Initialize MCA bus */
87
88 /* Initialize PCI bus. */
89 HalpInitializePciBus();
90
91 /* Initialize the stubs */
92 HalpInitializePciStubs();
93
94 /* What kind of bus is this? */
95 switch (HalpBusType)
96 {
97 /* ISA Machine */
98 case MACHINE_TYPE_ISA:
99 InterfaceType = Isa;
100 break;
101
102 /* EISA Machine */
103 case MACHINE_TYPE_EISA:
104 InterfaceType = Eisa;
105 break;
106
107 /* MCA Machine */
108 case MACHINE_TYPE_MCA:
109 InterfaceType = MicroChannel;
110 break;
111
112 /* Unknown */
113 default:
114 InterfaceType = Internal;
115 break;
116 }
117
118 /* Build HAL usage */
119 RtlInitUnicodeString(&HalString, HalName);
120 HalpReportResourceUsage(&HalString, InterfaceType);
121
122 /* Setup PCI debugging and Hibernation */
123 HalpRegisterPciDebuggingDeviceInfo();
124 }
125
126 /* EOF */