From: Eugene_Nechamkin@spectrumsignal.com Subject: Device Accessable Host Physical Memory Date: Tue, 02 Dec 1997 23:02:31 -0600 Message-ID: <881125049.29201@dejanews.com> Newsgroups: comp.os.ms-windows.programmer.nt.kernel-mode Organization: Deja News Posting Service Path: news.mitre.org!blanket.mitre.org!philabs!newsjunkie.ans.net!newsfeeds.ans.net!news-was.dfn.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-peer.sprintlink.net!news.sprintlink.net!Sprint!newsfeed.internetmci.com!204.238.120.130!jump.net!grunt.dejanews.com!not-for-mail X-Article-Creation-Date: Wed Dec 03 04:57:30 1997 GMT X-Authenticated-Sender: Eugene_Nechamkin@spectrumsignal.com X-Http-User-Agent: Mozilla/2.0 (compatible; MSIE 3.02; Windows 95) X-Originating-IP-Addr: 134.87.211.145 () Lines: 38 Hello everybody, I have to reserve a block of the HOST physical memory which would be accessable directly by the Device (PCI or ISA) from one side and by the User App. (my WinNT Kernel driver) from the HOST side. I realize that I have to reserve this block via either "HalAllocateCommonBuffer()" or via "MmAllocateContiguousMemory()". Currently I am using the following sequence: 0. DIOC with the "BufSize" 1.VirtAddr= MmAllocateContiguousMemory(BufSize) 2. PhysAddr=MmGetPhysicalAddress(VirtAddr) 3. Mdl=MmCreateMdl(VirtAddr) 4. MmBuildMdlForNonPagedPool(Mdl) 5.UserAppAddr=MmMapLockedPages(Mdl, UserMode) 6. Return from DIOC: (PhysAddr, UserAppAddr). It works OK: I can access this buffer from the User Applcation. Could somebody tell me whether this is OK to use this apprach for Direct BUS-Mastering (not the DMA!) from my PCI device (which has PLX-9060 on it)? Would this apprach work for bus-master DMA as well? or I shoud use another approach? Is there any difference in buffer allocating logic if the Device is ISA instead of PCI and the allocated M emory Buffer (4K) is used to setup the DPRAM physical address? Thank you all for all your suggestions and time. Eugene. -------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to Usenet