Advertising
- Someone
- Sunday, December 23rd, 2007 at 2:36:35am MST
- === C ===
- unsigned int* ttbPtr;
- int i;
- int pa = 0;
- ttbPtr = (unsigned int*)(0x80000000+64*1024*1024-TTB_SIZE));
- for(i=0; i<0x1000; i++, pa += (1<<20)) {
- *(ttbPtr + i) =
- pa |
- 1 << 10 | /* superuser - r/w, user - no access */
- 0 << 5 | /* domain 0th */
- 1 << 4 | /* should be "1" */
- 1 << 1; /* Section signature */
- }
- === ASM ===
- /* Map each memory loc to itself, no cache */
- mov r1, #0 /* Physical address */
- ldr r3, =(0x80000000+64*1024*1024-TTB_SIZE) /* TTB pointer */
- ldr r4, =(0x80000000+64*1024*1024-TTB_SIZE+0x1000) /* End position */
- maploop1:
- mov r2, r1
- orr r2, r2, #(1<<10)
- orr r2, r2, #(1<<5)
- orr r2, r2, #(1<<4)
- orr r2, r2, #(1<<1)
- str r2, [r3], #4
- add r1, r1, #(1<<20)
- cmp r3, r4
- bne maploop1
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.