{"id":4522,"date":"2019-12-14T10:20:45","date_gmt":"2019-12-14T18:20:45","guid":{"rendered":"https:\/\/www.flamingspork.com\/blog\/?p=4522"},"modified":"2019-12-14T10:21:52","modified_gmt":"2019-12-14T18:21:52","slug":"booting-temporary-firmware-on-the-raptor-blackbird","status":"publish","type":"post","link":"https:\/\/www.flamingspork.com\/blog\/2019\/12\/14\/booting-temporary-firmware-on-the-raptor-blackbird\/","title":{"rendered":"Booting temporary firmware on the Raptor Blackbird"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In a future post, I&#8217;ll detail how to build my ported-to-upstream Blackbird firmware. Here though, we&#8217;ll explore booting some firmware temporarily to experiment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Step 1: Copy your new PNOR image over to the BMC.<br \/>Step 2: &#8230;<br \/>Step 3: Profit!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Okay, not really, once you&#8217;ve copied over your image, ensure the computer is off and then you can tell the daemon that provides firmware to the host to use a file backend for it rather than the PNOR chip on the motherboard (i.e. <strong>yes, you can boot your system even when the firmware chip isn&#8217;t there<\/strong> &#8211; although I&#8217;ve not literally tried this).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root@blackbird:~# mboxctl --backend file:\/tmp\/blackbird.pnor \nSetBackend: Success\nroot@blackbird:~# obmcutil poweron<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If we look at the serial console (ssh to the BMC port 2200) we&#8217;ll see Hostboot start, realise there&#8217;s newer SBE code, flash it, and reboot:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>--== Welcome to Hostboot hostboot-b284071\/hbicore.bin ==--\n\n  3.02606|secure|SecureROM valid - enabling functionality\n  5.14678|Booting from SBE side 0 on master proc=00050000\n  5.18537|ISTEP  6. 5 - host_init_fsi\n  5.47985|ISTEP  6. 6 - host_set_ipl_parms\n  5.54476|ISTEP  6. 7 - host_discover_targets\n  6.56106|HWAS|PRESENT> DIMM&#91;03]=8080000000000000\n  6.56108|HWAS|PRESENT> Proc&#91;05]=8000000000000000\n  6.56109|HWAS|PRESENT> Core&#91;07]=1511540000000000\n  6.61373|ISTEP  6. 8 - host_update_master_tpm\n  6.61529|SECURE|Security Access Bit> 0x0000000000000000\n  6.61530|SECURE|Secure Mode Disable (via Jumper)> 0x8000000000000000\n  6.61543|ISTEP  6. 9 - host_gard\n  7.20987|HWAS|FUNCTIONAL> DIMM&#91;03]=8080000000000000\n  7.20988|HWAS|FUNCTIONAL> Proc&#91;05]=8000000000000000\n  7.20989|HWAS|FUNCTIONAL> Core&#91;07]=1511540000000000\n  7.21299|ISTEP  6.11 - host_start_occ_xstop_handler\n  8.28965|ISTEP  6.12 - host_voltage_config\n  8.47973|ISTEP  7. 1 - mss_attr_cleanup\n  9.07674|ISTEP  7. 2 - mss_volt\n  9.35627|ISTEP  7. 3 - mss_freq\n  9.63029|ISTEP  7. 4 - mss_eff_config\n 10.35189|ISTEP  7. 5 - mss_attr_update\n 10.38489|ISTEP  8. 1 - host_slave_sbe_config\n 10.45332|ISTEP  8. 2 - host_setup_sbe\n 10.45450|ISTEP  8. 3 - host_cbs_start\n 10.45574|ISTEP  8. 4 - proc_check_slave_sbe_seeprom_complete\n 10.48675|ISTEP  8. 5 - host_attnlisten_proc\n 10.50338|ISTEP  8. 6 - host_p9_fbc_eff_config\n 10.50771|ISTEP  8. 7 - host_p9_eff_config_links\n 10.53338|ISTEP  8. 8 - proc_attr_update\n 10.53634|ISTEP  8. 9 - proc_chiplet_fabric_scominit\n 10.55234|ISTEP  8.10 - proc_xbus_scominit\n 10.56202|ISTEP  8.11 - proc_xbus_enable_ridi\n 10.57788|ISTEP  8.12 - host_set_voltages\n 10.59421|ISTEP  9. 1 - fabric_erepair\n 10.65877|ISTEP  9. 2 - fabric_io_dccal\n 10.66048|ISTEP  9. 3 - fabric_pre_trainadv\n 10.66665|ISTEP  9. 4 - fabric_io_run_training\n 10.66860|ISTEP  9. 5 - fabric_post_trainadv\n 10.67060|ISTEP  9. 6 - proc_smp_link_layer\n 10.67503|ISTEP  9. 7 - proc_fab_iovalid\n 11.10386|ISTEP  9. 8 - host_fbc_eff_config_aggregate\n 11.15103|ISTEP 10. 1 - proc_build_smp\n 11.27537|ISTEP 10. 2 - host_slave_sbe_update\n 11.68581|sbe|System Performing SBE Update for PROC 0, side 0\n 34.50467|sbe|System Rebooting To Complete SBE Update Process\n 34.50595|IPMI: Initiate power cycle\n 34.54671|Stopping istep dispatcher\n 34.68729|IPMI: shutdown complete\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">One of the improvements is we now get output from the SBE! This means that when we do things like mess up secure boot and non secure boot firmware (I&#8217;ll explain why\/how this is a thing later), we&#8217;ll actually get something useful out of a serial port:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>--== Welcome to SBE - CommitId&#91;0x8b06b5c1] ==--\nistep 3.19\nistep 3.20\nistep 3.21\nistep 3.22\nistep 4.1\nistep 4.2\nistep 4.3\nistep 4.4\nistep 4.5\nistep 4.6\nistep 4.7\nistep 4.8\nistep 4.9\nistep 4.10\nistep 4.11\nistep 4.12\nistep 4.13\nistep 4.14\nistep 4.15\nistep 4.16\nistep 4.17\nistep 4.18\nistep 4.19\nistep 4.20\nistep 4.21\nistep 4.22\nistep 4.23\nistep 4.24\nistep 4.25\nistep 4.26\nistep 4.27\nistep 4.28\nistep 4.29\nistep 4.30\nistep 4.31\nistep 4.32\nistep 4.33\nistep 4.34\nistep 5.1\nistep 5.2\nSBE starting hostboot<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">And then we&#8217;re back into normal Hostboot boot (which we&#8217;ve all seen before) and end up at a newer petitboot!<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"584\" height=\"396\" data-attachment-id=\"4523\" data-permalink=\"https:\/\/www.flamingspork.com\/blog\/2019\/12\/14\/booting-temporary-firmware-on-the-raptor-blackbird\/screenshot-from-2019-12-14-09-59-38\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2019\/12\/Screenshot-from-2019-12-14-09-59-38.png?fit=640%2C434&amp;ssl=1\" data-orig-size=\"640,434\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-from-2019-12-14-09-59-38\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2019\/12\/Screenshot-from-2019-12-14-09-59-38.png?fit=584%2C396&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2019\/12\/Screenshot-from-2019-12-14-09-59-38.png?resize=584%2C396&#038;ssl=1\" alt=\"\" class=\"wp-image-4523\" srcset=\"https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2019\/12\/Screenshot-from-2019-12-14-09-59-38.png?w=640&amp;ssl=1 640w, https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2019\/12\/Screenshot-from-2019-12-14-09-59-38.png?resize=300%2C203&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.flamingspork.com\/blog\/wp-content\/uploads\/2019\/12\/Screenshot-from-2019-12-14-09-59-38.png?resize=442%2C300&amp;ssl=1 442w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><figcaption>Petitboot 1.11 on a Raptor Blackbird<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">One notable absence from that screenshot is my installed Fedora is missing. This is because there appears to be a bug in the 5.3.7 kernel that&#8217;s currently upstream, and if we drop to the shell and poke at lspci and dmesg, we can work out what could be the culprit:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Exiting petitboot. Type 'exit' to return.\nYou may run 'pb-sos' to gather diagnostic data\nNo password set, running as root. You may set a password in the System Configuration screen.\n# lspci\n0000:00:00.0 PCI bridge: IBM Device 04c1\n0001:00:00.0 PCI bridge: IBM Device 04c1\n0001:01:00.0 Non-Volatile memory controller: Intel Corporation Device f1a8 (rev 03)\n0002:00:00.0 PCI bridge: IBM Device 04c1\n0002:01:00.0 SATA controller: Marvell Technology Group Ltd. 88SE9235 PCIe 2.0 x2 4-port SATA 6 Gb\/s Controller (rev 11)\n0003:00:00.0 PCI bridge: IBM Device 04c1\n0003:01:00.0 USB controller: Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI Host Controller (rev 02)\n0004:00:00.0 PCI bridge: IBM Device 04c1\n0004:01:00.0 Ethernet controller: Broadcom Limited NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)\n0004:01:00.1 Ethernet controller: Broadcom Limited NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)\n0004:01:00.2 Ethernet controller: Broadcom Limited NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)\n0005:00:00.0 PCI bridge: IBM Device 04c1\n0005:01:00.0 PCI bridge: ASPEED Technology, Inc. AST1150 PCI-to-PCI Bridge (rev 04)\n0005:02:00.0 VGA compatible controller: ASPEED Technology, Inc. ASPEED Graphics Family (rev 41)\n# dmesg|grep -i nvme\n&#91;    2.991038] nvme nvme0: pci function 0001:01:00.0\n&#91;    2.991088] nvme 0001:01:00.0: enabling device (0140 -> 0142)\n&#91;    3.121799] nvme nvme0: Identify Controller failed (19)\n&#91;    3.121802] nvme nvme0: Removing after probe failure status: -5\n# uname -a\nLinux skiroot 5.3.7-openpower1 #2 SMP Sat Dec 14 09:06:20 PST 2019 ppc64le GNU\/Linux\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If for some reason the device didn&#8217;t show up in lspci, then I&#8217;d look at the skiboot firmware log, which is \/sys\/firmware\/opal\/msglog.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Looking at upstream stable kernel patches, it seems like 5.3.8 has a interesting looking patch when you realize that ppc64le uses a 64k page size:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>commit efac0f186ea654e8389f5017c7f643ef48cb4b93\nAuthor: Kevin Hao &lt;haokexin@gmail.com>\nDate:   Fri Oct 18 10:53:14 2019 +0800\n\n    nvme-pci: Set the prp2 correctly when using more than 4k page\n    \n    commit a4f40484e7f1dff56bb9f286cc59ffa36e0259eb upstream.\n    \n    In the current code, the nvme is using a fixed 4k PRP entry size,\n    but if the kernel use a page size which is more than 4k, we should\n    consider the situation that the bv_offset may be larger than the\n    dev->ctrl.page_size. Otherwise we may miss setting the prp2 and then\n    cause the command can't be executed correctly.\n    \n    Fixes: dff824b2aadb (\"nvme-pci: optimize mapping of small single segment requests\")\n    Cc: stable@vger.kernel.org\n    Reviewed-by: Christoph Hellwig &lt;hch@lst.de>\n    Signed-off-by: Kevin Hao &lt;haokexin@gmail.com>\n    Signed-off-by: Keith Busch &lt;kbusch@kernel.org>\n    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">So, time to go try 5.3.8. My yaks are getting quite smooth.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Oh, and when you&#8217;re done with your temporary firmware, either fiddle with mboxctl or restart the systemd service for it, or reboot your BMC or&#8230; well, I gotta leave you something to work out on your own :)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In a future post, I&#8217;ll detail how to build my ported-to-upstream Blackbird firmware. Here though, we&#8217;ll explore booting some firmware temporarily to experiment. Step 1: Copy your new PNOR image over to the BMC.Step 2: &#8230;Step 3: Profit! Okay, not &hellip; <a href=\"https:\/\/www.flamingspork.com\/blog\/2019\/12\/14\/booting-temporary-firmware-on-the-raptor-blackbird\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[5,1,588],"tags":[141,625,636,587,741],"class_list":["post-4522","post","type-post","status-publish","format-standard","hentry","category-cool-gadgets","category-general","category-opal","tag-linux","tag-linux-kernel","tag-opal","tag-openpower","tag-raptorcs"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5a6n8-1aW","jetpack-related-posts":[{"id":4599,"url":"https:\/\/www.flamingspork.com\/blog\/2020\/05\/13\/a-op-build-v2-5-rc1-based-raptor-blackbird-build\/","url_meta":{"origin":4522,"position":0},"title":"A op-build v2.5-rc1 based Raptor Blackbird Build","author":"Stewart Smith","date":"2020-05-13","format":false,"excerpt":"I have done a few builds of firmware for the Raptor Blackbird since I got mine, each of them based on upstream op-build plus a few patches. The previous one was Yet another near-upstream Raptor Blackbird firmware build that I built a couple of months ago. This new build is\u2026","rel":"","context":"In &quot;cool gadgets&quot;","block_context":{"text":"cool gadgets","link":"https:\/\/www.flamingspork.com\/blog\/category\/cool-gadgets\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4561,"url":"https:\/\/www.flamingspork.com\/blog\/2020\/03\/08\/yet-another-near-upstream-raptor-blackbird-firmware-build\/","url_meta":{"origin":4522,"position":1},"title":"Yet another near-upstream Raptor Blackbird firmware build","author":"Stewart Smith","date":"2020-03-08","format":false,"excerpt":"In what is coming a month occurance, I've put up yet another firmware build for the Raptor Blackbird with close-to-upstream firmware (see here and here for previous ones). Well, I\u00e2\u20ac\u2122ve done another build! It\u00e2\u20ac\u2122s current op-build (as of yesterday), but my branch with patches for the Raptor Blackbird. The skiboot\u2026","rel":"","context":"In &quot;General&quot;","block_context":{"text":"General","link":"https:\/\/www.flamingspork.com\/blog\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4544,"url":"https:\/\/www.flamingspork.com\/blog\/2020\/02\/01\/another-close-to-upstream-blackbird-firmware-build\/","url_meta":{"origin":4522,"position":2},"title":"Another close-to-upstream Blackbird Firmware Build","author":"Stewart Smith","date":"2020-02-01","format":false,"excerpt":"A few weeks ago (okay, close to six), I put up a firmware build for the Raptor Blackbird with close-to-upstream firmware (see here). Well, I've done another build! It's current op-build (as of this morning), but my branch with patches for the Raptor Blackbird. The skiboot patch is there, as\u2026","rel":"","context":"In &quot;OPAL&quot;","block_context":{"text":"OPAL","link":"https:\/\/www.flamingspork.com\/blog\/category\/opal\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4520,"url":"https:\/\/www.flamingspork.com\/blog\/2019\/12\/14\/building-openpower-firmware-on-fedora-31\/","url_meta":{"origin":4522,"position":3},"title":"Building OpenPOWER firmware on Fedora 31","author":"Stewart Smith","date":"2019-12-14","format":false,"excerpt":"One of the challenges with Fedora 31 is that \/usr\/bin\/python is now Python 3 rather than Python 2. Just about every python script in existence relies on \/usr\/bin\/python being Python 2 and not anything else. I can't really recall, but this probably happened with the 1.5 to 2 transition as\u2026","rel":"","context":"In &quot;General&quot;","block_context":{"text":"General","link":"https:\/\/www.flamingspork.com\/blog\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4528,"url":"https:\/\/www.flamingspork.com\/blog\/2019\/12\/16\/a-close-to-upstream-firmware-build-for-the-raptor-blackbird\/","url_meta":{"origin":4522,"position":4},"title":"A close-to-upstream firmware build for the Raptor Blackbird","author":"Stewart Smith","date":"2019-12-16","format":false,"excerpt":"UPDATE: A newer version is available here It goes without saying that using this build is a At Your Own Risk and I make zero warranty. AFAIK it can't physically destroy your system. My GitHub op-build branch stewart-blackbird-v1 has all the changes built into this build (the VERSION displayed in\u2026","rel":"","context":"In &quot;cool gadgets&quot;","block_context":{"text":"cool gadgets","link":"https:\/\/www.flamingspork.com\/blog\/category\/cool-gadgets\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4515,"url":"https:\/\/www.flamingspork.com\/blog\/2019\/12\/13\/upstreaming-blackbird-firmware-step-1-skiboot\/","url_meta":{"origin":4522,"position":5},"title":"Upstreaming Blackbird firmware (step 1: skiboot)","author":"Stewart Smith","date":"2019-12-13","format":false,"excerpt":"Now that I can actually boot the machine, I could test and send my patch upstream for Blackbird support in skiboot. One thing I noticed with the current firmware from Raptor is that the PCIe slot names were wrong. While a pretty minor point, it's a bit funny that there's\u2026","rel":"","context":"In &quot;cool gadgets&quot;","block_context":{"text":"cool gadgets","link":"https:\/\/www.flamingspork.com\/blog\/category\/cool-gadgets\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/4522","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/comments?post=4522"}],"version-history":[{"count":1,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/4522\/revisions"}],"predecessor-version":[{"id":4524,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/4522\/revisions\/4524"}],"wp:attachment":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/media?parent=4522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/categories?post=4522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/tags?post=4522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}