[comp.sys.amiga.hardware] MMU games with Motorola chips

mrush@csuchico.edu (Matt "C P." Rush) (09/15/90)

	(OK, this is not DIRECTLY Amiga oriented, but....)

	I have a question about an MMU on a 680x0 based computer:

	On a system with Memory Mapped I/O, is it possible to set up the
MMU so that USER programs can have ALL addresses go to RAM, yet have the OS
still be able to access the magic I/O address?  (sort of make ALL I/O through
OS calls, and give the USER a completely RAM address space; regardless of
whether or not this is PRACTICAL :-)

	On a more Amiga-oriented note:  There's been talk that we may get
Virtual Memory in later versions of the OS; will it be possible to have
Virtual CHIP Memory?

	And finally, how do all you ENGINEER-types (like Dave H.) manage to
design NEW hardware, AND keep up on everybody ELSES (Intel, IBM, Apple, etc.)
new hardware AT THE SAME TIME???

	-- Matt

    *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
    %    "Progress is an up-hill battle       %  mrush@csuchico.edu      %
    %    against backwards compatibility."    %  mrush@cscihp.UUCP       %
    %              -- me                                                 %
    %                              Now:  mrush@cscihp.ecst.csuchico.edu  %
    *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
     This is a SCHOOL!  Do you think they even CARE about MY opinions?!

al158305@mtecv2.mty.itesm.mx (Gustavo Cordova Avila) (09/15/90)

mrush@csuchico.edu (Matt "C P." Rush) writes:


>	On a more Amiga-oriented note:  There's been talk that we may get
>Virtual Memory in later versions of the OS; will it be possible to have
>Virtual CHIP Memory?

   I really don't think so, the principal behind virtual mem is that
when the cpu tries to execute or access any memory that isn't actually
in the main core (er, memory) at the moment, the mmu generates an
exception that is trapped by the OS, which re-loads the stuff from 
disk. Now, I do think that video access is MUCH too fast to be able 
to be swapped in and out from memory/disk, don't you think? :)

Gustavo Cordova
sig: REAL computers have keyboard garages! :)

daveh@cbmvax.commodore.com (Dave Haynie) (09/18/90)

In article <1990Sep14.185419.28320@ecst.csuchico.edu> mrush@csuchico.edu writes:

>	I have a question about an MMU on a 680x0 based computer:

>	On a system with Memory Mapped I/O, is it possible to set up the
>MMU so that USER programs can have ALL addresses go to RAM, yet have the OS
>still be able to access the magic I/O address?  (sort of make ALL I/O through
>OS calls, and give the USER a completely RAM address space; regardless of
>whether or not this is PRACTICAL :-)

Well, you really wouldn't want non-RAM accesses to go to RAM.  However, the
68030/68851 MMU gives you the option of having either unified or separate
tables for each kind of memory space (the important ones being User Data,
User Instruction, Supervisor Data, and Supervisor Instruction).  So, for 
example, it would be simple to allow only Supervisor Data space accesses to
talk to I/O locations.  Of course, you would have to modify the Amiga OS
somewhat to do that -- lots of I/O is currently done in user space.  But I'm
sure things like UNIX already behave this way on Amiga hardware.

>	On a more Amiga-oriented note:  There's been talk that we may get
>Virtual Memory in later versions of the OS; will it be possible to have
>Virtual CHIP Memory?

Virtual chip memory can't be done.  Virtual memory is possible as long as you
have control over that virtual memory exclusively by one CPU.  That's because
only the 68030, for instance, see it's virtual addresses -- everything else
in the system sees physical addresses.  As Chip memory is addressed by both
68030 and Agnus, you have two problems.  First of all, Agnus has no way to 
detect or generate a page fault, and secondly, no way to speak in terms of
the 68030's virtual addresses.

>	And finally, how do all you ENGINEER-types (like Dave H.) manage to
>design NEW hardware, AND keep up on everybody ELSES (Intel, IBM, Apple, etc.)
>new hardware AT THE SAME TIME???

We don't sleep much.  And we never rest.

>	-- Matt
-- 
Dave Haynie Commodore-Amiga (Amiga 3000) "The Crew That Never Rests"
   {uunet|pyramid|rutgers}!cbmvax!daveh      PLINK: hazy     BIX: hazy
      Get that coffee outta my face, put a Margarita in its place!

valentin@cbmvax.commodore.com (Valentin Pepelea) (09/22/90)

In article <1990Sep14.185419.28320@ecst.csuchico.edu> mrush@csuchico.edu writes:
>
>	I have a question about an MMU on a 680x0 based computer:
>
>	On a system with Memory Mapped I/O, is it possible to set up the
> MMU so that USER programs can have ALL addresses go to RAM, yet have the OS
> still be able to access the magic I/O address?  (sort of make ALL I/O through
> OS calls, and give the USER a completely RAM address space; regardless of
> whether or not this is PRACTICAL :-)

Yes, it is possible to do that. The virtual address space on the 68000 is
not just a huge 4 Gigabyte plane. While indeed the processor is limited to
access 4 Gigabytes of physical memory, virtual memory is divided into seven
address spaces. Four of them are

	- user data space (001)
	- user program space (010)
	- supervisor data space (101)
	- supervisor program space (110)

A separate translation table can be made for each of these cases. Therefore
when CPU is in supervisor mode, the supervisor mode translation table will
be used.

But this strategy would not work on the Amiga, where I/O space is often
accessed from user mode.

>	On a more Amiga-oriented note:  There's been talk that we may get
> Virtual Memory in later versions of the OS; will it be possible to have
> Virtual CHIP Memory?

Definitely not. The MMU resides between the CPU and external memory. The
graphic chip processors are part of the external world.

>	And finally, how do all you ENGINEER-types (like Dave H.) manage to
> design NEW hardware, AND keep up on everybody ELSES (Intel, IBM, Apple, etc.)
> new hardware AT THE SAME TIME???

Notice that there is only one Dave Haynie.

Valentin
-- 
The Goddess of democracy? "The tyrants     Name:    Valentin Pepelea
may distroy a statue,  but they cannot     Phone:   (215) 431-9327
kill a god."                               UseNet:  cbmvax!valentin@uunet.uu.net
             - Ancient Chinese Proverb     Claimer: I not Commodore spokesman be