aboutsummaryrefslogtreecommitdiff
path: root/common/lynxkdi.c
diff options
context:
space:
mode:
authorWolfgang Denk2006-03-12 01:59:35 +0100
committerWolfgang Denk2006-03-12 01:59:35 +0100
commitdc013d464000635a5b8ae841c6e683f94a6bee3d (patch)
treeae381c15180d16a1d30d4c5d0a7217741d8aaf64 /common/lynxkdi.c
parent8ff0208d31223e36f7c038982589b448d7fdd217 (diff)
Add loads of ntohl() in image header handling
Patch by Steven Scholz, 10 Jun 2005
Diffstat (limited to 'common/lynxkdi.c')
-rw-r--r--common/lynxkdi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/lynxkdi.c b/common/lynxkdi.c
index 797d8cc880d..ed1b595b844 100644
--- a/common/lynxkdi.c
+++ b/common/lynxkdi.c
@@ -23,11 +23,11 @@
#if defined(CONFIG_MPC8260) || defined(CONFIG_440EP) || defined(CONFIG_440GR)
void lynxkdi_boot ( image_header_t *hdr )
{
- void (*lynxkdi)(void) = (void(*)(void))hdr->ih_ep;
+ void (*lynxkdi)(void) = (void(*)(void)) ntohl(hdr->ih_ep);
lynxos_bootparms_t *parms = (lynxos_bootparms_t *)0x0020;
bd_t *kbd;
DECLARE_GLOBAL_DATA_PTR;
- u32 *psz = (u32 *)(hdr->ih_load + 0x0204);
+ u32 *psz = (u32 *)(ntohl(hdr->ih_load) + 0x0204);
memset( parms, 0, sizeof(*parms));
kbd = gd->bd;
@@ -39,9 +39,9 @@ void lynxkdi_boot ( image_header_t *hdr )
/* Do a simple check for Bluecat so we can pass the
* kernel command line parameters.
*/
- if( le32_to_cpu(*psz) == hdr->ih_size ){
+ if( le32_to_cpu(*psz) == ntohl(hdr->ih_size) ){ /* FIXME: NOT SURE HERE ! */
char *args;
- char *cmdline = (char *)(hdr->ih_load + 0x020c);
+ char *cmdline = (char *)(ntohl(hdr->ih_load) + 0x020c);
int len;
printf("Booting Bluecat KDI ...\n");