OpenOCD
rtos_standard_stackings.c File Reference
Include dependency graph for rtos_standard_stackings.c:

Go to the source code of this file.

Functions

target_addr_t rtos_cortex_m_stack_align (struct target *target, const uint8_t *stack_data, const struct rtos_register_stacking *stacking, target_addr_t stack_ptr, size_t xpsr_offset)
 
static target_addr_t rtos_generic_stack_align (struct target *target, const uint8_t *stack_data, const struct rtos_register_stacking *stacking, target_addr_t stack_ptr, int align)
 
target_addr_t rtos_generic_stack_align8 (struct target *target, const uint8_t *stack_data, const struct rtos_register_stacking *stacking, target_addr_t stack_ptr)
 
static target_addr_t rtos_standard_cortex_m3_stack_align (struct target *target, const uint8_t *stack_data, const struct rtos_register_stacking *stacking, target_addr_t stack_ptr)
 
static target_addr_t rtos_standard_cortex_m4f_fpu_stack_align (struct target *target, const uint8_t *stack_data, const struct rtos_register_stacking *stacking, target_addr_t stack_ptr)
 
static target_addr_t rtos_standard_cortex_m4f_stack_align (struct target *target, const uint8_t *stack_data, const struct rtos_register_stacking *stacking, target_addr_t stack_ptr)
 

Variables

static const struct stack_register_offset rtos_standard_cortex_m3_stack_offsets [ARMV7M_NUM_CORE_REGS]
 
const struct rtos_register_stacking rtos_standard_cortex_m3_stacking
 
static const struct stack_register_offset rtos_standard_cortex_m4f_fpu_stack_offsets []
 
const struct rtos_register_stacking rtos_standard_cortex_m4f_fpu_stacking
 
static const struct stack_register_offset rtos_standard_cortex_m4f_stack_offsets []
 
const struct rtos_register_stacking rtos_standard_cortex_m4f_stacking
 
static const struct stack_register_offset rtos_standard_cortex_r4_stack_offsets []
 
const struct rtos_register_stacking rtos_standard_cortex_r4_stacking
 

Function Documentation

◆ rtos_cortex_m_stack_align()

target_addr_t rtos_cortex_m_stack_align ( struct target target,
const uint8_t *  stack_data,
const struct rtos_register_stacking stacking,
target_addr_t  stack_ptr,
size_t  xpsr_offset 
)

◆ rtos_generic_stack_align()

static target_addr_t rtos_generic_stack_align ( struct target target,
const uint8_t *  stack_data,
const struct rtos_register_stacking stacking,
target_addr_t  stack_ptr,
int  align 
)
static

◆ rtos_generic_stack_align8()

target_addr_t rtos_generic_stack_align8 ( struct target target,
const uint8_t *  stack_data,
const struct rtos_register_stacking stacking,
target_addr_t  stack_ptr 
)

Definition at line 126 of file rtos_standard_stackings.c.

References rtos_generic_stack_align().

Referenced by ecos_stack_layout_cortexm().

◆ rtos_standard_cortex_m3_stack_align()

static target_addr_t rtos_standard_cortex_m3_stack_align ( struct target target,
const uint8_t *  stack_data,
const struct rtos_register_stacking stacking,
target_addr_t  stack_ptr 
)
static

Definition at line 172 of file rtos_standard_stackings.c.

References rtos_cortex_m_stack_align().

◆ rtos_standard_cortex_m4f_fpu_stack_align()

static target_addr_t rtos_standard_cortex_m4f_fpu_stack_align ( struct target target,
const uint8_t *  stack_data,
const struct rtos_register_stacking stacking,
target_addr_t  stack_ptr 
)
static

Definition at line 190 of file rtos_standard_stackings.c.

◆ rtos_standard_cortex_m4f_stack_align()

static target_addr_t rtos_standard_cortex_m4f_stack_align ( struct target target,
const uint8_t *  stack_data,
const struct rtos_register_stacking stacking,
target_addr_t  stack_ptr 
)
static

Definition at line 181 of file rtos_standard_stackings.c.

References rtos_cortex_m_stack_align().

Variable Documentation

◆ rtos_standard_cortex_m3_stack_offsets

