mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
Fix usage of KdComPortInUse
svn path=/trunk/; revision=27515
This commit is contained in:
parent
add1532e20
commit
e394d5e78d
6 changed files with 11 additions and 12 deletions
|
@ -218,8 +218,7 @@ SerialPnpStartDevice(
|
|||
ComPortBase = ULongToPtr(DeviceExtension->BaseAddress);
|
||||
|
||||
/* Test if we are trying to start the serial port used for debugging */
|
||||
DPRINT1("KdComPort: %p\n", KdComPortInUse);
|
||||
if (KdComPortInUse == ULongToPtr(DeviceExtension->BaseAddress))
|
||||
if (*KdComPortInUse == ULongToPtr(DeviceExtension->BaseAddress))
|
||||
{
|
||||
DPRINT("Failing IRP_MN_START_DEVICE as this serial port is used for debugging\n");
|
||||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
|
|
|
@ -74,7 +74,7 @@ IoReadPartitionTable@16=HalpReadPartitionTable@16
|
|||
IoSetPartitionInformation@16=HalpSetPartitionInformation@16
|
||||
IoWritePartitionTable@20=HalpWritePartitionTable@20
|
||||
KeAcquireSpinLock@8
|
||||
KdComPortInUse=_KdComPortInUse
|
||||
KdComPortInUse=_KdComPortInUse DATA
|
||||
KeFlushWriteBuffer@0
|
||||
KeGetCurrentIrql@0
|
||||
KeLowerIrql@4
|
||||
|
|
|
@ -12,7 +12,12 @@
|
|||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
ULONG KdComPortInUse = 0;
|
||||
#ifdef __GNUC__
|
||||
static PUCHAR realKdComPortInUse = 0;
|
||||
PUCHAR *_KdComPortInUse = &realKdComPortInUse;
|
||||
#else
|
||||
PUCHAR _KdComPortInUse = 0;
|
||||
#endif
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
|
|
|
@ -8,9 +8,6 @@
|
|||
/* Temporary hack */
|
||||
#define KPCR_BASE 0xFF000000
|
||||
|
||||
/* WDK Hack */
|
||||
#define KdComPortInUse _KdComPortInUse
|
||||
|
||||
#define HAL_APC_REQUEST 0
|
||||
#define HAL_DPC_REQUEST 1
|
||||
|
||||
|
|
|
@ -224,7 +224,7 @@ extern NTSYSAPI HAL_PRIVATE_DISPATCH HalPrivateDispatchTable;
|
|||
// HAL Exports
|
||||
//
|
||||
#ifndef _NTHAL_
|
||||
extern PUCHAR *KdComPortInUse;
|
||||
extern DECL_IMPORT PUCHAR *KdComPortInUse;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -26,8 +26,6 @@ KD_PORT_INFORMATION SerialPortInfo = {DEFAULT_DEBUG_PORT, DEFAULT_DEBUG_BAUD_RAT
|
|||
|
||||
/* Current Port in use. FIXME: Do we support more then one? */
|
||||
ULONG KdpPort;
|
||||
/* If serial debugging is enabled, is pointing to the UART base address. */
|
||||
PUCHAR *KdComPortInUse;
|
||||
|
||||
/* DEBUG LOG FUNCTIONS *******************************************************/
|
||||
|
||||
|
@ -99,7 +97,7 @@ KdpInitDebugLog(PKD_DISPATCH_TABLE DispatchTable,
|
|||
|
||||
if (BootPhase == 0)
|
||||
{
|
||||
KdComPortInUse = NULL;
|
||||
*KdComPortInUse = NULL;
|
||||
|
||||
/* Write out the functions that we support for now */
|
||||
DispatchTable->KdpInitRoutine = KdpInitDebugLog;
|
||||
|
@ -184,7 +182,7 @@ KdpSerialInit(PKD_DISPATCH_TABLE DispatchTable,
|
|||
KdpDebugMode.Serial = FALSE;
|
||||
return;
|
||||
}
|
||||
KdComPortInUse = (PUCHAR*)&SerialPortInfo.BaseAddress;
|
||||
*KdComPortInUse = (PUCHAR)(ULONG_PTR)SerialPortInfo.BaseAddress;
|
||||
|
||||
/* Register as a Provider */
|
||||
InsertTailList(&KdProviders, &DispatchTable->KdProvidersList);
|
||||
|
|
Loading…
Reference in a new issue