Skip to content

Commit 6e3220b

Browse files
committed
parisc: Fix argument pointer in real64_call_asm()
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>
1 parent 567b351 commit 6e3220b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

arch/parisc/kernel/real2.S

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,6 @@ ENTRY_CFI(real64_call_asm)
235235
/* save fn */
236236
copy %arg2, %r31
237237

238-
/* set up the new ap */
239-
ldo 64(%arg1), %r29
240-
241238
/* load up the arg registers from the saved arg area */
242239
/* 32-bit calling convention passes first 4 args in registers */
243240
ldd 0*REG_SZ(%arg1), %arg0 /* note overwriting arg0 */
@@ -249,7 +246,9 @@ ENTRY_CFI(real64_call_asm)
249246
ldd 7*REG_SZ(%arg1), %r19
250247
ldd 1*REG_SZ(%arg1), %arg1 /* do this one last! */
251248

249+
/* set up real-mode stack and real-mode ap */
252250
tophys_r1 %sp
251+
ldo -16(%sp), %r29 /* Reference param save area */
253252

254253
b,l rfi_virt2real,%r2
255254
nop

0 commit comments

Comments
 (0)