mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 22:32:58 +00:00
- Add profil.c and stub HalStartProfileInterrupt, HalStopProfileInterrupt and HalSetProfileInterval, and export these functions.
- KdComPortInUse is exported by HAL, not kdcom, so make the change. - Register the KD support routines that kdcom on NT uses and implement most of them (except support for PCI Debug Cards). - I can now get Windows to recognize the HAL but it freezes during loading (Due to broken IRQL implementation) and WinDBG won't connect to it. svn path=/trunk/; revision=24977
This commit is contained in:
parent
893be43835
commit
b906fae81e
10 changed files with 173 additions and 28 deletions
|
@ -1,7 +1,6 @@
|
||||||
LIBRARY kdcom.dll
|
LIBRARY kdcom.dll
|
||||||
EXPORTS
|
EXPORTS
|
||||||
|
|
||||||
KdComPortInUse=_KdComPortInUse
|
|
||||||
KdPortGetByte@4
|
KdPortGetByte@4
|
||||||
KdPortGetByteEx@8
|
KdPortGetByteEx@8
|
||||||
KdPortInitialize@12
|
KdPortInitialize@12
|
||||||
|
|
|
@ -13,6 +13,7 @@ EXPORTS
|
||||||
@KeAcquireInStackQueuedSpinLockRaiseToSynch@8
|
@KeAcquireInStackQueuedSpinLockRaiseToSynch@8
|
||||||
@KeAcquireSpinLockRaiseToSynch@4
|
@KeAcquireSpinLockRaiseToSynch@4
|
||||||
@KeAcquireQueuedSpinLock@4
|
@KeAcquireQueuedSpinLock@4
|
||||||
|
@KeAcquireQueuedSpinLockRaiseToSynch@4
|
||||||
@KeReleaseInStackQueuedSpinLock@4
|
@KeReleaseInStackQueuedSpinLock@4
|
||||||
@KeReleaseQueuedSpinLock@8
|
@KeReleaseQueuedSpinLock@8
|
||||||
@KeTryToAcquireQueuedSpinLock@8
|
@KeTryToAcquireQueuedSpinLock@8
|
||||||
|
@ -57,12 +58,12 @@ HalSetBusData@20
|
||||||
HalSetBusDataByOffset@24
|
HalSetBusDataByOffset@24
|
||||||
HalSetDisplayParameters@8
|
HalSetDisplayParameters@8
|
||||||
HalSetEnvironmentVariable@8
|
HalSetEnvironmentVariable@8
|
||||||
;HalSetProfileInterval@4
|
HalSetProfileInterval@4
|
||||||
HalSetRealTimeClock@4
|
HalSetRealTimeClock@4
|
||||||
HalSetTimeIncrement@4
|
HalSetTimeIncrement@4
|
||||||
HalStartNextProcessor@8
|
HalStartNextProcessor@8
|
||||||
;HalStartProfileInterrupt@4
|
HalStartProfileInterrupt@4
|
||||||
;HalStopProfileInterrupt@4
|
HalStopProfileInterrupt@4
|
||||||
HalTranslateBusAddress@24
|
HalTranslateBusAddress@24
|
||||||
IoAssignDriveLetters@16=HalpAssignDriveLetters@16
|
IoAssignDriveLetters@16=HalpAssignDriveLetters@16
|
||||||
IoFlushAdapterBuffers@24
|
IoFlushAdapterBuffers@24
|
||||||
|
@ -73,6 +74,7 @@ IoReadPartitionTable@16=HalpReadPartitionTable@16
|
||||||
IoSetPartitionInformation@16=HalpSetPartitionInformation@16
|
IoSetPartitionInformation@16=HalpSetPartitionInformation@16
|
||||||
IoWritePartitionTable@20=HalpWritePartitionTable@20
|
IoWritePartitionTable@20=HalpWritePartitionTable@20
|
||||||
KeAcquireSpinLock@8
|
KeAcquireSpinLock@8
|
||||||
|
KdComPortInUse=_KdComPortInUse
|
||||||
KeFlushWriteBuffer@0
|
KeFlushWriteBuffer@0
|
||||||
KeGetCurrentIrql@0
|
KeGetCurrentIrql@0
|
||||||
KeLowerIrql@4
|
KeLowerIrql@4
|
||||||
|
|
|
@ -18,6 +18,22 @@ ULONG HalpBusType;
|
||||||
|
|
||||||
/* PRIVATE FUNCTIONS *********************************************************/
|
/* PRIVATE FUNCTIONS *********************************************************/
|
||||||
|
|
||||||
|
VOID
|
||||||
|
NTAPI
|
||||||
|
HalpRegisterKdSupportFunctions(VOID)
|
||||||
|
{
|
||||||
|
/* Register PCI Device Functions */
|
||||||
|
KdSetupPciDeviceForDebugging = HalpSetupPciDeviceForDebugging;
|
||||||
|
KdReleasePciDeviceforDebugging = HalpReleasePciDeviceForDebugging;
|
||||||
|
|
||||||
|
/* Register memory functions */
|
||||||
|
KdMapPhysicalMemory64 = HalpMapPhysicalMemory64;
|
||||||
|
KdUnmapVirtualAddress = HalpUnmapVirtualAddress;
|
||||||
|
|
||||||
|
/* Register ACPI stub */
|
||||||
|
KdCheckPowerButton = HalpCheckPowerButton;
|
||||||
|
}
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
HalpAssignSlotResources(IN PUNICODE_STRING RegistryPath,
|
HalpAssignSlotResources(IN PUNICODE_STRING RegistryPath,
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
<file>misc.c</file>
|
<file>misc.c</file>
|
||||||
<file>pci.c</file>
|
<file>pci.c</file>
|
||||||
<file>portio.c</file>
|
<file>portio.c</file>
|
||||||
|
<file>profil.c</file>
|
||||||
<file>reboot.c</file>
|
<file>reboot.c</file>
|
||||||
<file>sysinfo.c</file>
|
<file>sysinfo.c</file>
|
||||||
<file>timer.c</file>
|
<file>timer.c</file>
|
||||||
|
|
|
@ -7,13 +7,43 @@
|
||||||
* Eric Kohl (ekohl@abo.rhein-zeitung.de)
|
* Eric Kohl (ekohl@abo.rhein-zeitung.de)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES ******************************************************************/
|
||||||
|
|
||||||
#include <hal.h>
|
#include <hal.h>
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* PRIVATE FUNCTIONS *********************************************************/
|
||||||
|
|
||||||
|
VOID
|
||||||
|
NTAPI
|
||||||
|
HalpCheckPowerButton(VOID)
|
||||||
|
{
|
||||||
|
/* Nothing to do on non-ACPI */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
PVOID
|
||||||
|
NTAPI
|
||||||
|
HalpMapPhysicalMemory64(IN PHYSICAL_ADDRESS PhysicalAddress,
|
||||||
|
IN ULONG NumberPage)
|
||||||
|
{
|
||||||
|
/* Use kernel memory manager I/O map facilities */
|
||||||
|
return MmMapIoSpace(PhysicalAddress,
|
||||||
|
NumberPage << PAGE_SHIFT,
|
||||||
|
MmNonCached);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
NTAPI
|
||||||
|
HalpUnmapVirtualAddress(IN PVOID VirtualAddress,
|
||||||
|
IN ULONG NumberPages)
|
||||||
|
{
|
||||||
|
/* Use kernel memory manager I/O map facilities */
|
||||||
|
return MmUnmapIoSpace(VirtualAddress, NumberPages << PAGE_SHIFT);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
|
|
|
@ -468,6 +468,23 @@ HalpSetPCIData(IN PBUS_HANDLER BusHandler,
|
||||||
return Len;
|
return Len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
|
HalpSetupPciDeviceForDebugging(IN PVOID LoaderBlock,
|
||||||
|
IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice)
|
||||||
|
{
|
||||||
|
DPRINT1("Unimplemented!\n");
|
||||||
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
|
HalpReleasePciDeviceForDebugging(IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice)
|
||||||
|
{
|
||||||
|
DPRINT1("Unimplemented!\n");
|
||||||
|
return STATUS_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
HalpAssignPCISlotResources(IN PBUS_HANDLER BusHandler,
|
HalpAssignPCISlotResources(IN PBUS_HANDLER BusHandler,
|
||||||
|
|
|
@ -31,9 +31,11 @@ HalInitializeProcessor(IN ULONG ProcessorNumber,
|
||||||
|
|
||||||
/* Update the interrupt affinity and processor mask */
|
/* Update the interrupt affinity and processor mask */
|
||||||
InterlockedBitTestAndSet(&HalpActiveProcessors, ProcessorNumber);
|
InterlockedBitTestAndSet(&HalpActiveProcessors, ProcessorNumber);
|
||||||
InterlockedBitTestAndSet((PLONG)&HalpDefaultInterruptAffinity, ProcessorNumber);
|
InterlockedBitTestAndSet((PLONG)&HalpDefaultInterruptAffinity,
|
||||||
|
ProcessorNumber);
|
||||||
|
|
||||||
/* FIXME: Register routines for KDCOM */
|
/* Register routines for KDCOM */
|
||||||
|
HalpRegisterKdSupportFunctions();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
48
reactos/hal/halx86/generic/profil.c
Normal file
48
reactos/hal/halx86/generic/profil.c
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
/*
|
||||||
|
* PROJECT: ReactOS HAL
|
||||||
|
* LICENSE: GPL - See COPYING in the top level directory
|
||||||
|
* FILE: hal/halx86/generic/profil.c
|
||||||
|
* PURPOSE: System Profiling
|
||||||
|
* PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* INCLUDES ******************************************************************/
|
||||||
|
|
||||||
|
#include <hal.h>
|
||||||
|
#define NDEBUG
|
||||||
|
#include <debug.h>
|
||||||
|
|
||||||
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
VOID
|
||||||
|
NTAPI
|
||||||
|
HalStopProfileInterrupt(IN KPROFILE_SOURCE ProfileSource)
|
||||||
|
{
|
||||||
|
KEBUGCHECK(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
VOID
|
||||||
|
NTAPI
|
||||||
|
HalStartProfileInterrupt(IN KPROFILE_SOURCE ProfileSource)
|
||||||
|
{
|
||||||
|
KEBUGCHECK(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
ULONG_PTR
|
||||||
|
NTAPI
|
||||||
|
HalSetProfileInterval(IN ULONG_PTR Interval)
|
||||||
|
{
|
||||||
|
KEBUGCHECK(0);
|
||||||
|
return Interval;
|
||||||
|
}
|
|
@ -12,6 +12,8 @@
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
ULONG KdComPortInUse = 0;
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
#define KPCR_BASE 0xFF000000
|
#define KPCR_BASE 0xFF000000
|
||||||
|
|
||||||
/* WDK Hack */
|
/* WDK Hack */
|
||||||
#define KdComPortInUse _KdComPortInUse
|
#define KdComPortInUse _KdComPortInUse
|
||||||
|
|
||||||
#define HAL_APC_REQUEST 0
|
#define HAL_APC_REQUEST 0
|
||||||
#define HAL_DPC_REQUEST 1
|
#define HAL_DPC_REQUEST 1
|
||||||
|
|
||||||
/* CMOS Registers and Ports */
|
/* CMOS Registers and Ports */
|
||||||
#define CMOS_CONTROL_PORT (PUCHAR)0x70
|
#define CMOS_CONTROL_PORT (PUCHAR)0x70
|
||||||
|
@ -35,15 +35,6 @@
|
||||||
#define INT_BCD(int) \
|
#define INT_BCD(int) \
|
||||||
(UCHAR)(((int / 10) << 4) + (int % 10))
|
(UCHAR)(((int / 10) << 4) + (int % 10))
|
||||||
|
|
||||||
//
|
|
||||||
// Kernel Debugger Port Definition
|
|
||||||
//
|
|
||||||
typedef struct _KD_PORT_INFORMATION
|
|
||||||
{
|
|
||||||
ULONG ComPort;
|
|
||||||
ULONG BaudRate;
|
|
||||||
ULONG BaseAddress;
|
|
||||||
} KD_PORT_INFORMATION, *PKD_PORT_INFORMATION;
|
|
||||||
/* adapter.c */
|
/* adapter.c */
|
||||||
PADAPTER_OBJECT STDCALL HalpAllocateAdapterEx(ULONG NumberOfMapRegisters,BOOLEAN IsMaster, BOOLEAN Dma32BitAddresses);
|
PADAPTER_OBJECT STDCALL HalpAllocateAdapterEx(ULONG NumberOfMapRegisters,BOOLEAN IsMaster, BOOLEAN Dma32BitAddresses);
|
||||||
|
|
||||||
|
@ -54,27 +45,64 @@ VOID NTAPI HalpInitNonBusHandler (VOID);
|
||||||
VOID NTAPI HalpInitPICs(VOID);
|
VOID NTAPI HalpInitPICs(VOID);
|
||||||
|
|
||||||
/* udelay.c */
|
/* udelay.c */
|
||||||
VOID HalpCalibrateStallExecution(VOID);
|
|
||||||
|
|
||||||
VOID NTAPI HalpInitializeClock(VOID);
|
VOID NTAPI HalpInitializeClock(VOID);
|
||||||
|
|
||||||
/* pci.c */
|
/* pci.c */
|
||||||
VOID HalpInitPciBus (VOID);
|
VOID HalpInitPciBus (VOID);
|
||||||
|
|
||||||
/* enum.c */
|
|
||||||
VOID HalpStartEnumerator (VOID);
|
|
||||||
|
|
||||||
/* dma.c */
|
/* dma.c */
|
||||||
VOID HalpInitDma (VOID);
|
VOID HalpInitDma (VOID);
|
||||||
|
|
||||||
/* mem.c */
|
|
||||||
PVOID HalpMapPhysMemory(ULONG PhysAddr, ULONG Size);
|
|
||||||
|
|
||||||
/* Non-generic initialization */
|
/* Non-generic initialization */
|
||||||
VOID HalpInitPhase0 (PLOADER_PARAMETER_BLOCK LoaderBlock);
|
VOID HalpInitPhase0 (PLOADER_PARAMETER_BLOCK LoaderBlock);
|
||||||
VOID HalpInitPhase1(VOID);
|
VOID HalpInitPhase1(VOID);
|
||||||
VOID NTAPI HalpClockInterrupt(VOID);
|
VOID NTAPI HalpClockInterrupt(VOID);
|
||||||
|
|
||||||
|
//
|
||||||
|
// KD Support
|
||||||
|
//
|
||||||
|
VOID
|
||||||
|
NTAPI
|
||||||
|
HalpCheckPowerButton(
|
||||||
|
VOID
|
||||||
|
);
|
||||||
|
|
||||||
|
VOID
|
||||||
|
NTAPI
|
||||||
|
HalpRegisterKdSupportFunctions(
|
||||||
|
VOID
|
||||||
|
);
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
|
HalpSetupPciDeviceForDebugging(
|
||||||
|
IN PVOID LoaderBlock,
|
||||||
|
IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice
|
||||||
|
);
|
||||||
|
|
||||||
|
NTSTATUS
|
||||||
|
NTAPI
|
||||||
|
HalpReleasePciDeviceForDebugging(
|
||||||
|
IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Memory routines
|
||||||
|
//
|
||||||
|
PVOID
|
||||||
|
NTAPI
|
||||||
|
HalpMapPhysicalMemory64(
|
||||||
|
IN PHYSICAL_ADDRESS PhysicalAddress,
|
||||||
|
IN ULONG NumberPage
|
||||||
|
);
|
||||||
|
|
||||||
|
VOID
|
||||||
|
NTAPI
|
||||||
|
HalpUnmapVirtualAddress(
|
||||||
|
IN PVOID VirtualAddress,
|
||||||
|
IN ULONG NumberPages
|
||||||
|
);
|
||||||
|
|
||||||
/* sysinfo.c */
|
/* sysinfo.c */
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue