[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] pc-bios/s390x: Pack ResetInfo struct
From: |
Jason J. Herne |
Subject: |
Re: [PATCH] pc-bios/s390x: Pack ResetInfo struct |
Date: |
Fri, 7 Feb 2020 09:02:28 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 |
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 (address@hidden)
- [PATCH] pc-bios/s390x: Pack ResetInfo struct, Jason J. Herne, 2020/02/05
- Re: [PATCH] pc-bios/s390x: Pack ResetInfo struct, Cornelia Huck, 2020/02/06
- Re: [PATCH] pc-bios/s390x: Pack ResetInfo struct, Christian Borntraeger, 2020/02/06
- Re: [PATCH] pc-bios/s390x: Pack ResetInfo struct, Jason J. Herne, 2020/02/13
- Re: [PATCH] pc-bios/s390x: Pack ResetInfo struct, Christian Borntraeger, 2020/02/13
- Re: [PATCH] pc-bios/s390x: Pack ResetInfo struct, Jason J. Herne, 2020/02/25
- Re: [PATCH] pc-bios/s390x: Pack ResetInfo struct, Christian Borntraeger, 2020/02/25
- Re: [PATCH] pc-bios/s390x: Pack ResetInfo struct, Jason J. Herne, 2020/02/25
- Re: [PATCH] pc-bios/s390x: Pack ResetInfo struct, Christian Borntraeger, 2020/02/25
- Re: [PATCH] pc-bios/s390x: Pack ResetInfo struct, Christian Borntraeger, 2020/02/25