From: Will Wagner <will_wagner@carallon.com>
To: Gary Thomas <gary@mlbassoc.com>
Cc: eCos Discussion <ecos-discuss@ecos.sourceware.org>
Subject: Re: [ECOS] Dual Port RAM on MPC8xx
Date: Wed, 20 Apr 2005 12:10:00 -0000 [thread overview]
Message-ID: <4266361A.5050802@carallon.com> (raw)
In-Reply-To: <1113994224.1030.170.camel@hermes>
Thanks very much for that. Not sure how I missed it.
In the alloc function instead of
if ((bd < QUICC_BD_BASE) || (bd > QUICC_BD_END)) {
// Most likely not set up - make a guess :-(
bd = *nextBd = QUICC_BD_BASE+0x400;
}
Why not just check the reset has been called? Seems odd to need that guess?
Gary Thomas wrote:
> On Wed, 2005-04-20 at 11:38 +0100, Will Wagner wrote:
>
>>I'm trying to understand how the allocation of DPRAM is done in the
>>function _mpc8xx_allocBd in cpm.c.
>>
>>Can someone explain why nextBD is initialised as:
>>
>>static short *nextBd = (short *)(CYGHWR_HAL_VSR_TABLE + 0x1F0);
>>
>>Presumably this is so that redboot and an application can cooperate when
>>using the DPRAM? Why is this address chosen and when is it's contents
>>ever initialised?
>>
>>Presumably it may not have been initialised as in _mpc8xx_allocBd there
>>is this code:
>>
>> if ((bd < QUICC_BD_BASE) || (bd > QUICC_BD_END)) {
>> // Most likely not set up - make a guess :-(
>> bd = *nextBd = QUICC_BD_BASE+0x400;
>> }
>>
>>I guess this is starting 0x400 into the DPRAM so that an apllication
>>doesn't reuse any DPRAM used by redboot? Is this correct? I can find
>>where redboot ever initialises this memory so I can't see how it works.
>>
>>Any help in understanding this is much appreciated.
>
>
> Look about 10 lines below the "static short" line you quoted :-)
> This value gets set when the CPM has been reset.
>
> The point is to keep track [minimally] of what DPRAM is in use
> and, yes, one wants applications to know and respect the allocations
> that RedBoot has already made.
>
> The choice was just an unused place in memory. This region of
> memory already holds similar data that is shared between RedBoot
> and applications.
>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
next prev parent reply other threads:[~2005-04-20 10:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-20 10:50 Will Wagner
2005-04-20 10:53 ` Gary Thomas
2005-04-20 12:10 ` Will Wagner [this message]
2005-04-20 12:56 ` Gary Thomas
2005-04-21 15:25 ` [ECOS] Serial Port in non-blocking mode Gatien Gillon
2005-04-21 16:50 ` Andrew Lunn
2005-04-21 18:43 ` Gatien Gillon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4266361A.5050802@carallon.com \
--to=will_wagner@carallon.com \
--cc=ecos-discuss@ecos.sourceware.org \
--cc=gary@mlbassoc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).