diff mbox

test/hello_world: always use shutdown type zero

Message ID 1469165945-24868-1-git-send-email-oohall@gmail.com
State Accepted
Headers show

Commit Message

Oliver O'Halloran July 22, 2016, 5:39 a.m. UTC
The hello world kernel fails to correctly set r3 before making the
shutdown opal call. On FSP machines only shutdown types 0 and 1 are
recognised as valid shutdown types. If any other type is specified
(in r3) the call is rejected with an OPAL_PARAMETER error and the
machine will continue running.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
---
 test/hello_world/hello_kernel/hello_kernel.S | 1 +
 1 file changed, 1 insertion(+)

Comments

Stewart Smith July 22, 2016, 7:52 a.m. UTC | #1
Oliver O'Halloran <oohall@gmail.com> writes:
> The hello world kernel fails to correctly set r3 before making the
> shutdown opal call. On FSP machines only shutdown types 0 and 1 are
> recognised as valid shutdown types. If any other type is specified
> (in r3) the call is rejected with an OPAL_PARAMETER error and the
> machine will continue running.
>
> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
> ---
>  test/hello_world/hello_kernel/hello_kernel.S | 1 +
>  1 file changed, 1 insertion(+)

OMG MORE INSTRUCTION BLOAT!

I'm amazed at how many bugs were in hello world :)

Merged to master as of 34012377c29895db060c44ae0ceab8147cce728d
diff mbox

Patch

diff --git a/test/hello_world/hello_kernel/hello_kernel.S b/test/hello_world/hello_kernel/hello_kernel.S
index 6cc6409c07fc..fecf5a3fb3cc 100644
--- a/test/hello_world/hello_kernel/hello_kernel.S
+++ b/test/hello_world/hello_kernel/hello_kernel.S
@@ -47,6 +47,7 @@  here:	mflr	%r8 /* work out where we are running */
 	bctrl
 
 	li	%r0, 5 /* OPAL_CEC_POWER_DOWN */
+	li	%r3, 0 /* normal shutdown */
 	mr	%r2, %r13
 	mtctr	%r14
 	bctrl