home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.os2.programmer
- Path: sparky!uunet!spool.mu.edu!caen!batcomputer!lynx@msc.cornell.edu!tommy
- From: tommy@lynx.msc.cornell.edu.UUCP (Mike Thompson,332,54714,2734927)
- Subject: Re: Memory access
- Message-ID: <1993Jan28.222022.4702@msc.cornell.edu>
- Originator: tommy@snoopy.msc.cornell.edu
- Sender: news@msc.cornell.edu
- Organization: Cornell-Materials-Science-Center
- References: <13903@icarus>
- Date: Thu, 28 Jan 1993 22:20:22 GMT
- Lines: 37
-
- From article <13903@icarus>, by rickr@Semi.Mitel.COM (Rick Reitmaier):
- > In article <C0z6r0.KGK@bunyip.cc.uq.oz.au> walker@s1.elec.uq.oz.au (Steven Walker) writes:
- >>I have to write code that accesses memory mapped dual port RAM
- >>on a board connected to an AT bus. Any suggestions on how to do
- >>this in OS/2?
- >>Do I need a device driver to allocate and lock the physical memory?
- >>Or can I use IOPL levels to access it directly?
- >>Thanks for any tips,
-
- Well, this is your lucky day. A month ago, I asked a similar question and
- received enough information to write a generic device driver that I call
- labhelp.sys. You add it to your config.sys, and it implements a device
- that lets any Ring 3 program access any physical block of memory,
- unprotected.
-
- This is clearly a form of unsafe sex. It bypasses all OS/2 memory
- protection and grants ANY protected mode application access to ANY
- physical block of memory. I am using it currently for accessing memory
- mapped A/D converters, and a memory mapped frame buffer.
-
- The driver has been used under both CSET/2 programming and MSC 6.0.
-
- I will make it available for anonymous FTP from 128.84.249.11
- (lore.msc.cornell.edu). Feel free to modify or use as you desire.
- (I will make a LABHELP.ZIP file and hang it there tonight.)
-
- > I don't know if or how it will work, but I would caution against building
- > a device driver, as it's a grueling example of how evil an operating system
- > can be to a programer.
-
- But elegant once it is done! In the end, it was quite simple. Most of the
- intelligence was put in the user shell running protected.
- --
- Michael O. Thompson tommy@msc.cornell.edu
- Cornell University (607) 255-4714
-
- OS/2: For the few, the proud, the devoted!
-