/!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ !\ /!\ /!\ /!\ /!\ /!\
**WARNING** **WARNING** **WARNING** **WARNING**
DO NOT TRY THIS!!! THIS WILL MAKE YOUR SYSTEM UNBOOTABLE!!
YOU WILL NOT BE ABLE TO SWITCH FIRMWARE TYPES FROM OPAL TO POWERVM!!
YOU HAVE BEEN WARNED!!
/!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ /!\ !\ /!\ /!\ /!\ /!\ /!\

FYI: This problem is caused by kexec -e and not OpenBSD. Kexec's -e does
not properly shutdown the system, so WILL end up with a broken system.
This is what happened here. 

As mentioned here: https://wiki.archlinux.org/title/Kexec#Manually
> Warning: Running kexec -e directly will not unmount active filesystems
> or terminate any running services gracefully. 

I still used -e as petitboot uses busybox's and its reboot command does
not have a -k flag.

Note
----
I initially tried it with bsd.mp and separated the kexec -e command
from the kexec -l and --ramdisk command and didn't make my system
unbootable. So, don't do a one liner kexec? I'll test that out after
fixing my system.

System information
------------------
service processor firmware version      : SV860_109
firmware type                           : OPAL
petitboot version                       : v1.4.2-e1658ec
skiroot version                         : 4.4.70-openpower1
Firmware error led light code           : B113E504
        https://www.ibm.com/docs/P8DEA/p8eai/B15050AD.htm

As I am on vacation today, I gave another try at booting openbsd on
POWERNV hadware (POWER8), but this time with the patched kexec binary.

