* [U-Boot] ppc: using d-cache for C stack and as cache at the same time?
@ 2009-04-01 8:20 Jens Gehrlein
2009-04-01 9:14 ` Wolfgang Denk
0 siblings, 1 reply; 7+ messages in thread
From: Jens Gehrlein @ 2009-04-01 8:20 UTC (permalink / raw)
To: u-boot
Hi,
AFAIK, while running from flash, u-boot uses (part of) d-cache on some
platforms for the C stack. I think, it's on MPC83xx and MPC85xx?
Does anybody know, if I can use the remaining part of the d-cache
as normal d-cache, e.g. to generate bursts on the SDRAM interface
while testing the RAM?
Kind regards,
Jens
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] ppc: using d-cache for C stack and as cache at the same time?
2009-04-01 8:20 [U-Boot] ppc: using d-cache for C stack and as cache at the same time? Jens Gehrlein
@ 2009-04-01 9:14 ` Wolfgang Denk
2009-04-01 9:29 ` [U-Boot] ppc: using d-cache for C stack and as cache at thesame time? Liu Dave-R63238
2009-04-01 9:42 ` [U-Boot] ppc: using d-cache for C stack and as cache at the same time? Jens Gehrlein
0 siblings, 2 replies; 7+ messages in thread
From: Wolfgang Denk @ 2009-04-01 9:14 UTC (permalink / raw)
To: u-boot
Dear Jens Gehrlein,
In message <49D323E5.9080100@tqs.de> you wrote:
>
> AFAIK, while running from flash, u-boot uses (part of) d-cache on some
> platforms for the C stack. I think, it's on MPC83xx and MPC85xx?
>
> Does anybody know, if I can use the remaining part of the d-cache
> as normal d-cache, e.g. to generate bursts on the SDRAM interface
> while testing the RAM?
On which platform?
Note that implementing a memory test that actually triggers burst
mode accesses is really, really tricky. You probably do NOT want to
do this while running from flash (i. e. from a very restrictive
envrionment). You might want to have a look at examples/test_burst*
but note that this code was written for a MPC8xx system, so changes
will be required for 83xx or 85xx.
Also note that a much more reliable test for burst mode errors is to
boot Linux with root file system over NFS and then compile the Linux
kernel on the target.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Bus error -- driver executed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] ppc: using d-cache for C stack and as cache at thesame time?
2009-04-01 9:14 ` Wolfgang Denk
@ 2009-04-01 9:29 ` Liu Dave-R63238
2009-04-01 9:47 ` Jens Gehrlein
2009-04-01 14:48 ` Peter Tyser
2009-04-01 9:42 ` [U-Boot] ppc: using d-cache for C stack and as cache at the same time? Jens Gehrlein
1 sibling, 2 replies; 7+ messages in thread
From: Liu Dave-R63238 @ 2009-04-01 9:29 UTC (permalink / raw)
To: u-boot
> > AFAIK, while running from flash, u-boot uses (part of)
> d-cache on some
> > platforms for the C stack. I think, it's on MPC83xx and MPC85xx?
> >
> > Does anybody know, if I can use the remaining part of the d-cache
> > as normal d-cache, e.g. to generate bursts on the SDRAM interface
> > while testing the RAM?
>
> On which platform?
>
> Note that implementing a memory test that actually triggers burst
> mode accesses is really, really tricky. You probably do NOT want to
> do this while running from flash (i. e. from a very restrictive
> envrionment). You might want to have a look at examples/test_burst*
> but note that this code was written for a MPC8xx system, so changes
> will be required for 83xx or 85xx.
>
> Also note that a much more reliable test for burst mode errors is to
> boot Linux with root file system over NFS and then compile the Linux
> kernel on the target.
It needs case by case.
* 83xx, the whole d-cache is locked
If you need generate bursts on DRAM interface, you have to change to
way locked. Otherwise, you can use the DMA to generate burst.
* 85xx, half of d-cache is locked.
it is possible to generate the burst at 85xx.
Try to use dcbf....
Thanks, Dave
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] ppc: using d-cache for C stack and as cache at the same time?
2009-04-01 9:14 ` Wolfgang Denk
2009-04-01 9:29 ` [U-Boot] ppc: using d-cache for C stack and as cache at thesame time? Liu Dave-R63238
@ 2009-04-01 9:42 ` Jens Gehrlein
1 sibling, 0 replies; 7+ messages in thread
From: Jens Gehrlein @ 2009-04-01 9:42 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
Wolfgang Denk schrieb:
> Dear Jens Gehrlein,
>
> In message <49D323E5.9080100@tqs.de> you wrote:
>> AFAIK, while running from flash, u-boot uses (part of) d-cache on some
>> platforms for the C stack. I think, it's on MPC83xx and MPC85xx?
>>
>> Does anybody know, if I can use the remaining part of the d-cache
>> as normal d-cache, e.g. to generate bursts on the SDRAM interface
>> while testing the RAM?
>
> On which platform?
>
> Note that implementing a memory test that actually triggers burst
> mode accesses is really, really tricky. You probably do NOT want to
> do this while running from flash (i. e. from a very restrictive
> envrionment).
Why not? Of course, it's only possible if I can use a part of the
D-Cache as C stack (or another internal RAM if available). This must
be separately checked for each processor.
> You might want to have a look at examples/test_burst*
> but note that this code was written for a MPC8xx system, so changes
> will be required for 83xx or 85xx.
Thank you for the hint. I'll have a look.
> Also note that a much more reliable test for burst mode errors is to
> boot Linux with root file system over NFS and then compile the Linux
> kernel on the target.
I agree.
Kind regards,
Jens
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] ppc: using d-cache for C stack and as cache at thesame time?
2009-04-01 9:29 ` [U-Boot] ppc: using d-cache for C stack and as cache at thesame time? Liu Dave-R63238
@ 2009-04-01 9:47 ` Jens Gehrlein
2009-04-01 14:48 ` Peter Tyser
1 sibling, 0 replies; 7+ messages in thread
From: Jens Gehrlein @ 2009-04-01 9:47 UTC (permalink / raw)
To: u-boot
Liu Dave-R63238 schrieb:
>>> AFAIK, while running from flash, u-boot uses (part of)
>> d-cache on some
>>> platforms for the C stack. I think, it's on MPC83xx and MPC85xx?
>>>
>>> Does anybody know, if I can use the remaining part of the d-cache
>>> as normal d-cache, e.g. to generate bursts on the SDRAM interface
>>> while testing the RAM?
>> On which platform?
>>
>> Note that implementing a memory test that actually triggers burst
>> mode accesses is really, really tricky. You probably do NOT want to
>> do this while running from flash (i. e. from a very restrictive
>> envrionment). You might want to have a look at examples/test_burst*
>> but note that this code was written for a MPC8xx system, so changes
>> will be required for 83xx or 85xx.
>>
>> Also note that a much more reliable test for burst mode errors is to
>> boot Linux with root file system over NFS and then compile the Linux
>> kernel on the target.
>
> It needs case by case.
>
> * 83xx, the whole d-cache is locked
> If you need generate bursts on DRAM interface, you have to change to
> way locked. Otherwise, you can use the DMA to generate burst.
Good idea.
> * 85xx, half of d-cache is locked.
> it is possible to generate the burst at 85xx.
> Try to use dcbf....
Thank you for the hints.
Kind regards,
Jens
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] ppc: using d-cache for C stack and as cache at thesame time?
2009-04-01 9:29 ` [U-Boot] ppc: using d-cache for C stack and as cache at thesame time? Liu Dave-R63238
2009-04-01 9:47 ` Jens Gehrlein
@ 2009-04-01 14:48 ` Peter Tyser
2009-04-01 15:03 ` Jens Gehrlein
1 sibling, 1 reply; 7+ messages in thread
From: Peter Tyser @ 2009-04-01 14:48 UTC (permalink / raw)
To: u-boot
On Wed, 2009-04-01 at 17:29 +0800, Liu Dave-R63238 wrote:
> > > AFAIK, while running from flash, u-boot uses (part of)
> > d-cache on some
> > > platforms for the C stack. I think, it's on MPC83xx and MPC85xx?
> > >
> > > Does anybody know, if I can use the remaining part of the d-cache
> > > as normal d-cache, e.g. to generate bursts on the SDRAM interface
> > > while testing the RAM?
> >
> > On which platform?
> >
> > Note that implementing a memory test that actually triggers burst
> > mode accesses is really, really tricky. You probably do NOT want to
> > do this while running from flash (i. e. from a very restrictive
> > envrionment). You might want to have a look at examples/test_burst*
> > but note that this code was written for a MPC8xx system, so changes
> > will be required for 83xx or 85xx.
> >
> > Also note that a much more reliable test for burst mode errors is to
> > boot Linux with root file system over NFS and then compile the Linux
> > kernel on the target.
>
> It needs case by case.
>
> * 83xx, the whole d-cache is locked
> If you need generate bursts on DRAM interface, you have to change to
> way locked. Otherwise, you can use the DMA to generate burst.
>
> * 85xx, half of d-cache is locked.
> it is possible to generate the burst at 85xx.
> Try to use dcbf....
You should be able to use the 85xx DMA engine to generate the bursts too
(I'd assume the same for 83xx, but never tried it). See
cpu/mpc85xx/cpu.c dma_*(). The default values of the satr0 and datr0
don't allow the processor to snoop transactions, so you'd have to use
cache operations or change datr0/satr0 to something like 0x50000 for
your tests.
We've added a very basic DMA test to the mtest command which is used for
board testing here. Let me know if you'd like me to send it - its not
cleaned up but could give you a starting point.
Best,
Peter
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] ppc: using d-cache for C stack and as cache at thesame time?
2009-04-01 14:48 ` Peter Tyser
@ 2009-04-01 15:03 ` Jens Gehrlein
0 siblings, 0 replies; 7+ messages in thread
From: Jens Gehrlein @ 2009-04-01 15:03 UTC (permalink / raw)
To: u-boot
Peter Tyser schrieb:
> You should be able to use the 85xx DMA engine to generate the bursts too
> (I'd assume the same for 83xx, but never tried it). See
> cpu/mpc85xx/cpu.c dma_*(). The default values of the satr0 and datr0
> don't allow the processor to snoop transactions, so you'd have to use
> cache operations or change datr0/satr0 to something like 0x50000 for
> your tests.
>
> We've added a very basic DMA test to the mtest command which is used for
> board testing here. Let me know if you'd like me to send it - its not
> cleaned up but could give you a starting point.
Although, I will not start before next month with burst testing, it
would be very nice, if could send it. Thank you very much.
Kind regards,
Jens
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-04-01 15:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-01 8:20 [U-Boot] ppc: using d-cache for C stack and as cache at the same time? Jens Gehrlein
2009-04-01 9:14 ` Wolfgang Denk
2009-04-01 9:29 ` [U-Boot] ppc: using d-cache for C stack and as cache at thesame time? Liu Dave-R63238
2009-04-01 9:47 ` Jens Gehrlein
2009-04-01 14:48 ` Peter Tyser
2009-04-01 15:03 ` Jens Gehrlein
2009-04-01 9:42 ` [U-Boot] ppc: using d-cache for C stack and as cache at the same time? Jens Gehrlein
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox