Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!caen!mondo.engin.umich.edu!davids From: davids@mondo.engin.umich.edu (David Snearline) Newsgroups: comp.sys.mac.programmer Subject: Re: System 7.0/Supervisor Mode ? Message-ID: <1991May12.030640.6368@engin.umich.edu> Date: 12 May 91 03:06:40 GMT References: <1991May10.175654.812@eng.umd.edu> <13455@goofy.Apple.COM> <9432@idunno.Princeton.EDU> Sender: davids@mondo.engin.umich.edu (David Snearline) Distribution: na Organization: University of Michigan Engineering Lines: 37 Regarding Brian Kendig's questions regarding the difference between the user and supervisor modes on the Macintosh: The user and supervisor modes are internal to the MC68000 series, and are determined by a bit within the status register (SR). The operating mode has two fundamental effects. First of all, in the user mode, some of the "privileged" commands may not be executed -- they cause a privilege exception. Example of these commands are RESET, MOVE SR, and MOVES. The second effect, which for multiuser systems is probably the most important, is that the privilege bit affects how the processor classfies a data reference. There are three lines (FC0-FC2) which classify the type of data reference being made by the processor. Computer designers can then use these line to block access to certain memory address areas based on whether or not the process is in "supervisor mode". Generally, only the OS or a multiuser system will be operating in supervisor mode, and thus hardware may allow it to have unrestricted memory access. The Mac toolbox will always execute in supervisor state, because exception processing (ie. traps) will always force supervisor mode. Also, I don't believe Macs without a PMMU use the FC lines. "User mode" by itself will do nothing to avoid crashes -- it's only if the hardware is set up to utilize the FC lines to block memory write violations that anything is gained. Thus, writing an INIT to force "user mode" on old Macs would not do anything useful. Further, you would also have to re-write _Launch so that it cleared the S bit before executing a new program. The MC680X0 handbooks have a good description of how the supervisor mode works if you are interested. By the way, does anyone know to what extent the new Macs utilize FC0-FC2? --- Dave --- -- David Snearline CAEN Network Operations University of Michigan Engineering