Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

BIOS: report rescue mode to the application using R4

  • Loading branch information...
commit a0260673e047ee1c9b68b19c2bc096f9d3e621e2 1 parent d2f4d51
@sbourdeauducq sbourdeauducq authored
View
2  software/bios/boot-helper.S
@@ -7,4 +7,4 @@ boot_helper:
nop
nop
nop
- call r4
+ call r5
View
17 software/bios/boot.c
@@ -40,16 +40,17 @@
#include "boot.h"
extern const struct board_desc *brd_desc;
+extern int rescue;
-extern void boot_helper(unsigned int r1, unsigned int r2, unsigned int r3, unsigned int addr);
+extern void boot_helper(unsigned int r1, unsigned int r2, unsigned int r3, unsigned int r4, unsigned int addr);
-static void __attribute__((noreturn)) boot(unsigned int r1, unsigned int r2, unsigned int r3, unsigned int addr)
+static void __attribute__((noreturn)) boot(unsigned int r1, unsigned int r2, unsigned int r3, unsigned int r4, unsigned int addr)
{
vga_disable();
uart_force_sync(1);
irq_setmask(0);
irq_enable(0);
- boot_helper(r1, r2, r3, addr);
+ boot_helper(r1, r2, r3, r4, addr);
while(1);
}
@@ -168,7 +169,7 @@ void serialboot()
|((unsigned int)frame.payload[2] << 8)
|((unsigned int)frame.payload[3] << 0);
uart_write(SFL_ACK_SUCCESS);
- boot(cmdline_adr, initrdstart_adr, initrdend_adr, addr);
+ boot(cmdline_adr, initrdstart_adr, initrdend_adr, rescue, addr);
break;
}
case SFL_CMD_CMDLINE:
@@ -268,7 +269,7 @@ void netboot()
initrdend_adr = initrdstart_adr + size - 1;
printf("I: Booting...\n");
- boot(cmdline_adr, initrdstart_adr, initrdend_adr, SDRAM_BASE);
+ boot(cmdline_adr, initrdstart_adr, initrdend_adr, rescue, SDRAM_BASE);
}
static int tryload(char *filename, unsigned int address)
@@ -323,11 +324,9 @@ void fsboot(int devnr)
fatfs_done();
printf("I: Booting...\n");
- boot(cmdline_adr, initrdstart_adr, initrdend_adr, SDRAM_BASE);
+ boot(cmdline_adr, initrdstart_adr, initrdend_adr, rescue, SDRAM_BASE);
}
-extern int rescue;
-
static void lzma_error(char *x)
{
printf("LZMA error: %s\n", x);
@@ -378,5 +377,5 @@ void flashboot()
}
}
printf("I: Booting...\n");
- boot(0, 0, 0, SDRAM_BASE);
+ boot(0, 0, 0, rescue, SDRAM_BASE);
}
View
2  software/bios/main.c
@@ -533,7 +533,7 @@ static void print_mac()
static const char banner[] =
"\nMILKYMIST(tm) v"VERSION" BIOS http://www.milkymist.org\n"
- "(c) Copyright 2007, 2008, 2009, 2010 Sebastien Bourdeauducq\n\n"
+ "(c) Copyright 2007, 2008, 2009, 2010, 2011 Sebastien Bourdeauducq\n\n"
"This program is free software: you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation, version 3 of the License.\n\n";

0 comments on commit a026067

Please sign in to comment.
Something went wrong with that request. Please try again.