This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PowerPC hangs on memory read


"Anthony Tonizzo" <atonizzo@lycos.com> writes:

> Andrew:
> 
> > You you checked the MMU setup? Maybe you don't have 
> > access to this location?
> 
> I had a hunch it was MMU, but I was under the mistaken
> impression that when enabled, the MMU was mapped to a 1:1
> correspondence between logical and physical address 
> _for_the_whole_extent_of_the_memory_ (this is not as
> wasteful as it sounds since all the addressable space can 
> be covered with large memory blocks resulting in acceptably
> sized translation tables).

The MMU is generally used to control the cache attributes of various
regions of the address space. Usually RAM and ROM are mapped cached,
device registers and PCI space are mapped uncached. It may also be
useful to have an uncached view of RAM too. Depending on the relative
layouts of these blocks, it is not always possible to share MMU
entries between them. Also, by explicitly leaving unused address space
unmapped we can detect invalid accesses more easily.

> 
> Obviously I was wrong, because once I recompiled Ecos
> to disabled the MMU, everything works alright.
> 
> I peeked around, and I found one particularly interesting
> function in the HAL, cyg_hal_map_memory(). Can
> this function be called at any time or is it a setup only
> call? In other words, can you augment the MMU translation
> table at any time?

It is only called at startup. Depending on the MMU facilities
available it either uses the BAT registers, or installs static
mappings in the TLB. These are limited resources, so the HAL writes
needs to work things out fairly carefully.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]