Research on Qualcomm platform debugging (-)

Source: Internet
Author: User

12.1680-v6107-20.rev_a_debug_troubleshoot.pdf

 

When the function is called, The R0-R3 passes four parameters, the rest are saved through the stack, and the parameters are imported from the right to the left order into the stack.

R13 is the stack pointer Stack pointer (SP). It does not need to be used for other purposes and always points to the current position in the stack. When context switch is enabled, Rex uses SP to switch the execution of different tasks (points SP to the stack of different tasks ).

 

R14 generally saves the return address.

PC R15 saves the next command.

 

BL jump command: before the jump, the current content of the PC will be saved in register R14, so you can re-load the content of R14 to the PC, to return the execution of the command after the jump command.

 

BL label: when the program jumps to the label unconditionally, it saves the current Pc value to R14.

 

The R13 (SP) address is 0x140218fc.

Enter the command: D. Dump ui_stack/byte to view the UI stack, as shown in.

See the following value, now push {r1-r7, R14} has been executed:

Address 0x140218fc value 0x1411fc78-contents of R1 <-SP points here

0x14021900 0x00000001-contents of R2

0x14021904 0x00142be3-contents of r3

0x14021908 0x00000000-contents of r4

0x1402191c 0x1411f438-contents of R5

0x14021920 0x14120338-contents of R6

0x14021924 0x14120358-contents of r7

0x14021928 0x00142beb-R14-return address

The value of R14 returns the next command and runs uiuasmsn_init ().

 

FIQ: Fast interrupt, which has a higher priority than IRQ interrupt.

FIQ interrupt vector: Fast interrupt request vector table. When an exception orInterruptedWhen this occurs, the processor sets the PC as a special memory address (faster RAM memory ). This address is called the interrupt vector table. The entry to the interrupt vector table is the entry to the interrupt and abnormal branches ..

 

Intlock () and intfree () in Rex can control the Enable of FIQ and IRQ interruptions.

FIQ interruption occurs every 1.25 mS, so the suspension lock time cannot be longer than Ms.

 

Tasklock protects the current task activity status from being replaced by other tasks, but does not protect it from being interrupted.

 

Use intlock () and intfree:

Before an interruption is locked, intlock will save the status of the current IRQ/FIQ identifier. This value may be 0 (the interrupt is enabled, before the lock), or not 0 (the interrupt is not enabled before the lock ).

 

# Define intlock () {DWORD sav = rex_int_lock ();

# Define intfree () if (! Sav) (void) rex_int_free ();}

 

 

 

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.