Hello All

I'm really desperate for some help , I've been struggling with this system since few days.

sudheer wrote:
Hello Raja,

We too are working on customized board with amcc 440SPe processor , xilinx System Ace controller.  Compact flash  is connected to system ace controller. 
We use u-boot 1.1.2 as bootloader & linux kernel - 2.6.16-2.

System ace is connected to amcc440SPE processor via GPIO and External Peripheral Bus Controller(EBC).
I am still facing the issue in accessing the address in linux.

The physical address given in u-boot  init.S tlbentry for 'system ace'  is 0xE0000000
I am able to access the address in u-boot  and everything is fine in u-boot.
But in linux , I am able to ioremap the the address 0xE0000000 but the kernel crashes when i try to access the address .
physical address=0xe0000000
address_after_ioremap = 0xe1000000.
I am trying to read with readw(address_after_ioremap)
The kernel gives an exception error saying Oops: machine check, sig: 7 [#2] .
The error dump is as below:

Instruction dump:
Data machine check in kernel mode.
PLB0: BEAR=0x00000000e0000000 ACR=  0xdb000000 BESR= 0x0000000000008000
PLB1: BEAR=0xe98d7ad33716ee7e ACR=  0xdb000000 BESR= 0x0000000000000000
POB0: BEAR=0x0000000fffaebbcd BESR0=0x00000000 BESR1=0x00000000
OPB0: BEAR=0x0000000000000000 BSTAT=0x00000000
Oops: machine check, sig: 7 [#2]
NIP: 00000000 LR: C0002200 CTR: 00000000
REGS: c0241f50 TRAP: 0202   Not tainted  (2.6.16.2)
MSR: 00000000 <>  CR: 84CA4124  XER: 00000000
TASK = dff6cb70[1] 'swapper' THREAD: c0740000
GPR00: 00000000 C0241E40 DFF6CB70 00000001 FFFFFFD0 00000000 C0240000 C01F3C0C
GPR08: C01F0000 C0002200 00021002 C0001FF4 DFF6CD38 802823E0 1FFB9600 00000000
GPR16: 00000001 FFFFFFFF 00000000 007FFF00 1FFB3540 1FF63CE0 1FFCEE78 C01C0000
GPR24: C01C0000 C01C0000 C01F0000 C01C0000 BFFFFFFF FFFFFFD0 00000000 C0241F50
NIP [00000000] 0x0
LR [C0002200] ret_from_except+0x0/0x18
Call Trace:
Instruction dump:
Data machine check in kernel mode.
PLB0: BEAR=0x00000000e0000000 ACR=  0xdb000000 BESR= 0x0000000000008000
.........and this dump gets print continously.


I have checked with TLB entries in u-boot and linux using BDI:

BDI_AMCC440SPe>tlb 0 10
IDX TID      EPN  SIZE VTS          RPN   USER WIMGE USRSVC
 0 : 00 ff000000  16MB V0 -> 4_ff000000 U:0000 WI-G- XWRXWR
 1 : 00 00000000 256MB V0 -> 0_00000000 U:0000 -I-G- XWRXWR
 2 : 00 10000000 256MB V0 -> 0_10000000 U:0000 -I-G- XWRXWR
 3 : 00 20000000 256MB V0 -> 0_20000000 U:0000 -I-G- XWRXWR
 4 : 00 30000000 256MB V0 -> 0_30000000 U:0000 -I-G- XWRXWR
 5 : 00 90000000 256KB V0 -> 4_00000000 U:0000 -I--- XWRXWR
 6 : 00 e0000000   1KB V0 -> 4_e0000000 U:0000 -I-G- -WR-WR
 7 : 00 a0000000   4KB V0 -> 4_f0000000 U:0000 -I-G- -WR-WR
 8 : 00 d0000000 256MB V0 -> c_00000000 U:0000 -I-G- -WR-WR
 9 : 00 80000000 256MB V0 -> c_10000000 U:0000 -I-G- -WR-WR
10 : 00 01080000   1KB -0 -> 0_00000000 U:0000 ----- ------
BDI_AMCC440SPe>

In Linux the tlb entries are as below.......

BDI_AMCC440SPe>tlb 0 63
IDX TID      EPN  SIZE VTS          RPN   USER WIMGE USRSVC
 0 : 0e 0ff1a000   4KB V0 -> 0_007ce000 U:0000 --MG- --R--R
 1 : 0e 0fe94000   4KB V0 -> 0_1ff96000 U:0000 ---G- X-RX-R
 2 : 0e 30017000   4KB V0 -> 0_007cd000 U:0000 --MG- --R-WR
 3 : 0e 10039000   4KB V0 -> 0_1ffb8000 U:0000 ---G- X-RX-R
 4 : 0e 30009000   4KB V0 -> 0_00758000 U:0000 ---G- X-RX-R
 5 : 0e 30010000   4KB V0 -> 0_0078b000 U:0000 ---G- X-RX-R
 6 : 0e 00000000   1KB -0 -> 0_1f4e2000 U:0000 ---G- --R--R
 7 : 0e 0fe3e000   4KB V0 -> 0_1f4e2000 U:0000 ---G- X-RX-R
 8 : 0e 0ff1c000   4KB V0 -> 0_007ed000 U:0000 --MG- XWRXWR
 9 : 0e 0ff1e000   4KB V0 -> 0_007ee000 U:0000 --MG- -WR-WR
10 : 0e 0ff1f000   4KB V0 -> 0_007ea000 U:0000 --MG- XWRXWR
11 : 0e 0fe39000   4KB V0 -> 0_1ff8e000 U:0000 ---G- X-RX-R
12 : 0e 0ff21000   4KB V0 -> 0_007a8000 U:0000 --MG- --R-WR
13 : 0e 0fe47000   4KB V0 -> 0_1ffa9000 U:0000 ---G- X-RX-R
14 : 0e 0fe46000   4KB V0 -> 0_1ffb2000 U:0000 ---G- X-RX-R
15 : 0e 30019000   4KB V0 -> 0_007c5000 U:0000 --MG- -WR-WR
16 : 0e 0fe45000   4KB V0 -> 0_1ffa8000 U:0000 ---G- X-RX-R
17 : 00 fdfff000   4KB V0 -> 4_f0000000 U:0000 -IMG- ----WR
18 : 0e 0fe9a000   4KB V0 -> 0_1ff98000 U:0000 ---G- X-RX-R
19 : 0e 10067000   4KB V0 -> 0_0078e000 U:0000 --MG- -WR-WR
20 : 0e 00000000   4KB -0 -> 0_1f4e5000 U:0000 ---G- --R--R
21 : 0e 10030000   4KB V0 -> 0_1f4e5000 U:0000 ---G- X-RX-R
22 : 0e 10063000   4KB V0 -> 0_007b7000 U:0000 --MG- -WR-WR
23 : 0e 0fe4c000   4KB V0 -> 0_1ff9b000 U:0000 ---G- X-RX-R
24 : 0e 1007f000   4KB V0 -> 0_007e0000 U:0000 --MG- -WR-WR
25 : 0e 0ff1d000   4KB V0 -> 0_007c6000 U:0000 --MG- --R-WR
26 : 0e 0fe4e000   4KB V0 -> 0_1ffa1000 U:0000 ---G- X-RX-R
27 : 0e 0fe0f000   4KB V0 -> 0_0077e000 U:0000 ---G- X-RX-R
28 : 0e 0fe52000   4KB V0 -> 0_0077f000 U:0000 ---G- X-RX-R
29 : 0e 0fe53000   4KB V0 -> 0_1ff80000 U:0000 ---G- X-RX-R
30 : 0e 0fef9000   4KB V0 -> 0_1ff81000 U:0000 ---G- --R--R
31 : 0e 0fe3b000   4KB V0 -> 0_1ffa7000 U:0000 ---G- X-RX-R
32 : 0e 7f901000   4KB V0 -> 0_007db000 U:0000 --MG- -WR-WR
33 : 0e 10027000   4KB V0 -> 0_1ffd0000 U:0000 ---G- X-RX-R
34 : 0e 1003a000   4KB V0 -> 0_1ffb6000 U:0000 ---G- X-RX-R
35 : 0e 0fe51000   4KB V0 -> 0_00775000 U:0000 ---G- X-RX-R
36 : 0e 1003b000   4KB V0 -> 0_1ffb7000 U:0000 ---G- X-RX-R
37 : 0e 1002a000   4KB V0 -> 0_1ffcf000 U:0000 ---G- X-RX-R
38 : 0e 10066000   4KB V0 -> 0_007de000 U:0000 --MG- -WR-WR
39 : 0e 1002b000   4KB V0 -> 0_1ffd3000 U:0000 ---G- X-RX-R
40 : 0e 1002c000   4KB V0 -> 0_1ffd2000 U:0000 ---G- X-RX-R
41 : 0e 1005d000   4KB V0 -> 0_007f4000 U:0000 --MG- XWRXWR
42 : 0e 1002d000   4KB V0 -> 0_1ffc2000 U:0000 ---G- X-RX-R
43 : 0e 10028000   4KB V0 -> 0_1ffc8000 U:0000 ---G- X-RX-R
44 : 0e 10069000   4KB V0 -> 0_0078d000 U:0000 --MG- -WR-WR
45 : 0e 1002e000   4KB V0 -> 0_1ffd4000 U:0000 ---G- X-RX-R
46 : 0e 1005e000   4KB V0 -> 0_007a7000 U:0000 --MG- X-RXWR
47 : 0e 0fe11000   4KB V0 -> 0_0077a000 U:0000 ---G- X-RX-R
48 : 0e 10047000   4KB V0 -> 0_1ffcd000 U:0000 ---G- --R--R
49 : 0e 1007e000   4KB V0 -> 0_007d0000 U:0000 --MG- --R-WR
50 : 0e 0fea1000   4KB V0 -> 0_1ffd5000 U:0000 ---G- X-RX-R
51 : 0e 10026000   4KB V0 -> 0_1ffc9000 U:0000 ---G- X-RX-R
52 : 0e 0fe0e000   4KB V0 -> 0_1ffd1000 U:0000 ---G- X-RX-R
53 : 0e 0fe96000   4KB V0 -> 0_1ffce000 U:0000 ---G- X-RX-R
54 : 0e 1002f000   4KB V0 -> 0_1f4c1000 U:0000 ---G- X-RX-R
55 : 0e 7f900000   4KB V0 -> 0_0078f000 U:0000 --MG- -WR-WR
56 : 0e 10036000   4KB V0 -> 0_1f4c0000 U:0000 ---G- X-RX-R
57 : 0e 1004b000   4KB V0 -> 0_1ffcc000 U:0000 ---G- --R--R
58 : 0e 0fe9b000   4KB V0 -> 0_1ff88000 U:0000 ---G- X-RX-R
59 : 0e 0fe4d000   4KB V0 -> 0_1ffa0000 U:0000 ---G- X-RX-R
60 : 0e 10080000   4KB V0 -> 0_00793000 U:0000 --MG- -WR-WR
61 : 0e 0fe95000   4KB V0 -> 0_1ff99000 U:0000 ---G- X-RX-R
62 : 00 d0000000 256MB V0 -> 0_10000000 U:0000 ---G- ---XWR
63 : 00 c0000000 256MB V0 -> 0_00000000 U:0000 ---G- ---XWR
BDI_AMCC440SPe>

I could not see the tlb entry for system ace in the linux level, But in the kernel error message, the physical address address can be seen
EBC's BEAR=0x00000000e0000000 saying the ioremap is done properly and phys-addr is obtaining from virtual adr given.
I could not understand what is going wrong. When i try to read/write using the ioremapped address, the kernel crashes. Even from the Error/Status reg(EBC's BESR in the error dump) could not get any information.

Can someone please be so kind to help me debug this...what might be wrong / what should I do to try and get a better understanding of what is going wrong?

please let me if any details required.

Thank you in advance

Regards
Sudheer



While booting the linux, it crashes when i am trying to access(read/write) a system ace register.
In the u-boot though i have support, as of now  i am not doing anything with system ace as it not required now.
In u-boot/include/configs/custom_board.h, i could see
#define CFG_ACE_BASE        0xe0000000          /* Xilinx ACE controller - Compact Flash */
 So i have used this address in Linux driver to to ioremap to access the  ace registers. Though i could do ioremap,  it crashes while booting exactly when it is trying the access any ace register.

I doubt with the address i have used . But could not get any clue from the docs given.  

I want to know how to access the system ace registers and how to  get the address to ioremap. Please let me know if any details required and also if i am missing any fundamentals.


Thanks & Regards
Sudheer




sudheer wrote:
Hi Ameet,

Firstly, thanks for the mail.

I am able to compile the linux-2.6.16 and got the ace support files with 
the patch.
While compiling got some errors with  xparameters, but am rectify  them.

I need to wait for the hardware to test the source.

Thanks & Regards
Sudheer


Ameet Patil wrote:
  
Hi Sudheer,
   Frank has already answered your questions. If you have any problems 
with the SysAce patch... do let me know. I have written a small 
tutorial here if it helps...

http://linux.get2knowmore.com


-Ameet

sudheer wrote:
    
Hello Ameet Patil

I am looking for linux kernel source 2.6.16 with system ace 
controller support. I downloaded the linux-2.6.16 and linux-2.6.17-1 
source from kernel.org but could not find any files related to system 
ace controller  ( No xilinx_sysace directory in  drivers/block/) .  I 
have checked penguinppc.org also but could not get it.

Can you please send to me the link where i could download the 
linuxppc-2.6.16 source with system ace support.

Thanks & Regards
Sudheer

Ameet Patil wrote:
      
Hi Raja,
    I have ported the Xilinx System ACE driver to 2.6 kernel. Find 
the latest one here:
http://www.cs.york.ac.uk/rtslab/demos/amos/xupv2pro/patches/linuxppc-2.6.17.1-sysace-1.2.patch 


NOTE: this patch wouldn't work if you are using the TEMAC driver. In 
which case use the -after-TEMAC patch found in the patches folder 
above.

Check the following discussions (threads) for more details:
1. "Xilinx SystemACE driver for 2.6"
2. "Xilinx BSP for linux 2.6"
3. "Kernel hangs after "Now booting the kernel"."

cheers,
-Ameet

Raja Chidambaram wrote:
 
        
 Hi all,
 We are working on customized board with amcc 440SPe
processor & xilinx System Ace controller. The System
Ace controller is connected to compact flash driver.

We use u-boot 1.2 as bootloader & linux kernel
2.6.16-2.

On the process the u-boot is able to detect compact
flash through Xilinx SystemAce controller & able to
load the kernel image into compact flash.But when the
linux boot's up it not able to detect the System Ace
controller or compact flash.

Note:we need to have the root file system in compact
flash.

Is their any drivers available for SystemAce
controller on linux 2.6,if their how to get it.please
help me in this
                                    with regards
                                     raja



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com _______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

    
          
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

  
        
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded