LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 10-06-2012, 01:38 PM   #1
edwardlu666@hotmail.com
LQ Newbie
 
Registered: Oct 2012
Location: shanghai china
Distribution: Ubuntu
Posts: 1

Rep: Reputation: Disabled
mmu_enable before and after would effect?


Hello everyone:
I've been confisued by a MMU question 4 a long time.
First of all,let us see 2 points below:
1,cpu fatch the instuction by itself if no branch instuction called like "jump" and "b".The PC counter will be added automatically.
2,if the code tell the cpu to jump to a certain address by branch instruction, the pc-counter will be loaded by the address.

My questions are:
The code is from head.S FilePath:arch/arm/kernel/head.s
1 __turn_mmu_on:
2 mov r0, r0
3 mcr p15, 0, r0, c1, c0, 0 @ enable mmu
4 mrc p15, 0, r3, c0, c0, 0 @ read id reg
5 mov r3, r3
6 mov r3, r13 @ load the address of __mmap_switched
7 mov pc, r3 @ jump to __mmap_switched
8 __enable_mmu_end:

Suppose if the MMU Table was created to map the address from C0000000 to 50000000 as:
0xC0000000,0xC8000000 -> 0x50000000,0x58000000
If MMU enabled,after line 3 instuction,what would be loaded in the pc-counter?Shall we need to translate the address?
A,If the content of pc-counter was 0x30008000,and after line 3 4 code (Enable MMU),the pc-counter would be updateed by 0x50008004 or 0x30008004?For the reason there was no branch instruction called at line 4,so the pc-counter would be updated by cpu itself automatically.
B,If the __mmap_switched was arranged by the linker as a Cxxx xxxx,line 7 mov a address would be translated to a Virt Address?

Thanks
Best regards.
 
  


Reply



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
desktop effect oguejiofor obiora Linux - Software 2 12-13-2008 05:49 PM
For 3D Effect ramesh mohite Fedora 1 10-22-2007 03:24 PM
route - Changes take a while to take effect Khang Linux - Networking 4 10-28-2004 08:30 PM
Mac-like effect ? mykrob Linux - General 1 08-16-2004 04:12 PM
htpasswd... not in effect 3AM Fedora 1 06-11-2004 12:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 03:29 PM.

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