It still resets my system, so OpenBSD doesn't boot. But worst, my
system does not boot into petitboot anymore :( . So, I cannot continue
to use it at the moment.

+ I cannot change between firmware types (from PowerVM to OPAL).

But, it's ok. I'll fix my system in the following weeks.

Petitboot's output
------------------
Exiting petitboot. Type 'exit' to return.
You may run 'pb-sos' to gather diagnostic data
/ # mkdir -p /tmp/openbsd
/ # cd /tmp/openbsd
/tmp/openbsd # wget http://drop.rtk0.net/kexec
Connecting to drop.rtk0.net (45.79.10.221:80)
kexec                100% |*******************************|   332k  0:00:00 ETA
/tmp/openbsd # chmod +x kexec
/tmp/openbsd # wget http://cdn.openbsd.org/pub/OpenBSD/7.3/powerpc64/bsd
Connecting to cdn.openbsd.org (151.101.138.217:80)
bsd                  100% |*******************************| 11375k  0:00:00 ETA
/tmp/openbsd # wget http://cdn.openbsd.org/pub/OpenBSD/7.3/powerpc64/bsd.rd
Connecting to cdn.openbsd.org (151.101.138.217:80)
bsd.rd               100% |*******************************| 11706k  0:00:00 ETA
/tmp/openbsd # ./kexec --load bsd --ramdisk bsd.rd -e
/tmp/openbsd #

**
here should be the line mentioning that it's starting the kernel, 
I don't have it as it was displayed on my monitor
**

Welcome
Machine type-model: 8247-22L
Serial number: 213FB3A
Date: 2023-6-26
Time: 16:26:24
Service Processor: Primary (Location: U78CB.001.WZS0DXW-P1)
User Status:
      dev: Disabled
      celogin: Enabled
      celogin1: Enabled
      celogin2: Disabled
User ID:



Upon this reset, my power system does not boot to petitboot anymore nor
can I switch its firmware type to PowerVM. This is NOT ideal as firmware
patches are done via a running system...

Probably useful/useless logs:

Boot progress from the service processor
----------------------------------------
S1> 3

Previous Boot Progress Indicator

 1. B113E504 2023-06-26 16:25:29
98. Return to previous menu
99. Log out

S1> 1

| Created at               : 2023-06-26 16:25:29                               |
|------------------------------------------------------------------------------|
|                            System Reference Code                             |
|------------------------------------------------------------------------------|
| SRC Version              : 0x02                                              |
| Virtual Progress SRC     : False                                             |
| I5/OS Service Event Bit  : False                                             |
| Hypervisor Dump Initiated: False                                             |
| Power Control Net Fault  : False                                             |
| Additional Sections      : Enabled                                           |
| Hex Word Count           : 9                                                 |
| System Backplane CCIN    : 0x2CD6                                            |
| Source Service Processor : A                                                 |
| Error SRC Count          : 0xFF                                              |
| Clock State              : None declared                                     |
| Error Status Flags       : Hardware CheckStop                                |
| Module Id                : 0x0B                                              |
| Reference Code           : B113E504                                          |
| Hex Words 2 - 5          : 030000F0 2CD60B10 C13920FF C24000FF               |
| Hex Words 6 - 9          : 0006000E 00000103 C6B00011 00000000               |
|                                                                              |
|                               Callout Section                                |
PRESS ENTER TO CONTINUE:
|                                                                              |
| Additional Sections      : Disabled                                          |
| Callout Count            : 3                                                 |
|                                                                              |
|                             Normal Hardware FRU                              |
| Priority                 : Mandatory, replace all with this type as a unit   |
| Location Code            : U78CB.001.WZS0DXW-P1-C32                          |
| Part Number              : 00FX518                                           |
| CCIN                     : 54E8                                              |
| Serial Number            : YA1932960479                                      |
| MFG Replacement Unit Id  : 0x0202000E                                        |
|                                                                              |
|                        Maintenance Procedure Required                        |
| Priority                 : Mandatory, replace all with this type as a unit   |
| Procedure Number         : FSPSP04                                           |
|                                                                              |
|                        Maintenance Procedure Required                        |
| Priority                 : Lowest priority replacement                       |
| Procedure Number         : FSPSP06                                           |
|                                                                              |
|------------------------------------------------------------------------------|



Firmware error given by the service processor
---------------------------------------------
Progress Indicator History

 1. B15050AD 2023-06-26 16:26:17
 2. B15050AD 2023-06-26 16:26:17
97. Next page
98. Return to previous menu
99. Log out

S1> 1

| Created at               : 2023-06-26 16:26:17                               |
|------------------------------------------------------------------------------|
|                            System Reference Code                             |
|------------------------------------------------------------------------------|
| SRC Version              : 0x02                                              |
| Virtual Progress SRC     : False                                             |
| I5/OS Service Event Bit  : False                                             |
| Hypervisor Dump Initiated: False                                             |
| Power Control Net Fault  : False                                             |
| Additional Sections      : Enabled                                           |
| Hex Word Count           : 9                                                 |
| System Backplane CCIN    : 0x2CD6                                            |
| Source Service Processor : A                                                 |
| Error SRC Count          : 0xFF                                              |
| Clock State              : None declared                                     |
| Error Status Flags       : Firmware Termination                              |
| Module Id                : 0x80                                              |
| Reference Code           : B15050AD                                          |
| Hex Words 2 - 5          : 020000F0 2CD68010 C1472000 224000FF               |
| Hex Words 6 - 9          : 00020000 00000000 00000000 00000000               |
|                                                                              |
|                               Callout Section                                |
PRESS ENTER TO CONTINUE:
|                                                                              |
| Additional Sections      : Disabled                                          |
| Callout Count            : 2                                                 |
|                                                                              |
|                        Maintenance Procedure Required                        |
| Priority                 : Mandatory, replace all with this type as a unit   |
| Procedure Number         : FSPSP01                                           |
|                                                                              |
|                             Normal Hardware FRU                              |
| Priority                 : Lowest priority replacement                       |
| Location Code            : U78CB.001.WZS0DXW-P1                              |
| Part Number              : 00E4404                                           |
| CCIN                     : 2CD6                                              |
| Serial Number            : YL10UF5AV06K                                      |
|                                                                              |
|------------------------------------------------------------------------------|



If we lookup the code on IBM's documentation website:
> Service Processor Firmware couldn't detect minimum hardware required
> to boot the host
source: https://www.ibm.com/docs/P8DEA/p8eai/B15050AD.htm

So yeah. I'll attempt a factory reset of the machine (not ideal and
probably will do nothing and if that doesn't work, I'll continue to
debug this issue)

