[ros-dev] [ros-diffs] [hbelusca] 70405: [KDCOM] Do not use the "LoaderBlock->u.I386.CommonDataArea; " hack to use FreeLdr's DbgPrint function inside KDCOM, for the simple reason that while it works when KDCOM just initia...
Timo Kreuzer
timo.kreuzer at web.de
Sun Dec 27 16:40:39 UTC 2015
That doesn't seem to make much sense. Why enumerate from the end? It
should rather enumerate from the start and skip the KdComPort. So far we
used COM1 as debug port on MSVC builds and COM2 as terminal debug port
for both freeldr and KDCOM. Preferably this should configurable. I
really don't like this unintuitive and quite random behaviour.
> +#ifdef KDDEBUG
> + /*
> + * Try to find a free COM port and use it as the KD debugging port.
> + * NOTE: Inspired by reactos/boot/freeldr/freeldr/comm/rs232.c, Rs232PortInitialize(...)
> + */
> + {
> + /*
> + * Start enumerating COM ports from the last one to the first one,
> + * and break when we find a valid port.
> + * If we reach the first element of the list, the invalid COM port,
> + * then it means that no valid port was found.
> + */
> + ULONG ComPort;
> + for (ComPort = MAX_COM_PORTS; ComPort > 0; ComPort--)
> + {
> + /* Check if the port exist; skip the KD port */
> + if ((ComPort != ComPortNumber) && CpDoesPortExist(UlongToPtr(BaseArray[ComPort])))
> + break;
> + }
> + if (ComPort != 0)
> + CpInitialize(&KdDebugComPort, UlongToPtr(BaseArray[ComPort]), DEFAULT_BAUD_RATE);
> + }
> +#endif
> +
> + KDDBGPRINT("KdDebuggerInitialize0\n");
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3703 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://www.reactos.org/pipermail/ros-dev/attachments/20151227/37206c5b/attachment.bin>
More information about the Ros-dev
mailing list