VxD->Ring3->Ring0 Communication

VDMAD:
   How do I make it appear to my ring3 app from my VxD that terminal count has occured using VDMAD vxd services when the DMA is in SCD mode?   TC Bit must be set and count must equal 0xffff (most important is the TC bit)...
    -- Aaron
LVL 2
amartin030297Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

amartin030297Author Commented:
Edited text of question
0
amartin030297Author Commented:
Edited text of question
0
amartin030297Author Commented:
Additionally, is it SAFE to issue and wait on an APC from within the IO Handler (just comment on this one, please)... As I have noticed SoftIce mouse-movement causes an exception occasionally after I hook/unhook any port..
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

doncCommented:
This answer is Win95 specific, and is not guaranteed to work in any future version of the OS.  Also, it is not polite, and if everyone starts doing this it might mess up the world.

Make sure your ring 3 code will not cause a page fault  (This may be optional, I haven't tested to see what will happen if your ring 3 stuff is paged out.)

Make sure your ring 3 code is loaded in the common address space (above 2GB), so it doesn't matter what process is active at the time of the interrupt.

Make sure your ring 3 code is self contained, doesn't call into any other code.

Just call directly into your ring 3 code.  It works fine, I've been doing this for years :-)
0
amartin030297Author Commented:
While that may work for specific cases, there by copying the ring-3 code into ring-0, you do not run at user level, rather at kernel level...thus many (most) win32 functions will not work.

  Good ideas, but its not a solution for my problem..
     -- Aaron
0
amartin030297Author Commented:

****************************************************
I've since figured out how to do this... disregard this question please..
                   Thanks!
****************************************************


0
amartin030297Author Commented:
Edited text of question
0
amartin030297Author Commented:
##############################

Okay,
   I changed the question entirely!! Anyone know the answer
to this one???

##############################
0
APWeirCommented:
If you have virtualized the channel using the VDMAD_Virtualize_Channel call, you can apply the VDMAD_Set_Virt_State call, using the previously acquired DMA handle and the handle of the VM in which the APP is running, to set the count and physical address. If the Count specified is 0xffff, the VDMAD will virtualize the TC status bit  to the VM until the count changes.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
amartin030297Author Commented:
I have tried (and just did again to verify)... Setting
the VirtualState of the dma channel to 0xffff yields
a value (when read from the vm) of 0xfffe, and NO TC BIT
(port 8) set.
Additonally, setting 0x10000 yields 0xffff in the vm, but
still no TC.
        -- Aaron

0
APWeirCommented:
Aaron,

It seems to me based on your last comment that setting the count in the virtual state to 0x0000 would yield the desired result.

0
amartin030297Author Commented:
No, setting a count of 0x0000 will yield a value of 1 in the
controller... a legal value, and is not a terminal count.
  -- Aaron

0
amartin030297Author Commented:
hmm... maybe 0 will give 0xffff... I may be wrong..lemme check

0
amartin030297Author Commented:
I have done testing around all the "Edges"... and
the TC bit (port 0x8) is NEVER set by VDMAD.  Unless
I'm missing something, you are not correct.

0
APWeirCommented:
I have done a lot of investigation regarding this issue (for other reasons) and it has become clear to me that the VDMAD was never intended to fully virtualize a channel (e.g., virtualize DMA to a VM for a PCI audio card). The VDMAD assumes that the channel is physically driven by DRQs on the ISA bus. When a channel is unmasked, it polls the physical controller for a TC - it will never reflect TC to the VM unless it sees one physically. The VPICD has a similar virtualization flaw when there is no physical IRQ. Try virtualizing and IRQ to a VM using VCPICD_Set_Int_Request. If the VM has the IRQ masked, it cannot detect the IRQ assertion by reading the IRR.
0
amartin030297Author Commented:
You might as well take the points..... as I think all the
investigation in the world will yield identical results
as yours and mine..
  -- Aaron
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.