* [U-Boot-Users] [PATCH] PATCH: load ixp42x NPE firmware from separate flash block, remove dead code
@ 2008-01-09 12:30 Jean-Christophe PLAGNIOL-VILLARD
2008-01-09 12:34 ` [U-Boot-Users] [PATCH] IXP: add dynamic microcode addr Jean-Christophe PLAGNIOL-VILLARD
2008-01-10 22:05 ` [U-Boot-Users] [PATCH] PATCH: load ixp42x NPE firmware from separate flash block, remove dead code Michael Schwingen
0 siblings, 2 replies; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-01-09 12:30 UTC (permalink / raw)
To: u-boot
From: Michael Schwingen <michael@schwingen.org>
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.
Signed-off-by: Michael Schwingen <michael@schwingen.org>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
diff --git a/cpu/ixp/npe/IxNpeDl.c b/cpu/ixp/npe/IxNpeDl.c
index ffe355c..3738337 100644
--- a/cpu/ixp/npe/IxNpeDl.c
+++ b/cpu/ixp/npe/IxNpeDl.c
@@ -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
diff --git a/cpu/ixp/npe/IxNpeDlImageMgr.c b/cpu/ixp/npe/IxNpeDlImageMgr.c
index e05c228..c0e7349 100644
--- a/cpu/ixp/npe/IxNpeDlImageMgr.c
+++ b/cpu/ixp/npe/IxNpeDlImageMgr.c
@@ -134,8 +134,8 @@ typedef struct
static 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 BOOL
ixNpeDlImageMgrNpeFunctionIdCompare (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)
{
--
1.5.3.7
^ permalink raw reply related [flat|nested] 9+ messages in thread* [U-Boot-Users] [PATCH] IXP: add dynamic microcode addr
2008-01-09 12:30 [U-Boot-Users] [PATCH] PATCH: load ixp42x NPE firmware from separate flash block, remove dead code Jean-Christophe PLAGNIOL-VILLARD
@ 2008-01-09 12:34 ` Jean-Christophe PLAGNIOL-VILLARD
2008-01-09 13:23 ` Stefan Roese
2008-01-10 22:05 ` [U-Boot-Users] [PATCH] PATCH: load ixp42x NPE firmware from separate flash block, remove dead code Michael Schwingen
1 sibling, 1 reply; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-01-09 12:34 UTC (permalink / raw)
To: u-boot
allow to load the microde from flash or ram by download it through
the serial or other.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
diff --git a/cpu/ixp/npe/IxNpeDlImageMgr.c b/cpu/ixp/npe/IxNpeDlImageMgr.c
index c0e7349..1c47661 100644
--- a/cpu/ixp/npe/IxNpeDlImageMgr.c
+++ b/cpu/ixp/npe/IxNpeDlImageMgr.c
@@ -140,6 +140,13 @@ static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)CONFIG_IXP4XX_NPE_EXT_UCOD
static 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 */
}
--
1.5.3.7
^ permalink raw reply related [flat|nested] 9+ messages in thread* [U-Boot-Users] [PATCH] IXP: add dynamic microcode addr
2008-01-09 12:34 ` [U-Boot-Users] [PATCH] IXP: add dynamic microcode addr Jean-Christophe PLAGNIOL-VILLARD
@ 2008-01-09 13:23 ` Stefan Roese
2008-01-09 17:40 ` Jean-Christophe PLAGNIOL-VILLARD
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Stefan Roese @ 2008-01-09 13:23 UTC (permalink / raw)
To: u-boot
On Wednesday 09 January 2008, Jean-Christophe PLAGNIOL-VILLARD wrote:
> allow to load the microde from flash or ram by download it through
> the serial or other.
>
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
>
> diff --git a/cpu/ixp/npe/IxNpeDlImageMgr.c b/cpu/ixp/npe/IxNpeDlImageMgr.c
> index c0e7349..1c47661 100644
> --- a/cpu/ixp/npe/IxNpeDlImageMgr.c
> +++ b/cpu/ixp/npe/IxNpeDlImageMgr.c
> @@ -140,6 +140,13 @@ static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32
> *)CONFIG_IXP4XX_NPE_EXT_UCOD static UINT32 *IxNpeMicroCodeImageLibrary =
> (UINT32 *)IxNpeMicrocode_array; #endif
>
> +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
=====================================================================
^ permalink raw reply [flat|nested] 9+ messages in thread* [U-Boot-Users] [PATCH] IXP: add dynamic microcode addr
2008-01-09 13:23 ` Stefan Roese
@ 2008-01-09 17:40 ` Jean-Christophe PLAGNIOL-VILLARD
2008-01-09 17:49 ` Jean-Christophe PLAGNIOL-VILLARD
2008-01-09 17:56 ` Jean-Christophe PLAGNIOL-VILLARD
2 siblings, 0 replies; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-01-09 17:40 UTC (permalink / raw)
To: u-boot
On 14:23 Wed 09 Jan , Stefan Roese wrote:
> On Wednesday 09 January 2008, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > allow to load the microde from flash or ram by download it through
> > the serial or other.
> >
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> >
> > diff --git a/cpu/ixp/npe/IxNpeDlImageMgr.c b/cpu/ixp/npe/IxNpeDlImageMgr.c
> > index c0e7349..1c47661 100644
> > --- a/cpu/ixp/npe/IxNpeDlImageMgr.c
> > +++ b/cpu/ixp/npe/IxNpeDlImageMgr.c
> > @@ -140,6 +140,13 @@ static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32
> > *)CONFIG_IXP4XX_NPE_EXT_UCOD static UINT32 *IxNpeMicroCodeImageLibrary =
> > (UINT32 *)IxNpeMicrocode_array; #endif
> >
> > +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.
Done.
>
> I'm not so sure about the naming of the env variable too. How
> about "npe_ucode"?
Why not
Best regards,
J.
^ permalink raw reply [flat|nested] 9+ messages in thread* [U-Boot-Users] [PATCH] IXP: add dynamic microcode addr
2008-01-09 13:23 ` Stefan Roese
2008-01-09 17:40 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2008-01-09 17:49 ` Jean-Christophe PLAGNIOL-VILLARD
2008-01-09 17:56 ` Jean-Christophe PLAGNIOL-VILLARD
2 siblings, 0 replies; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-01-09 17:49 UTC (permalink / raw)
To: u-boot
allow to load the microde from flash or ram by download it through
the serial or other.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
diff --git a/README b/README
index 26f93c2..9a8d6d7 100644
--- a/README
+++ b/README
@@ -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.
diff --git a/cpu/ixp/npe/IxNpeDlImageMgr.c b/cpu/ixp/npe/IxNpeDlImageMgr.c
index c0e7349..f7326bd 100644
--- a/cpu/ixp/npe/IxNpeDlImageMgr.c
+++ b/cpu/ixp/npe/IxNpeDlImageMgr.c
@@ -140,6 +140,12 @@ static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)CONFIG_IXP4XX_NPE_EXT_UCOD
static 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 */
}
--
1.5.3.7
^ permalink raw reply related [flat|nested] 9+ messages in thread* [U-Boot-Users] [PATCH] IXP: add dynamic microcode addr
2008-01-09 13:23 ` Stefan Roese
2008-01-09 17:40 ` Jean-Christophe PLAGNIOL-VILLARD
2008-01-09 17:49 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2008-01-09 17:56 ` Jean-Christophe PLAGNIOL-VILLARD
2008-01-09 18:36 ` Stefan Roese
2 siblings, 1 reply; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-01-09 17:56 UTC (permalink / raw)
To: u-boot
allow to load the microde from flash or ram by download it through
the serial or other.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
diff --git a/README b/README
index 26f93c2..9a8d6d7 100644
--- a/README
+++ b/README
@@ -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.
diff --git a/cpu/ixp/npe/IxNpeDlImageMgr.c b/cpu/ixp/npe/IxNpeDlImageMgr.c
index c0e7349..b46d16d 100644
--- a/cpu/ixp/npe/IxNpeDlImageMgr.c
+++ b/cpu/ixp/npe/IxNpeDlImageMgr.c
@@ -140,6 +140,13 @@ static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)CONFIG_IXP4XX_NPE_EXT_UCOD
static 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 */
}
--
1.5.3.7
^ permalink raw reply related [flat|nested] 9+ messages in thread* [U-Boot-Users] [PATCH] IXP: add dynamic microcode addr
2008-01-09 17:56 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2008-01-09 18:36 ` Stefan Roese
0 siblings, 0 replies; 9+ messages in thread
From: Stefan Roese @ 2008-01-09 18:36 UTC (permalink / raw)
To: u-boot
On Wednesday 09 January 2008, Jean-Christophe PLAGNIOL-VILLARD wrote:
> allow to load the microde from flash or ram by download it through
> the serial or other.
>
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Stefan Roese <sr@denx.de>
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
=====================================================================
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot-Users] [PATCH] PATCH: load ixp42x NPE firmware from separate flash block, remove dead code
2008-01-09 12:30 [U-Boot-Users] [PATCH] PATCH: load ixp42x NPE firmware from separate flash block, remove dead code Jean-Christophe PLAGNIOL-VILLARD
2008-01-09 12:34 ` [U-Boot-Users] [PATCH] IXP: add dynamic microcode addr Jean-Christophe PLAGNIOL-VILLARD
@ 2008-01-10 22:05 ` Michael Schwingen
2008-01-10 23:32 ` Jean-Christophe PLAGNIOL-VILLARD
1 sibling, 1 reply; 9+ messages in thread
From: Michael Schwingen @ 2008-01-10 22:05 UTC (permalink / raw)
To: u-boot
On Wed, Jan 09, 2008 at 01:30:11PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> From: Michael Schwingen <michael@schwingen.org>
>
> 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.
>
> Signed-off-by: Michael Schwingen <michael@schwingen.org>
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
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):
Signed-off-by: Michael Schwingen <michael@schwingen.org>
diff --git a/cpu/ixp/npe/Makefile b/cpu/ixp/npe/Makefile
index 7f020b5..25117d7 100644
--- a/cpu/ixp/npe/Makefile
+++ b/cpu/ixp/npe/Makefile
@@ -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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot-Users] [PATCH] PATCH: load ixp42x NPE firmware from separate flash block, remove dead code
2008-01-10 22:05 ` [U-Boot-Users] [PATCH] PATCH: load ixp42x NPE firmware from separate flash block, remove dead code Michael Schwingen
@ 2008-01-10 23:32 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-01-10 23:32 UTC (permalink / raw)
To: u-boot
On 23:05 Thu 10 Jan , Michael Schwingen wrote:
> On Wed, Jan 09, 2008 at 01:30:11PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > From: Michael Schwingen <michael@schwingen.org>
> >
> > Hi,
<snip>
> - 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))
>
>
I will add this to the PATCH: load ixp42x NPE firmware from separate
flash block, remove dead code
too
Best Regards,
J.
>
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-01-10 23:32 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-09 12:30 [U-Boot-Users] [PATCH] PATCH: load ixp42x NPE firmware from separate flash block, remove dead code Jean-Christophe PLAGNIOL-VILLARD
2008-01-09 12:34 ` [U-Boot-Users] [PATCH] IXP: add dynamic microcode addr Jean-Christophe PLAGNIOL-VILLARD
2008-01-09 13:23 ` Stefan Roese
2008-01-09 17:40 ` Jean-Christophe PLAGNIOL-VILLARD
2008-01-09 17:49 ` Jean-Christophe PLAGNIOL-VILLARD
2008-01-09 17:56 ` Jean-Christophe PLAGNIOL-VILLARD
2008-01-09 18:36 ` Stefan Roese
2008-01-10 22:05 ` [U-Boot-Users] [PATCH] PATCH: load ixp42x NPE firmware from separate flash block, remove dead code Michael Schwingen
2008-01-10 23:32 ` Jean-Christophe PLAGNIOL-VILLARD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox