* EBC peripheral, access causing Machine Check
@ 2007-09-24 19:19 Dave Cogley
2007-09-24 23:42 ` Josh Boyer
0 siblings, 1 reply; 3+ messages in thread
From: Dave Cogley @ 2007-09-24 19:19 UTC (permalink / raw)
To: linuxppc-embedded
[-- Attachment #1.1: Type: text/plain, Size: 916 bytes --]
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
Dave Cogley
Software Engineer
Ultra Stereo Labs, Inc.
(805) 549-0161
mailto:dcogley@uslinc.com
[-- Attachment #1.2: Type: text/html, Size: 3940 bytes --]
[-- Attachment #2: mcdump.txt --]
[-- Type: text/plain, Size: 1767 bytes --]
bash-3.00#
Machine check in kernel mode.
Data Read PLB Error
OPB to PLB3: BSTAT= 0x00000000
PLB3 to PLB4: BEAR=0xffffffffffffffff BESR0=0x00000000 BESR1=0x00000000
PLB4 to PLB3: BEAR=0xfffffffffffffffd BESR0=0x00000000 BESR1=0x00000000
PLB3 to OPB: BEAR=0xffffffff BESR0=0x00000000 BESR1=0x00000000
PLB3 arbiter: BEAR=0xfffffffe ACR=0x00000000 BESR=0x00000000
PLB4 to OPB1: BEAR=0x0000000dbfffffbf BESR0=0x00000000 BESR1=0x00000000
PLB40 Arbiter: BEAR=0x00000000c0000000 ACR=0xda000000 BESR0=0x0f000000
PLB41 Arbiter: BEAR=0xfffffffffffffffc ACR=0xdb000000 BESR0=0x00000000
POB0: BEAR=0xc27e3194ffffffff BESR0=0x00000000 BESR1=0x00000000
OPB0: BEAR=0x0000000000000000 BSTAT=0x00000000
Oops: machine check, sig: 7 [#2]
NIP: D107E2D4 LR: C0069F24 CTR: 0FF40B20
REGS: c02a9f50 TRAP: 0202 Not tainted (2.6.19.2)
MSR: 00029000 <EE,ME> CR: 40000022 XER: 00000000
TASK = cf6c1030[268] 'banjocore' THREAD: cf1b8000
GPR00: 40044B01 CF1B9EB0 CF6C1030 00000000 CF0EF5C0 40044B01 7F95B928 0FF39D08
GPR08: 00000000 00000000 FFFFFFE7 D1080000 80000028 10018B10 00000000 100D8ED8
GPR16: 100C0000 00000000 100C0000 10090000 00000000 100DF660 100C7C48 00000000
GPR24: 100D9038 00000000 100D8F58 40044B01 FFFFFFF7 CF0EF5C0 0FFBB73C 7F95B928
NIP [D107E2D4] banjo_ioctl+0xc0/0x14c [banjodecoder]
LR [C0069F24] do_ioctl+0x80/0x84
Call Trace:
[CF1B9EB0] [00000001] 0x1 (unreliable)
[CF1B9ED0] [C0069F24] do_ioctl+0x80/0x84
[CF1B9EE0] [C0069FB4] vfs_ioctl+0x8c/0x418
[CF1B9F10] [C006A380] sys_ioctl+0x40/0x74
[CF1B9F40] [C0001C84] ret_from_syscall+0x0/0x3c
Instruction dump:
60004b00 7f850000 419e0044 3c004004 60004b01 7f850000 38600000 409eff74
3d60d108 812bf2a4 7c0004ac 7d204c2c <0c090000> 4c00012c 38600000 91260000
Bus error
bash-3.00#
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: EBC peripheral, access causing Machine Check
2007-09-24 19:19 EBC peripheral, access causing Machine Check Dave Cogley
@ 2007-09-24 23:42 ` Josh Boyer
2007-09-25 16:44 ` Dave Cogley
0 siblings, 1 reply; 3+ messages in thread
From: Josh Boyer @ 2007-09-24 23:42 UTC (permalink / raw)
To: Dave Cogley; +Cc: linuxppc-embedded
On Mon, 24 Sep 2007 12:19:01 -0700
"Dave Cogley" <dcogley@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
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: EBC peripheral, access causing Machine Check
2007-09-24 23:42 ` Josh Boyer
@ 2007-09-25 16:44 ` Dave Cogley
0 siblings, 0 replies; 3+ messages in thread
From: Dave Cogley @ 2007-09-25 16:44 UTC (permalink / raw)
To: 'Josh Boyer'; +Cc: linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 1781 bytes --]
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@jdub.homelinux.org]
Sent: Monday, September 24, 2007 4:42 PM
To: Dave Cogley
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: EBC peripheral, access causing Machine Check
On Mon, 24 Sep 2007 12:19:01 -0700
"Dave Cogley" <dcogley@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
[-- Attachment #2: banjodecoder.tar.gz --]
[-- Type: application/x-gzip, Size: 4159 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-09-25 16:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-24 19:19 EBC peripheral, access causing Machine Check Dave Cogley
2007-09-24 23:42 ` Josh Boyer
2007-09-25 16:44 ` Dave Cogley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).