2010-03-31 04:43:39 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS HAL
|
|
|
|
* LICENSE: BSD - See COPYING.ARM in the top level directory
|
|
|
|
* PURPOSE: HAL Legacy Support Code
|
|
|
|
* PROGRAMMERS: ReactOS Portable Systems Group
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* INCLUDES *******************************************************************/
|
|
|
|
|
|
|
|
#include <hal.h>
|
2020-07-25 13:31:02 +00:00
|
|
|
|
2010-03-31 04:43:39 +00:00
|
|
|
#define NDEBUG
|
|
|
|
#include <debug.h>
|
|
|
|
|
|
|
|
/* GLOBALS ********************************************************************/
|
|
|
|
|
2010-04-01 20:46:55 +00:00
|
|
|
/* This determines the HAL type */
|
|
|
|
BOOLEAN HalDisableFirmwareMapper = FALSE;
|
2020-02-13 13:02:11 +00:00
|
|
|
#if defined(SARCH_XBOX)
|
|
|
|
PWCHAR HalHardwareIdString = L"xbox";
|
|
|
|
PWCHAR HalName = L"Xbox HAL";
|
2020-07-25 13:31:02 +00:00
|
|
|
#elif defined(SARCH_PC98)
|
|
|
|
PWCHAR HalHardwareIdString = L"pc98_up";
|
|
|
|
PWCHAR HalName = L"NEC PC-98 Compatible NESA/C-Bus HAL";
|
2020-02-13 13:02:11 +00:00
|
|
|
#else
|
2010-04-01 20:46:55 +00:00
|
|
|
PWCHAR HalHardwareIdString = L"e_isa_up";
|
|
|
|
PWCHAR HalName = L"PC Compatible Eisa/Isa HAL";
|
2020-02-13 13:02:11 +00:00
|
|
|
#endif
|
2010-04-01 20:46:55 +00:00
|
|
|
|
2010-03-31 04:43:39 +00:00
|
|
|
/* PRIVATE FUNCTIONS **********************************************************/
|
|
|
|
|
2020-10-06 19:44:01 +00:00
|
|
|
CODE_SEG("INIT")
|
2010-03-31 04:43:39 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
HalpSetupAcpiPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
|
|
|
{
|
|
|
|
/* There is no ACPI on these HALs */
|
2023-07-01 23:01:11 +00:00
|
|
|
return STATUS_SUCCESS;
|
2010-03-31 04:43:39 +00:00
|
|
|
}
|
|
|
|
|
2020-10-06 19:44:01 +00:00
|
|
|
CODE_SEG("INIT")
|
2010-04-01 20:46:55 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
HalpBuildAddressMap(VOID)
|
|
|
|
{
|
|
|
|
/* FIXME: Inherit ROM blocks from the registry */
|
|
|
|
//HalpInheritROMBlocks();
|
2020-07-25 13:31:02 +00:00
|
|
|
|
2010-04-01 20:46:55 +00:00
|
|
|
/* FIXME: Add the ROM blocks to our ranges */
|
|
|
|
//HalpAddROMRanges();
|
|
|
|
}
|
|
|
|
|
2020-10-06 19:44:01 +00:00
|
|
|
CODE_SEG("INIT")
|
2010-04-01 20:46:55 +00:00
|
|
|
BOOLEAN
|
|
|
|
NTAPI
|
|
|
|
HalpGetDebugPortTable(VOID)
|
|
|
|
{
|
|
|
|
/* No ACPI */
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2020-10-06 19:44:01 +00:00
|
|
|
CODE_SEG("INIT")
|
2010-04-01 20:46:55 +00:00
|
|
|
ULONG
|
|
|
|
NTAPI
|
|
|
|
HalpIs16BitPortDecodeSupported(VOID)
|
|
|
|
{
|
|
|
|
/* Only EISA systems support this */
|
|
|
|
return (HalpBusType == MACHINE_TYPE_EISA) ? CM_RESOURCE_PORT_16_BIT_DECODE : 0;
|
|
|
|
}
|
|
|
|
|
2011-08-24 21:08:42 +00:00
|
|
|
#if 0
|
2020-10-06 19:44:01 +00:00
|
|
|
CODE_SEG("INIT")
|
2010-09-10 21:46:13 +00:00
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
|
|
|
HaliInitPnpDriver(VOID)
|
|
|
|
{
|
|
|
|
/* On PC-AT, this will interface with the PCI driver */
|
2010-11-04 01:28:09 +00:00
|
|
|
//HalpDebugPciBus();
|
2010-09-10 21:46:13 +00:00
|
|
|
return STATUS_SUCCESS;
|
|
|
|
}
|
2011-08-24 21:08:42 +00:00
|
|
|
#endif
|
2010-09-10 21:46:13 +00:00
|
|
|
|
2010-04-01 19:42:07 +00:00
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
2020-10-06 19:44:01 +00:00
|
|
|
CODE_SEG("INIT")
|
2010-04-01 19:42:07 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
HalReportResourceUsage(VOID)
|
|
|
|
{
|
|
|
|
INTERFACE_TYPE InterfaceType;
|
|
|
|
UNICODE_STRING HalString;
|
|
|
|
|
|
|
|
/* FIXME: Initialize MCA bus */
|
|
|
|
|
|
|
|
/* Initialize PCI bus. */
|
|
|
|
HalpInitializePciBus();
|
|
|
|
|
|
|
|
/* Initialize the stubs */
|
|
|
|
HalpInitializePciStubs();
|
|
|
|
|
|
|
|
/* What kind of bus is this? */
|
|
|
|
switch (HalpBusType)
|
|
|
|
{
|
|
|
|
/* ISA Machine */
|
|
|
|
case MACHINE_TYPE_ISA:
|
|
|
|
InterfaceType = Isa;
|
|
|
|
break;
|
|
|
|
|
|
|
|
/* EISA Machine */
|
|
|
|
case MACHINE_TYPE_EISA:
|
|
|
|
InterfaceType = Eisa;
|
|
|
|
break;
|
|
|
|
|
|
|
|
/* MCA Machine */
|
|
|
|
case MACHINE_TYPE_MCA:
|
|
|
|
InterfaceType = MicroChannel;
|
|
|
|
break;
|
|
|
|
|
|
|
|
/* Unknown */
|
|
|
|
default:
|
|
|
|
InterfaceType = Internal;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Build HAL usage */
|
2010-04-01 20:46:55 +00:00
|
|
|
RtlInitUnicodeString(&HalString, HalName);
|
2010-04-01 19:42:07 +00:00
|
|
|
HalpReportResourceUsage(&HalString, InterfaceType);
|
|
|
|
|
|
|
|
/* Setup PCI debugging and Hibernation */
|
|
|
|
HalpRegisterPciDebuggingDeviceInfo();
|
|
|
|
}
|
|
|
|
|
2010-03-31 04:43:39 +00:00
|
|
|
/* EOF */
|