2 # Copyright (c) 2007-2011 Josef 'Jeff' Sipek
9 # At this point, the machine is running in ESA390 mode. Let's load a new
10 # PSW, making it switch to 64-bit mode
13 # switch to 64-bit mode
16 # Order 0x12: Set Architecture
17 # R1 bits 56-63 = 0x01 (switch all CPUs to z/Arch)
19 LHI
%r1, 0x1 # switch all to z/Arch
20 SR %r3, %r3 # CPU Address (CPU0000)
21 SIGP
%r1, %r3, 0x12 # Signal, order 0x12
24 # Bit 55 = 1, cc1 (inval param)
25 # Bit 54 = 1, cc1 (incorrect state)
27 # FIXME: check for errors?
30 # At this point, we should be in 64-bit mode
34 # It is unfortunate that the below code is required.
36 # Let's set the stack pointer to make gcc happy
38 # A standard stack frame is 160 bytes.