const struct stack_register_offset rtos_standard_cortex_m3_stack_offsets[ARMV7M_NUM_CORE_REGS]
static
Initial value:
= {
{ ARMV7M_R0, 0x20, 32 },
{ ARMV7M_R1, 0x24, 32 },
{ ARMV7M_R2, 0x28, 32 },
{ ARMV7M_R3, 0x2c, 32 },
{ ARMV7M_R4, 0x00, 32 },
{ ARMV7M_R5, 0x04, 32 },
{ ARMV7M_R6, 0x08, 32 },
{ ARMV7M_R7, 0x0c, 32 },
{ ARMV7M_R8, 0x10, 32 },
{ ARMV7M_R9, 0x14, 32 },
{ ARMV7M_R10, 0x18, 32 },
{ ARMV7M_R11, 0x1c, 32 },
{ ARMV7M_R12, 0x30, 32 },
{ ARMV7M_R13, -2, 32 },
{ ARMV7M_R14, 0x34, 32 },
{ ARMV7M_PC, 0x38, 32 },
{ ARMV7M_XPSR, 0x3c, 32 },
}
@ ARMV7M_R1
Definition: armv7m.h:108
@ ARMV7M_R6
Definition: armv7m.h:114
@ ARMV7M_R2
Definition: armv7m.h:109
@ ARMV7M_R3
Definition: armv7m.h:110
@ ARMV7M_R14
Definition: armv7m.h:124
@ ARMV7M_R9
Definition: armv7m.h:118
@ ARMV7M_R12
Definition: armv7m.h:122
@ ARMV7M_R0
Definition: armv7m.h:107
@ ARMV7M_R13
Definition: armv7m.h:123
@ ARMV7M_PC
Definition: armv7m.h:125
@ ARMV7M_R7
Definition: armv7m.h:115
@ ARMV7M_R4
Definition: armv7m.h:112
@ ARMV7M_XPSR
Definition: armv7m.h:127
@ ARMV7M_R8
Definition: armv7m.h:117
@ ARMV7M_R11
Definition: armv7m.h:120
@ ARMV7M_R10
Definition: armv7m.h:119
@ ARMV7M_R5
Definition: armv7m.h:113

Definition at line 1 of file rtos_standard_stackings.c.

◆ rtos_standard_cortex_m3_stacking

const struct rtos_register_stacking rtos_standard_cortex_m3_stacking
Initial value:
= {
.stack_registers_size = 0x40,
.stack_growth_direction = -1,
.num_output_registers = ARMV7M_NUM_CORE_REGS,
.calculate_process_stack = rtos_standard_cortex_m3_stack_align,
}
#define ARMV7M_NUM_CORE_REGS
Definition: armv7m.h:218
static const struct stack_register_offset rtos_standard_cortex_m3_stack_offsets[ARMV7M_NUM_CORE_REGS]
static target_addr_t rtos_standard_cortex_m3_stack_align(struct target *target, const uint8_t *stack_data, const struct rtos_register_stacking *stacking, target_addr_t stack_ptr)

Definition at line 190 of file rtos_standard_stackings.c.

◆ rtos_standard_cortex_m4f_fpu_stack_offsets

const struct stack_register_offset rtos_standard_cortex_m4f_fpu_stack_offsets[]
static
Initial value:
= {
{ ARMV7M_R0, 0x64, 32 },
{ ARMV7M_R1, 0x68, 32 },
{ ARMV7M_R2, 0x6c, 32 },
{ ARMV7M_R3, 0x70, 32 },
{ ARMV7M_R4, 0x00, 32 },
{ ARMV7M_R5, 0x04, 32 },
{ ARMV7M_R6, 0x08, 32 },
{ ARMV7M_R7, 0x0c, 32 },
{ ARMV7M_R8, 0x10, 32 },
{ ARMV7M_R9, 0x14, 32 },
{ ARMV7M_R10, 0x18, 32 },
{ ARMV7M_R11, 0x1c, 32 },
{ ARMV7M_R12, 0x74, 32 },
{ ARMV7M_R13, -2, 32 },
{ ARMV7M_R14, 0x78, 32 },
{ ARMV7M_PC, 0x7c, 32 },
{ ARMV7M_XPSR, 0x80, 32 },
}

Definition at line 1 of file rtos_standard_stackings.c.

◆ rtos_standard_cortex_m4f_fpu_stacking

