From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stuart Adams To: ecos-discuss@cygnus.com Subject: Re: Cache and MMU support for PowerPC Date: Fri, 06 Nov 1998 10:40:00 -0000 Message-id: <36431BCE.64287D5A@brightstareng.com> References: <3640A0CC.1B964D74@microplex.com> <3640AEAB.15DFD164.cygnus.sourceware.ecos.d@brightstareng.com> X-SW-Source: 1998/msg00008.html > Cache support will be available soon. However, as Stuart points out, > it requires a minimal MMU setup which is board specific; we use a > Cogent board for development, so that is what will be supported to > start with. Customizing the MMU setup for other boards should be > trivial though. The only thing that would need to go in the board specific HAL would be a data structure describing the static mapping of Virtual to Physical Addresses and the Attributes for each map. The actual MMU and cache setup code can be independent. (Motorola's example MMU/Cache code on their web site does it this way.) > The MMU setup is truly minimal, basically marking the IO memory area > of the Cogent board as Cache Inhibited, so generic MMU support (memory > protection, paging, etc.) is *not* supported yet. What about for memory that is used as buffers by the CPM. Since the CPM transfers data to/from I/O devices to memory but bypasses the cache you have to make sure that you don't wind up with stale data in your cache. I don't know if its the best approach but we got around this by creating two Virtual->Physical mappings for main DRAM memory - one cache enabled, the other cache disabled. When ever we read/write CPM I/O buffers we use the cache inhibited virtual addresses. The nice thing about this is that you can use malloc/free to dynamically allocate buffers for use by the CPM. -- Stuart