As I said, this isn't ideal as as far as I know, these systems can
only update their firmware via a running OS in PowerVM and probably
in OPAL. Hopefully I'm wrong ha!

I'm not giving up on booting openbsd on powernv hardware!

Have a good day!

------- Original Message -------
On Wednesday, April 19th, 2023 at 21:24, Roberto Arturo Gonzalez Godinez 
<robglez...@proton.me> wrote:

> Hello all, happy to be here!
>
> I'm coming from a backend web (technician) formation, but UNIX systems
> interest me more. So, I have gotten myself an IBM POWER8 machine to
> introduce myself into this new interesting world. I'm not an expert,
> but I'm planing to spend some time to giveback to openbsd :)
>
> So, I have an IBM S822L (8247-22L) and I have tried to boot
> openbsd/powerpc64 in opal mode and it does not boot. See below for
> more information and the possible cause.
>
> system and firmware information:
> petitboot : v1.4.2-e1658ec
> skiroot : 4.4.70-openpower1
> mode : opal
> processor : dual 10 core POWER8
> ram : 128gb
> model : IBM S822L (8247-22L)
> mode : OPAL
>
> petitboot menu
> ------------------------------------------------------------------------
> Petitboot (v1.4.2-e1658ec) 8247-22L 213FB3A
> ───────────────────────────────────────────────────────────────────────
> [USB: sda1 / E820-1608]
> OpenBSD install
>
> System information
> System configuration
> System status log
> Language
> Rescan devices
> Retrieve config from URL
> *Exit to shell
> ------------------------------------------------------------------------
>
> when I telnet into the skiroot's shell I see this before the power8 reset's
> itself:
>
> skiboot output
> ------------------------------------------------------------------------
> Exiting petitboot. Type 'exit' to return.
> You may run 'pb-sos' to gather diagnostic data
> / # uname -a
> uname -a
> Linux skiroot 4.4.70-openpower1 #1 SMP Wed Jun 14 08:57:46 UTC 2017
> ppc64le GNU/Linux
> / #
> The system is going down NOW!
> Sent SIGTERM to all processes
> Sent SIGKILL to all processes
> [ 108.051970] kexec_core: Starting new kernel
> Connection closed by foreign host.
> ------------------------------------------------------------------------
>
> After some online searches, I found that this seems to be related to
> a kexec-lite regression found by Brandon Bergren from freebsd
> (bdra...@freebsd.org).
>
> issue documented on freebsd:
> https://www.freebsd.org/platforms/ppc/#issues
>
> > As of 2021-11-30 the firmware of IBM POWER9 and some IBM POWER8
> > machines contain a version of kexec-lite with a regression that
> > computes FreeBSD kernel entry point erroneously
>
>
> Upon doing the same test with freebsd, the same behavior happens.
> Skiroot outputs the same thing and my power8 reset's itself.
>
> So, it seems as if OpenBSD is facing the same issue.
>
> This seems to be fixed here:
> https://github.com/antonblanchard/kexec-lite/pull/9
>
> I have yet to try the patched kexec-lite binary and to update the
> firmware on my power8 system if there are any updates available.
> I will check this when I will have some more time.
>
> Notice: my power8 system firmware may not be up to date, I will have
> to check the logs on the service processor and see when was the last
> time that its firmware was updated. If I recall well, it was sometime
> in 2021...
>
> Cheers!

Reply via email to