Update of /cvsroot/blob/blob/src/blob
In directory usw-pr-cvs1:/tmp/cvs-serv30028
Modified Files:
reboot.c
Log Message:
Disable subsystems before we call the new blob. Most important is that this
disables the i-cache so we don't get strange aborts because of overwritten
code.
Index: reboot.c
===================================================================
RCS file: /cvsroot/blob/blob/src/blob/reboot.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- reboot.c 2001/10/14 20:24:32 1.4
+++ reboot.c 2001/10/28 20:32:15 1.5
@@ -29,8 +29,10 @@
#include <blob/arch.h>
#include <blob/command.h>
+#include <blob/errno.h>
+#include <blob/error.h>
+#include <blob/main.h>
#include <blob/serial.h>
-#include <blob/sa1100.h>
#include <blob/time.h>
@@ -40,9 +42,19 @@
{
void (*blob)(void) = (void (*)(void))BLOB_RAM_BASE;
+ /* sanity check */
+ if(blob_status.blobType == fromFlash) {
+ printerrprefix();
+ SerialOutputString("blob not downloaded\n");
+ return -EINVAL;
+ }
+
SerialOutputString("Restarting blob from RAM...\n\n");
msleep(500);
+
+ /* disable subsystems that want to be disabled */
+ exit_subsystems();
blob();
|