Path: utzoo!attcan!uunet!world!decwrl!sun-barr!newstop!sun!imagen!atari!apratt From: apratt@atari.UUCP (Allan Pratt) Newsgroups: comp.sys.atari.st Subject: Re: TT RAM Message-ID: <2304@atari.UUCP> Date: 19 Sep 90 00:21:46 GMT References: <3107@medusa.informatik.uni-erlangen.de> Organization: Atari Corp., Sunnyvale CA Lines: 56 csbrod@medusa.informatik.uni-erlangen.de (Claus Brod ) writes: >Is the TT's memory mapped by the MMU so that it appears >contiguous? No. There is no address translation going on in the MMU. If there were, every program that wrote an address into a chip (video, DMA, etc.) would have to be able to do the logical-to-physical translation. This is impractical, and would result in nearly 100% incompatibility with existing programs. The MMU is used, however, so don't mess with it. It's used to get around a bug in the 68030's design; I may explain in more detail later. >I need this info for my hard disk driver which has to >decide if some transfer is to be made into fast or slow RAM. Right you are. That's what the _FRB cookie is for. But you are looking at the problem in the wrong terms: rather than deciding what kind of RAM the transfer is destined for, your program should decide only what it has to: in this case, decide if it's being made to/from a place that the ACSI DMA chip can access. This prevents you from hard-coding the location or size of different pieces of RAM. This saves you from having to re-release your driver when somebody complained that he couldn't access VME RAM with it, because you didn't think of that. The ACSI DMA chip can access memory only in the low 24 bits of the address space, so that's your answer: you check the high byte of the transfer address. If it's zero, you can use ACSI directly. If it's not, you must use the FRB. You never examine any part of the address other than the high byte, and you only test that against zero. Minimizing the information you require in this way leads to maximum portability and future compatibility. As an aside to SCSI driver writers, you have less to worry about. As mentioned above, the definition of accessibility on the ACSI bus is "the high byte must be zero." The definition of accessibility on the SCSI bus is "the bus must be 32 bits wide." This means that A24/D16 VME memory is not accessible to SCSI, and you should use the buffer pointed to by the _FRB cookie. Finally, to defeat nit-pickers before they strike, I *know* that the ACSI DMA chip can't really talk to everything in the 24-bit ST address space: it can't see ROM, for example. But it *can* access any real RAM in that space, and if you're trying to DMA to something else (like the palette) you deserve what you get. >---------------------------------------------------------------------- >Claus Brod, Am Felsenkeller 2, Things. Take. Time. >D-8772 Marktheidenfeld, West Germany (Piet Hein) >csbrod@medusa.informatik.uni-erlangen.de >---------------------------------------------------------------------- ============================================ Opinions expressed above do not necessarily -- Allan Pratt, Atari Corp. reflect those of Atari Corp. or anyone else. ...ames!atari!apratt