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
55 * void consume_sclp_int(void)
57 * eats one sclp interrupt
59 .globl consume_sclp_int
61 /* enable service interrupts in cr0 */
65 /* prepare external call handler */
66 larl %r1, external_new_code
68 larl %r1, external_new_mask
70 /* load enabled wait PSW */
71 larl %r1, enabled_wait_psw
75 * void consume_io_int(void)
77 * eats one I/O interrupt
81 /* enable I/O interrupts in cr6 */
85 /* prepare i/o call handler */
90 /* load enabled wait PSW */
91 larl %r1, enabled_wait_psw
95 /* disable service interrupts in cr0 */
102 /* disable I/O interrupts in cr6 */
103 stctg %c6,%c6,0(%r15)
105 lctlg %c6,%c6,0(%r15)
110 .quad 0x0002000180000000,0x0000000000000000
112 .quad 0x0302000180000000,0x0000000000000000
114 .quad 0x0000000180000000
116 .quad 0x0000000180000000