mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
[NTOSKRNL|KDCOM]
Allow to specify the serial port address, as requested by people on the forum. svn path=/trunk/; revision=54473
This commit is contained in:
@@ -258,19 +258,27 @@ KdPortInitializeEx(
|
|||||||
if (PortInformation->BaudRate == 0)
|
if (PortInformation->BaudRate == 0)
|
||||||
PortInformation->BaudRate = DEFAULT_BAUD_RATE;
|
PortInformation->BaudRate = DEFAULT_BAUD_RATE;
|
||||||
|
|
||||||
if (PortInformation->ComPort == 0)
|
if (PortInformation->ComPort != 0)
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
if (!KdpDoesComPortExist(BaseArray[PortInformation->ComPort]))
|
|
||||||
{
|
{
|
||||||
sprintf(buffer,
|
if (!KdpDoesComPortExist(BaseArray[PortInformation->ComPort]))
|
||||||
"\nKernel Debugger: Serial port not found!\n\n");
|
{
|
||||||
HalDisplayString(buffer);
|
sprintf(buffer,
|
||||||
return FALSE;
|
"\nKernel Debugger: Serial port not found!\n\n");
|
||||||
|
HalDisplayString(buffer);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
ComPortBase = BaseArray[PortInformation->ComPort];
|
||||||
|
PortInformation->BaseAddress = ComPortBase;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ComPortBase = PortInformation->BaseAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
ComPortBase = BaseArray[PortInformation->ComPort];
|
if (ComPortBase == 0)
|
||||||
PortInformation->BaseAddress = ComPortBase;
|
return FALSE;
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
sprintf(buffer,
|
sprintf(buffer,
|
||||||
"\nSerial port COM%ld found at 0x%lx\n",
|
"\nSerial port COM%ld found at 0x%lx\n",
|
||||||
|
|||||||
@@ -64,15 +64,29 @@ KdpGetDebugMode(PCHAR Currentp2)
|
|||||||
{
|
{
|
||||||
/* Gheck for a valid Serial Port */
|
/* Gheck for a valid Serial Port */
|
||||||
p2 += 3;
|
p2 += 3;
|
||||||
Value = (ULONG)atol(p2);
|
if (*p2 != ':')
|
||||||
if (Value > 0 && Value < 5)
|
|
||||||
{
|
{
|
||||||
/* Valid port found, enable Serial Debugging */
|
Value = (ULONG)atol(p2);
|
||||||
KdpDebugMode.Serial = TRUE;
|
if (Value > 0 && Value < 5)
|
||||||
|
{
|
||||||
|
/* Valid port found, enable Serial Debugging */
|
||||||
|
KdpDebugMode.Serial = TRUE;
|
||||||
|
|
||||||
/* Set the port to use */
|
/* Set the port to use */
|
||||||
SerialPortInfo.ComPort = Value;
|
SerialPortInfo.ComPort = Value;
|
||||||
KdpPort = Value;
|
KdpPort = Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Value = strtoul(p2 + 1, NULL, 0);
|
||||||
|
if (Value)
|
||||||
|
{
|
||||||
|
KdpDebugMode.Serial = TRUE;
|
||||||
|
SerialPortInfo.BaseAddress = Value;
|
||||||
|
SerialPortInfo.ComPort = 0;
|
||||||
|
KdpPort = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user