Mercurial > ecos
changeset 848:ddac09c38f55
Improve initial DPRAM value when guessing
| author | gthomas |
|---|---|
| date | Thu, 20 Mar 2003 13:09:54 +0000 |
| parents | def96a37f90d |
| children | 23fd347aba65 |
| files | packages/hal/powerpc/quicc/current/ChangeLog packages/hal/powerpc/quicc/current/src/cpm.c |
| diffstat | 2 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/hal/powerpc/quicc/current/ChangeLog +++ b/packages/hal/powerpc/quicc/current/ChangeLog @@ -1,3 +1,9 @@ +2003-03-20 Gary Thomas <gary@mlbassoc.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@mlbassoc.com> * src/quicc_smc1.c (cyg_hal_sccx_init_channel): Update initialization
--- 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; }
