ReactOS  0.4.14-dev-815-ge410a12
bochs.c File Reference
#include <ntoskrnl.h>
#include <debug.h>
Include dependency graph for bochs.c:

Go to the source code of this file.

Macros

#define NDEBUG
 
#define BOCHS_LOGGER_PORT   ((PVOID)0xe9)
 

Functions

VOID NTAPI KdpBochsDebugPrint (IN PCH Message, IN ULONG Length)
 
VOID NTAPI KdpBochsInit (PKD_DISPATCH_TABLE DispatchTable, ULONG BootPhase)
 

Macro Definition Documentation

◆ BOCHS_LOGGER_PORT

#define BOCHS_LOGGER_PORT   ((PVOID)0xe9)

Definition at line 15 of file bochs.c.

◆ NDEBUG

#define NDEBUG

Definition at line 11 of file bochs.c.

Function Documentation

◆ KdpBochsDebugPrint()

VOID NTAPI KdpBochsDebugPrint ( IN PCH  Message,
IN ULONG  Length 
)

Definition at line 21 of file bochs.c.

23 {
24  if (!KdpDebugMode.Bochs) return;
25 
26  while (*Message != 0)
27  {
28  if (*Message == '\n')
29  {
31  }
33  Message++;
34  }
35 }
KDP_DEBUG_MODE KdpDebugMode
Definition: kdinit.c:25
CHAR Message[80]
Definition: alive.c:5
void WRITE_PORT_UCHAR(PUCHAR Address, UCHAR Value)
Definition: mach.c:532
#define BOCHS_LOGGER_PORT
Definition: bochs.c:15

Referenced by KdpBochsInit().

◆ KdpBochsInit()

VOID NTAPI KdpBochsInit ( PKD_DISPATCH_TABLE  DispatchTable,
ULONG  BootPhase 
)

Definition at line 39 of file bochs.c.

41 {
42  UCHAR Value;
43  if (!KdpDebugMode.Bochs) return;
44 
45  if (BootPhase == 0)
46  {
49  {
50  KdpDebugMode.Bochs = FALSE;
51  return;
52  }
53 
54  /* Write out the functions that we support for now */
55  DispatchTable->KdpInitRoutine = KdpBochsInit;
56  DispatchTable->KdpPrintRoutine = KdpBochsDebugPrint;
57 
58  /* Register as a Provider */
59  InsertTailList(&KdProviders, &DispatchTable->KdProvidersList);
60  }
61  else if (BootPhase == 2)
62  {
63  HalDisplayString("\r\n Bochs debugging enabled\r\n\r\n");
64  }
65 }
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2374
KDP_DEBUG_MODE KdpDebugMode
Definition: kdinit.c:25
UCHAR NTAPI READ_PORT_UCHAR(PUCHAR Address)
Definition: mach.c:528
#define InsertTailList(ListHead, Entry)
VOID NTAPI KdpBochsInit(PKD_DISPATCH_TABLE DispatchTable, ULONG BootPhase)
Definition: bochs.c:39
LIST_ENTRY KdProviders
Definition: kdinit.c:29
uint32_t ULONG_PTR
Definition: typedefs.h:63
VOID NTAPI KdpBochsDebugPrint(IN PCH Message, IN ULONG Length)
Definition: bochs.c:21
unsigned char UCHAR
Definition: xmlstorage.h:181
static LSA_DISPATCH_TABLE DispatchTable
Definition: authpackage.c:164
NTHALAPI VOID NTAPI HalDisplayString(PUCHAR String)
#define BOCHS_LOGGER_PORT
Definition: bochs.c:15