🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #9660

Having your cake (Re: Address Space on the Amiga (was Re: Need info on exceptions))

#9660
From: Peter da Silva
Date: Thu, 01 Sep 1988 01:47
30 lines
1841 bytes
This started out as a response to a message about message passing, and
I think it's worth kicking around for a while:

Here's my solution.

	(a) MMAP the same for kernel and user processes.
	(b) Drivers, etc... run at TRANSFER privilege (== kernel or supervisor)
	(c) MEMF_PRIVATE is write-protected. MEMF_PUBLIC isn't.
	(d) There is a system call to raise you to TRANSFER privilege.

First thing to note... drivers already do a copy in the Amiga because (1)
the system calls don't require block alignment, and (2) the driver uses the
blitter to generate and decode MFM, so data outside MEMF_CHIP has to be copied
anyway.

If you want another program to get at your data, you make it MEMF_PUBLIC.
Otherwise, it's MEMF_PRIVATE. Drivers can get to MEMF_PRIVATE, but only
because there are programs out there that pass statically allocated data
to drivers. New programs won't do this, we hope.

There's no extra danger for (d)... after all, programs can already inhibit
context switching and even interrupts. Make Disable() and Enable() do this
automatically, so:

You can have some global flag in preferences that determines whether copper
lists etc. are secure or not. If Disable() and Enable() move you into and
out of TRANSFER priority, then this should not be necessary for most programs.
-- 
		Peter da Silva  `-_-'  peter@sugar.uu.net
		 Have you hugged  U  your wolf today?
Technical Details
Message-ID: <2582@sugar.uu.net>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!super!udel!rochester!rutgers!bellcore!tness7!tness1!sugar!peter
References: <8808311759.AA19249@cory.Berkeley.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!super!udel!rochester!rutgers!bellcore!tness7!tness1!sugar!peter
From: peter@sugar.uu.net (Peter da Silva)
Newsgroups: comp.sys.amiga.tech
Subject: Having your cake (Re: Address Space on the Amiga (was Re: Need info on exceptions))
Message-ID: <2582@sugar.uu.net>
Date: 1 Sep 88 01:47:18 GMT
References: <8808311759.AA19249@cory.Berkeley.EDU>
Organization: Sugar Land Unix - Houston, TX
Lines: 30