summaryrefslogtreecommitdiff
path: root/tools/zynqmpimage.h
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2018-04-13 14:18:52 +0200
committerMichal Simek <michal.simek@xilinx.com>2018-05-11 09:23:44 +0200
commit6915dcf35987d654b491524f151e56b91e0d0ec9 (patch)
treece2fc7cff7811d8714e4025b15bdeca14f910aa7 /tools/zynqmpimage.h
parentb123aff26f580343adf57b5145d8334cd2a4b6b4 (diff)
tools: zynqmpimage: Add bif support
The officially described way to generate boot.bin files for ZynqMP is to describe the contents of the target binary using a file of the "bif" format. This file then links to other files that all get packed into a bootable image. This patch adds support to read such a .bif file and generate a respective ZynqMP boot.bin file that can include the normal image and pmu files, but also supports image partitions now. This makes it a handy replacement for the proprietary "bootgen" utility that is currently used to generate boot.bin files with FSBL. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'tools/zynqmpimage.h')
-rw-r--r--tools/zynqmpimage.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/zynqmpimage.h b/tools/zynqmpimage.h
index f3b5c195ad..7a57681709 100644
--- a/tools/zynqmpimage.h
+++ b/tools/zynqmpimage.h
@@ -19,7 +19,11 @@
#define HEADER_REGINIT_NULL (cpu_to_le32(0xffffffff))
#define HEADER_WIDTHDETECTION (cpu_to_le32(0xaa995566))
#define HEADER_IMAGEIDENTIFIER (cpu_to_le32(0x584c4e58))
+#define HEADER_CPU_SELECT_MASK (0x3 << 10)
+#define HEADER_CPU_SELECT_R5_SINGLE (0x0 << 10)
+#define HEADER_CPU_SELECT_A53_32BIT (0x1 << 10)
#define HEADER_CPU_SELECT_A53_64BIT (0x2 << 10)
+#define HEADER_CPU_SELECT_R5_DUAL (0x3 << 10)
enum {
ENCRYPTION_EFUSE = 0xa5c3c5a3,
@@ -129,4 +133,7 @@ struct zynqmp_header {
uint32_t __reserved4[66]; /* 0x9c0 */
};
+void zynqmpimage_default_header(struct zynqmp_header *ptr);
+void zynqmpimage_print_header(const void *ptr);
+
#endif /* _ZYNQMPIMAGE_H_ */