{"action":"created","issue":{"url":"https://api.github.com/repos/open-power/op-build/issues/470","repository_url":"https://api.github.com/repos/open-power/op-build","labels_url":"https://api.github.com/repos/open-power/op-build/issues/470/labels{/name}","comments_url":"https://api.github.com/repos/open-power/op-build/issues/470/comments","events_url":"https://api.github.com/repos/open-power/op-build/issues/470/events","html_url":"https://github.com/open-power/op-build/issues/470","id":153708627,"number":470,"title":"Switching from golden side pnor boot to primary side pnor boot is not happening for habanero machine.","user":{"login":"pridhiviraj","id":16423000,"avatar_url":"https://avatars.githubusercontent.com/u/16423000?v=3","gravatar_id":"","url":"https://api.github.com/users/pridhiviraj","html_url":"https://github.com/pridhiviraj","followers_url":"https://api.github.com/users/pridhiviraj/followers","following_url":"https://api.github.com/users/pridhiviraj/following{/other_user}","gists_url":"https://api.github.com/users/pridhiviraj/gists{/gist_id}","starred_url":"https://api.github.com/users/pridhiviraj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pridhiviraj/subscriptions","organizations_url":"https://api.github.com/users/pridhiviraj/orgs","repos_url":"https://api.github.com/users/pridhiviraj/repos","events_url":"https://api.github.com/users/pridhiviraj/events{/privacy}","received_events_url":"https://api.github.com/users/pridhiviraj/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"stewart-ibm","id":6668672,"avatar_url":"https://avatars.githubusercontent.com/u/6668672?v=3","gravatar_id":"","url":"https://api.github.com/users/stewart-ibm","html_url":"https://github.com/stewart-ibm","followers_url":"https://api.github.com/users/stewart-ibm/followers","following_url":"https://api.github.com/users/stewart-ibm/following{/other_user}","gists_url":"https://api.github.com/users/stewart-ibm/gists{/gist_id}","starred_url":"https://api.github.com/users/stewart-ibm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stewart-ibm/subscriptions","organizations_url":"https://api.github.com/users/stewart-ibm/orgs","repos_url":"https://api.github.com/users/stewart-ibm/repos","events_url":"https://api.github.com/users/stewart-ibm/events{/privacy}","received_events_url":"https://api.github.com/users/stewart-ibm/received_events","type":"User","site_admin":false},"assignees":[{"login":"stewart-ibm","id":6668672,"avatar_url":"https://avatars.githubusercontent.com/u/6668672?v=3","gravatar_id":"","url":"https://api.github.com/users/stewart-ibm","html_url":"https://github.com/stewart-ibm","followers_url":"https://api.github.com/users/stewart-ibm/followers","following_url":"https://api.github.com/users/stewart-ibm/following{/other_user}","gists_url":"https://api.github.com/users/stewart-ibm/gists{/gist_id}","starred_url":"https://api.github.com/users/stewart-ibm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stewart-ibm/subscriptions","organizations_url":"https://api.github.com/users/stewart-ibm/orgs","repos_url":"https://api.github.com/users/stewart-ibm/repos","events_url":"https://api.github.com/users/stewart-ibm/events{/privacy}","received_events_url":"https://api.github.com/users/stewart-ibm/received_events","type":"User","site_admin":false}],"milestone":null,"comments":9,"created_at":"2016-05-09T06:03:30Z","updated_at":"2016-11-03T02:24:42Z","closed_at":"2016-11-03T02:24:42Z","body":"Problem statement:\nInstall a habanero system with OpenPower Firmware, and do a golden side pnor boot. After further reboots system still booting always from golden side pnor firmware, and it is not booting from primary side pnor firmware.\n\nHow to Reproduce:\n1.Install a Habanero system with latest OpenPower Firmware.\n\nipmitool sensor list | grep -i \"boot count\"\nBoot Count | 0x0 | discrete | 0x0280| na | na | na | na | na | na\n\ninitially boot count =0x02\n\n  1.Do a Power ON followed by immediate power off(To make sure boot fail early)\n    check for boot count sensor value, it should be decremented by 1\n    ipmitool sensor list | grep -i \"boot count\"\n    Boot Count | 0x0 | discrete | 0x0180| na | na | na | na | na | na\n\n  2.Do a Power ON followed by immediate power off for 2nd time(To make sure boot fail early)\n    check for boot count sensor value, it should be decremented by 1\n    ipmitool sensor list | grep -i \"boot count\"\n    Boot Count | 0x0 | discrete | 0x0080| na | na | na | na | na | na\n\n  3.Do a Power ON Operation to boot the system from golden side PNOR(Because boot count =0x00)\n\nipmitool sensor list | grep -i golden\nBIOS Golden Side | 0x0 | discrete | 0x0180| na | na | na | na | na | na\n\nBMC Golden Side | 0x0 | discrete | 0x0080| na | na | na | na | na | na\n\ncd /sys/firmware/devicetree/base/xscom@3fc0000000000/isa@b0020/pnor@fc000000\nlsprop *-tocs\nactive-image-tocs\n02000000 03ff8000\nalternate-image-tocs\n00000000 01ff8000\ngolden-image-tocs\n02000000 03ff8000\nHere we can observe at this stage system booted from golden side\n1. Reboot the sytem again. reboot [ OK ] Started Show Plymouth Reboot Screen. [ OK ] Stopped Virtualization daemon. Stopping D-Bus System Message Bus...\n\nAfter completion of reboot check again system boot side still it is in golden side of pnor.\ncd /sys/firmware/devicetree/base/xscom@3fc0000000000/isa@b0020/pnor@fc000000\nlsprop *-tocs\nactive-image-tocs\n02000000 03ff8000\nalternate-image-tocs\n00000000 01ff8000\ngolden-image-tocs\n02000000 03ff8000\n\nipmitool sensor list | grep -i golden\nBIOS Golden Side | 0x0 | discrete | 0x0180| na | na | na | na | na | na\n\nBMC Golden Side | 0x0 | discrete | 0x0080| na | na | na | na | na | na\n\nFurther subsequent reboots also system is not booting from primary side of pnor, and it is always booting from golden side of pnor.\n\nHow to switch from golden side pnor to primary side pnor manually:\n\n   1.On BMC Busy box execute below command.\n    /etc/init.d/boot_into_primary\n\n   2.Do a ipmi hard power reset to boot the system into primary.\n    ipmitool power reset.\n\nFirmware levels:\nWhen system is in primary side:\nopen-power-habanero-6ec4e33\nbuildroot-d78ccc1\nskiboot-5.2.1\nhostboot-e189edd-9824b9f\nlinux-4.4.8-openpower1-bd9161a\npetitboot-v1.0.1-8f13d5f\nhabanero-xml-5a2a541-cb4e251\nocc-19a3ebc\nhostboot-binaries-7f593a3\ncapp-ucode-105cb8f\n\nWhen system is in golden side:\nProduct Name : OpenPOWER Firmware\nProduct Version : TN71-BP012-810.1611.20160406a\nProduct Extra : hostboot-bc98d0b-3f66050\nProduct Extra : occ-0362706-805fe5a\nProduct Extra : skiboot-5.1.13\nProduct Extra : hostboot-binaries-43d5a59\nProduct Extra : habanero-xml-5a2a541-228a675\nProduct Extra : capp-ucode-105cb8f\n"},"comment":{"url":"https://api.github.com/repos/open-power/op-build/issues/comments/258051973","html_url":"https://github.com/open-power/op-build/issues/470#issuecomment-258051973","issue_url":"https://api.github.com/repos/open-power/op-build/issues/470","id":258051973,"user":{"login":"stewart-ibm","id":6668672,"avatar_url":"https://avatars.githubusercontent.com/u/6668672?v=3","gravatar_id":"","url":"https://api.github.com/users/stewart-ibm","html_url":"https://github.com/stewart-ibm","followers_url":"https://api.github.com/users/stewart-ibm/followers","following_url":"https://api.github.com/users/stewart-ibm/following{/other_user}","gists_url":"https://api.github.com/users/stewart-ibm/gists{/gist_id}","starred_url":"https://api.github.com/users/stewart-ibm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stewart-ibm/subscriptions","organizations_url":"https://api.github.com/users/stewart-ibm/orgs","repos_url":"https://api.github.com/users/stewart-ibm/repos","events_url":"https://api.github.com/users/stewart-ibm/events{/privacy}","received_events_url":"https://api.github.com/users/stewart-ibm/received_events","type":"User","site_admin":false},"created_at":"2016-11-03T02:24:42Z","updated_at":"2016-11-03T02:24:42Z","body":"(copied from internal bug tracker here)\r\n\r\nAMI's response:\r\n\r\nJayesh,\r\n\r\nThis is the intended behavior, and working as designed. This is how it has been ever since it has been implemented in Habanero timeframe.\r\n\r\nThe reason is that, for the BMC, 'Boot Count' and the 'BIOS Golden Side' sensor is the tracker to identify which side of PNOR should be booted.\r\n\r\nHere, by doing a immediate power off after a power on, you are simulating the behavior as if host didn't complete booting. (If the host had booted, it would reset the Boot Count sensor back to 2).\r\n\r\nSo, after 2 attempts, when Boot Count sensor goes to 0, according to BMC's state-machine, it has attempted 2 boots to the Primary side, and BMC would try the Golden side of PNOR. That is why the Boot Count sensor is 0, and the BIOS Golden side sensor is 1. When the Golden side PNOR boots, it would reset the Boot Count sensor back to 2. If you do a power off again when the Golden PNOR is booting, then BMC would think that Golden PNOR also failed to boot and BMC would give up.\r\n\r\nNow, the BMC knows that, the primary side failed and hence BMC booted the Golden side (as indicated by BIOS Golden Side) sensor. Hence, even on repeated boots, until the \"BIOS Golden side\" sensor is 1, BMC would continue to boot only the Golden PNOR, irrespective of how many times you try.\r\n\r\nIf the user wants to manually boot into the Primary side of PNOR, user would have to set the \"BIOS Golden Side\" sensor to 0 (using set sensor reading command), and then do a power reset or power cycle, and host will boot from Primary side of PNOR.\r\n\r\nThus for the BMC, if the \"BIOS Golden side\" sensor is 1, then Golden PNOR will be booted. If the \"BIOS Golden side\" sensor is 0, then Primary PNOR will be booted. This gives the user, the control to boot either sides of PNOR whenever user wants to, in addition to automated fail-over recovery or boot into golden PNOR when primary PNOR fails to boot."}}
{"actor":{"display_login":"stewart-ibm"}}