PATCH: load ixp42x NPE firmware from separate flash block, remove dead code
Hi,
the following patch adds support to move the IXP42X NPE firmware to a separate flash block, whose start address is defined in CONFIG_IXP4XX_NPE_EXT_UCODE_BASE. Using that, it is possible to build NPE-enabled u-boot without copyright problems due to the NPE firmware.
I have also removed some unused code (#if 0 currently - should we completely remove those unused parts?)
I hope the patch applies, I get whitespace-related differences in the NPE files due to trailing whitespace in the original versions.
cpu/ixp/npe/IxNpeDl.c +2 -0
@@ -108,6 +108,7 @@ static BOOL ixNpeDlNpeStarted[IX_NPEDL_NPEID_MAX] ={FALSE, FALSE, FALSE} ; PRIVATE IX_STATUSixNpeDlNpeInitAndStartInternal (UINT32 *imageLibrary,UINT32 imageId); +#if 0 /* * Function definition: ixNpeDlMicrocodeImageLibraryOverride */
@@ -139,6 +140,7 @@ ixNpeDlMicrocodeImageLibraryOverride (UINT32 *clientImageLibrary) "status = %d\n", status); return status; } +#endif /* * Function definition: ixNpeDlImageDownload
cpu/ixp/npe/IxNpeDlImageMgr.c +8 -4
@@ -134,8 +134,8 @@ typedef structstatic IxNpeDlImageMgrStats ixNpeDlImageMgrStats;/* default image */ -#ifdef IX_NPEDL_READ_MICROCODE_FROM_FILE -static UINT32 *IxNpeMicroCodeImageLibrary =NULL ;/* Gets set to proper value at runtime */ +#ifdef CONFIG_IXP4XX_NPE_EXT_UCODE_BASE +static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)CONFIG_IXP4XX_NPE_EXT_UCODE_BASE ;#else static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)IxNpeMicrocode_array;#endif
@@ -158,6 +158,7 @@ PRIVATE BOOLixNpeDlImageMgrNpeFunctionIdCompare (IxNpeDlImageId *imageIdA, IxNpeDlImageId *imageIdB); +#if 0 PRIVATE IX_STATUS ixNpeDlImageMgrImageFind_legacy (UINT32 *imageLibrary, UINT32 imageId,
@@ -195,7 +196,7 @@ ixNpeDlImageMgrMicrocodeImageLibraryOverride ( status); return status; } - +#endif /* * Function definition: ixNpeDlImageMgrImageListExtract
@@ -527,6 +528,7 @@ ixNpeDlImageMgrStatsReset (void) } +#if 0 /* * Function definition: ixNpeDlImageMgrImageFind_legacy *
@@ -600,7 +602,7 @@ ixNpeDlImageMgrImageFind_legacy ( "Exiting ixNpeDlImageMgrImageFind: status = %d\n", status); return status; } - +#endif /* * Function definition: ixNpeDlImageMgrImageFind
@@ -635,6 +637,7 @@ ixNpeDlImageMgrImageFind (#endif /* IX_NPEDL_READ_MICROCODE_FROM_FILE */ } +#if 0 /* For backward's compatibility with previous image format */ if (ixNpeDlImageMgrSignatureCheck (imageLibrary)) {
@@ -643,6 +646,7 @@ ixNpeDlImageMgrImageFind ( imagePtr, imageSize); } +#endif while (*(imageLibrary+offset) ==NPE_IMAGE_MARKER ) {
Quoted 6 lines · In message <[email protected]> you wrote:
the following patch adds support to move the IXP42X NPE firmware to a separate flash block, whose start address is defined in
CONFIG_IXP4XX_NPE_EXT_UCODE_BASE. Using that, it is possible to build NPE-enabled u-boot without copyright problems due to the NPE firmware.
Quoted 7 lines
I have also removed some unused code (#if 0 currently - should we completely remove those unused parts?)
I hope the patch applies, I get whitespace-related differences in the NPE files due to trailing whitespace in the original versions.
Signed-off-by Michael Schwingen <[email protected]>
I appreciate this patch, yet I have to NAK it in it's current form.
Quoted 17 lines
cpu/ixp/npe/IxNpeDl.c +2
-0@@ -108,6 +108,7 @@ static BOOL ixNpeDlNpeStarted[IX_NPEDL_NPEID_MAX] ={FALSE, FALSE, FALSE} ; PRIVATE IX_STATUSixNpeDlNpeInitAndStartInternal (UINT32 *imageLibrary,UINT32 imageId); +#if 0 /* * Function definition: ixNpeDlMicrocodeImageLibraryOverride */ @@ -139,6 +140,7 @@ ixNpeDlMicrocodeImageLibraryOverride (UINT32 *clientImageLibrary) "status = %d\n", status); return status; } +#endif
...
Quoted 1 line
+#if 0
...
Quoted 1 line
+#endif
etc.
Please don't do this - instead, remove the dead code.
We have a source code management system to track such changes.
Best regards,
Wolfgang Denk
Signature · 5 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
C++ was an interesting and valuable experiment, but we've learned its
lessons and it's time to move on.
- Peter Curran in <[email protected]>PATCH 1/1 PATCH: load ixp42x NPE firmware from separate flash block, remove dead code
From: Michael Schwingen <[email protected]>
Hi,
the following patch adds support to move the IXP42X NPE firmware to a separate flash block, whose start address is defined in CONFIG_IXP4XX_NPE_EXT_UCODE_BASE. Using that, it is possible to build NPE-enabled u-boot without copyright problems due to the NPE firmware.
I have also removed some unused code (#if 0 currently - should we completely remove those unused parts?)
I hope the patch applies, I get whitespace-related differences in the NPE files due to trailing whitespace in the original versions.
cpu/ixp/npe/IxNpeDl.c +0 -32
@@ -109,38 +109,6 @@ PRIVATE IX_STATUS ixNpeDlNpeInitAndStartInternal (UINT32 *imageLibrary, UINT32 imageId);/* -* Function definition: ixNpeDlMicrocodeImageLibraryOverride -*/ -PUBLIC IX_STATUS -ixNpeDlMicrocodeImageLibraryOverride (UINT32 *clientImageLibrary) -{ -IX_STATUS status =IX_SUCCESS ; - -IX_NPEDL_TRACE0 (IX_NPEDL_FN_ENTRY_EXIT , -"Entering ixNpeDlMicrocodeImageLibraryOverride\n" ); - -if (clientImageLibrary ==NULL ) - { - status =IX_NPEDL_PARAM_ERR ; -IX_NPEDL_ERROR_REPORT ("ixNpeDlMicrocodeImageLibraryOverride - " -"invalid parameter\n" ); - } -else - { - status =ixNpeDlImageMgrMicrocodeImageLibraryOverride (clientImageLibrary); -if (status !=IX_SUCCESS ) - { - status =IX_FAIL ; - } - }/* end of if-else(clientImageLibrary) */ - -IX_NPEDL_TRACE1 (IX_NPEDL_FN_ENTRY_EXIT , -"Exiting ixNpeDlMicrocodeImageLibraryOverride : " -"status = %d\n" , status); -return status; -} - -/* * Function definition: ixNpeDlImageDownload */ PUBLIC IX_STATUS
cpu/ixp/npe/IxNpeDlImageMgr.c +8 -4
@@ -134,8 +134,8 @@ typedef structstatic IxNpeDlImageMgrStats ixNpeDlImageMgrStats;/* default image */ -#ifdef IX_NPEDL_READ_MICROCODE_FROM_FILE -static UINT32 *IxNpeMicroCodeImageLibrary =NULL ;/* Gets set to proper value at runtime */ +#ifdef CONFIG_IXP4XX_NPE_EXT_UCODE_BASE +static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)CONFIG_IXP4XX_NPE_EXT_UCODE_BASE ;#else static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)IxNpeMicrocode_array;#endif
@@ -158,6 +158,7 @@ PRIVATE BOOLixNpeDlImageMgrNpeFunctionIdCompare (IxNpeDlImageId *imageIdA, IxNpeDlImageId *imageIdB); +#if 0 PRIVATE IX_STATUS ixNpeDlImageMgrImageFind_legacy (UINT32 *imageLibrary, UINT32 imageId,
@@ -195,7 +196,7 @@ ixNpeDlImageMgrMicrocodeImageLibraryOverride ( status); return status; } - +#endif /* * Function definition: ixNpeDlImageMgrImageListExtract
@@ -527,6 +528,7 @@ ixNpeDlImageMgrStatsReset (void) } +#if 0 /* * Function definition: ixNpeDlImageMgrImageFind_legacy *
@@ -600,7 +602,7 @@ ixNpeDlImageMgrImageFind_legacy ( "Exiting ixNpeDlImageMgrImageFind: status = %d\n", status); return status; } - +#endif /* * Function definition: ixNpeDlImageMgrImageFind
@@ -635,6 +637,7 @@ ixNpeDlImageMgrImageFind (#endif /* IX_NPEDL_READ_MICROCODE_FROM_FILE */ } +#if 0 /* For backward's compatibility with previous image format */ if (ixNpeDlImageMgrSignatureCheck (imageLibrary)) {
@@ -643,6 +646,7 @@ ixNpeDlImageMgrImageFind ( imagePtr, imageSize); } +#endif while (*(imageLibrary+offset) ==NPE_IMAGE_MARKER ) {
Signature · 1 line
1.5.3.7
PATCH 1/1 IXP: add dynamic microcode addr
allow to load the microde from flash or ram by download it through the serial or other.
cpu/ixp/npe/IxNpeDlImageMgr.c +16 -8
@@ -140,6 +140,13 @@ static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)CONFIG_IXP4XX_NPE_EXT_UCODstatic UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)IxNpeMicrocode_array;#endif +static UNIT32 *getIxNpeMicroCodeImageLibrary () +{ +if ((s =getenv ("microcodeaddr" )) !=NULL ) { + load_addr =simple_strtoul (s,NULL ,16 ); + } +else return IxNpeMicroCodeImageLibrary; +}/* * static function prototypes.
@@ -218,9 +225,9 @@ ixNpeDlImageMgrImageListExtract (IX_NPEDL_TRACE0 (IX_NPEDL_FN_ENTRY_EXIT ,"Entering ixNpeDlImageMgrImageListExtract\n" ); - header = (IxNpeDlImageMgrImageLibraryHeader *) IxNpeMicroCodeImageLibrary; + header = (IxNpeDlImageMgrImageLibraryHeader *)getIxNpeMicroCodeImageLibrary (); -if (ixNpeDlImageMgrSignatureCheck (IxNpeMicroCodeImageLibrary)) +if (ixNpeDlImageMgrSignatureCheck (getIxNpeMicroCodeImageLibrary ())) {/* for each image entry in the image header ... */ while (header->entry[imageCount].eohMarker !=
@@ -291,9 +298,9 @@ ixNpeDlImageMgrImageLocate (IX_NPEDL_TRACE0 (IX_NPEDL_FN_ENTRY_EXIT ,"Entering ixNpeDlImageMgrImageLocate\n" ); - header = (IxNpeDlImageMgrImageLibraryHeader *) IxNpeMicroCodeImageLibrary; + header = (IxNpeDlImageMgrImageLibraryHeader *)getIxNpeMicroCodeImageLibrary (); -if (ixNpeDlImageMgrSignatureCheck (IxNpeMicroCodeImageLibrary)) +if (ixNpeDlImageMgrSignatureCheck (getIxNpeMicroCodeImageLibrary ())) {/* for each image entry in the image library header ... */ while (header->entry[imageCount].eohMarker !=
@@ -308,8 +315,9 @@ ixNpeDlImageMgrImageLocate (* get pointer to the image in the image library using offset from * 1st word in image library */ +UINT32 *tmp=getIxNpeMicroCodeImageLibrary (); imageOffset = header->entry[imageCount].image.offset; - *imagePtr = &IxNpeMicroCodeImageLibrary[imageOffset]; + *imagePtr = &tmp[imageOffset];/* get the image size */ *imageSize = header->entry[imageCount].image.size; status =IX_SUCCESS ;
@@ -354,9 +362,9 @@ ixNpeDlImageMgrLatestImageExtract (IxNpeDlImageId *imageId)IX_NPEDL_TRACE0 (IX_NPEDL_FN_ENTRY_EXIT ,"Entering ixNpeDlImageMgrLatestImageExtract\n" ); - header = (IxNpeDlImageMgrImageLibraryHeader *) IxNpeMicroCodeImageLibrary; + header = (IxNpeDlImageMgrImageLibraryHeader *)getIxNpeMicroCodeImageLibrary (); -if (ixNpeDlImageMgrSignatureCheck (IxNpeMicroCodeImageLibrary)) +if (ixNpeDlImageMgrSignatureCheck (getIxNpeMicroCodeImageLibrary ())) {/* for each image entry in the image library header ... */ while (header->entry[imageCount].eohMarker !=
@@ -633,7 +641,7 @@ ixNpeDlImageMgrImageFind ( imageLibrary = ixNpeMicrocode_binaryArray; }#else - imageLibrary = IxNpeMicroCodeImageLibrary; + imageLibrary =getIxNpeMicroCodeImageLibrary ();#endif /* IX_NPEDL_READ_MICROCODE_FROM_FILE */ }
Signature · 1 line
1.5.3.7
PATCH 1/1 IXP: add dynamic microcode addr
Quoted 13 lines · Jean-Christophe PLAGNIOL-VILLARD
allow to load the microde from flash or ram by download it through the serial or other.
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>cpu/ixp/npe/IxNpeDlImageMgr.c +0
-0@@ -140,6 +140,13 @@ static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)CONFIG_IXP4XX_NPE_EXT_UCOD static UINT32 *IxNpeMicroCodeImageLibrary =(UINT32 *)IxNpeMicrocode_array; #endif
cpu/ixp/npe/IxNpeDlImageMgr.c static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)CONFIG_IXP4XX_NPE_EXT_UCOD · line 148
Quoted 6 lines
cpu/ixp/npe/IxNpeDlImageMgr.c +6
-0+static UNIT32 *getIxNpeMicroCodeImageLibrary () +{ +if ((s =getenv ("microcodeaddr" )) !=NULL ) { + load_addr =simple_strtoul (s,NULL ,16 ); + } +else return IxNpeMicroCodeImageLibrary;
if ((s = getenv("microcodeaddr")) != NULL)
load_addr = simple_strtoul(s, NULL, 16);
else
return IxNpeMicroCodeImageLibrary;please.
I'm not so sure about the naming of the env variable too. How about "npe_ucode"?
Thanks.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
PATCH 1/1 IXP: add dynamic microcode addr
Quoted 26 lines · Stefan Roese
Quoted 13 lines · Jean-Christophe PLAGNIOL-VILLARD
allow to load the microde from flash or ram by download it through the serial or other.
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>cpu/ixp/npe/IxNpeDlImageMgr.c +0
-0@@ -140,6 +140,13 @@ static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)CONFIG_IXP4XX_NPE_EXT_UCOD static UINT32 *IxNpeMicroCodeImageLibrary =(UINT32 *)IxNpeMicrocode_array; #endif
cpu/ixp/npe/IxNpeDlImageMgr.c static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)CONFIG_IXP4XX_NPE_EXT_UCOD · line 148
Quoted 6 lines
cpu/ixp/npe/IxNpeDlImageMgr.c +6
-0+static UNIT32 *getIxNpeMicroCodeImageLibrary () +{ +if ((s =getenv ("microcodeaddr" )) !=NULL ) { + load_addr =simple_strtoul (s,NULL ,16 ); + } +else return IxNpeMicroCodeImageLibrary;if ((s = getenv("microcodeaddr")) != NULL) load_addr = simple_strtoul(s, NULL, 16); else return IxNpeMicroCodeImageLibrary;
Quoted 1 line
please.
Done.
Quoted 3 lines
I'm not so sure about the naming of the env variable too. How about "
npe_ucode"?
Why not
Best regards,
J.
PATCH 1/1 IXP: add dynamic microcode addr
In reply to Stefan Roeseallow to load the microde from flash or ram by download it through the serial or other.
README +3 -0
@@ -2685,6 +2685,9 @@ Some configuration options can be set using Environment Variables: are tried once without success. Useful on scripts which control the retry operation themselves. + + npe_ucode - see CONFIG_IXP4XX_NPE_EXT_UCOD + if set load address for the npe microcode tftpsrcport - If this is set, the value is used for TFTP's UDP source port.
cpu/ixp/npe/IxNpeDlImageMgr.c +15 -8
@@ -140,6 +140,12 @@ static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)CONFIG_IXP4XX_NPE_EXT_UCODstatic UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)IxNpeMicrocode_array;#endif +static UNIT32 *getIxNpeMicroCodeImageLibrary () +{ +if ((s =getenv ("npe_ucode" )) !=NULL ) + load_addr =simple_strtoul (s,NULL ,16 ); +else return IxNpeMicroCodeImageLibrary; +}/* * static function prototypes.
@@ -218,9 +224,9 @@ ixNpeDlImageMgrImageListExtract (IX_NPEDL_TRACE0 (IX_NPEDL_FN_ENTRY_EXIT ,"Entering ixNpeDlImageMgrImageListExtract\n" ); - header = (IxNpeDlImageMgrImageLibraryHeader *) IxNpeMicroCodeImageLibrary; + header = (IxNpeDlImageMgrImageLibraryHeader *)getIxNpeMicroCodeImageLibrary (); -if (ixNpeDlImageMgrSignatureCheck (IxNpeMicroCodeImageLibrary)) +if (ixNpeDlImageMgrSignatureCheck (getIxNpeMicroCodeImageLibrary ())) {/* for each image entry in the image header ... */ while (header->entry[imageCount].eohMarker !=
@@ -291,9 +297,9 @@ ixNpeDlImageMgrImageLocate (IX_NPEDL_TRACE0 (IX_NPEDL_FN_ENTRY_EXIT ,"Entering ixNpeDlImageMgrImageLocate\n" ); - header = (IxNpeDlImageMgrImageLibraryHeader *) IxNpeMicroCodeImageLibrary; + header = (IxNpeDlImageMgrImageLibraryHeader *)getIxNpeMicroCodeImageLibrary (); -if (ixNpeDlImageMgrSignatureCheck (IxNpeMicroCodeImageLibrary)) +if (ixNpeDlImageMgrSignatureCheck (getIxNpeMicroCodeImageLibrary ())) {/* for each image entry in the image library header ... */ while (header->entry[imageCount].eohMarker !=
@@ -308,8 +314,9 @@ ixNpeDlImageMgrImageLocate (* get pointer to the image in the image library using offset from * 1st word in image library */ +UINT32 *tmp=getIxNpeMicroCodeImageLibrary (); imageOffset = header->entry[imageCount].image.offset; - *imagePtr = &IxNpeMicroCodeImageLibrary[imageOffset]; + *imagePtr = &tmp[imageOffset];/* get the image size */ *imageSize = header->entry[imageCount].image.size; status =IX_SUCCESS ;
@@ -354,9 +361,9 @@ ixNpeDlImageMgrLatestImageExtract (IxNpeDlImageId *imageId)IX_NPEDL_TRACE0 (IX_NPEDL_FN_ENTRY_EXIT ,"Entering ixNpeDlImageMgrLatestImageExtract\n" ); - header = (IxNpeDlImageMgrImageLibraryHeader *) IxNpeMicroCodeImageLibrary; + header = (IxNpeDlImageMgrImageLibraryHeader *)getIxNpeMicroCodeImageLibrary (); -if (ixNpeDlImageMgrSignatureCheck (IxNpeMicroCodeImageLibrary)) +if (ixNpeDlImageMgrSignatureCheck (getIxNpeMicroCodeImageLibrary ())) {/* for each image entry in the image library header ... */ while (header->entry[imageCount].eohMarker !=
@@ -633,7 +640,7 @@ ixNpeDlImageMgrImageFind ( imageLibrary = ixNpeMicrocode_binaryArray; }#else - imageLibrary = IxNpeMicroCodeImageLibrary; + imageLibrary =getIxNpeMicroCodeImageLibrary ();#endif /* IX_NPEDL_READ_MICROCODE_FROM_FILE */ }
Signature · 1 line
1.5.3.7
PATCH 1/1 IXP: add dynamic microcode addr
In reply to Stefan Roeseallow to load the microde from flash or ram by download it through the serial or other.
README +3 -0
@@ -2685,6 +2685,9 @@ Some configuration options can be set using Environment Variables: are tried once without success. Useful on scripts which control the retry operation themselves. + + npe_ucode - see CONFIG_IXP4XX_NPE_EXT_UCOD + if set load address for the npe microcode tftpsrcport - If this is set, the value is used for TFTP's UDP source port.
cpu/ixp/npe/IxNpeDlImageMgr.c +16 -8
@@ -140,6 +140,13 @@ static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)CONFIG_IXP4XX_NPE_EXT_UCODstatic UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)IxNpeMicrocode_array;#endif +static UNIT32 *getIxNpeMicroCodeImageLibrary () +{ +if ((s =getenv ("npe_ucode" )) !=NULL ) + load_addr =simple_strtoul (s,NULL ,16 ); +else +return IxNpeMicroCodeImageLibrary; +}/* * static function prototypes.
@@ -218,9 +225,9 @@ ixNpeDlImageMgrImageListExtract (IX_NPEDL_TRACE0 (IX_NPEDL_FN_ENTRY_EXIT ,"Entering ixNpeDlImageMgrImageListExtract\n" ); - header = (IxNpeDlImageMgrImageLibraryHeader *) IxNpeMicroCodeImageLibrary; + header = (IxNpeDlImageMgrImageLibraryHeader *)getIxNpeMicroCodeImageLibrary (); -if (ixNpeDlImageMgrSignatureCheck (IxNpeMicroCodeImageLibrary)) +if (ixNpeDlImageMgrSignatureCheck (getIxNpeMicroCodeImageLibrary ())) {/* for each image entry in the image header ... */ while (header->entry[imageCount].eohMarker !=
@@ -291,9 +298,9 @@ ixNpeDlImageMgrImageLocate (IX_NPEDL_TRACE0 (IX_NPEDL_FN_ENTRY_EXIT ,"Entering ixNpeDlImageMgrImageLocate\n" ); - header = (IxNpeDlImageMgrImageLibraryHeader *) IxNpeMicroCodeImageLibrary; + header = (IxNpeDlImageMgrImageLibraryHeader *)getIxNpeMicroCodeImageLibrary (); -if (ixNpeDlImageMgrSignatureCheck (IxNpeMicroCodeImageLibrary)) +if (ixNpeDlImageMgrSignatureCheck (getIxNpeMicroCodeImageLibrary ())) {/* for each image entry in the image library header ... */ while (header->entry[imageCount].eohMarker !=
@@ -308,8 +315,9 @@ ixNpeDlImageMgrImageLocate (* get pointer to the image in the image library using offset from * 1st word in image library */ +UINT32 *tmp=getIxNpeMicroCodeImageLibrary (); imageOffset = header->entry[imageCount].image.offset; - *imagePtr = &IxNpeMicroCodeImageLibrary[imageOffset]; + *imagePtr = &tmp[imageOffset];/* get the image size */ *imageSize = header->entry[imageCount].image.size; status =IX_SUCCESS ;
@@ -354,9 +362,9 @@ ixNpeDlImageMgrLatestImageExtract (IxNpeDlImageId *imageId)IX_NPEDL_TRACE0 (IX_NPEDL_FN_ENTRY_EXIT ,"Entering ixNpeDlImageMgrLatestImageExtract\n" ); - header = (IxNpeDlImageMgrImageLibraryHeader *) IxNpeMicroCodeImageLibrary; + header = (IxNpeDlImageMgrImageLibraryHeader *)getIxNpeMicroCodeImageLibrary (); -if (ixNpeDlImageMgrSignatureCheck (IxNpeMicroCodeImageLibrary)) +if (ixNpeDlImageMgrSignatureCheck (getIxNpeMicroCodeImageLibrary ())) {/* for each image entry in the image library header ... */ while (header->entry[imageCount].eohMarker !=
@@ -633,7 +641,7 @@ ixNpeDlImageMgrImageFind ( imageLibrary = ixNpeMicrocode_binaryArray; }#else - imageLibrary = IxNpeMicroCodeImageLibrary; + imageLibrary =getIxNpeMicroCodeImageLibrary ();#endif /* IX_NPEDL_READ_MICROCODE_FROM_FILE */ }
Signature · 1 line
1.5.3.7
PATCH 1/1 IXP: add dynamic microcode addr
Quoted 4 lines · Jean-Christophe PLAGNIOL-VILLARD
allow to load the microde from flash or ram by download it through the serial or other.
Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
PATCH 1/1 PATCH: load ixp42x NPE firmware from separate flash block, remove dead code
In reply to Jean-Christophe PLAGNIOL-VILLARDQuoted 9 lines · Jean-Christophe PLAGNIOL-VILLARD
From: Michael Schwingen <[email protected]>
Hi,
the following patch adds support to move the IXP42X NPE firmware to a separate flash block, whose start address is defined in
CONFIG_IXP4XX_NPE_EXT_UCODE_BASE. Using that, it is possible to build NPE-enabled u-boot without copyright problems due to the NPE firmware.
Quoted 8 lines
I have also removed some unused code (#if 0 currently - should we completely remove those unused parts?)
I hope the patch applies, I get whitespace-related differences in the NPE files due to trailing whitespace in the original versions.
Signed-off-by Michael Schwingen <[email protected]>Signed-off-by Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
Thanks - I had expected some more discussion if those NPE code cleanups should be done.
Now for CONFIG_IXP4XX_NPE_EXT_UCODE_BASE to really work, one more change in the Makefile is required (which I left out when I sent the patch, but with the new Makefile structure, this is really easy to do):
cpu/ixp/npe/Makefile +3 -1
@@ -72,7 +72,6 @@ COBJS := npe.o \ IxNpeDlImageMgr.o \ IxNpeDlNpeMgr.o \ IxNpeDlNpeMgrUtils.o \ - IxNpeMicrocode.o \ IxNpeMh.o \ IxNpeMhConfig.o \ IxNpeMhReceive.o \
@@ -80,6 +79,9 @@ COBJS := npe.o \ IxNpeMhSolicitedCbMgr.o \ IxNpeMhUnsolicitedCbMgr.o +ifndef CONFIG_IXP4XX_NPE_EXT_UCODE_BASE +COBJS += IxNpeMicrocode.o +endif SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
Having the NPE microcode in a seperate flash sector works well with both u-boot and with the OpenWRT patches, which expect the microcode in a separate MTD partition, so the code is in flash only once, and it should be GPL compliant.
cu
Michael
PATCH 1/1 PATCH: load ixp42x NPE firmware from separate flash block, remove dead code
Quoted 4 lines · Michael Schwingen
Quoted 3 lines · Jean-Christophe PLAGNIOL-VILLARD
From: Michael Schwingen <[email protected]>
Hi,
<snip>
Quoted 7 lines
cpu/ixp/npe/Makefile +0
-1- IxNpeMicrocode.o \ IxNpeMh.o \ IxNpeMhConfig.o \ IxNpeMhReceive.o \
cpu/ixp/npe/Makefile COBJS := npe.o \ · line 87
Quoted 9 lines
cpu/ixp/npe/Makefile +3
-0@@ -80,6 +79,9 @@ COBJS := npe.o \ IxNpeMhSolicitedCbMgr.o \ IxNpeMhUnsolicitedCbMgr.o +ifndef CONFIG_IXP4XX_NPE_EXT_UCODE_BASE +COBJS += IxNpeMicrocode.o +endif SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
I will add this to the PATCH: load ixp42x NPE firmware from separate flash block, remove dead code
too
Best Regards,
J.
Quoted 18 lines
Having the NPE microcode in a seperate flash sector works well with both u-boot and with the OpenWRT patches, which expect the microcode in a separate MTD partition, so the code is in flash only once, and it should be GPL compliant.
cu
Michael-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users