2 * First stage boot loader for virtio devices. The compiled output goes
3 * into the pc-bios directory of qemu.
5 * Copyright (c) 2013 Alexander Graf <agraf@suse.de>
6 * Copyright IBM Corp. 2013, 2017
8 * This work is licensed under the terms of the GNU GPL, version 2 or (at
9 * your option) any later version. See the COPYING file in the top-level
16 larl %r15, stack + 0x8000 /* Set up stack */
21 slgr %r3, %r2 /* get sizeof bss */
22 ltgr %r3,%r3 /* bss emtpy? */
25 srlg %r4,%r3,8 /* how many 256 byte chunks? */
37 j main /* And call C */
44 * void disabled_wait(void)
46 * stops the current guest cpu.
50 larl %r1,disabled_wait_psw
56 * void consume_sclp_int(void)
58 * eats one sclp interrupt
60 .globl consume_sclp_int
62 /* enable service interrupts in cr0 */
66 /* prepare external call handler */
67 larl %r1, external_new_code
69 larl %r1, external_new_mask
71 /* load enabled wait PSW */
72 larl %r1, enabled_wait_psw
76 * void consume_io_int(void)
78 * eats one I/O interrupt
82 /* enable I/O interrupts in cr6 */
86 /* prepare i/o call handler */
91 /* load enabled wait PSW */
92 larl %r1, enabled_wait_psw
96 /* disable service interrupts in cr0 */
103 /* disable I/O interrupts in cr6 */
104 stctg %c6,%c6,0(%r15)
106 lctlg %c6,%c6,0(%r15)
111 .quad 0x0002000180000000,0x0000000000000000
113 .quad 0x0302000180000000,0x0000000000000000
115 .quad 0x0000000180000000
117 .quad 0x0000000180000000