# HG changeset patch # User gthomas # Date 1048165794 0 # Node ID ddac09c38f55f59cfba0ac49d2f3f7129461a3a5 # Parent def96a37f90d310f3ff5a5b4d77f7b65f9b6cbe5 Improve initial DPRAM value when guessing diff --git a/packages/hal/powerpc/quicc/current/ChangeLog b/packages/hal/powerpc/quicc/current/ChangeLog --- a/packages/hal/powerpc/quicc/current/ChangeLog +++ b/packages/hal/powerpc/quicc/current/ChangeLog @@ -1,3 +1,9 @@ +2003-03-20 Gary Thomas + + * 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 * src/quicc_smc1.c (cyg_hal_sccx_init_channel): Update initialization diff --git a/packages/hal/powerpc/quicc/current/src/cpm.c b/packages/hal/powerpc/quicc/current/src/cpm.c --- a/packages/hal/powerpc/quicc/current/src/cpm.c +++ b/packages/hal/powerpc/quicc/current/src/cpm.c @@ -100,11 +100,14 @@ unsigned short 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; }