Solved

VxD->Ring3->Ring0 Communication

Posted on 1997-03-02
16
373 Views
Last Modified: 2013-12-03
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
0
Comment
Question by:amartin030297
  • 12
  • 3
16 Comments
 
LVL 2

Author Comment

by:amartin030297
ID: 1299981
Edited text of question
0
 
LVL 2

Author Comment

by:amartin030297
ID: 1299982
Edited text of question
0
 
LVL 2

Author Comment

by:amartin030297
ID: 1299983
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
 
LVL 1

Expert Comment

by:donc
ID: 1299984
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
 
LVL 2

Author Comment

by:amartin030297
ID: 1299985
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
 
LVL 2

Author Comment

by:amartin030297
ID: 1299986

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


0
 
LVL 2

Author Comment

by:amartin030297
ID: 1299987
Edited text of question
0
 
LVL 2

Author Comment

by:amartin030297
ID: 1299988
##############################

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

##############################
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Accepted Solution

by:
APWeir earned 150 total points
ID: 1299989
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
 
LVL 2

Author Comment

by:amartin030297
ID: 1299990
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
 

Expert Comment

by:APWeir
ID: 1299991
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
 
LVL 2

Author Comment

by:amartin030297
ID: 1299992
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
 
LVL 2

Author Comment

by:amartin030297
ID: 1299993
hmm... maybe 0 will give 0xffff... I may be wrong..lemme check

0
 
LVL 2

Author Comment

by:amartin030297
ID: 1299994
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
 

Expert Comment

by:APWeir
ID: 1299995
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
 
LVL 2

Author Comment

by:amartin030297
ID: 1299996
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Mixed results 10 79
Messagebox for a Web Site Application 4 63
dialer.exe 4 57
How do ASP.NET and MVC work together? 4 25
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now