PPC4xx: Minimal changes to add vxWorks support
PATCH 1/1 PPC4xx: Minimal changes to add vxWorks support
Hi
I have to support vxWorks on our boards. In order to avoid changing the TLB in all PPC440x based boards I need this small patch. Can it go into the git repository or do I have to maintain it out of the tree forever?
Best regards
--- cpu/ppc4xx/start.S | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
cpu/ppc4xx/start.S +4 -1
@@ -1432,7 +1432,10 @@ relocate_code: dccci 0,0 /* Invalidate data cache, now no longer our stack */ sync isync - addi r1,r0,0x0000 /* TLB entry #0 */ +#ifndef CFG_TLB_FOR_BOOT_FLASH +#define CFG_TLB_FOR_BOOT_FLASH 0 +#endif + addi r1,r0,CFG_TLB_FOR_BOOT_FLASH /* TLB entry (default #0) */ tlbre r0,r1,0x0002 /* Read contents */ ori r0,r0,0x0c00 /* Or in the inhibit, write through bit */ tlbwe r0,r1,0x0002 /* Save it out */
Signature · 1 line
1.5.2
PATCH 1/1 PPC4xx: Minimal changes to add vxWorks support
Quoted 19 lines · Niklaus Giger
Hi
I have to support vxWorks on our boards. In order to avoid changing the TLB in all PPC440x based boards I need this small patch. Can it go into the git repository or do I have to maintain it out of the tree forever?
Best regards
Signed-off-by Niklaus Giger <[email protected]>--- cpu/ppc4xx/start.S | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)cpu/ppc4xx/start.S +0
-0@@ -1432,7 +1432,10 @@ relocate_code: dccci 0,0 /* Invalidate data cache, now no longer our stack */
cpu/ppc4xx/start.S relocate_code: · line 1441
Quoted 10 lines
cpu/ppc4xx/start.S +4
-1sync isync - addi r1,r0,0x0000 /* TLB entry #0 */ +#ifndef CFG_TLB_FOR_BOOT_FLASH +#define CFG_TLB_FOR_BOOT_FLASH 0 +#endif + addi r1,r0,CFG_TLB_FOR_BOOT_FLASH /* TLB entry (default #0) */ tlbre r0,r1,0x0002 /* Read contents */ ori r0,r0,0x0c00 /* Or in the inhibit, write through bit */ tlbwe r0,r1,0x0002 /* Save it out */
Hi Niklaus,
I don't know the answer to your question, but the following alternate construct is cleaner (and cleaner may help get acceptance ;-):
#ifdef CFG_TLB_FOR_BOOT_FLASH addi r1,r0,CFG_TLB_FOR_BOOT_FLASH /* Use defined TLB */ #else addi r1,r0,0x0000 /* Default TLB entry is #0 */
#endif
Best regards,
gvb
PATCH 1/1 PPC4xx: Minimal changes to add vxWorks support
Hi Niklaus,
Quoted 3 lines · Jerry Van Baren
Quoted 3 lines
I have to support vxWorks on our boards. In order to avoid changing the TLB in all PPC440x based boards I need this small patch. Can it go into the git repository or do I have to maintain it out of the tree forever?
If something fixes a problem and is for general use, why not include it, if it's not too messy. Please see below.
Quoted 26 lines
Quoted 13 lines
Best regards
Signed-off-by Niklaus Giger <[email protected]>--- cpu/ppc4xx/start.S | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)cpu/ppc4xx/start.S +0
-0@@ -1432,7 +1432,10 @@ relocate_code: dccci 0,0 /* Invalidate data cache, now no longer our stack */cpu/ppc4xx/start.S relocate_code: · line 1441
Quoted 10 lines
cpu/ppc4xx/start.S +4
-1sync isync - addi r1,r0,0x0000 /* TLB entry #0 */ +#ifndef CFG_TLB_FOR_BOOT_FLASH +#define CFG_TLB_FOR_BOOT_FLASH 0 +#endif + addi r1,r0,CFG_TLB_FOR_BOOT_FLASH /* TLB entry (default #0) */ tlbre r0,r1,0x0002 /* Read contents */ ori r0,r0,0x0c00 /* Or in the inhibit, write through bit */ tlbwe r0,r1,0x0002 /* Save it out */Hi Niklaus,
Quoted 8 lines
I don't know the answer to your question, but the following alternate construct is cleaner (and cleaner may help get acceptance ;-):
#ifdef CFG_TLB_FOR_BOOT_FLASH addi r1,r0,CFG_TLB_FOR_BOOT_FLASH /* Use defined TLB */ #else addi r1,r0,0x0000 /* Default TLB entry is #0 */#endif
Thanks Jerry. This is much clearer and I have no problem adding this version in the next merge window, when Niklaus provides a revised patch.
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
=====================================================================