home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / sun / admin / 4871 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  2.6 KB

  1. Xref: sparky comp.sys.sun.admin:4871 comp.sys.sun.hardware:3480
  2. Path: sparky!uunet!sun-barr!news2me.ebay.sun.com!exodus.Eng.Sun.COM!appserv.Eng.Sun.COM!ouroborous.Eng.Sun.COM!limes
  3. From: limes@ouroborous.Eng.Sun.COM (Greg Limes)
  4. Newsgroups: comp.sys.sun.admin,comp.sys.sun.hardware
  5. Subject: Re: Patch to run MP kernel in uniprocessor mode
  6. Date: 22 Jul 1992 17:28:30 GMT
  7. Organization: Sun Microsystems, Inc.
  8. Lines: 53
  9. Message-ID: <l6r6luINN8ct@appserv.Eng.Sun.COM>
  10. References: <1992Jul17.153114.19054@uc.msc.edu> <l6hhbhINNmga@appserv.Eng.Sun.COM> <1992Jul21.015742.19793@uc.msc.edu>
  11. NNTP-Posting-Host: ouroborous
  12.  
  13. I wrote:
  14. | Effectively, you are just changing a test of a bit in boothowto
  15. | so that it comes up true ... the bits in this variable are
  16. | defined in /usr/include/sys/reboot.h, and if you patch
  17. | boothowto to turn on a bit or two, we don't turn them off. So,
  18. | wouldn't it be easier to read <sys/reboot.h>, decide which
  19. | options to turn on, and patch the value of boothowto?
  20.  
  21. In article <1992Jul21.015742.19793@uc.msc.edu> alan@af.msc.edu (Alan Klietz) writes:
  22. | Because, as with most other sites, we DO NOT HAVE SOURCE.
  23.  
  24. /usr/include/sys/reboot.h should exist on your machine. It exists
  25. here on my machines, where I have also not installed source. You
  26. might need to have installed the "Sys" files, but you should have
  27. installed those somewhere at one time so you could configure kernels.
  28.  
  29. | Boothowto is set at runtime by the PROM code.
  30.  
  31. The prom code provides a list of option characters to the kernel, which
  32. then sets any corresponding bits in boothowto.
  33.  
  34. | It cannot be changed by simply overwriting the BSS value.
  35.  
  36. Try harder :-). For instance, one can force the "-sw" flag set, which
  37. is in fact used in the miniroot. First, check reboot.h, and you find
  38. that you probably want RB_SINGLE and RB_WRITABLE; adding up the hex
  39. constants gives 0x102.
  40.  
  41.     # adb -w /vmunix
  42.     boothowto?W 0x102
  43.     $q
  44.     # reboot
  45.  
  46.     <<surprise, we boot singleuser with root mounted writable!>>
  47.  
  48. If you decide, upon reading reboot.h, that you want to fiddle
  49. around with other bits ... well, I can't guarantee that anything
  50. like this that is *not* in the manual will always work, but you
  51. probably would be interested in RB_UNIPROCESSOR.
  52.  
  53. Or, you could continue your disassembly from the place where
  54. you patched the code, and note that what you changed had the
  55. effect of causing the startup code to set the "uniprocessor"
  56. variable, and you could sidestep the whole boothowto issue:
  57.  
  58.     # adb -w /vmunix
  59.     uniprocessor?W 1
  60.     $q
  61.     # reboot
  62.  
  63. This is not, in fact, a defined and supported interface, so it
  64. may go away ... but if it does, the fact that it has gone
  65. away should be relatively obvious.
  66.