Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!nrl-cmf!cmcl2!brl-adm!umd5!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!uiucdcs!meccts!viper!dave From: dave@viper.Lynx.MN.Org (David Messer) Newsgroups: comp.unix.microport Subject: Re: Physical memory Message-ID: <643@viper.Lynx.MN.Org> Date: 23 Feb 88 19:28:55 GMT References: <122@ucrmath.UUCP> Reply-To: dave@viper.UUCP (David Messer) Organization: Lynx Data Systems, Eagan, MN Lines: 33 In article <122@ucrmath.UUCP> jantypas@soft21.UUCP (John Antypas) writes: >Anyone know how to get hold of physical memory in a driver? (I/O >physical memory NOT created by a kernel malloc().) > >John Antypas -- Soft21 --21st Century Software: > >UUCP: {garp, killer, pyramid, reed, sdcsvax!ucsd!ucrmath}!soft21!jantypas >Internet: jantypas%soft21.UUCP@{eddie.MIT.EDU, ucsd.UCSD.EDU} Yes, there are four routines included in the libraries to do this. They are described in linkkit/doc/link.doc. Here is there discription from that file: fpbyte (long physical address) fpword (long physical address) Get byte or word at physical address. Don't return anything. If there is no hardware at given address, behavior is unpredictable; garbage is usually returned. spbyte (long physical address, char data) spword (long physical address, int data) Set byte or word at physical address to data. It is very important to read link.doc before writing any kernal code, you will probably not be succesful otherwise. -- If you can't convince | David Messer - (dave@Lynx.MN.Org) them, confuse them. | Lynx Data Systems -- Harry S. Truman | | amdahl --!meccts!viper!dave | rutgers / Copyright 1987 David Messer -- All Rights Reserved This work may be freely copied. Any restrictions on redistribution of this work are prohibited.