* Issue in using mmap on ARM target
[not found] <AANLkTi=VS34cbaH9TNA9aZ7mVavoTaAiAwMfuRXSxbd8@mail.gmail.com>
@ 2010-09-20 5:11 ` naveen yadav
2010-09-28 13:08 ` Lothar Waßmann
2010-09-28 19:13 ` Russell King - ARM Linux
0 siblings, 2 replies; 3+ messages in thread
From: naveen yadav @ 2010-09-20 5:11 UTC (permalink / raw)
To: linux-arm-kernel
Hi all,
I am facing one issue when executing below progmra on ARM target. The
same program work well on X86 host machine,
When execute on Host(x86). the result are as expected.
[root at localhost naveen]# ./a.out ?0000 b 2
/dev/mem opened.
Memory mapped at address 0xb7f00000.
Value at address 0x0 (0xb7f00000): 0x24
Written 0x2; readback 0x2
But when execute on Target(ARM):
# ./a.out 0 w 20
/dev/mem opened.
Memory mapped at address 0x40003000.
Value at address 0x0 (0x40003000): 0xEA000006
Written 0x14; readback 0xEA000006
#
The value does not change. any idea ....
Kind regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: devmem2.c
Type: application/octet-stream
Size: 3550 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100920/56f2707f/attachment-0001.obj>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Issue in using mmap on ARM target
2010-09-20 5:11 ` Issue in using mmap on ARM target naveen yadav
@ 2010-09-28 13:08 ` Lothar Waßmann
2010-09-28 19:13 ` Russell King - ARM Linux
1 sibling, 0 replies; 3+ messages in thread
From: Lothar Waßmann @ 2010-09-28 13:08 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
> I am facing one issue when executing below progmra on ARM target. The
> same program work well on X86 host machine,
>
> When execute on Host(x86). the result are as expected.
> [root at localhost naveen]# ./a.out ?0000 b 2
> /dev/mem opened.
> Memory mapped at address 0xb7f00000.
> Value at address 0x0 (0xb7f00000): 0x24
> Written 0x2; readback 0x2
>
> But when execute on Target(ARM):
> # ./a.out 0 w 20
> /dev/mem opened.
> Memory mapped at address 0x40003000.
> Value at address 0x0 (0x40003000): 0xEA000006
> Written 0x14; readback 0xEA000006
> #
> The value does not change. any idea ....
>
There is no RAM at (physical) address 0.
You should check the PHYS_OFFSET setting of your machine to find out
where your RAM is located.
Lothar Wa?mann
--
___________________________________________________________
Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996
www.karo-electronics.de | info at karo-electronics.de
___________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Issue in using mmap on ARM target
2010-09-20 5:11 ` Issue in using mmap on ARM target naveen yadav
2010-09-28 13:08 ` Lothar Waßmann
@ 2010-09-28 19:13 ` Russell King - ARM Linux
1 sibling, 0 replies; 3+ messages in thread
From: Russell King - ARM Linux @ 2010-09-28 19:13 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Sep 20, 2010 at 10:41:20AM +0530, naveen yadav wrote:
> Hi all,
>
> I am facing one issue when executing below progmra on ARM target. The
> same program work well on X86 host machine,
>
> When execute on Host(x86). the result are as expected.
> [root at localhost naveen]# ./a.out ?0000 b 2
> /dev/mem opened.
> Memory mapped at address 0xb7f00000.
> Value at address 0x0 (0xb7f00000): 0x24
> Written 0x2; readback 0x2
>
> But when execute on Target(ARM):
> # ./a.out 0 w 20
> /dev/mem opened.
> Memory mapped at address 0x40003000.
> Value at address 0x0 (0x40003000): 0xEA000006
> Written 0x14; readback 0xEA000006
> #
> The value does not change. any idea ....
You are probably trying to write to some read-only memory.
On ARM systems, the boot loader is probably at location zero, and being
stored in flash or mask ROM, will probably not be (immediately) writable.
On x86, location zero tends to be RAM, and so can be written.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-09-28 19:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <AANLkTi=VS34cbaH9TNA9aZ7mVavoTaAiAwMfuRXSxbd8@mail.gmail.com>
2010-09-20 5:11 ` Issue in using mmap on ARM target naveen yadav
2010-09-28 13:08 ` Lothar Waßmann
2010-09-28 19:13 ` Russell King - ARM Linux
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).