Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Apr 1998 18:38:15 -0700
From:      Mike Smith <mike@smith.net.au>
To:        Bernie Doehner <bad@ece.WPI.EDU>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: Documentation of 2.2.5-RELEASE and 3.0 memory protection? 
Message-ID:  <199804120138.SAA00618@antipodes.cdrom.com>
In-Reply-To: Your message of "Sat, 11 Apr 1998 16:22:36 EDT." <Pine.OSF.3.96.980411161430.23739A-100000@taz.WPI.EDU> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Is there a document that describes the kernel memory protection/allocation 
> scheme used in 2.2.5-RELEASE and 3.0? 
> 
> I am especially interested in a list of io-space and io-memory ranges 
> which I am allowed to read/write from in user space without
> worrying about interfering/overlapping into the kernel's memory space.

Ah, I think you may have a slight misunderstanding here.

Normally, you can't execute *any* I/O instructions from user space, nor 
can you access memory in the ISA "hole".

Opening /dev/io sets the IOPL flag for your process, which allows 
unrestricted I/O access.  When doing this, you're effectively on your 
own - the kernel will definitely be upset if you attempt to use any of 
the "standard" peripheral components, as well as if you interfere with 
any peripheral that it believes it controls.

If you want to access memory on an expansion card in the ISA "hole", 
you need to memory-map it into your process.  You need a cooperative 
driver for this - syscons allows you to memory-map video memory, and 
AFAIR it's not too picky about the offset you specify.

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804120138.SAA00618>