This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

QUICC - Improve guess about DPRAM allocation


Index: hal/powerpc/quicc/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/quicc/current/ChangeLog,v
retrieving revision 1.30
diff -u -5 -p -r1.30 ChangeLog
--- hal/powerpc/quicc/current/ChangeLog	18 Mar 2003 14:03:27 -0000	1.30
+++ hal/powerpc/quicc/current/ChangeLog	20 Mar 2003 13:09:26 -0000
@@ -1,5 +1,11 @@
+2003-03-20  Gary Thomas  <gary at mlbassoc dot com>
+
+	* src/cpm.c (_mpc8xx_allocBd): Improve "best guess" for intial DPRAM
+	allocation to use a value which is likely not to conflict with old 
+	versions of RedBoot.
+
 2003-03-18  Gary Thomas  <gary at mlbassoc dot com>
 
 	* src/quicc_smc1.c (cyg_hal_sccx_init_channel): Update initialization
 	for SCC2 - *CAUTION* not tested on actual hardware.
 
Index: hal/powerpc/quicc/current/src/cpm.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/powerpc/quicc/current/src/cpm.c,v
retrieving revision 1.2
diff -u -5 -p -r1.2 cpm.c
--- hal/powerpc/quicc/current/src/cpm.c	7 Mar 2003 02:34:57 -0000	1.2
+++ hal/powerpc/quicc/current/src/cpm.c	19 Mar 2003 17:12:49 -0000
@@ -98,15 +98,18 @@ _mpc8xx_allocBd(int len)
 {
     unsigned short bd;
 
     bd = *nextBd;
     if ((bd < QUICC_BD_BASE) || (bd > QUICC_BD_END)) {
-        // Most likely not set up :-(
-        bd = *nextBd = QUICC_BD_BASE;
+        // Most likely not set up - make a guess :-(
+        bd = *nextBd = QUICC_BD_BASE+0x400;
     }
     len = (len + 7) & ~7;  // Multiple of 8 bytes
     *nextBd += len;
+    if (*nextBd >= QUICC_BD_END) {
+        *nextBd = QUICC_BD_BASE;
+    }
     return bd;
 }
 
 #endif // CYGPKG_HAL_POWERPC_MPC860
 // EOF cpm.c


-- 
------------------------------------------------------------
Gary Thomas                 |
MLB Associates              |  Consulting for the
+1 (970) 229-1963           |    Embedded world
http://www.mlbassoc.com/    |
email: <gary at mlbassoc dot com>  |
gpg: http://www.chez-thomas.org/gary/gpg_key.asc
------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]