summaryrefslogtreecommitdiff
path: root/arch/parisc
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2023-05-03 16:39:56 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-05-17 11:47:35 +0200
commite4b526442247fabc92d2ce79a5725ee75c4f7caa (patch)
tree6b7a8115bf597ae80ff0c501462499bca6c2ae2f /arch/parisc
parentbe649ea153b04c2ad35c6f32b18f644ab9b192b9 (diff)
downloadlinux-e4b526442247fabc92d2ce79a5725ee75c4f7caa.tar.gz
linux-e4b526442247fabc92d2ce79a5725ee75c4f7caa.tar.bz2
linux-e4b526442247fabc92d2ce79a5725ee75c4f7caa.zip
parisc: Fix argument pointer in real64_call_asm()
commit 6e3220ba3323a2c24be834aebf5d6e9f89d0993f upstream. Fix the argument pointer (ap) to point to real-mode memory instead of virtual memory. It's interesting that this issue hasn't shown up earlier, as this could have happened with any 64-bit PDC ROM code. I just noticed it because I suddenly faced a HPMC while trying to execute the 64-bit STI ROM code of an Visualize-FXe graphics card for the STI text console. Signed-off-by: Helge Deller <deller@gmx.de> Cc: <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/kernel/real2.S5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/parisc/kernel/real2.S b/arch/parisc/kernel/real2.S
index 2b16d8d6598f..c37010a13586 100644
--- a/arch/parisc/kernel/real2.S
+++ b/arch/parisc/kernel/real2.S
@@ -248,9 +248,6 @@ ENTRY_CFI(real64_call_asm)
/* save fn */
copy %arg2, %r31
- /* set up the new ap */
- ldo 64(%arg1), %r29
-
/* load up the arg registers from the saved arg area */
/* 32-bit calling convention passes first 4 args in registers */
ldd 0*REG_SZ(%arg1), %arg0 /* note overwriting arg0 */
@@ -262,7 +259,9 @@ ENTRY_CFI(real64_call_asm)
ldd 7*REG_SZ(%arg1), %r19
ldd 1*REG_SZ(%arg1), %arg1 /* do this one last! */
+ /* set up real-mode stack and real-mode ap */
tophys_r1 %sp
+ ldo -16(%sp), %r29 /* Reference param save area */
b,l rfi_virt2real,%r2
nop