1 \ *****************************************************************************
2 \ * Copyright (c) 2004, 2008 IBM Corporation
3 \ * All rights reserved.
4 \ * This program and the accompanying materials
5 \ * are made available under the terms of the BSD License
6 \ * which accompanies this distribution, and is available at
7 \ * http://www.opensource.org/licenses/bsd-license.php
10 \ * IBM Corporation - initial implementation
11 \ ****************************************************************************/
13 4 CONSTANT vpd-bootlist-size
21 05 CONSTANT ISCSICRITICAL
23 07 CONSTANT NOTSPECIFIED
32 : check-bootlist ( -- true | false )
35 ( bootlist == 0 means that probably nothing from vpd has been received )
36 s" Boot list could not be read from VPD" log-string cr
37 s" Boot watchdog has been rearmed" log-string cr
43 ( bootlist all FFs means that the vpd has no useful information )
45 -6b boot-exception-handler
46 \ The next message is duplicate, but sent w. log-string
47 s" Boot list successfully read from VPD but no useful information received" log-string cr
48 s" Please specify the boot device in the management module" log-string cr
49 s" Specified Boot Sequence not valid" mm-log-warning
57 \ the following words are necessary for vpd-boot-import
61 \ select-install? is a flag which is used in the SMS panel #20
62 \ "Select/Install Boot Devices".
63 \ This panel can be used to temporarily override the boot device.
64 false VALUE select-install?
66 \ select/install-path stores string address and string length of the
67 \ device node chosen in the SMS panel #20 "Select/Install Boot Devices"
68 \ This device node is prepended to the boot path if select-install? is
70 CREATE select/install-path 2 cells allot
72 \ Import boot device list from VPD
73 \ If none, keep the existing list in NVRAM
74 \ This word can be used to overwrite read-bootlist if wanted
76 : vpd-boot-import ( -- )
80 select/install-path 2@ add-boot-device
85 4 0 DO vpd-bootlist i + c@
87 6 OF \ cr s" 2B Booting from Network" log-string cr
88 furnish-boot-file strdup add-boot-device
91 HDD0 OF \ cr s" 2B Booting from hdd0" log-string cr
92 s" disk hdd0" add-boot-device ENDOF
94 HDD1 OF \ cr s" 2B Booting from hdd1" log-string cr
95 s" hdd1" add-boot-device ENDOF
97 HDD2 OF \ cr s" 2B Booting from hdd2" log-string cr
98 s" hdd2" add-boot-device ENDOF
100 HDD3 OF \ cr s" 2B Booting from hdd3" log-string cr
101 s" hdd3" add-boot-device ENDOF
103 CDROM OF \ cr s" 2B Booting from CDROM" log-string cr
104 s" cdrom" add-boot-device ENDOF
106 HDD4 OF \ cr s" 2B Booting from hdd4" log-string cr
107 s" hdd4" add-boot-device ENDOF
109 F OF \ cr s" 2B Booting from SAS - w. Timeout" log-string cr
110 s" sas" add-boot-device ENDOF
112 SCSI OF \ cr s" 2B Booting from SAS - Continuous Retry" log-string cr
113 s" sas" add-boot-device ENDOF
120 \ Check for all no device -> use boot-device
121 vpd-bootlist l@ 07070707 = IF 0 ELSE -6b THEN
124 boot-exception-handler
127 : vpd-bootlist-restore-default ( -- )
128 NOTSPECIFIED vpd-bootlist 0 + c!
129 NOTSPECIFIED vpd-bootlist 1 + c!
130 NOTSPECIFIED vpd-bootlist 2 + c!
131 HDD0 vpd-bootlist 3 + c!