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