Author: hpoussin Date: Mon Jul 9 00:13:20 2007 New Revision: 27515
URL: http://svn.reactos.org/svn/reactos?rev=27515&view=rev Log: Fix usage of KdComPortInUse
Modified: trunk/reactos/drivers/serial/serial/pnp.c trunk/reactos/hal/hal/hal.def trunk/reactos/hal/halx86/generic/sysinfo.c trunk/reactos/hal/halx86/include/halp.h trunk/reactos/include/ndk/haltypes.h trunk/reactos/ntoskrnl/kd/kdio.c
Modified: trunk/reactos/drivers/serial/serial/pnp.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/serial/serial/pnp.c... ============================================================================== --- trunk/reactos/drivers/serial/serial/pnp.c (original) +++ trunk/reactos/drivers/serial/serial/pnp.c Mon Jul 9 00:13:20 2007 @@ -218,8 +218,7 @@ 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;
Modified: trunk/reactos/hal/hal/hal.def URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/hal/hal.def?rev=27515&a... ============================================================================== --- trunk/reactos/hal/hal/hal.def (original) +++ trunk/reactos/hal/hal/hal.def Mon Jul 9 00:13:20 2007 @@ -74,7 +74,7 @@ IoSetPartitionInformation@16=HalpSetPartitionInformation@16 IoWritePartitionTable@20=HalpWritePartitionTable@20 KeAcquireSpinLock@8 -KdComPortInUse=_KdComPortInUse +KdComPortInUse=_KdComPortInUse DATA KeFlushWriteBuffer@0 KeGetCurrentIrql@0 KeLowerIrql@4
Modified: trunk/reactos/hal/halx86/generic/sysinfo.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/sysinfo.... ============================================================================== --- trunk/reactos/hal/halx86/generic/sysinfo.c (original) +++ trunk/reactos/hal/halx86/generic/sysinfo.c Mon Jul 9 00:13:20 2007 @@ -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 *****************************************************************/
Modified: trunk/reactos/hal/halx86/include/halp.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/include/halp.h?r... ============================================================================== --- trunk/reactos/hal/halx86/include/halp.h (original) +++ trunk/reactos/hal/halx86/include/halp.h Mon Jul 9 00:13:20 2007 @@ -7,9 +7,6 @@
/* Temporary hack */ #define KPCR_BASE 0xFF000000 - -/* WDK Hack */ -#define KdComPortInUse _KdComPortInUse
#define HAL_APC_REQUEST 0 #define HAL_DPC_REQUEST 1
Modified: trunk/reactos/include/ndk/haltypes.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/haltypes.h?rev=... ============================================================================== --- trunk/reactos/include/ndk/haltypes.h (original) +++ trunk/reactos/include/ndk/haltypes.h Mon Jul 9 00:13:20 2007 @@ -224,10 +224,10 @@ // HAL Exports // #ifndef _NTHAL_ -extern PUCHAR *KdComPortInUse; -#endif - -#endif -#endif - - +extern DECL_IMPORT PUCHAR *KdComPortInUse; +#endif + +#endif +#endif + +
Modified: trunk/reactos/ntoskrnl/kd/kdio.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd/kdio.c?rev=2751... ============================================================================== --- trunk/reactos/ntoskrnl/kd/kdio.c (original) +++ trunk/reactos/ntoskrnl/kd/kdio.c Mon Jul 9 00:13:20 2007 @@ -26,8 +26,6 @@
/* 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 @@
if (BootPhase == 0) { - KdComPortInUse = NULL; + *KdComPortInUse = NULL;
/* Write out the functions that we support for now */ DispatchTable->KdpInitRoutine = KdpInitDebugLog; @@ -184,7 +182,7 @@ KdpDebugMode.Serial = FALSE; return; } - KdComPortInUse = (PUCHAR*)&SerialPortInfo.BaseAddress; + *KdComPortInUse = (PUCHAR)(ULONG_PTR)SerialPortInfo.BaseAddress;
/* Register as a Provider */ InsertTailList(&KdProviders, &DispatchTable->KdProvidersList);