summaryrefslogtreecommitdiffstats
path: root/firmware/microblaze/usrp2p
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-12-14 15:34:49 -0800
committerNick Foster <nick@nerdnetworks.org>2010-12-14 15:34:49 -0800
commit3d70da92fc539e254494be1fd75341c0a9bcf631 (patch)
tree51534b568f76a5f1641d99916396331680b3b23f /firmware/microblaze/usrp2p
parent42c8c0873c00e692eb88c54e7da4fcbabbd9a4b6 (diff)
downloaduhd-3d70da92fc539e254494be1fd75341c0a9bcf631.tar.gz
uhd-3d70da92fc539e254494be1fd75341c0a9bcf631.tar.bz2
uhd-3d70da92fc539e254494be1fd75341c0a9bcf631.zip
ZPU: bootloader changes for new ZPU
Diffstat (limited to 'firmware/microblaze/usrp2p')
-rw-r--r--firmware/microblaze/usrp2p/bootloader/init_bootloader.c4
-rw-r--r--firmware/microblaze/usrp2p/bootloader_utils.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/firmware/microblaze/usrp2p/bootloader/init_bootloader.c b/firmware/microblaze/usrp2p/bootloader/init_bootloader.c
index 1d9d681d7..ab6c70a6b 100644
--- a/firmware/microblaze/usrp2p/bootloader/init_bootloader.c
+++ b/firmware/microblaze/usrp2p/bootloader/init_bootloader.c
@@ -56,7 +56,7 @@ void delay(uint32_t t) {
int main(int argc, char *argv[]) {
hal_disable_ints(); // In case we got here via jmp 0x0
output_regs->leds = 0xFF;
- delay(500000);
+ delay(5000);
output_regs->leds = 0x00;
hal_uart_init();
spif_init();
@@ -85,7 +85,7 @@ int main(int argc, char *argv[]) {
if(is_valid_fpga_image(PROD_FPGA_IMAGE_LOCATION_ADDR)) {
puts("Valid production FPGA image found. Attempting to boot.");
set_safe_booted_flag(1);
- delay(30000); //so serial output can finish
+ delay(300); //so serial output can finish
icap_reload_fpga(PROD_FPGA_IMAGE_LOCATION_ADDR);
}
puts("No valid production FPGA image found.\nAttempting to load production firmware...");
diff --git a/firmware/microblaze/usrp2p/bootloader_utils.c b/firmware/microblaze/usrp2p/bootloader_utils.c
index fadd225bb..d68fafcb3 100644
--- a/firmware/microblaze/usrp2p/bootloader_utils.c
+++ b/firmware/microblaze/usrp2p/bootloader_utils.c
@@ -25,7 +25,7 @@ int is_valid_fpga_image(uint32_t addr) {
}
int is_valid_fw_image(uint32_t addr) {
- static const uint8_t fwheader[] = {0xB0, 0x00, 0x00, 0x00, 0xB8, 0x08}; //just lookin for a jump to anywhere located at the reset vector
+ static const uint8_t fwheader[] = {0x0b 0x0b 0x0b 0x0b 0x80 0x70}; //just lookin for a jump to anywhere located at the reset vector
uint8_t buf[12];
spi_flash_read(addr, 6, buf);
return memcmp(buf, fwheader, 6) == 0;
@@ -33,7 +33,7 @@ int is_valid_fw_image(uint32_t addr) {
void start_program(uint32_t addr)
{
- memcpy(0x00000000, addr+0x00000000, 36); //copy the whole vector table, with the reset vector, into boot RAM
+ memcpy(0x00000000, addr+0x00000000, 0x3f); //copy the reset vector and interrupt vector
typedef void (*fptr_t)(void);
(*(fptr_t) 0x00000000)(); // most likely no return
}