From: "Jason J. Herne" <jjherne@linux.ibm.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>,
Thomas Huth <thuth@redhat.com>,
qemu-devel@nongnu.org, qemu-s390x@nongnu.org, cohuck@redhat.com
Subject: Re: [PATCH] pc-bios/s390x: Pack ResetInfo struct
Date: Fri, 7 Feb 2020 09:02:28 -0500 [thread overview]
Message-ID: <d9891265-2254-ee64-c009-0105f7a8b02b@linux.ibm.com> (raw)
In-Reply-To: <caefcdbf-e68c-ba05-2ec4-17f127109434@de.ibm.com>
On 2/7/20 6:28 AM, Christian Borntraeger wrote:
> Jason,
>
> can you run objdump -Sdr on jump2ipl.o on a broken variant?
>
>
To keep the volume lower, I've only pasted the output that I think you're interested in.
If you want to see the entire thing just let me know.
static void jump_to_IPL_2(void)
{
1d0: eb bf f0 58 00 24 stmg %r11,%r15,88(%r15)
1d6: a7 fb ff 50 aghi %r15,-176
1da: b9 04 00 bf lgr %r11,%r15
ResetInfo *current = 0;
1de: a7 19 00 00 lghi %r1,0
1e2: e3 10 b0 a8 00 24 stg %r1,168(%r11)
void (*ipl)(void) = (void *) (uint64_t) current->ipl_continue;
1e8: e3 10 b0 a8 00 04 lg %r1,168(%r11)
1ee: 58 10 10 08 l %r1,8(%r1)
1f2: b9 16 00 11 llgfr %r1,%r1
1f6: e3 10 b0 a0 00 24 stg %r1,160(%r11)
*current = save;
1fc: e3 10 b0 a8 00 04 lg %r1,168(%r11)
202: c0 20 00 00 00 00 larl %r2,202 <jump_to_IPL_2+0x32>
204: R_390_PC32DBL .bss+0x2
208: eb 23 20 00 00 04 lmg %r2,%r3,0(%r2)
20e: eb 23 10 00 00 24 stmg %r2,%r3,0(%r1)
ipl(); /* should not return */
214: e3 10 b0 a0 00 04 lg %r1,160(%r11)
21a: 0d e1 basr %r14,%r1
}
21c: 18 00 lr %r0,%r0
21e: eb bf b1 08 00 04 lmg %r11,%r15,264(%r11)
224: 07 fe br %r14
226: 07 07 nopr %r7
0000000000000228 <jump_to_IPL_code>:
void jump_to_IPL_code(uint64_t address)
{
228: eb bf f0 58 00 24 stmg %r11,%r15,88(%r15)
22e: c0 d0 00 00 00 00 larl %r13,22e <jump_to_IPL_code+0x6>
230: R_390_PC32DBL .rodata+0x2a
234: a7 fb ff 50 aghi %r15,-176
238: b9 04 00 bf lgr %r11,%r15
23c: e3 20 b0 a0 00 24 stg %r2,160(%r11)
/* store the subsystem information _after_ the bootmap was loaded */
write_subsystem_identification();
242: c0 e5 00 00 00 00 brasl %r14,242 <jump_to_IPL_code+0x1a>
244: R_390_PLT32DBL write_subsystem_identification+0x2
/* prevent unknown IPL types in the guest */
if (iplb.pbt == S390_IPL_TYPE_QEMU_SCSI) {
248: c0 10 00 00 00 00 larl %r1,248 <jump_to_IPL_code+0x20>
24a: R_390_GOTENT iplb+0x2
24e: e3 10 10 00 00 04 lg %r1,0(%r1)
254: 43 10 10 0c ic %r1,12(%r1)
258: a7 28 00 ff lhi %r2,255
25c: 14 12 nr %r1,%r2
25e: a7 1e 00 ff chi %r1,255
262: a7 74 00 15 jne 28c <jump_to_IPL_code+0x64>
iplb.pbt = S390_IPL_TYPE_CCW;
266: c0 10 00 00 00 00 larl %r1,266 <jump_to_IPL_code+0x3e>
268: R_390_GOTENT iplb+0x2
26c: e3 10 10 00 00 04 lg %r1,0(%r1)
272: 92 02 10 0c mvi 12(%r1),2
set_iplb(&iplb);
276: c0 10 00 00 00 00 larl %r1,276 <jump_to_IPL_code+0x4e>
278: R_390_GOTENT iplb+0x2
27c: e3 10 10 00 00 04 lg %r1,0(%r1)
282: b9 04 00 21 lgr %r2,%r1
286: c0 e5 ff ff ff 75 brasl %r14,170 <set_iplb>
/*
* The IPL PSW is at address 0. We also must not overwrite the
* content of non-BIOS memory after we loaded the guest, so we
* save the original content and restore it in jump_to_IPL_2.
*/
ResetInfo *current = 0;
28c: a7 19 00 00 lghi %r1,0
290: e3 10 b0 a8 00 24 stg %r1,168(%r11)
save = *current;
296: c0 10 00 00 00 00 larl %r1,296 <jump_to_IPL_code+0x6e>
298: R_390_PC32DBL .bss+0x2
29c: e3 20 b0 a8 00 04 lg %r2,168(%r11)
2a2: eb 23 20 00 00 04 lmg %r2,%r3,0(%r2)
2a8: eb 23 10 00 00 24 stmg %r2,%r3,0(%r1)
current->ipl_psw = (uint64_t) &jump_to_IPL_2;
2ae: c0 20 ff ff ff 91 larl %r2,1d0 <jump_to_IPL_2>
2b4: e3 10 b0 a8 00 04 lg %r1,168(%r11)
2ba: e3 20 10 00 00 24 stg %r2,0(%r1)
current->ipl_psw |= RESET_PSW_MASK;
2c0: e3 10 b0 a8 00 04 lg %r1,168(%r11)
2c6: e3 10 10 00 00 04 lg %r1,0(%r1)
2cc: e3 20 d0 00 00 04 lg %r2,0(%r13)
2d2: b9 81 00 21 ogr %r2,%r1
2d6: e3 10 b0 a8 00 04 lg %r1,168(%r11)
2dc: e3 20 10 00 00 24 stg %r2,0(%r1)
current->ipl_continue = address & 0x7fffffff;
2e2: e3 10 b0 a0 00 04 lg %r1,160(%r11)
2e8: b9 17 00 21 llgtr %r2,%r1
2ec: e3 10 b0 a8 00 04 lg %r1,168(%r11)
2f2: 50 20 10 08 st %r2,8(%r1)
debug_print_int("set IPL addr to", current->ipl_continue);
2f6: e3 10 b0 a8 00 04 lg %r1,168(%r11)
2fc: 58 10 10 08 l %r1,8(%r1)
300: b9 16 00 11 llgfr %r1,%r1
304: b9 04 00 31 lgr %r3,%r1
308: c0 20 00 00 00 00 larl %r2,308 <jump_to_IPL_code+0xe0>
30a: R_390_PC32DBL .rodata+0x2
30e: c0 e5 ff ff ff 4d brasl %r14,1a8 <debug_print_int>
/* Ensure the guest output starts fresh */
sclp_print("\n");
314: c0 20 00 00 00 00 larl %r2,314 <jump_to_IPL_code+0xec>
316: R_390_PC32DBL .rodata+0x12
31a: c0 e5 00 00 00 00 brasl %r14,31a <jump_to_IPL_code+0xf2>
31c: R_390_PLT32DBL sclp_print+0x2
/*
* HACK ALERT.
* We use the load normal reset to keep r15 unchanged. jump_to_IPL_2
* can then use r15 as its stack pointer.
*/
asm volatile("lghi 1,1\n\t"
320: a7 19 00 01 lghi %r1,1
324: 83 11 03 08 diag %r1,%r1,776
"diag 1,1,0x308\n\t"
: : : "1", "memory");
panic("\n! IPL returns !\n");
328: c0 20 00 00 00 00 larl %r2,328 <jump_to_IPL_code+0x100>
32a: R_390_PC32DBL .rodata+0x14
32e: c0 e5 00 00 00 00 brasl %r14,32e <jump_to_IPL_code+0x106>
330: R_390_PLT32DBL panic+0x2
}
334: 18 00 lr %r0,%r0
336: eb bf b1 08 00 04 lmg %r11,%r15,264(%r11)
33c: 07 fe br %r14
33e: 07 07 nopr %r7
--
-- Jason J. Herne (jjherne@linux.ibm.com)
next prev parent reply other threads:[~2020-02-07 14:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-05 18:21 [PATCH] pc-bios/s390x: Pack ResetInfo struct Jason J. Herne
2020-02-06 9:55 ` Cornelia Huck
2020-02-06 10:09 ` Christian Borntraeger
2020-02-06 11:00 ` Thomas Huth
2020-02-07 11:28 ` Christian Borntraeger
2020-02-07 14:02 ` Jason J. Herne [this message]
2020-08-27 10:07 ` Thomas Huth
2020-09-01 13:02 ` Jason J. Herne
2020-02-13 18:02 ` Jason J. Herne
2020-02-13 18:24 ` Christian Borntraeger
2020-02-25 10:23 ` Jason J. Herne
2020-02-25 11:13 ` Christian Borntraeger
2020-02-25 12:58 ` Jason J. Herne
2020-02-25 15:00 ` Christian Borntraeger
2020-02-25 15:05 ` Christian Borntraeger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d9891265-2254-ee64-c009-0105f7a8b02b@linux.ibm.com \
--to=jjherne@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).