parisc: Move boot_args[] to pad608 to fix HP-UX SMP boot
Do not store the boot args in the pad0 field of PAGE0.
This breaks booting HP-UX SMP kernels.
Use pad608 instead.
Signed-off-by: Helge Deller <deller@gmx.de>
diff --git a/src/parisc/head.S b/src/parisc/head.S
index 900ec48..b578790 100644
--- a/src/parisc/head.S
+++ b/src/parisc/head.S
@@ -190,8 +190,8 @@
bv,n 0(%r3)
$is_monarch_cpu:
- /* Save boot_args. Only monarch CPU does this once. */
- load32 BOOTADDR(0x040 + 10*4),%r1
+ /* Save boot_args in PAGE0->pad608[]. Only monarch CPU does this once. */
+ load32 BOOTADDR(0x608),%r1
stw,ma %r26,4(%r1)
stw,ma %r25,4(%r1)
stw,ma %r24,4(%r1)
diff --git a/src/parisc/parisc.c b/src/parisc/parisc.c
index 8232d64..05549ae 100644
--- a/src/parisc/parisc.c
+++ b/src/parisc/parisc.c
@@ -92,15 +92,16 @@
* PA-RISC specific constants and functions.
********************************************************/
-/* variables provided by qemu - boot_args starting at pad0[10] */
-#define ram_size PAGE0->pad0[10]
-#define linux_kernel_entry PAGE0->pad0[11]
-#define cmdline PAGE0->pad0[12]
-#define initrd_start PAGE0->pad0[13]
-#define initrd_end PAGE0->pad0[14]
-#define smp_cpus PAGE0->pad0[15]
-#define pdc_debug PAGE0->pad0[16]
-#define fw_cfg_port PAGE0->pad0[17]
+/* boot_args[] variables provided by qemu */
+#define boot_args PAGE0->pad608
+#define ram_size boot_args[0]
+#define linux_kernel_entry boot_args[1]
+#define cmdline boot_args[2]
+#define initrd_start boot_args[3]
+#define initrd_end boot_args[4]
+#define smp_cpus boot_args[5]
+#define pdc_debug boot_args[6]
+#define fw_cfg_port boot_args[7]
/* flags for pdc_debug */
#define DEBUG_PDC 0x01