ReactOS  0.4.15-dev-2972-gda2a567
halpcat.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS HAL
3  * LICENSE: BSD - See COPYING.ARM in the top level directory
4  * PURPOSE: HAL Legacy Support Code
5  * PROGRAMMERS: ReactOS Portable Systems Group
6  */
7 
8 /* INCLUDES *******************************************************************/
9 
10 #include <hal.h>
11 
12 #define NDEBUG
13 #include <debug.h>
14 
15 /* GLOBALS ********************************************************************/
16 
17 /* This determines the HAL type */
19 #if defined(SARCH_XBOX)
21 PWCHAR HalName = L"Xbox HAL";
22 #elif defined(SARCH_PC98)
23 PWCHAR HalHardwareIdString = L"pc98_up";
24 PWCHAR HalName = L"NEC PC-98 Compatible NESA/C-Bus HAL";
25 #else
27 PWCHAR HalName = L"PC Compatible Eisa/Isa HAL";
28 #endif
29 
30 /* PRIVATE FUNCTIONS **********************************************************/
31 
32 CODE_SEG("INIT")
34 NTAPI
36 {
37  /* There is no ACPI on these HALs */
38  return STATUS_NO_SUCH_DEVICE;
39 }
40 
41 CODE_SEG("INIT")
42 VOID
43 NTAPI
45 {
46  /* FIXME: Inherit ROM blocks from the registry */
47  //HalpInheritROMBlocks();
48 
49  /* FIXME: Add the ROM blocks to our ranges */
50  //HalpAddROMRanges();
51 }
52 
53 CODE_SEG("INIT")
54 BOOLEAN
55 NTAPI
57 {
58  /* No ACPI */
59  return FALSE;
60 }
61 
62 CODE_SEG("INIT")
63 ULONG
64 NTAPI
66 {
67  /* Only EISA systems support this */
69 }
70 
71 #if 0
72 CODE_SEG("INIT")
74 NTAPI
76 {
77  /* On PC-AT, this will interface with the PCI driver */
78  //HalpDebugPciBus();
79  return STATUS_SUCCESS;
80 }
81 #endif
82 
83 /*
84  * @implemented
85  */
86 CODE_SEG("INIT")
87 VOID
88 NTAPI
90 {
92  UNICODE_STRING HalString;
93 
94  /* FIXME: Initialize MCA bus */
95 
96  /* Initialize PCI bus. */
98 
99  /* Initialize the stubs */
101 
102  /* What kind of bus is this? */
103  switch (HalpBusType)
104  {
105  /* ISA Machine */
106  case MACHINE_TYPE_ISA:
107  InterfaceType = Isa;
108  break;
109 
110  /* EISA Machine */
111  case MACHINE_TYPE_EISA:
113  break;
114 
115  /* MCA Machine */
116  case MACHINE_TYPE_MCA:
118  break;
119 
120  /* Unknown */
121  default:
123  break;
124  }
125 
126  /* Build HAL usage */
127  RtlInitUnicodeString(&HalString, HalName);
129 
130  /* Setup PCI debugging and Hibernation */
132 }
133 
134 /* EOF */
#define IN
Definition: typedefs.h:39
enum _INTERFACE_TYPE INTERFACE_TYPE
ULONG NTAPI HalpIs16BitPortDecodeSupported(VOID)
Definition: halpcat.c:65
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS NTAPI HalpSetupAcpiPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: halpcat.c:35
VOID NTAPI HalpBuildAddressMap(VOID)
Definition: halpcat.c:44
uint16_t * PWCHAR
Definition: typedefs.h:56
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define FALSE
Definition: types.h:117
unsigned char BOOLEAN
#define CM_RESOURCE_PORT_16_BIT_DECODE
Definition: cmtypes.h:112
VOID NTAPI HalpRegisterPciDebuggingDeviceInfo(VOID)
Definition: pcibus.c:633
BOOLEAN HalDisableFirmwareMapper
Definition: halpcat.c:18
VOID NTAPI HalReportResourceUsage(VOID)
Definition: halpcat.c:89
VOID NTAPI HalpInitializePciBus(VOID)
Definition: pci.c:770
ULONG HalpBusType
Definition: bus.c:17
#define STATUS_NO_SUCH_DEVICE
Definition: udferr_usr.h:136
#define MACHINE_TYPE_ISA
Definition: ketypes.h:52
PWCHAR HalHardwareIdString
Definition: halpcat.c:26
BOOLEAN NTAPI HalpGetDebugPortTable(VOID)
Definition: halpcat.c:56
static const WCHAR L[]
Definition: oid.c:1250
#define MACHINE_TYPE_MCA
Definition: ketypes.h:54
VOID NTAPI HalpInitializePciStubs(VOID)
Definition: pci.c:674
PWCHAR HalName
Definition: halpcat.c:27
NTSTATUS NTAPI HaliInitPnpDriver(VOID)
Definition: halpnpdd.c:886
unsigned int ULONG
Definition: retypes.h:1
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define STATUS_SUCCESS
Definition: shellext.h:65
static CODE_SEG("PAGE")
Definition: isapnp.c:1482
VOID NTAPI HalpReportResourceUsage(IN PUNICODE_STRING HalName, IN INTERFACE_TYPE InterfaceType)
Definition: usage.c:26
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID InterfaceType
Definition: wdffdo.h:461
#define MACHINE_TYPE_EISA
Definition: ketypes.h:53