Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 02-09-2009, 09:13 AM   #1
LQ Newbie
Registered: Sep 2008
Posts: 4

Rep: Reputation: 0
How to access Physical memory not mapped in kernel


I want to test PASR(partial array self refresh) feature in mobile SRAM.
For which I had put appropriate code, now in order to check that the SRAM actually goes into PASR I booted my board with half memory(of total physical available) and used ioremap to map some part of physical memory above half , there is no problem with memset_io but problem comes when i try to read the newly mapped memory with memcpy_fromio() but it hangs and gives error

Error log is :

<1>Unhandled fault: external abort on non-linefetch (0x1008) at 0xc4a00000
Internal error: : 1008 [#1]
Modules linked in:
CPU: 0 Not tainted (2.6.29-rc3-omap1-05417-gc00b556-dirty #40)
PC is at memcpy+0x48/0x330
LR is at omap_ldp_init+0xf4/0x154
pc : [<c0125148>] lr : [<c0011abc>] psr: 80000013
sp : c3817eac ip : 00000000 fp : c3817f44
r10: 00000000 r9 : 00000000 r8 : 00000000
r7 : 00000000 r6 : c021c820 r5 : c021d4f0 r4 : c021d4f0
r3 : 60000013 r2 : ffffffe4 r1 : c4a00000 r0 : c3817ecc
Flags: Nzcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 10c5387f Table: 80004019 DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc38162e0)
Stack: (0xc3817eac to 0xc3818000)
7ea0: c021d4f0 c021c820 00000000 00000000 c3817ecc
7ec0: c021d4f0 c0011abc c022c004 c0218c68 00000001 00000000 c3817ef4 c3817ee8
7ee0: c00d85f4 c00d8554 c3817f04 c3817ef8 c00d8630 c00d85ec c3817f14 c3817f08
7f00: c016227c c00d8604 c3817f34 c3817f18 c01566c8 c016226c c022c004 00000000
7f20: c021c820 00000000 c3817f54 c3817f38 c001c52c c001c4e0 c3817f54 c3817f48
7f40: c000e650 c00119d4 c3817fdc c3817f58 c0023290 c000e63c c383d0a0 c020e530
7f60: c000e630 00000000 c3817f94 c3817f78 c00d3600 c00d3390 c3817f94 c383e800
7f80: c00d3720 c3817f9e c3817fc4 c3817f98 c006e78c c00d35b0 c3817fb4 3533f9f0
7fa0: 00000031 00000000 00000170 c001c4e0 00000000 c001c52c c001c4e0 00000000
7fc0: 00000000 00000000 00000000 00000000 c3817ff4 c3817fe0 c00088b8 c002323c
7fe0: 00000000 00000000 00000000 c3817ff8 c004b578 c0008854 00ffff00 007fff10
r5:c001c4e0 r4:c001c52c
[<c000e630>] (customize_machine+0x0/0x2c) from [<c0023290>] (do_one_initcall+0x60/0x198)
[<c0023230>] (do_one_initcall+0x0/0x198) from [<c00088b8>] (kernel_init+0x70/0xdc)
[<c0008848>] (kernel_init+0x0/0xdc) from [<c004b578>] (do_exit+0x0/0x65c)
r5:00000000 r4:00000000
Code: ba000002 f5d1f03c f5d1f05c f5d1f07c (e8b151f8)
<4>---[ end trace 1b75b31a2719ed1c ]---
<0>Kernel panic - not syncing: Attempted to kill init!

I searched but not found answer . can anyone help ???????

Also is there any other method to access the physical memory which is not mapped in kernel other than ioremap() .



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on using mmap to access physical memory Gnu2Linux2 Linux - Embedded & Single-board computer 1 10-05-2009 03:54 AM
How to access physical (as opposed to virtual) memory in C language for a Linux app. ss729 Programming 2 12-23-2008 03:02 PM
Kernel crashes while accessing the IO mapped memory rohshall Linux - Embedded & Single-board computer 0 12-10-2008 09:52 AM
Memory mapped device access in Linux tsik Linux - Software 1 10-31-2006 09:26 PM
How to access physical memory in C? cyu021 Programming 6 03-27-2005 04:16 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:41 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration