https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8d3a395101e2c166e1d30…
commit 8d3a395101e2c166e1d302715b841967c9757d1d
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Sat Mar 28 10:45:31 2020 +0100
Commit: Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Mon Nov 16 08:55:03 2020 +0100
[NTOS:KD] Remove Bochs port debugging
You can use serial port debugging instead.
---
ntoskrnl/include/internal/kd.h | 13 ++------
ntoskrnl/kd/kdmain.c | 7 -----
ntoskrnl/kd/wrappers/bochs.c | 67 ------------------------------------------
ntoskrnl/kd64/kddata.c | 6 ----
ntoskrnl/ntos.cmake | 1 -
5 files changed, 2 insertions(+), 92 deletions(-)
diff --git a/ntoskrnl/include/internal/kd.h b/ntoskrnl/include/internal/kd.h
index 36a7394074e..7f727c0df8c 100644
--- a/ntoskrnl/include/internal/kd.h
+++ b/ntoskrnl/include/internal/kd.h
@@ -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 */
diff --git a/ntoskrnl/kd/kdmain.c b/ntoskrnl/kd/kdmain.c
index 40718b5d5fc..83009cd80db 100644
--- a/ntoskrnl/kd/kdmain.c
+++ b/ntoskrnl/kd/kdmain.c
@@ -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;
}
diff --git a/ntoskrnl/kd/wrappers/bochs.c b/ntoskrnl/kd/wrappers/bochs.c
deleted file mode 100644
index 642d14df6c7..00000000000
--- a/ntoskrnl/kd/wrappers/bochs.c
+++ /dev/null
@@ -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(a)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 */
diff --git a/ntoskrnl/kd64/kddata.c b/ntoskrnl/kd64/kddata.c
index 6d32ad6ec77..2049583026f 100644
--- a/ntoskrnl/kd64/kddata.c
+++ b/ntoskrnl/kd64/kddata.c
@@ -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
diff --git a/ntoskrnl/ntos.cmake b/ntoskrnl/ntos.cmake
index 110dae4b3e6..7b1c0f93cde 100644
--- a/ntoskrnl/ntos.cmake
+++ b/ntoskrnl/ntos.cmake
@@ -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)