if (PortInformation->BaudRate == 0)
PortInformation->BaudRate = DEFAULT_BAUD_RATE;
- if (PortInformation->ComPort == 0)
- return FALSE;
+ if (PortInformation->ComPort != 0)
+ {
+ if (!KdpDoesComPortExist(BaseArray[PortInformation->ComPort]))
+ {
+ sprintf(buffer,
+ "\nKernel Debugger: Serial port not found!\n\n");
+ HalDisplayString(buffer);
+ return FALSE;
+ }
- if (!KdpDoesComPortExist(BaseArray[PortInformation->ComPort]))
+ ComPortBase = BaseArray[PortInformation->ComPort];
+ PortInformation->BaseAddress = ComPortBase;
+ }
+ else
{
- sprintf(buffer,
- "\nKernel Debugger: Serial port not found!\n\n");
- HalDisplayString(buffer);
- return FALSE;
+ ComPortBase = PortInformation->BaseAddress;
}
- ComPortBase = BaseArray[PortInformation->ComPort];
- PortInformation->BaseAddress = ComPortBase;
+ if (ComPortBase == 0)
+ return FALSE;
+
#ifndef NDEBUG
sprintf(buffer,
"\nSerial port COM%ld found at 0x%lx\n",
{
/* Gheck for a valid Serial Port */
p2 += 3;
- Value = (ULONG)atol(p2);
- if (Value > 0 && Value < 5)
+ if (*p2 != ':')
{
- /* Valid port found, enable Serial Debugging */
- KdpDebugMode.Serial = TRUE;
+ Value = (ULONG)atol(p2);
+ if (Value > 0 && Value < 5)
+ {
+ /* Valid port found, enable Serial Debugging */
+ KdpDebugMode.Serial = TRUE;
- /* Set the port to use */
- SerialPortInfo.ComPort = Value;
- KdpPort = Value;
+ /* Set the port to use */
+ SerialPortInfo.ComPort = Value;
+ KdpPort = Value;
+ }
+ }
+ else
+ {
+ Value = strtoul(p2 + 1, NULL, 0);
+ if (Value)
+ {
+ KdpDebugMode.Serial = TRUE;
+ SerialPortInfo.BaseAddress = Value;
+ SerialPortInfo.ComPort = 0;
+ KdpPort = 0;
+ }
}
}