linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Can't write value into memory ?(E500 V2)
@ 2009-08-26 14:39 wilbur.chan
  2009-08-26 19:20 ` Scott Wood
  0 siblings, 1 reply; 6+ messages in thread
From: wilbur.chan @ 2009-08-26 14:39 UTC (permalink / raw)
  To: linuxppc-dev

In  an assemblely code ,   I invalided all the TLB entries except for
the entry  we are executed in.

After that , I setuped a 1:1 TLB entry mapping of 1GB .

At last , I wrote value 30 into the physical address 0x0400,0000 (also
the virtual address because of my 1:1 mapping).

However, it seemed failed to store the value '30' at address
0x400,0000. The following is my code:

//code start

// setup a 1:1 mapping of 1GB
...
//store '30' into address 0x0400,0000

li  r23, 30
lis r22, 0x400
ori r22,r22,0x0
stb  r23,0(r22)


//check if we successfully store value at 0x400,0000

lis r22, 0x400
ori r22,r22,0x0
lwz r23,0(r22)
cmpw r23, 30
beq  print_equal

1: b 1b

print_equal:
 ...
//code end

I found that, print_equal was not called ,the whole code seemed  to
enter an  infinite loop.

Can anyone plz tell me why this happended?


Thanks in advance.


regards,

wilbur

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-08-27 16:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-26 14:39 Can't write value into memory ?(E500 V2) wilbur.chan
2009-08-26 19:20 ` Scott Wood
2009-08-27 15:53   ` wilbur.chan
2009-08-27 15:59     ` Scott Wood
2009-08-27 16:27       ` wilbur.chan
2009-08-27 16:34         ` Scott Wood

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).