Index: Makefile.target
===================================================================
--- Makefile.target (revision 915)
+++ Makefile.target (working copy)
@@ -24,7 +24,7 @@
STRIP := $(TARGET)strip
RANLIB := $(TARGET)ranlib
-CFLAGS+= -Os -g -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS
+CFLAGS+= -O0 -g -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS
CFLAGS+= -Wall -Wredundant-decls -Wshadow -Wpointer-arith
CFLAGS+= -Wstrict-prototypes -Wmissing-declarations -Wundef -Wendif-labels
CFLAGS+= -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -Wnested-externs
Index: arch/sparc32/build.xml
===================================================================
--- arch/sparc32/build.xml (revision 915)
+++ arch/sparc32/build.xml (working copy)
@@ -16,6 +16,7 @@
+
Index: arch/sparc32/romvec.c
===================================================================
--- arch/sparc32/romvec.c (revision 915)
+++ arch/sparc32/romvec.c (working copy)
@@ -13,7 +13,9 @@
#include "drivers/drivers.h"
#include "libopenbios/sys_info.h"
#include "boot.h"
+#include "romvec.h"
+#define CONFIG_DEBUG_OBP 1
#ifdef CONFIG_DEBUG_OBP
#define DPRINTF(fmt, args...) \
do { printk(fmt , ##args); } while (0)
@@ -412,7 +414,7 @@
return 0;
}
-static void obp_fortheval_v2(char *str, int arg0, int arg1, int arg2, int arg3, int arg4)
+void obp_fortheval_v2(char *str, int arg0, int arg1, int arg2, int arg3, int arg4)
{
int pusharg = 0;
@@ -449,8 +451,16 @@
DPRINTF("obp_fortheval_v2(%s)\n", str);
push_str(str);
fword("eval");
+
}
+/*
+static void obp_fortheval_v2_handler2(char *str, int arg0, int arg1, int arg2, int arg3, int arg4)
+{
+ obp_fortheval_v2(str, arg0, arg1, arg2, arg3, arg4);
+}
+*/
+
void *
init_openprom(void)
{
@@ -479,7 +489,7 @@
romvec0.pv_halt = obp_halt;
romvec0.pv_synchook = &sync_hook;
romvec0.pv_v0bootargs = &obp_argp;
- romvec0.pv_fortheval.v2_eval = obp_fortheval_v2;
+ romvec0.pv_fortheval.v2_eval = obp_fortheval_v2_handler;
romvec0.pv_v2devops.v2_inst2pkg = obp_inst2pkg;
romvec0.pv_v2devops.v2_dumb_mem_alloc = obp_dumb_memalloc;
romvec0.pv_v2devops.v2_dumb_mem_free = obp_dumb_memfree;
Index: arch/sparc32/romvec.h
===================================================================
--- arch/sparc32/romvec.h (revision 0)
+++ arch/sparc32/romvec.h (revision 0)
@@ -0,0 +1,7 @@
+/*
+ * romvec extern declarations
+ */
+
+extern void obp_fortheval_v2(char *str, int arg0, int arg1, int arg2, int arg3, int arg4);
+extern void obp_fortheval_v2_handler(char *str, int arg0, int arg1, int arg2, int arg3, int arg4);
+
Index: arch/sparc32/context.c
===================================================================
--- arch/sparc32/context.c (revision 915)
+++ arch/sparc32/context.c (working copy)
@@ -11,7 +11,7 @@
#include "openbios.h"
#define MAIN_STACK_SIZE 16384
-#define IMAGE_STACK_SIZE 4096
+#define IMAGE_STACK_SIZE 4096*2
#define debug printk
Index: arch/sparc32/call-romvec.S
===================================================================
--- arch/sparc32/call-romvec.S (revision 0)
+++ arch/sparc32/call-romvec.S (revision 0)
@@ -0,0 +1,27 @@
+#include "psr.h"
+#include "asm/asi.h"
+
+ .text
+ .align 4
+
+#define STACKFRAME_SZ 0x60
+
+/* These are just handy. */
+#define _SV save %sp, -STACKFRAME_SZ, %sp
+#define _RS restore
+
+#define FLUSH_ALL_KERNEL_WINDOWS \
+ _SV; _SV; _SV; _SV; _SV; _SV; _SV; \
+ _RS; _RS; _RS; _RS; _RS; _RS; _RS;
+
+ .globl obp_fortheval_v2_handler
+
+obp_fortheval_v2_handler:
+ FLUSH_ALL_KERNEL_WINDOWS
+ call obp_fortheval_v2
+ nop
+
+ ret
+ nop
+
+