[CMAKE]
[reactos.git] / 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 NTSTATUS
64 NTAPI
65 INIT_FUNCTION
66 HaliInitPnpDriver(VOID)
67 {
68 /* On PC-AT, this will interface with the PCI driver */
69 //HalpDebugPciBus();
70 return STATUS_SUCCESS;
71 }
72
73 /*
74 * @implemented
75 */
76 VOID
77 NTAPI
78 INIT_FUNCTION
79 HalReportResourceUsage(VOID)
80 {
81 INTERFACE_TYPE InterfaceType;
82 UNICODE_STRING HalString;
83
84 /* FIXME: Initialize MCA bus */
85
86 /* Initialize PCI bus. */
87 HalpInitializePciBus();
88
89 /* Initialize the stubs */
90 HalpInitializePciStubs();
91
92 /* What kind of bus is this? */
93 switch (HalpBusType)
94 {
95 /* ISA Machine */
96 case MACHINE_TYPE_ISA:
97 InterfaceType = Isa;
98 break;
99
100 /* EISA Machine */
101 case MACHINE_TYPE_EISA:
102 InterfaceType = Eisa;
103 break;
104
105 /* MCA Machine */
106 case MACHINE_TYPE_MCA:
107 InterfaceType = MicroChannel;
108 break;
109
110 /* Unknown */
111 default:
112 InterfaceType = Internal;
113 break;
114 }
115
116 /* Build HAL usage */
117 RtlInitUnicodeString(&HalString, HalName);
118 HalpReportResourceUsage(&HalString, InterfaceType);
119
120 /* Setup PCI debugging and Hibernation */
121 HalpRegisterPciDebuggingDeviceInfo();
122 }
123
124 /* EOF */