[U-Boot] [PATCH] Add support for booting of INTEGRITY operating system uImages

2008-08-13 Thread Peter Tyser
Signed-off-by: Peter Tyser <[EMAIL PROTECTED]>
---
 README |5 +++--
 common/cmd_bootm.c |   39 +++
 common/image.c |3 +++
 include/image.h|1 +
 4 files changed, 46 insertions(+), 2 deletions(-)

diff --git a/README b/README
index d4456e5..3d9c903 100644
--- a/README
+++ b/README
@@ -3030,8 +3030,9 @@ details; basically, the header defines the following 
image properties:
 
 * Target Operating System (Provisions for OpenBSD, NetBSD, FreeBSD,
   4.4BSD, Linux, SVR4, Esix, Solaris, Irix, SCO, Dell, NCR, VxWorks,
-  LynxOS, pSOS, QNX, RTEMS, ARTOS;
-  Currently supported: Linux, NetBSD, VxWorks, QNX, RTEMS, ARTOS, LynxOS).
+  LynxOS, pSOS, QNX, RTEMS, ARTOS, INTEGRITY;
+  Currently supported: Linux, NetBSD, VxWorks, QNX, RTEMS, ARTOS, LynxOS,
+  INTEGRITY).
 * Target CPU Architecture (Provisions for Alpha, ARM, AVR32, Intel x86,
   IA64, MIPS, NIOS, PowerPC, IBM S390, SuperH, Sparc, Sparc 64 Bit;
   Currently supported: ARM, AVR32, Intel x86, MIPS, NIOS, PowerPC).
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 5295969..95021cc 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -106,6 +106,9 @@ int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[]);
 #if defined(CONFIG_ARTOS) && defined(CONFIG_PPC)
 static boot_os_fn do_bootm_artos;
 #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 */
@@ -356,6 +359,12 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[])
do_bootm_artos (cmdtp, flag, argc, argv, &images);
break;
 #endif
+
+#ifdef CONFIG_INTEGRITY
+   case IH_OS_INTEGRITY:
+   do_bootm_integrity (cmdtp, flag, argc, argv, &images);
+   break;
+#endif
}
 
show_boot_progress (-9);
@@ -1139,3 +1148,33 @@ static void do_bootm_artos (cmd_tbl_t *cmdtp, int flag,
(*entry) (kbd, cmdline, fwenv, top);
 }
 #endif