const struct rtos_register_stacking rtos_standard_cortex_m4f_fpu_stacking
Initial value:
= {
.stack_registers_size = 0xcc,
.stack_growth_direction = -1,
.num_output_registers = ARMV7M_NUM_CORE_REGS,
.calculate_process_stack = rtos_standard_cortex_m4f_fpu_stack_align,
}
static const struct stack_register_offset rtos_standard_cortex_m4f_fpu_stack_offsets[]
static target_addr_t rtos_standard_cortex_m4f_fpu_stack_align(struct target *target, const uint8_t *stack_data, const struct rtos_register_stacking *stacking, target_addr_t stack_ptr)

Definition at line 190 of file rtos_standard_stackings.c.

◆ rtos_standard_cortex_m4f_stack_offsets

const struct stack_register_offset rtos_standard_cortex_m4f_stack_offsets[]
static
Initial value:
= {
{ ARMV7M_R0, 0x24, 32 },
{ ARMV7M_R1, 0x28, 32 },
{ ARMV7M_R2, 0x2c, 32 },
{ ARMV7M_R3, 0x30, 32 },
{ ARMV7M_R4, 0x00, 32 },
{ ARMV7M_R5, 0x04, 32 },
{ ARMV7M_R6, 0x08, 32 },
{ ARMV7M_R7, 0x0c, 32 },
{ ARMV7M_R8, 0x10, 32 },
{ ARMV7M_R9, 0x14, 32 },
{ ARMV7M_R10, 0x18, 32 },
{ ARMV7M_R11, 0x1c, 32 },
{ ARMV7M_R12, 0x34, 32 },
{ ARMV7M_R13, -2, 32 },
{ ARMV7M_R14, 0x38, 32 },
{ ARMV7M_PC, 0x3c, 32 },
{ ARMV7M_XPSR, 0x40, 32 },
}

Definition at line 1 of file rtos_standard_stackings.c.

◆ rtos_standard_cortex_m4f_stacking

const struct rtos_register_stacking rtos_standard_cortex_m4f_stacking
Initial value:
= {
.stack_registers_size = 0x44,
.stack_growth_direction = -1,
.num_output_registers = ARMV7M_NUM_CORE_REGS,
.calculate_process_stack = rtos_standard_cortex_m4f_stack_align,
}
static target_addr_t rtos_standard_cortex_m4f_stack_align(struct target *target, const uint8_t *stack_data, const struct rtos_register_stacking *stacking, target_addr_t stack_ptr)
static const struct stack_register_offset rtos_standard_cortex_m4f_stack_offsets[]

Definition at line 190 of file rtos_standard_stackings.c.

◆ rtos_standard_cortex_r4_stack_offsets

const struct stack_register_offset rtos_standard_cortex_r4_stack_offsets[]
static
Initial value:
= {
{ 0, 0x08, 32 },
{ 1, 0x0c, 32 },
{ 2, 0x10, 32 },
{ 3, 0x14, 32 },
{ 4, 0x18, 32 },
{ 5, 0x1c, 32 },
{ 6, 0x20, 32 },
{ 7, 0x24, 32 },
{ 8, 0x28, 32 },
{ 10, 0x2c, 32 },
{ 11, 0x30, 32 },
{ 12, 0x34, 32 },
{ 13, 0x38, 32 },
{ 14, -2, 32 },
{ 15, 0x3c, 32 },
{ 16, 0x40, 32 },
{ 17, -1, 96 },
{ 18, -1, 96 },
{ 19, -1, 96 },
{ 20, -1, 96 },
{ 21, -1, 96 },
{ 22, -1, 96 },
{ 23, -1, 96 },
{ 24, -1, 96 },
{ 25, -1, 32 },
{ 26, 0x04, 32 },
}

Definition at line 1 of file rtos_standard_stackings.c.

◆ rtos_standard_cortex_r4_stacking

const struct rtos_register_stacking rtos_standard_cortex_r4_stacking
Initial value:
= {
.stack_registers_size = 0x48,
.stack_growth_direction = -1,
.num_output_registers = 26,
.calculate_process_stack = rtos_generic_stack_align8,
}
static const struct stack_register_offset rtos_standard_cortex_r4_stack_offsets[]
target_addr_t rtos_generic_stack_align8(struct target *target, const uint8_t *stack_data, const struct rtos_register_stacking *stacking, target_addr_t stack_ptr)

Definition at line 190 of file rtos_standard_stackings.c.