home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 4 / hacker04 / 04_HACK04.ISO / darwin / darwinx86.iso / usr / share / nvram / Mainstreet < prev    next >
Encoding:
Text File  |  2001-01-31  |  2.9 KB  |  104 lines

  1. ##
  2. # Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
  3. #
  4. # @APPLE_LICENSE_HEADER_START@
  5. # "Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
  6. # Reserved.  This file contains Original Code and/or Modifications of
  7. # Original Code as defined in and that are subject to the Apple Public
  8. # Source License Version 1.0 (the 'License').  You may not use this file
  9. # except in compliance with the License.  Please obtain a copy of the
  10. # License at http://www.apple.com/publicsource and read it before using
  11. # this file.
  12. # The Original Code and all software distributed under the License are
  13. # distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  14. # EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  15. # INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  16. # FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
  17. # License for the specific language governing rights and limitations
  18. # under the License."
  19. # @APPLE_LICENSE_HEADER_END@
  20. ##
  21. # Version: 1.2.1  Date: 1-30-2001
  22. use-nvramrc? true
  23. load-base 600000
  24. diag-device 
  25. nvramrc hex\
  26. : $D find-device ;\
  27. : $E device-end ;\
  28. : $L BLpatch ; : $R BRpatch ;\
  29. : $X execute ;\
  30. : $P 0 to my-self property ;\
  31. : &a " /chosen" $D $P $E ;\
  32. : &c " ata-enable" $call-parent ;\
  33. : helpb " backlight-on" _pmu-ihandle $call-method\
  34. 0 0 " "(70)" 40 " pmu-op" _pmu-ihandle $call-method drop ;\
  35. 10 buffer: km\
  36. devalias ide0 /pci/@10/ata0\
  37. devalias ide1 /pci/@10/@34/ata1\
  38. devalias ide4 /pci/@d/@34/ata4\
  39. dev /aliases\
  40. : $M delete-property ;\
  41. " ata-int" $M\
  42. " ata0" $M\
  43. " ata1" $M\
  44. " ata4" $M\
  45. dev kbd\
  46. get-key-map km swap move\
  47. $E\
  48. : ck 0 do swap dup 3 >> km + c@ 1 rot 7 and << and or loop ;\
  49. : bootr 0d word count encode-string " machargs" &a\
  50. 0 0 1 ck if 0 and else dup 1 = if 3d 0 1 else f 3d 0 2 then ck if 40 or then then\
  51. 40 and if bye else helpb 1e 0 do ['] boot catch drop 1f4 ms loop then bye ;\
  52. : myboot boot-command eval ;\
  53. dev enet\
  54. 62 ' READ 7 - c!\
  55. : READ { _p _n ; _a } begin _p _n bead -> _a _a 2+\
  56. if _p c@ 80 and 0= else 1 then until _a ;\
  57. $E\
  58. dev /packages/obp-tftp\
  59. : $M over + ['] noop $L ;\
  60. : $O ['] open + ;\
  61. : $M1 dup 24 - -1720 $O $X 6 move 14 + ;\
  62. -5BC $O ' $M1 $L\
  63. 0 $O E8 $M EC $M F0 $M F4 $M F8 + ' true $L\
  64. $E\
  65. dev /packages/mac-parts\
  66. : $M -7E86F0 $X 8000 alloc-mem 7F00 + 4 -7E86F0 $X ;\
  67. ' load 268 - ' $M $L\
  68. ' load 160 + ' 0 $L\
  69. dev ide0\
  70. : open use-ata-interface 0 &c -1 ;\
  71. : set-device-ID set-drive-select ;\
  72. $E\
  73. dev mac-io/@34\
  74. 1 value &f\
  75. : ata-enable &f if 1000 ms &c 1000 ms 0 to &f else drop then ;\
  76. $E\
  77. dev ide1\
  78. : open use-ata-interface 1 &c -1 ;\
  79. : set-device-ID set-drive-select ;\
  80. : reset-atapi-bus reset-ata-bus ;\
  81. $E\
  82. dev pci1/@d/@34\
  83. : ata-enable &c ;\
  84. $E\
  85. dev ide4\
  86. : open use-ata-interface 1 &c -1 ;\
  87. : set-device-ID set-drive-select ;\
  88. : reset-atapi-bus reset-ata-bus ;\
  89. $E\
  90. dev scsi\
  91. : $M ['] do-cmd + ;\
  92. : $M2 5 us -5f0 $M $X ;\
  93. : $M3 -710 $M f over $X $X ;\
  94. : $M4 1 ms ;\
  95. -1AC $M ' $M2 $L\
  96. 100 $M ' $M3 $L\
  97. 120 $M ' $M4 $L\
  98. 124 $M ' 1 $L\
  99. $E\
  100. unselect-dev
  101.