+
+#ifdef CONFIG_INTEGRITY
+static void do_bootm_integrity (cmd_tbl_t *cmdtp, int flag,
+   int argc, char *argv[],
+   bootm_headers_t *images)
+{
+   image_header_t *hdr = &images->legacy_hdr_os_copy;
+   void (*entry_point)(void);
+
+#if defined(CONFIG_FIT)
+   if (!images->legacy_hdr_valid) {
+   fit_unsupported_reset ("INTEGRITY");
+   do_reset (cmdtp, flag, argc, argv);
+   }
+#endif
+
+   entry_point = (void (*)(void))image_get_ep (hdr);
+
+   printf ("## Transferring control to INTEGRITY (at address %08lx) ...\n",
+   (ulong)entry_point);
+
+   show_boot_progress (15);
+
+   /*
+* INTEGRITY Parameters:
+*   None
+*/
+   (*entry_point)();
+}
+#endif
diff --git a/common/image.c b/common/image.c
index 6d2ce32..95488db 100644
--- a/common/image.c
+++ b/common/image.c
@@ -108,6 +108,9 @@ static table_entry_t uimage_os[] = {
 #if defined(CONFIG_ARTOS) || defined(USE_HOSTCC)
{   IH_OS_ARTOS,"artos","ARTOS",},
 #endif
+#if defined(CONFIG_INTEGRITY) || defined(USE_HOSTCC)
+   {   IH_OS_INTEGRITY,"integrity","INTEGRITY",},
+#endif
{   IH_OS_LINUX,"linux","Linux",},
 #if defined(CONFIG_LYNXKDI) || defined(USE_HOSTCC)
{   IH_OS_LYNXOS,   "lynxos",   "LynxOS",   },
diff --git a/include/image.h b/include/image.h
index 4b9c582..cbf183a 100644
--- a/include/image.h
+++ b/include/image.h
@@ -85,7 +85,7 @@
 #define IH_OS_RTEMS18  /* RTEMS*/
 #define IH_OS_ARTOS19  /* ARTOS*/
 #define IH_OS_UNITY20  /* Unity OS */
+#define IH_OS_INTEGRITY21  /* INTEGRITY*/
 
 /*
  * CPU Architecture Codes (supported by Linux)
-- 
1.5.4.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Add support for booting of INTEGRITY operating system uImages

2008-08-13 Thread Kumar Gala

On Aug 13, 2008, at 3:31 PM, Peter Tyser wrote:

> Signed-off-by: Peter Tyser <[EMAIL PROTECTED]>
> ---
> README |5 +++--
> common/cmd_bootm.c |   39 +++
> common/image.c |3 +++
> include/image.h|1 +
> 4 files changed, 46 insertions(+), 2 deletions(-)

> +#ifdef CONFIG_INTEGRITY
> +static void do_bootm_integrity (cmd_tbl_t *cmdtp, int flag,
> + int argc, char *argv[],
> + bootm_headers_t *images)
> +{
> + image_header_t *hdr = &images->legacy_hdr_os_copy;
> + void (*entry_point)(void);
> +
> +#if defined(CONFIG_FIT)
> + if (!images->legacy_hdr_valid) {
> + fit_unsupported_reset ("INTEGRITY");
> + do_reset (cmdtp, flag, argc, argv);
> + }
> +#endif
> +
> + entry_point = (void (*)(void))image_get_ep (hdr);
> +
> + printf ("## Transferring control to INTEGRITY (at address  
> %08lx) ...\n",
> + (ulong)entry_point);
> +
> + show_boot_progress (15);
> +
> + /*
> +  * INTEGRITY Parameters:
> +  *   None
> +  */
> + (*entry_point)();
> +}

Any reason we can't just use go?

- k
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Add support for booting of INTEGRITY operating system uImages

2008-08-13 Thread Peter Tyser
On Wed, 2008-08-13 at 16:10 -0500, Kumar Gala wrote:
> 
> Any reason we can't just use go?
> 
> - k

Our INTEGRITY images are loaded to address 0x0.  We can't relocate the
INTEGRITY binaries there without disabling interrupts first (ppc
boards), which go doesn't do.

Best,
Peter

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Add support for booting of INTEGRITY operating system uImages

2008-09-05 Thread Wolfgang Denk
Dear Peter Tyser,

In message <[EMAIL PROTECTED]> you wrote:
> Signed-off-by: Peter Tyser <[EMAIL PROTECTED]>
> ---
>  README |5 +++--
>  common/cmd_bootm.c |   39 +++
>  common/image.c |3 +++
>  include/image.h|1 +
>  4 files changed, 46 insertions(+), 2 deletions(-)

Can you please rebase your patch against current top of tree, and
resubmit?   Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
Anyone who doesn't believe in miracles is not a realist.
   - David Ben Gurion
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Add support for booting of INTEGRITY operating system uImages

2008-09-08 Thread Peter Tyser
Hello,

> In message <[EMAIL PROTECTED]> you wrote:
> > Signed-off-by: Peter Tyser <[EMAIL PROTECTED]>
> > ---
> >  README |5 +++--
> >  common/cmd_bootm.c |   39 +++
> >  common/image.c |3 +++
> >  include/image.h|1 +
> >  4 files changed, 46 insertions(+), 2 deletions(-)
> 
> Can you please rebase your patch against current top of tree, and
> resubmit?   Thanks.

Sure.  I'll post after Kumar re-submits his removal of ARTOS support
patches as the INTEGRITY patch touches the same files.  I made a
aesthetic comment on his patchset and will base the INTEGRITY change on
top of his changes.

Kumar, if you don't plan on resubmitting the ARTOS support patches let
me know and I'll go ahead and send my rebased patch now.

Thanks,
Peter

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot