parisc: Allow PDC functions to act when called in narrow mode

Some PDC functions need to know at runtime if they were called in
narrow mode. Add infrastructure to hand over this information to
parisc_pdc_entry().

The background is, that the MPE IPL boot loader calls PDC_MODEL
and provides a very small return buffer, followed in memory by the
stack. So, when pdc_model writes 32 x 8 bytes in 64-bit mode,
the stack of IPL boot will be trashed.

Signed-off-by: Helge Deller <deller@gmx.de>
diff --git a/src/parisc/head.S b/src/parisc/head.S
index 8734704..c4df7f0 100644
--- a/src/parisc/head.S
+++ b/src/parisc/head.S
@@ -512,6 +512,7 @@
 	stw %arg2,-44(%sp)
 	stw %arg3,-48(%sp)
 	ldo -FRAME_SIZE(%sp),%arg0
+	ldi 1,%arg1		/* called with wide-bit cleared (narrow mode) */
 
 	loadgp
 	load32		MEM_PDC_ENTRY + 1f - pdc_entry_table,%rp
@@ -566,6 +567,7 @@
 	std %arg0, -0x58(%sp)
 
 	ldo -0x58(%sp),%arg0	/* points to arg7 */
+	ldi 1,%arg1		/* called with wide-bit cleared (narrow mode) */
 
 	loadgp
 	load32_firmware parisc_pdc_entry,%r1
@@ -614,6 +616,7 @@
 	std %r20, -0x50(%sp)
 	std %r19, -0x58(%sp)
 	ldo -0x58(%sp),%arg0	/* points to arg7 */
+	ldi 0,%arg1		/* called with wide-bit set (not narrow) */
 
 	loadgp
 	b,l parisc_pdc_entry, %rp
diff --git a/src/parisc/parisc.c b/src/parisc/parisc.c
index 1a0c97e..1c7b109 100644
--- a/src/parisc/parisc.c
+++ b/src/parisc/parisc.c
@@ -2364,7 +2364,7 @@
 }
 
 
-int __VISIBLE parisc_pdc_entry(unsigned long *arg)
+int __VISIBLE parisc_pdc_entry(unsigned long *arg, unsigned long narrow_mode)
 {
     unsigned long proc = ARG0;
     unsigned long option = ARG1;