Virtual PC with ReactOS 0.3.8 : ok

Here you can discuss ReactOS related topics.

Moderator: Moderator Team

hto
Developer
Posts: 2193
Joined: Sun Oct 01, 2006 3:43 pm

Post by hto »

ericy wrote: From a cmd window, I can do "dir > COM2" and the output comes to COM1 (notice the off-by-one error in the naming).
Which port and irq have com1 / com2 ports there, maybe different from VirtualBox?
I could dump the DebugPrint messages to a file which sort of told me how the mouse was initialized, but at some point after the mouse is initialized the log was truncated and there were no further messages.
It is "normal". Debug output to a file is broken.

ericy
Posts: 11
Joined: Mon Jun 22, 2009 8:38 pm

Re: Virtual PC with ReactOS 0.3.8 : ok

Post by ericy »

For VirtualPC (technically VirtualServer), I get (in this order):

(drivers\serial\serial\pnp.c:218) New COM port. Base = 0x2f8, Irql = 24
(drivers\serial\serial\pnp.c:226) Comparing addresses: KdComPortInUse: 00000000, ComPortBase: 000002F8
(drivers\serial\serial\devctrl.c:67) SerialSetBaudRate(COM1, 19200 Bauds)

(drivers\serial\serial\pnp.c:218) New COM port. Base = 0x3f8, Irql = 23
(drivers\serial\serial\pnp.c:226) Comparing addresses: KdComPortInUse: 00000000, ComPortBase: 000003F8
(drivers\serial\serial\devctrl.c:67) SerialSetBaudRate(COM2, 19200 Bauds)

For some reason, the log I have from VirtualBox doesn't have similar information. The base numbers seem reversed however. The IRQL numbers don't correspond to the kinds of numbers I am used to however, so I can't say whether those are reversed or not.

Note - when I run Win2k under VirtualServer, the com ports seem to work properly, so I don't *think* that this is a problem with the virtualization.
It is "normal". Debug output to a file is broken.
OK, that will help to narrow things down then..

hto
Developer
Posts: 2193
Joined: Sun Oct 01, 2006 3:43 pm

Post by hto »

Ports are indeed reversed, usually com1 has base 0x3f8 and irq 4 (so irql 23), not com2. Try to change /DEBUGPORT=COM1 to /DEBUGPORT=COM2 in freeldr.ini. Or maybe there is some option in VirtualPC to reverse the ports.

ericy
Posts: 11
Joined: Mon Jun 22, 2009 8:38 pm

Re: Virtual PC with ReactOS 0.3.8 : ok

Post by ericy »

Originally I had tried attaching the debugger to both COM ports with no success. I can make the following observations however.

From userland, the COM ports seem to work, but they are reversed. Win2K running under VirtualPC doesn't have this problem, and VirtualPC doesn't have an option to swap the things. If this were the only problem, life would be simpler.

As far as the kernel is concerned (and debugger interactions with the kernel), there appears to be a completely independent COM port implementation in drivers\base\kdcom, and these have the COM port addresses hardcoded to the appropriate values, and from this I would conclude that reversal is unlikely.

Sometimes on the host machine I see strings "DSs" coming through. Completely unclear what if anything this means..

I have seen reports on the web that "serial ports in VirtualPC are difficult" - whatever that means. :x . An implication I think that when reading/writing we might need to watch for certain conditions or some such. Given that the userland kernel driver seems to function much better, I might start looking there to see if there is something better we can do.

hto
Developer
Posts: 2193
Joined: Sun Oct 01, 2006 3:43 pm

Post by hto »

ericy wrote: As far as the kernel is concerned (and debugger interactions with the kernel), there appears to be a completely independent COM port implementation in drivers\base\kdcom, and these have the COM port addresses hardcoded to the appropriate values, and from this I would conclude that reversal is unlikely.
Com port is not hardcoded. /DEBUGPORT=COM2 works, at least in other emulators.
I have seen reports on the web that "serial ports in VirtualPC are difficult" - whatever that means.
There is a bug report in Bugzilla, so the reporter somehow managed to get debug log.

ericy
Posts: 11
Joined: Mon Jun 22, 2009 8:38 pm

Re: Virtual PC with ReactOS 0.3.8 : ok

Post by ericy »

What I meant by hardcoded is that the addresses of COM1, COM2, etc is hardcoded in kdcom. It doesn't seem to use the information that it gets via PNP in the normal serial mode driver that a userland program would call through.

josilva23
Posts: 6
Joined: Wed Jul 15, 2009 4:29 pm

Re: Virtual PC with ReactOS 0.3.8 : ok

Post by josilva23 »

But is there any solution to the ReactOS go back to work on VPC ? :?:

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 6 guests