A Beginner's Guide to Arm CPUs | What are ARM Processors? | ARM processor and its Features
Arm architecture specifies a set of rules that dictate how the hardware works when a particular instruction is executed. It is a contract between the hardware and the software, defining how they interact with one another.
ARM Registers: A Core Concept
ARM processors have two types of registers:
General-purpose registers (r0-r15): These hold data or memory addresses.
Special-purpose registers (r13-r15): These have specific functions:
Stack Pointer (SP, r13): Points to the top of the stack for the current mode.
Link Register (LR, r14): Stores the return address for subroutines.
Program Counter (PC, r15): Holds the address of the next instruction to be executed.
There are also two status registers:
Current Program Status Register (CPSR): Holds the processor’s current status (flags, mode, etc.).
Saved Program Status Register (SPSR) (exception modes only): Stores the CPSR when an exception occurs (like an interrupt).
Key Points:
Some registers (r13-r14) can be used for general purposes depending on the context.
Registers are visible based on the processor mode.
Each exception mode has its own SP register.
CPSR is similar to the flag register in other processors.
Understanding these registers is crucial for kernel development (memory management, interrupts) and LDD development (device communication).
20240414 2 Understanding ARM registers HD 1080p
by Linux Kernel Foundation
linux foundation