<font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2"> <span>Hi, Adriana, <br><br>In OPAL, the code related to boot options is in petitboot/discover/platform-powerpc.c. I posted it here. <br><br>You could see the OPAL only cares about the following things now:<br>1) "boot flags valid" in "boot flags" (bit 7 in boot flags' data 1)<br>2) "options persistent" in </span><span><span>"boot flags" (bit 6 in boot flags' data 1)<br>3) "boot device selector" in "boot flags" (bit 2-bit 5 in boot flags' data 2) <br><br>Maybe we could define these three properties first. <br><br><b>Jeremy,</b> If I am wrong, please kindly point it out. Thanks!<br><br></span>static int get_ipmi_bootdev_ipmi(struct platform_powerpc *platform,<br> uint8_t *bootdev, bool *persistent)<br>{<br> uint16_t resp_len;<br> uint8_t resp[8];<br> int rc;<br> uint8_t req[] = {<br> 0x05, /* parameter selector: boot flags */<br> 0x00, /* no set selector */<br> 0x00, /* no block selector */<br> };<br><br> resp_len = sizeof(resp);<br> rc = ipmi_transaction(platform->ipmi, IPMI_NETFN_CHASSIS,<br> IPMI_CMD_CHASSIS_GET_SYSTEM_BOOT_OPTIONS,<br> req, sizeof(req),<br> resp, &resp_len,<br> ipmi_timeout);<br> if (rc) {<br> pb_log("platform: error reading IPMI boot options\n");<br> return -1;<br> }<br><br> if (resp_len != sizeof(resp)) {<br> pb_log("platform: unexpected length (%d) in "<br> "boot options response\n", resp_len);<br> return -1;<br> }<br><br> if (resp[0] != 0) {<br> pb_log("platform: non-zero completion code %d from IPMI req\n",<br> resp[0]);<br> return -1;<br> }<br><br> /* check for correct parameter version */<br> if ((resp[1] & 0xf) != 0x1) {<br> pb_log("platform: unexpected version (0x%x) in "<br> "boot options response\n", resp[0]);<br> return -1;<br> }<br><br> /* check for valid paramters */<br> if (resp[2] & 0x80) {<br> pb_debug("platform: boot options are invalid/locked\n");<br> return -1;<br> }<br><br> *persistent = false;<br><br> <font color="#0000ff"> /* check for valid flags */<br> if (!(resp[3] & 0x80)) {<br> pb_debug("platform: boot flags are invalid, ignoring\n");<br> return 0;<br> }<br><br> *persistent = resp[3] & 0x40;<br> *bootdev = (resp[4] >> 2) & 0x0f;</font><br> return 0;<br>}<br><br>Regards,<br><br>——————<br>Dr. Jiang Yu (余江) PMP®<br>OpenPower Application Engineer<br>IBM GCG Systems & Technology Group Lab<br><br>Tel: (86-21)6092-2872<br>T/L: 11-90-22872<br>Fax: 86-21-60922200<br>E-Mail: <a href="mailto:jiangyu@cn.ibm.com">jiangyu@cn.ibm.com</a></span></font><BR>