summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorPeter Tyser <ptyser@xes-inc.com>2008-09-08 14:56:49 -0500
committerWolfgang Denk <wd@denx.de>2008-09-09 15:54:10 +0200
commitf5ed9e39088ecfa5a5f3ef47b08e5bda7890d764 (patch)
tree0d12b55208085a94dad89b10086173be362c8ffd /common
parent72f1b65f1b68bc6ed0d182eda1f3d6cf51b6414a (diff)
downloadblackbird-obmc-uboot-f5ed9e39088ecfa5a5f3ef47b08e5bda7890d764.tar.gz
blackbird-obmc-uboot-f5ed9e39088ecfa5a5f3ef47b08e5bda7890d764.zip
Add support for booting of INTEGRITY operating system uImages
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_bootm.c38
-rw-r--r--common/image.c3
2 files changed, 41 insertions, 0 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 08a014f448..b023e2635e 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -108,6 +108,9 @@ static boot_os_fn do_bootm_qnxelf;
int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
#endif
+#if defined(CONFIG_INTEGRITY)
+static boot_os_fn do_bootm_integrity;
+#endif
ulong load_addr = CFG_LOAD_ADDR; /* Default Load Address */
static bootm_headers_t images; /* pointers to os/initrd/fdt images */
@@ -452,6 +455,11 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
break;
#endif
+#ifdef CONFIG_INTEGRITY
+ case IH_OS_INTEGRITY:
+ do_bootm_integrity (0, argc, argv, &images);
+ break;
+#endif
}
show_boot_progress (-9);
@@ -1144,3 +1152,33 @@ static int do_bootm_qnxelf(int flag, int argc, char *argv[],
return 1;
}
#endif
+
+#ifdef CONFIG_INTEGRITY
+static int do_bootm_integrity (int flag, int argc, char *argv[],
+ bootm_headers_t *images)
+{
+ void (*entry_point)(void);
+
+#if defined(CONFIG_FIT)
+ if (!images->legacy_hdr_valid) {
+ fit_unsupported_reset ("INTEGRITY");
+ return 1;
+ }
+#endif
+
+ entry_point = (void (*)(void))images->ep;
+
+ printf ("## Transferring control to INTEGRITY (at address %08lx) ...\n",
+ (ulong)entry_point);
+
+ show_boot_progress (15);
+
+ /*
+ * INTEGRITY Parameters:
+ * None
+ */
+ (*entry_point)();
+
+ return 1;
+}
+#endif
diff --git a/common/image.c b/common/image.c
index 78efe2ebb7..b0119327b5 100644
--- a/common/image.c
+++ b/common/image.c
@@ -116,6 +116,9 @@ static table_entry_t uimage_os[] = {
{ IH_OS_QNX, "qnx", "QNX", },
{ IH_OS_VXWORKS, "vxworks", "VxWorks", },
#endif
+#if defined(CONFIG_INTEGRITY) || defined(USE_HOSTCC)
+ { IH_OS_INTEGRITY,"integrity", "INTEGRITY", },
+#endif
#ifdef USE_HOSTCC
{ IH_OS_4_4BSD, "4_4bsd", "4_4BSD", },
{ IH_OS_DELL, "dell", "Dell", },
OpenPOWER on IntegriCloud