How does the stack works in the DCache?
Hello all,
I am using PPC 405 Walnut with 16M sdram. I got a question regarding the DCache setting in u-boot cpu/ppc4xx/start.S. I wrote the pseudo-code of start.S as below:
(In File cpu/ppc4xx/start.S)
.globl _start_start:_start:
clear and set up registers
invalidate I and D caches
Enable 128M cachable regions
set up temporary stack in DCACHE
sdram_init() (cpu/ppc4xx/sdram.c)
..........
I understand the code is trying to set up a stack in DCache. But I didn't get how the code makes it. Before calling sdram_init(), the stack pointer is CFG_INIT_RAM_ADDR = 0x40000000. I suppose this address is not a physical address and it refers to the address in the DCache. Is that right? But the CFG_INIT_RAM_ADDR is located in the address space of sdram. So is there any address translator in between DCache and CFG_INIT_RAM_ADDR? Or did I miss anything? I just couldn't figure out how the stack works in DCache... Can someone give me any clue? Thanks!
Frank
_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee? Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963