[NTOS:KD] Remove Bochs port debugging

You can use serial port debugging instead.
This commit is contained in:
Hervé Poussineau 2020-03-28 10:45:31 +01:00
parent 8a62f277d8
commit 8d3a395101
5 changed files with 2 additions and 92 deletions

View file

@ -153,13 +153,6 @@ KdpDebugLogInit(
ULONG BootPhase
);
VOID
NTAPI
KdpBochsInit(
struct _KD_DISPATCH_TABLE *DispatchTable,
ULONG BootPhase
);
VOID
NTAPI
KdpKdbgInit(
@ -202,9 +195,8 @@ KdpSafeWriteMemory(
#define KdScreen 0
#define KdSerial 1
#define KdFile 2
#define KdBochs 3
#define KdKdbg 4
#define KdMax 5
#define KdKdbg 3
#define KdMax 4
/* KD Private Debug Modes */
typedef struct _KDP_DEBUG_MODE
@ -217,7 +209,6 @@ typedef struct _KDP_DEBUG_MODE
UCHAR Screen :1;
UCHAR Serial :1;
UCHAR File :1;
UCHAR Bochs :1;
};
/* Generic Value */

View file

@ -129,13 +129,6 @@ KdpGetDebugMode(PCHAR Currentp2)
KdpLogFileName.Buffer = p1;
}
}
/* Check for BOCHS Debugging */
else if (!_strnicmp(p2, "BOCHS", 5))
{
/* Enable It */
p2 += 5;
KdpDebugMode.Bochs = TRUE;
}
return p2;
}

View file

@ -1,67 +0,0 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/kd/wrappers/bochs.c
* PURPOSE: BOCHS Wrapper for Kd
*
* PROGRAMMERS: Alex Ionescu (alex@relsoft.net)
*/
#include <ntoskrnl.h>
#define NDEBUG
#include <debug.h>
/* bochs debug output */
#define BOCHS_LOGGER_PORT ((PVOID)0xe9)
/* FUNCTIONS *****************************************************************/
VOID
NTAPI
KdpBochsDebugPrint(IN PCH Message,
IN ULONG Length)
{
if (!KdpDebugMode.Bochs) return;
while (*Message != 0)
{
if (*Message == '\n')
{
WRITE_PORT_UCHAR(BOCHS_LOGGER_PORT, '\r');
}
WRITE_PORT_UCHAR(BOCHS_LOGGER_PORT, *Message);
Message++;
}
}
VOID
NTAPI
KdpBochsInit(PKD_DISPATCH_TABLE DispatchTable,
ULONG BootPhase)
{
UCHAR Value;
if (!KdpDebugMode.Bochs) return;
if (BootPhase == 0)
{
Value = READ_PORT_UCHAR(BOCHS_LOGGER_PORT);
if (Value != (ULONG_PTR)BOCHS_LOGGER_PORT)
{
KdpDebugMode.Bochs = FALSE;
return;
}
/* Write out the functions that we support for now */
DispatchTable->KdpInitRoutine = KdpBochsInit;
DispatchTable->KdpPrintRoutine = KdpBochsDebugPrint;
/* Register as a Provider */
InsertTailList(&KdProviders, &DispatchTable->KdProvidersList);
}
else if (BootPhase == 2)
{
HalDisplayString("\r\n Bochs debugging enabled\r\n\r\n");
}
}
/* EOF */

View file

@ -139,15 +139,10 @@ ULONG KdPrintBufferChanges = 0;
#ifndef _WINKD_
/* Make bochs debug output in the very early boot phase available */
//#define AUTO_ENABLE_BOCHS
ULONG PortNumber = DEFAULT_DEBUG_PORT;
CPPORT PortInfo = {0, DEFAULT_DEBUG_BAUD_RATE, 0};
ULONG KdpPortIrq;
#ifdef AUTO_ENABLE_BOCHS
KDP_DEBUG_MODE KdpDebugMode = {{{.Bochs=TRUE}}};
#else
KDP_DEBUG_MODE KdpDebugMode;
#endif
PKDP_INIT_ROUTINE WrapperInitRoutine;
KD_DISPATCH_TABLE WrapperTable;
LIST_ENTRY KdProviders = {&KdProviders, &KdProviders};
@ -156,7 +151,6 @@ KD_DISPATCH_TABLE DispatchTable[KdMax];
PKDP_INIT_ROUTINE InitRoutines[KdMax] = {KdpScreenInit,
KdpSerialInit,
KdpDebugLogInit,
KdpBochsInit,
KdpKdbgInit};
#endif

View file

@ -404,7 +404,6 @@ if(NOT _WINKD_)
endif()
list(APPEND SOURCE
${REACTOS_SOURCE_DIR}/ntoskrnl/kd/wrappers/bochs.c
${REACTOS_SOURCE_DIR}/ntoskrnl/kd/wrappers/kdbg.c
${REACTOS_SOURCE_DIR}/ntoskrnl/kd/kdio.c
${REACTOS_SOURCE_DIR}/ntoskrnl/kd/kdmain.c)