home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / mac / programm / 18762 < prev    next >
Encoding:
Text File  |  1992-11-21  |  2.2 KB  |  48 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!spool.mu.edu!umn.edu!csus.edu!netcom.com!wysocki
  3. From: wysocki@netcom.com (Chris Wysocki)
  4. Subject: Re: SwapMMUMode() breaks INIT
  5. Message-ID: <1992Nov22.043703.6046@netcom.com>
  6. Keywords: INIT, memory, OSUtils
  7. Organization: Connectix Corporation, San Mateo, CA
  8. References: <1992Nov21.145938.18889@ll.mit.edu>
  9. Date: Sun, 22 Nov 1992 04:37:03 GMT
  10. Lines: 36
  11.  
  12. In article <1992Nov21.145938.18889@ll.mit.edu> wolfson@ll.mit.edu (Harry
  13. Wolfson) writes:
  14.  
  15. >I am trying to write a pair of short INIT's that will
  16. >set the memory addressing mode to 24 or 32 bits on
  17. >startup. 
  18. >...
  19. >My code is very short and straight forward and *very*
  20. >ineffective. I fix the pc as instructed in Tech note
  21. >#228. Then call SwapMMUMode( &mode), with mode = 1 
  22. >or 0 (32 or 24 bit respectively). And that's all.
  23. >...
  24. >Is it impossible to set the mode during startup? Why?
  25.  
  26. SwapMMUMode doesn't and can't change the mode (24/32-bit) of the Memory
  27. Manager; it only changes the way the hardware (the MMU, specifically)
  28. interprets memory addresses.  SwapMMUMode is only intended to allow you to
  29. access RAM on NuBus video cards and do other similarly esoteric things.
  30. Changing the mode of the Memory Manager at startup is quite difficult to
  31. do, since the entire system (Memory Manager, Slot Manager, etc. etc.) has
  32. already been initialized (at least preliminarily) by the time anything is
  33. read from the startup disk.  Unless you're willing to put a *lot* of time
  34. into this project, about the best you can expect to do is to have your
  35. INIT toggle the appropriate location in extended parameter RAM that
  36. controls the mode of the Memory Manager, then do a warm restart to
  37. reinitialize the system in the appropriate mode.  I don't remember the
  38. exact location of the 24/32-bit mode flag in PRAM, but you should be able
  39. to find it by peeking at the System 7 Memory control panel.
  40.  
  41. Chris.
  42. -- 
  43. ------------------------------------------------------------------------------
  44. Chris Wysocki                                     Internet: wysocki@netcom.com
  45. Software Engineer                                   America Online: AFA ChrisW
  46. Connectix Corporation                                   CompuServe: 72010,1140
  47.  
  48.