code to the beginning of the probe function:int *ptest = NULL;*ptest = 0x1234;Re-compile the kernel, and it will error after startup and print out the following Oops information:Unable to handle kernel NULL pointer dereference in virtual Address 00000000PGD = c0004000[00000000] *pgd=00000000Internal error:oops:805 [#1]Modules Linked In:cpu:0Not tainted (2.6.22.6 #36)PC is at s3c2410fb_probe+0x18/0x560LR is at platform_drv_probe+0x20/0x24PC: [LR: [psr:a0000013Sp:c0481e64 ip:c0481ea0 fp:c0481e9cr
jump command). For MIPS, it is saved in a register (that is, R31). For x86, it is saved to the stack (which will say what the stack is later). After the jump, execute a piece of code, you can also jump back, because the old PC saved. This is important if there are several places where you want to jump to this code and then go back to where it was. For example, the function of a piece of code is to do something based on the values of R4 and R5 (such a
, in order to avoid all downloads, here are listed behind the development of NDK to use the package: autoconf2.1, automake1.10, Binutils, Gcc-core, gcc-g++, Gcc4-core, gcc4-g++, GDB, Pcre, Pcre-devel, gawk, make a total of 12 packages
10 and then start to choose to install these packages, point skip, turn it into a digital version format, to ensure that the bin item into a fork, and SRC is the source code, this is not necessary to choose.
11 below test the Cygwin is not already installed.
Run
current Cygwin version and running state, if the status is OK, then Cygwin run normal.
Then enter gcc–version,g++--version,make–version,gdb–version to test, if all print out version information and some description information, then Cygwin installation success!
3. Configure NDK Environment variables
A First find the Cygwin installation directory, find a home\
b Open the Bash_profile file and add ndk=/cygdrive/
Ndk=/cygdrive/e/android-ndk-r5
Exp
available physical network adapter to bridge to vmnet0 option of the Enable Automatic Bridge of the automatic bridging is selected.
4. Virtual Machine customization OptimizationTo run multiple virtual machines on one machine, it is best to optimize each virtual machine. Based on experience, memory usage is much higher than CPU usage on virtual machines with few tasks. Therefore, we have installed the five virtual machines, namely R1, R2, R3, R4, and R5
Build our ndk development environment. This part contains a lot of online materials ~~~~
To do this, you must first sharpen the tool. The following describes how to build an integrated development environment for the eclipse SDK ndk cygwin CDT.1. Build an android Development Environment
Setting up the android development environment is not a key point. I believe many people who have read this article have successfully set up the environment. Let's give a brief description here.
1) download JDK
the 0XD91B8 to read the memory at 0x97356 (R2+0X15DA), triggering the breakpoint. 0XD91B4 anti-Push can get R5 = 0x20 corresponds to the race of the tri-colored Bird 33, you can know here R5 save is the race ID, The data for this race ID should be read from the CDROM. We're not going to push anymore. . we are at 0xd91b8 and 0xd91a8 place the breakpoint to see. found that 0xd91a8 will not pass. Continue ste
Local-preferenceLocal Priority PropertyOnly exchanged between IBGP peers and not advertised to other asThe greater the priority, the higher the priority, the default is 100For multiple exits of the same as, go out of the waybelongs to any recognized attributeNote: The source route delivery direction + specified peer+ the direction (Import/export) that you want to pass in order to correctly apply the routing policy.650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/84/89/wKioL1eTYB3DW2H_A
.text:00003094 ADD R3, PC; _ztv4base_ptr.text:00003096 LDR R3, [R3]; ' vtable for ' base takes out the virtual table pointer of base, pointing to. data.rel.ro, i.e. 0x70428960.text:00003098 MOVS R4, R0; R0 is the first address of a memory unit of just 20 bytes allocated, and is now assigned to r4.text:0000309a ADDS R3, #8; R3+8 to r3,r3 points to 0x70428968.text:0000309c STR R3, [R0]; assigns 0x70428968 to the first address of the memory unit that was just allocated (the memory unit pointed to).
there is a higher priority function to use R0, then the value of R0 pushed to the stack, and so R0 by the higher priority function after the use of the pop from the stack before the value. The stack is typically manipulated when the function is called.The command for the stack operation is push and pop, usually in pairs, and at the beginning of the function, the value in the register to be used when the function is executed is pushed into the stack, and then at the end of the function the value
is somewhat abstract, and here's an example to explain it easily:Use:Arm-inux-objdump–d u-boot > Dump_u-boot.txt Copy Codecan get dump_u-boot.txt files. The file is the executable assembly code that contains the program in U-boot,In which we can see the C language function source code, in the end corresponds to those assembly code.The following is a two-function assembly code,One is Clock_init,The other is in the same C-source file as Clock_init, and another function Copycode2ram:33D0091C:33d00
abstract, and here is an example to illustrate briefly, it is easy to understand:Arm-inux-objdump–d u-boot > Dump_u-boot.txtYou can get the Dump_u-boot.txt file. The file is in, containing the executable assembly code of the program in U-boot, where we can see the source code of the C language function, which corresponds to those assembly code.The following is a compilation code of two functions,One is Clock_init,The other is not clock_init in the same C source file, and the other one is Copyco
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/77/75/wKioL1ZoIcOTDBBOAAECfBygMsY426.jpg "title=" QQ picture 20151209204034.jpg "alt=" Wkiol1zoicotdbboaaecfbygmsy426.jpg "/>Address description1,R1--R5 all want a loopback0=10.10.x.x2, R1--R3 E0 address =1.1.123.x3, the R2--r4 WAN interface is 1.1.234.X/244,r4-r5 WAN Interface =1.1.45.x/24Bridge connection1, configure the Ethernet address of the R1
After early_init is executed in the previous article, the basic initialization work in the early stages of CPU startup is completed. Then the kernel starts to redirect and copy and run. The Code is as follows:
Blreloc_offsetmrr26, r3addisr4, R3, kernelbase @ H/* Current address of _ start */lisr5, physical_start @ hcmplw0, R4, R5/* already running physical_start? */Bnerelocate_kernel/* Juan kernel redirection, required for classic startup */
Here, the
3. CPU Initialization
The following code initializes the CPU. The functions are blocked by watchdog, the interrupt control register is initialized, the cache is cleared, and MMU is disabled.
. Globlinit_e300_coreinit_e300_core:/* time T 10 * // * initialize machine status; Enable machine check interrupt */lir3, msr_kernel/* Set MSR, allow data \ command replication and machine check */rlwimir3, R5, 0, 25, 25/* preserve IP bit set by hrcw */# ifdef deb
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.