VOID
HalpInitBusHandlers (VOID);
-ULONG
-STDCALL
-HalpGetSystemInterruptVector (
- PVOID BusHandler,
- ULONG BusNumber,
- ULONG BusInterruptLevel,
- ULONG BusInterruptVector,
- PKIRQL Irql,
- PKAFFINITY Affinity
- );
-
+/* udelay.c */
VOID HalpCalibrateStallExecution(VOID);
+/* irq.c */
+VOID HalpInitIRQs (VOID);
+
+
#endif /* __INTERNAL_HAL_HAL_H */
/* INITIALIZATION FUNCTIONS *************************************************/
VOID KeInitExceptions(VOID);
-VOID KeInitIRQ(VOID);
VOID KeInitTimer(VOID);
VOID KeInitDpc(VOID);
VOID KeInitDispatcher(VOID);
-VOID KeCalibrateTimerLoop(VOID);
VOID KeInitializeDispatcher(VOID);
VOID KeInitializeTimerImpl(VOID);
VOID KeInitializeBugCheck(VOID);
* RETURNS: True if detected
*/
{
+ DbgPrint ("Hal_bios32_probe()\n");
+
return;
#if 0
int i;
for (i=0xe0000;i<=0xffff0;i++)
{
-/// bios32* service_entry = (bios32 *)physical_to_linear(i);
+ bios32* service_entry = (bios32 *)physical_to_linear(i);
if ( service_entry->signature != BIOS32_SIGNATURE )
{
continue;
}
-// DbgPrint("Signature detected at %x\n",i);
+ DbgPrint("Signature detected at %x\n",i);
if (!checksum(service_entry))
{
continue;
-/* $Id: bus.c,v 1.4 2000/03/20 17:59:41 ekohl Exp $
+/* $Id: bus.c,v 1.5 2000/04/09 15:58:13 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
/* TYPE DEFINITIONS *********************************************************/
+
struct _BUS_HANDLER;
typedef NTSTATUS (STDCALL *pAdjustResourceList) (
} BUS_HANDLER, *PBUS_HANDLER;
+/* sysbus.h */
+ULONG
+STDCALL
+HalpGetSystemInterruptVector (
+ PVOID BusHandler,
+ ULONG BusNumber,
+ ULONG BusInterruptLevel,
+ ULONG BusInterruptVector,
+ PKIRQL Irql,
+ PKAFFINITY Affinity
+ );
+
+BOOLEAN
+STDCALL
+HalpTranslateSystemBusAddress (
+ PBUS_HANDLER BusHandler,
+ ULONG BusNumber,
+ PHYSICAL_ADDRESS BusAddress,
+ PULONG AddressSpace,
+ PPHYSICAL_ADDRESS TranslatedAddress
+ );
+
+/* isa.c */
+BOOLEAN
+STDCALL
+HalpTranslateIsaBusAddress (
+ PBUS_HANDLER BusHandler,
+ ULONG BusNumber,
+ PHYSICAL_ADDRESS BusAddress,
+ PULONG AddressSpace,
+ PPHYSICAL_ADDRESS TranslatedAddress
+ );
+
+
/* GLOBAL VARIABLES **********************************************************/
KSPIN_LOCK HalpBusHandlerSpinLock = {0,};
0);
BusHandler->GetInterruptVector =
(pGetInterruptVector)HalpGetSystemInterruptVector;
-// BusHandler->TranslateBusAddress =
-// (pTranslateBusAddress)HalpTranslateSystemBusAddress;
+ BusHandler->TranslateBusAddress =
+ (pTranslateBusAddress)HalpTranslateSystemBusAddress;
/* cmos bus handler */
BusHandler = HalpAllocateBusHandler (InterfaceTypeUndefined,
// BusHandler->SetBusData =
// (pGetSetBusData)HalpSetCmosData;
+ /* isa bus handler */
+ BusHandler = HalpAllocateBusHandler (Isa,
+ ConfigurationSpaceUndefined,
+ 0);
+ BusHandler->TranslateBusAddress =
+ (pTranslateBusAddress)HalpTranslateIsaBusAddress;
+
+#if 0
/* pci bus handler */
BusHandler = HalpAllocateBusHandler (PCIBus,
PCIConfiguration,
// (pGetSetBusData)HalpAdjustPciResourceList;
// BusHandler->AssignSlotResources =
// (pGetSetBusData)HalpAssignPciSlotResources;
-
- /* isa bus handler */
- BusHandler = HalpAllocateBusHandler (Isa,
- ConfigurationSpaceUndefined,
- 0);
-// BusHandler->TranslateBusAddress =
-// (pTranslateBusAddress)HalpTranslateIsaBusAddress;
+#endif
}
-/* $Id: halinit.c,v 1.10 2000/04/08 19:08:50 ekohl Exp $
+/* $Id: halinit.c,v 1.11 2000/04/09 15:58:13 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
{
HalInitializeDisplay (bp);
HalpCalibrateStallExecution ();
- KeInitExceptions();
- KeInitIRQ();
+ KeInitExceptions ();
+ HalpInitIRQs ();
KeLowerIrql(DISPATCH_LEVEL);
}
else
{
HalpInitBusHandlers ();
- /*
- * Probe for a BIOS32 extension
- */
- Hal_bios32_probe();
-
- /*
- * Probe for buses attached to the computer
- * NOTE: Order is important here because ISA is the default
- */
-#if 0
- if (HalPciProbe())
- {
- return TRUE;
- }
- HalIsaProbe();
-#endif
}
return TRUE;
-/* $Id: irq.c,v 1.10 2000/03/26 19:38:18 ea Exp $
+/* $Id: irq.c,v 1.11 2000/04/09 15:58:13 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* PURPOSE: IRQ handling
* PROGRAMMER: David Welch (welch@mcmail.com)
* UPDATE HISTORY:
- * 29/05/98: Created
+ * 29/05/98: Created
*/
/*
// DbgPrint("}");
}
-void KeInitIRQ(void)
+VOID HalpInitIRQs (VOID)
{
int i;
- DPRINT("KeInitIrq()\n",0);
+ DPRINT("HalpInitIRQs ()\n",0);
/*
* First mask off all interrupts from pic
KeLowerIrql(oldlvl);
}
+#if 0
ULONG
STDCALL
-HalpGetSystemInterruptVector(PVOID BusHandler,
- ULONG BusNumber,
- ULONG BusInterruptLevel,
- ULONG BusInterruptVector,
- PKIRQL Irql,
- PKAFFINITY Affinity)
-/*
- * FUNCTION: Returns a mapped system interrupt vector for passing to
- * IoConnectInterrupt
- * ARGUMENTS:
- * InterfaceType = Type bus the device is on
- * BusNumber = Zero based number of the bus
- * BusInterruptLevel = Bus specific interrupt level
- * BusInterruptVector = Bus specific interrupt vector
- * Irql (IN/OUT) = On entry the bus relative IRQL
- * On exit the DIRQL
- * Affinity (OUT) = Caller supplied storage for the interrupt
- * affinity mask
- * RETURNS: The mapped vector
- */
+HalDisableSystemInterrupt (
+ ULONG Unknown0,
+ ULONG Unknown1
+ )
{
- ULONG ret;
-
-// ASSERT_IRQL(PASSIVE_LEVEL);
-
-#if 0
- switch (InterfaceType)
- {
- case Internal:
-#endif
- *Irql = HIGH_LEVEL - BusInterruptVector;
- ret = BusInterruptVector;
-#if 0
- break;
-
- default:
- ret = -1;
- DbgPrint("(%s:%d) Don't know that bus type\n",__FILE__,__LINE__);
- break;
- }
-#endif
- return(ret);
+
+}
+
+ULONG
+STDCALL
+HalEnableSystemInterrupt (
+ ULONG Unknown0,
+ ULONG Unknown1,
+ ULONG Unknown2
+ )
+{
+
}
+#endif
/* EOF */
-/* $Id: isa.c,v 1.5 2000/03/20 17:59:42 ekohl Exp $
+/* $Id: isa.c,v 1.6 2000/04/09 15:58:13 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
#include <ddk/ntddk.h>
+
+typedef struct _BUS_HANDLER *PBUS_HANDLER;
+
+
/* FUNCTIONS *****************************************************************/
BOOL HalIsaProbe(VOID)
return(TRUE);
}
-#if 0
+
BOOLEAN
STDCALL
HalpTranslateIsaBusAddress (
{
BOOLEAN Result;
- Result = HalpTranslateSystemBusAddress (BusHandler,
- BusNumber,
- BusAddress,
- AddressSpace,
- TranslatedAddress);
- if (Result != FALSE)
- return Result;
+ Result = HalTranslateBusAddress (PCIBus,
+ BusNumber,
+ BusAddress,
+ AddressSpace,
+ TranslatedAddress);
- /* PCI does not provide memory address space */
- if (*AddressSpace == 0)
+ if (Result != FALSE)
return Result;
- Result = HalTranslateBusAddress (PCIBus,
+ Result = HalTranslateBusAddress (Internal,
BusNumber,
BusAddress,
AddressSpace,
return Result;
}
-#endif
/* EOF */
-/* $Id: misc.c,v 1.3 2000/04/08 19:08:50 ekohl Exp $
+/* $Id: misc.c,v 1.4 2000/04/09 15:58:13 ekohl Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
{
/*
* FIXME: Report all resources used by hal.
- Calls IoReportHalResourceUsage()
+ * Calls IoReportHalResourceUsage()
*/
+ /*
+ * Initialize PCI, IsaPnP and other busses.
+ */
+
+#if 0
+ /*
+ * Probe for a BIOS32 extension
+ */
+ Hal_bios32_probe();
+
+ /*
+ * Probe for buses attached to the computer
+ */
+
+ HalPciProbe();
+#endif
+
return;
}
hal/x86/sysinfo.o hal/x86/time.o hal/x86/beep.o \
hal/x86/display.o hal/x86/reboot.o hal/x86/kdbg.o \
hal/x86/portio.o hal/x86/misc.o hal/x86/parttab.o \
- hal/x86/adapter.o hal/x86/drive.o hal/x86/udelay.o
+ hal/x86/adapter.o hal/x86/drive.o hal/x86/udelay.o \
+ hal/x86/sysbus.o
--- /dev/null
+/* $Id: sysbus.c,v 1.1 2000/04/09 15:58:13 ekohl Exp $
+ *
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
+ * FILE: ntoskrnl/hal/sysbus.c
+ * PURPOSE: System bus handler functions
+ * PROGRAMMER: Eric Kohl (ekohl@rz-online.de)
+ * UPDATE HISTORY:
+ * 09/04/2000 Created
+ */
+
+/* INCLUDES *****************************************************************/
+
+#include <ddk/ntddk.h>
+
+
+typedef struct _BUS_HANDLER *PBUS_HANDLER;
+
+
+/* FUNCTIONS ****************************************************************/
+
+ULONG
+STDCALL
+HalpGetSystemInterruptVector (
+ PVOID BusHandler,
+ ULONG BusNumber,
+ ULONG BusInterruptLevel,
+ ULONG BusInterruptVector,
+ PKIRQL Irql,
+ PKAFFINITY Affinity
+ )
+{
+ *Irql = HIGH_LEVEL - BusInterruptVector;
+ return BusInterruptVector;
+}
+
+
+BOOLEAN
+STDCALL
+HalpTranslateSystemBusAddress (
+ PBUS_HANDLER BusHandler,
+ ULONG BusNumber,
+ PHYSICAL_ADDRESS BusAddress,
+ PULONG AddressSpace,
+ PPHYSICAL_ADDRESS TranslatedAddress
+ )
+{
+ ULONG BaseAddress = 0;
+
+ if (*AddressSpace == 0)
+ {
+ /* memory space */
+
+ }
+ else if (*AddressSpace == 1)
+ {
+ /* io space */
+
+ }
+ else
+ {
+ /* other */
+ return FALSE;
+ }
+
+ TranslatedAddress->QuadPart = BusAddress.QuadPart + BaseAddress;
+
+ return TRUE;
+}
+
+/* EOF */
-/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS kernel
* FILE: ntoskrnl/hal/x86/time.c
* PURPOSE: Getting time information
* UPDATE HISTORY: