[ros-dev] serial.sys
Alex Ionescu
ionucu at videotron.ca
Fri Aug 25 16:54:48 CEST 2006
Rick Parrish wrote:
> This email is directed mostly to Herve and anyone else familiar with
> SERIAL.SYS and how it works.
>
> Two years ago I implemented a small (5 kilobyte) WDM driver that
> "wrapped" SERIAL.SYS. It's an ugly hack that (almost) works. What I did
> was "hook" the interrupt service routine by directly modifying the IDT.
> It works most of the time but occassionally I get BSOD (and I don't know
> why).
>
> The driver installed ISR reads the MSR (modem status register) of the
> UART. The RDTSC instruction is used to generate a timestamp of when the
> MSR changed. Both pieces of data are stored in a FIFO - on every
> interrupt. A user mode program can later retrieve the information at
> regular time intervals.
>
> Hint: using the CTS, DCD, and DSR pins on a standard RS232 port, you can
> create a Poor Man's 3 Channel Logic Analyzer. Other applications include
> packet radio interface for amateur radio.
>
> What I'd like to do is merge the functionality directly into SERIAL.SYS
> (eg. work with the OS instead of around it). The extra functionality
> would be exposed through IOCTL or some other means but would not break
> ordinary serial COMM functionality.
>
> Disclaimer: I'm not a veteran author of kernel mode drivers.
>
> This is a relatively obscure application so if you want to reply
> off-list, that's perfectly fine by me.
>
> Here are my questions:
>
> 1. how robust is the current SERIAL.SYS driver (I see a few "FIXME"s in
> the comments) ?
> 2. does ReactOS support or require code-signing of drivers? (probably
> not yet)
> 3. Can I run the "Genuine" Reactos SERIAL.SYS on "Genuine" Windows
> 2K/XP? I think so (setting WFP aside). 4. is anyone in the ReactOS
> community interested in such a driver extension as described above?
> (probably not)
>
> Also, if anyone would like to see the logic analyzer program and related
> driver - please send me an email.
>
> Regards,
> Rick
>
> _______________________________________________
> Ros-dev mailing list
> Ros-dev at reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev
>
Besides what Hervé wrote, have a look at Microsoft's serial.sys driver
in the WDK/DDK sample source code. It's the working driver used in XP+,
and you can easily modify it to test your changes on it.
--
Best regards,
Alex Ionescu
Project Lead, TinyKRNL
Kernel-Mode Software Design Engineer, ReactOS
More information about the Ros-dev
mailing list