Right, exactly, thats what I am trying to achieve.
I have a emulation driver ready that creates virtual parallel port visible to guest on the VM. Now I need to transfer data from the emulation driver to the actual physical port which I do through my kernel port driver (This driver writes to the parallel port via parport.sy “abstraction”).
Now we also have he provision so as to enable guest access status and control register … (This is what I want to achieve).
Thanks
Anshul Makkar
www.justkernel.com
From: m
To: Windows System Software Devs Interest List
Sent: Wednesday, 29 February 2012 8:44 PM
Subject: Re:[ntdev] Access control , data and status register of parallel port
What you need to do is to emulate a port rather than hijacking a port on
the physical machine. The data that you read out of this virtual port can
then be redirected to the physical parallel port (if one exists in the machine)
or to some other device or stream. This eliminates the problems you have
with direct hardware access of a device you don’t own (and may not exist) and
also allows you to arbitrate between multiple guests who gets access to what and
when. The limitation of this design is that the virtual environment can’t
directly access the hardware, but then that is usually one of the main features
of virtual environments in the first place.
“anshul makkar” wrote in message
news:xxxxx@ntdev…
Sorry , if I was not able to comprehend the mail
properly.
Yes, exactly I need to present the parallel port to virtual
environment so that guest can direct access it.
Please suggest some ways of providing this ability…
What I was thinking off is write a kernel mode driver that can gain
exclusive access to parallel port data register and also to control and status
register. That’s why I was looking for some way of (“getting access” was wrongly
interpreted) “presenting parallel port” (control , status and data registers) to
virtual environment.(using abstraction) .
Please let me know if you want any other
information…
Thanks
Anshul Makkar
www.justkernel.com
From: m
To: Windows System Software Devs Interest
List
Sent: Wednesday, 29 February 2012 7:09
PM
Subject: Re:[ntdev] Access
control , data and status register of parallel port
The point Tim & Joe are trying to make is that you don’t need access to
them. What you need is some way to present a parallel port to a virtual
environment that runs in Windows.
Depending on what that virtual environment consists of, there are several
ways to provide that ability, but no one other than you knows what is possible
in your environment unless you tell us more
“anshul makkar” wrote in message
news:xxxxx@ntdev…
Joe, I totally agree with you … I need to stick to
abstraction…
But that’s what I am wondering and trying to find an answer to - How
to access status and control register using abstraction… I need to access them
, does abstraction provides any means (functions or IOCTLs) which can give me
access to these registers.
Thanks
Anshul Makkar
www.justkernel.com
From: “xxxxx@flounder.com”
To: Windows System Software Devs Interest
List
Sent: Wednesday, 29 February 2012 11:40
AM
Subject: Re: [ntdev] Access
control , data and status register of parallel port
The
presumption that the bits in the registers have some meaning
is
unfounded. I might have a built-in parallel port on some old
legacy
board, or I might have a PCI-based adapter which doesn’t have I/O
ports at
all (just memory-mapped registers). The drivers worry about
this, and
anything above the lowest-level driver has NO IDEA what the
implementation
is. As Time says, that’s what we mean by
“abstraction”.
If you go for the raw ports, it means you will develop a
driver that is
known to work on exactly one machine in the known universe:
yours. If you
expect it to work on any other machine, stick with the
abstractions.
joe
> Anshul
Makkar wrote:
>> Tim, thanks for the reply… Sorry, but i couldn’t
understand completly.
>> I have used IOCTLS directed towards
parport.sys to access the parallel
>> port and get parallel port and
pnp information.
>> But i couldn’t find any IOCTL to change the bits of
control, status or
>> data register.
>> Request you too please
suggest.
>
> What bits do you want to control? You
have
> IOCTL_INTERNAL_PARALLEL_SET_CHIP_MODE to select EPP and ECP
modes. To
> write data, you use an IRP_MJ_WRITE request. To
read data, you use an
> IRP_MJ_READ request. You aren’t supposed to
worry about the specific
> bits in the control and status registers.
That’s handled internally by
> parport.sys. That’s what it means to
have an abstraction – parport.sys
> worries about the bit-level
details. You worry about the task you need
> to do.
>
>
You haven’t really shared with us what, exactly, you are trying to do.
>
What are you controlling here? If you’re just trying to stream data
in
> and out, the abstraction will do what you need. If you need
more direct
> control, then you need to toss out parport.sys and do your
own thing.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza &
Boekelheide, Inc.
>
>
> —
> NTDEV is sponsored by
OSR
>
> For our schedule of WDF, WDM, debugging and other seminars
visit:
> http://www.osr.com/seminars
>
> To unsubscribe,
visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
—
NTDEV
is sponsored by OSR
For our schedule of WDF, WDM, debugging and other
seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the
List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging
and other seminars visit:
http://www.osr.com/seminars
To
unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer