diff options
author | Brandon Bergren <bdragon@FreeBSD.org> | 2020-01-19 04:13:19 +0000 |
---|---|---|
committer | Brandon Bergren <bdragon@FreeBSD.org> | 2020-01-19 04:13:19 +0000 |
commit | a8614f0eeced8a9aa3304904fb346b0bcdff88f1 (patch) | |
tree | 1f12d5ef5a16a77b2b840fdfa1c5df6f8fd8c979 /stand/powerpc | |
parent | c7a19fd70a35ae0591b185bd7216a328f6bfe848 (diff) | |
download | src-test2-a8614f0eeced8a9aa3304904fb346b0bcdff88f1.tar.gz src-test2-a8614f0eeced8a9aa3304904fb346b0bcdff88f1.zip |
Notes
Diffstat (limited to 'stand/powerpc')
-rw-r--r-- | stand/powerpc/uboot/start.S | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/stand/powerpc/uboot/start.S b/stand/powerpc/uboot/start.S index 3e80576907a4..3c8d64ae724f 100644 --- a/stand/powerpc/uboot/start.S +++ b/stand/powerpc/uboot/start.S @@ -38,10 +38,11 @@ _start: lis %r11, uboot_address@ha addi %r11, %r11, uboot_address@l stw %r1, 0(%r11) - /* Save U-Boot's r14 */ + /* Save U-Boot's r14 and r30 */ lis %r11, saved_regs@ha addi %r11, %r11, saved_regs@l stw %r14, 0(%r11) + stw %r30, 4(%r11) /* Disable interrupts */ mfmsr %r11 andi. %r11, %r11, ~0x8000@l @@ -52,14 +53,16 @@ _start: * syscall() */ ENTRY(syscall) - stwu %r1, -16(%r1) + stwu %r1, -32(%r1) mflr %r0 stw %r14, 8(%r1) - stw %r0, 20(%r1) - /* Restore U-Boot's r14 */ + stw %r30, 12(%r1) + stw %r0, 36(%r1) + /* Restore U-Boot's r14 and r30 */ lis %r11, saved_regs@ha addi %r11, %r11, saved_regs@l lwz %r14, 0(%r11) + lwz %r30, 4(%r11) /* Enable interrupts */ mfmsr %r11 ori %r11, %r11, 0x8000@l @@ -79,6 +82,7 @@ ENTRY(syscall) lwz %r0, 4(%r11) mtlr %r0 lwz %r14, 8(%r1) + lwz %r30, 12(%r1) mr %r1, %r11 blr @@ -90,5 +94,6 @@ GLOBAL(syscall_ptr) .long 0 GLOBAL(saved_regs) .long 0 /* R14 */ + .long 0 /* R30 */ GLOBAL(uboot_address) .long 0 |