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
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to