From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Garnett To: ecos-discuss@sourceware.cygnus.com Subject: Re: [ECOS] Porting eCos to DDB-VRC4375(Memory mapping) Date: Tue, 30 Jan 2001 03:16:00 -0000 Message-id: References: <000b01c08a63$06a81cd0$0201a8c0@raccoon> X-SW-Source: 2001-01/msg00466.html "Ling Su" writes: > I am working on porting eCos to DDB-VRC4375 based on VRC4373 source code. Of > course, if I make a working version, I will let you know. Now I have several > questions on the memory mapping. > > The DDB-VRC4375 contains 32M SDRAM, but DDB-VRC4373 has 8M SDRAM. > > <1>. In the mlt_mips_vr4300_vrc4373_ram.ldi, > MEMORY > { > ram : ORIGIN = 0x80100000, LENGTH = 0x500000 > } > > I am wondering why the LENGTH is 0x500000 instead of 0x700000. For vrc4375 > is SDRAM is 32M, how should I set it. I first set it to 0x1E00000, I am not > sure if it is right. Any explaination on the LENGTH will be welcomed a lot. > :-/ I'm not sure why it is 0x500000 rather than 0x700000. Perhaps we were using the top 2M for something else initially and forgot to change it. 0x1E00000 should be right for 32Mb. > > <2>. In the mlt_mips_vr4300_vrc4373_rom.ldi, > MEMORY > { > ram: ORIGIN = 0x80000800, LENGTH = 0x7F800 > rom: ORIGIN = 0xBFC0000, LENGTH = 0x80000 > } > I don't quite understand the ram LENGTH setting, why we just use 512KB ram > in rom start up setting? Can we set the ram LENGTH to larger. Another thing > is why its ORIGIN is 0x80000800? Again, the RAM length is probably just left over from an earlier version of the code. Generally we use the ROMRAM startup for all VRC4373 non-RAM configurations, I suspect that the ROM startup has not been used for a long time and has not been kept up to date. The RAM starts at 0x80000800 because we have various tables defined to go into low RAM. Below 0x80000400 there are hardware defined interrupt vectors. We have the VSR table at 0x80000400 and the vector table at 0x80000600. > > <3>. What is ROMRAM startup type? I found the memory mapping for ROMRAM is > the same as RAM startup type, why? > ROMRAM is for code that starts life in ROM but is copied out to RAM early in its life and runs from there. It is essentially the same as a RAM configuration in memory layout, except that it starts at 0x80000000 rather than 0x80100000. It differs from a normal RAM startup in that it also contains all the hardware initialization code needed in a ROM startup. > I am working on making the GDB stubs for the DDB-VRC4375, since the vrc4375 > has a FLASH ROM, so I can modify it a lot of times. But now I still didn't > make a GDB working. I think if I can make a RAM startup type GDB stub > working with my PMON, It will be convenient to try it. But the PMON in > VRC4375 Base Memory physical address 0x00000000 - 0x1FFFFFF mapped to both > 0x80000000 to 0x81FFFFFF and 0xA0000000 to 0xA1FFFFFF, two regions. I don't > know how it happend. In the PMON, I found the user space is from 0xA010000 > to above. Can anyone kindly shed some light on how to map two virtual region > to one physical region? > This is the same memory. At 0x80000000 it is seen through the cache and at 0xA0000000 it is seen uncached. Generally you should use the 0x8XXXXXXX addresses for code and data and 0xAXXXXXXX for device access. -- Nick Garnett, eCos Kernel Architect Red Hat, Cambridge, UK