aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/microblaze/usrp2p/bootloader_utils.h
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-11-17 18:31:21 -0800
committerNick Foster <nick@nerdnetworks.org>2010-11-17 18:31:21 -0800
commit95cf7753c175e868d1aacaad378bfe74d9454200 (patch)
tree2eef9c811655d7a1b4d0fb020db7fa5125a2adc7 /firmware/microblaze/usrp2p/bootloader_utils.h
parent81c9f77306dc82f250bfb2871b8bd7db67a40085 (diff)
parent89ae5f3f651cff22226e2b2c0ce0ed796dad4c71 (diff)
downloaduhd-95cf7753c175e868d1aacaad378bfe74d9454200.tar.gz
uhd-95cf7753c175e868d1aacaad378bfe74d9454200.tar.bz2
uhd-95cf7753c175e868d1aacaad378bfe74d9454200.zip
Merge branch 'master' of ettus.sourcerepo.com:ettus/uhdpriv into flow_ctrl
Conflicts: host/lib/transport/udp_simple.cpp host/lib/usrp/usrp2/mboard_impl.cpp host/lib/usrp/usrp2/usrp2_iface.cpp host/lib/usrp/usrp2/usrp2_regs.hpp
Diffstat (limited to 'firmware/microblaze/usrp2p/bootloader_utils.h')
-rw-r--r--firmware/microblaze/usrp2p/bootloader_utils.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/firmware/microblaze/usrp2p/bootloader_utils.h b/firmware/microblaze/usrp2p/bootloader_utils.h
new file mode 100644
index 000000000..f597c0113
--- /dev/null
+++ b/firmware/microblaze/usrp2p/bootloader_utils.h
@@ -0,0 +1,22 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2010 Ettus Research LLC
+ *
+ */
+
+#include <stdint.h>
+
+//we're working in bytes and byte addresses so we can run the same code with Flash chips of different sector sizes.
+//it's really 1463736, but rounded up to 1.5MB
+#define FPGA_IMAGE_SIZE_BYTES 1572864
+//instead of 32K, we write 31K because we're using the top 1K for stack space!
+#define FW_IMAGE_SIZE_BYTES 31744
+
+#define SAFE_FPGA_IMAGE_LOCATION_ADDR 0x00000000
+#define SAFE_FW_IMAGE_LOCATION_ADDR 0x003F0000
+#define PROD_FPGA_IMAGE_LOCATION_ADDR 0x00180000
+#define PROD_FW_IMAGE_LOCATION_ADDR 0x00300000
+
+int is_valid_fpga_image(uint32_t addr);
+int is_valid_fw_image(uint32_t addr);
+void start_program(uint32_t addr);