EBC peripheral, access causing Machine Check

Dave Cogley dcogley at uslinc.com
Wed Sep 26 02:44:59 EST 2007


Yes I thought it might be a problem with the TLB.  Where does the TLB
initialization take place in the Linux kernel?  I am able to access any
other peripherals on the chip as there TLB entries appear to be properly
allocated. I am remapping the physical address for all peripherals that I am
working with.  I have attached the driver code for reference.

Dave

-----Original Message-----
From: Josh Boyer [mailto:jwboyer at jdub.homelinux.org] 
Sent: Monday, September 24, 2007 4:42 PM
To: Dave Cogley
Cc: linuxppc-embedded at ozlabs.org
Subject: Re: EBC peripheral, access causing Machine Check

On Mon, 24 Sep 2007 12:19:01 -0700
"Dave Cogley" <dcogley at uslinc.com> wrote:

> Good Afternoon,
> 
>  
> 
> I am using an AMCC 440EPx processor with an FPGA peripheral attached to
the
> EBC.  I am doing the entire bank configuration in the u-boot boot loader
> before Linux is loaded.  I can directly read and write registers using
> memory read and write (md, nm) within area 0xC0000000 to 0xC000FFFF direct
> memory I/O within the context of u-boot without any faults.  When I
attempt
> to access any register in area 0xC000000 within the context of my Linux
> device driver I get a Machine Check fault (attached text) which appears to
> be an access permission violation.  I am currently running the DENX ELDK
> 2.6.19.2 platform that was specific to the "Sequoia" platform.
> 
>  
> 
> I have configured the EBC access permissions and control resisters as
> follows for bank 1:
> 
>  
> 
> PB1CR: 0xC003C000
> 
> PB1AP: 0x80040380

You need proper TLB entries set up before you can access things.  Linux
discards the MMU settings that U-Boot does.  So your driver needs to call 
ioremap on the physical address. 

Other than that, we can't help you much without your driver code.

josh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: banjodecoder.tar.gz
Type: application/x-gzip
Size: 4159 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20070925/06ac6a78/attachment-0001.bin 


More information about the Linuxppc-embedded mailing list