Hi, 

I'm trying to access some registers that should be mapped in memory through 
the AEMIF bus, on a DM355 evm-board, but I got strange results.

So, for example: at address 0x04014000 should start the registers mapped 
from dm9000. Right?
The dm9000 driver uses an iow() function that simply stands:

static void iow(board_info_t * db, int reg, int value)  {
writeb(reg, db->io_addr);
writeb(value, db->io_data);
} 

and io_addr is ETH_PHYS, defined in arch/asm/mach-davinci/board-
dm355_evm.c: 0x04014000 !
So, using readb( 0x04014000 ) should be fine. Instead it leads to a 
segfault.

I'm using simply this line of code:
  value = readb( (void  __iomem*) current_address );

Someone could tell me if my guesses are wrong? 

The log of the segfault is the following: 

<1>Unable to handle kernel paging request at virtual address 04014000
pgd = c5edc000
[04014000] *pgd=00000000
Internal error: Oops: 5 [#2]
Modules linked in: sregisters
CPU: 0
PC is at sreg_read+0x3c/0x94 [sregisters]
LR is at vfs_read+0xc4/0xfc
pc : [<bf000050>]    lr : [<c00920a4>]    Not tainted
sp : c4301f28  ip : fffffff2  fp : c4301f4c
r10: 00900003  r9 : c4300000  r8 : c4301f78
r7 : bf000d84  r6 : 00000000  r5 : c4301f30  r4 : 40019000
r3 : 04014000  r2 : 00000000  r1 : 04014000  r0 : bf000304
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  Segment user
Control: 5317F  Table: 85EDC000  DAC: 00000015
Process python (pid: 1219, stack limit = 0xc43001a0)
Stack: (0xc4301f28 to 0xc4302000)
1f20:                   00000001 00000001 00001000 c5e60b80 40019000 
bf000014 
1f40: c4301f74 c4301f50 c00920a4 bf000024 40019000 00000000 00000000 
c5e60b80 
1f60: 00000003 c00362f4 c4301fa4 c4301f78 c00922f0 c0091ff0 00000000 
00000000 
1f80: 00000000 00000000 000000c0 00146560 00146560 00000004 00000000 
c4301fa8 
1fa0: c0035b60 c00922b8 00146560 00146560 00000003 40019000 00001000 
00000000 
1fc0: 00146560 00146560 00000004 40338074 00000004 00000004 402e3000 
400186a0 
1fe0: 00000000 befff52c 4027c9bc 4027c9d8 60000010 00000003 97939f77 
40924088 
Backtrace: 
[<bf000014>] (sreg_read+0x0/0x94 [sregisters]) from [<c00920a4>] 
(vfs_read+0xc4/0xfc)
 r7 = BF000014  r6 = 40019000  r5 = C5E60B80  r4 = 00001000
[<c0091fe0>] (vfs_read+0x0/0xfc) from [<c00922f0>] (sys_read+0x48/0x74)
 r8 = C00362F4  r7 = 00000003  r6 = C5E60B80  r5 = 00000000
 r4 = 00000000 
[<c00922a8>] (sys_read+0x0/0x74) from [<c0035b60>] 
(ret_fast_syscall+0x0/0x2c)
 r6 = 00000004  r5 = 00146560  r4 = 00146560 
Code: e59f005c e3e0c00d e1a01003 0a000010 (e5d33000) 

Thanks, bye!
-- 
Andrea Gasparini 
---- ImaVis S.r.l. ----
web: www.imavis.com

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to