mirror of
https://github.com/reactos/reactos.git
synced 2025-02-20 15:35:04 +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
|
||||
EXPORTS
|
||||
|
||||
KdComPortInUse=_KdComPortInUse
|
||||
KdPortGetByte@4
|
||||
KdPortGetByteEx@8
|
||||
KdPortInitialize@12
|
||||
|
|
|
@ -13,6 +13,7 @@ EXPORTS
|
|||
@KeAcquireInStackQueuedSpinLockRaiseToSynch@8
|
||||
@KeAcquireSpinLockRaiseToSynch@4
|
||||
@KeAcquireQueuedSpinLock@4
|
||||
@KeAcquireQueuedSpinLockRaiseToSynch@4
|
||||
@KeReleaseInStackQueuedSpinLock@4
|
||||
@KeReleaseQueuedSpinLock@8
|
||||
@KeTryToAcquireQueuedSpinLock@8
|
||||
|
@ -57,12 +58,12 @@ HalSetBusData@20
|
|||
HalSetBusDataByOffset@24
|
||||
HalSetDisplayParameters@8
|
||||
HalSetEnvironmentVariable@8
|
||||
;HalSetProfileInterval@4
|
||||
HalSetProfileInterval@4
|
||||
HalSetRealTimeClock@4
|
||||
HalSetTimeIncrement@4
|
||||
HalStartNextProcessor@8
|
||||
;HalStartProfileInterrupt@4
|
||||
;HalStopProfileInterrupt@4
|
||||
HalStartProfileInterrupt@4
|
||||
HalStopProfileInterrupt@4
|
||||
HalTranslateBusAddress@24
|
||||
IoAssignDriveLetters@16=HalpAssignDriveLetters@16
|
||||
IoFlushAdapterBuffers@24
|
||||
|
@ -73,6 +74,7 @@ IoReadPartitionTable@16=HalpReadPartitionTable@16
|
|||
IoSetPartitionInformation@16=HalpSetPartitionInformation@16
|
||||
IoWritePartitionTable@20=HalpWritePartitionTable@20
|
||||
KeAcquireSpinLock@8
|
||||
KdComPortInUse=_KdComPortInUse
|
||||
KeFlushWriteBuffer@0
|
||||
KeGetCurrentIrql@0
|
||||
KeLowerIrql@4
|
||||
|
|
|
@ -18,6 +18,22 @@ ULONG HalpBusType;
|
|||
|
||||
/* 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
|
||||
NTAPI
|
||||
HalpAssignSlotResources(IN PUNICODE_STRING RegistryPath,
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
<file>misc.c</file>
|
||||
<file>pci.c</file>
|
||||
<file>portio.c</file>
|
||||
<file>profil.c</file>
|
||||
<file>reboot.c</file>
|
||||
<file>sysinfo.c</file>
|
||||
<file>timer.c</file>
|
||||
|
|
|
@ -7,13 +7,43 @@
|
|||
* Eric Kohl (ekohl@abo.rhein-zeitung.de)
|
||||
*/
|
||||
|
||||
/* INCLUDES *****************************************************************/
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <hal.h>
|
||||
#define NDEBUG
|
||||
#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
|
||||
|
|
|
@ -468,6 +468,23 @@ HalpSetPCIData(IN PBUS_HANDLER BusHandler,
|
|||
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
|
||||
NTAPI
|
||||
HalpAssignPCISlotResources(IN PBUS_HANDLER BusHandler,
|
||||
|
|
|
@ -31,9 +31,11 @@ HalInitializeProcessor(IN ULONG ProcessorNumber,
|
|||
|
||||
/* Update the interrupt affinity and processor mask */
|
||||
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
|
||||
#include <debug.h>
|
||||
|
||||
ULONG KdComPortInUse = 0;
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
NTSTATUS
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
#define KPCR_BASE 0xFF000000
|
||||
|
||||
/* WDK Hack */
|
||||
#define KdComPortInUse _KdComPortInUse
|
||||
#define KdComPortInUse _KdComPortInUse
|
||||
|
||||
#define HAL_APC_REQUEST 0
|
||||
#define HAL_DPC_REQUEST 1
|
||||
#define HAL_APC_REQUEST 0
|
||||
#define HAL_DPC_REQUEST 1
|
||||
|
||||
/* CMOS Registers and Ports */
|
||||
#define CMOS_CONTROL_PORT (PUCHAR)0x70
|
||||
|
@ -35,15 +35,6 @@
|
|||
#define INT_BCD(int) \
|
||||
(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 */
|
||||
PADAPTER_OBJECT STDCALL HalpAllocateAdapterEx(ULONG NumberOfMapRegisters,BOOLEAN IsMaster, BOOLEAN Dma32BitAddresses);
|
||||
|
||||
|
@ -54,27 +45,64 @@ VOID NTAPI HalpInitNonBusHandler (VOID);
|
|||
VOID NTAPI HalpInitPICs(VOID);
|
||||
|
||||
/* udelay.c */
|
||||
VOID HalpCalibrateStallExecution(VOID);
|
||||
|
||||
VOID NTAPI HalpInitializeClock(VOID);
|
||||
|
||||
/* pci.c */
|
||||
VOID HalpInitPciBus (VOID);
|
||||
|
||||
/* enum.c */
|
||||
VOID HalpStartEnumerator (VOID);
|
||||
|
||||
/* dma.c */
|
||||
VOID HalpInitDma (VOID);
|
||||
|
||||
/* mem.c */
|
||||
PVOID HalpMapPhysMemory(ULONG PhysAddr, ULONG Size);
|
||||
|
||||
/* Non-generic initialization */
|
||||
VOID HalpInitPhase0 (PLOADER_PARAMETER_BLOCK LoaderBlock);
|
||||
VOID HalpInitPhase1(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 */
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
|
Loading…
Reference in a new issue