mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-25 22:07:15 +00:00
score: Add CPU_INTERRUPT_STACK_ALIGNMENT
Add CPU port define for the interrupt stack alignment. The alignment should take the stack ABI and the cache line size into account. Update #3459.
This commit is contained in:
@@ -165,6 +165,8 @@
|
||||
/* AAPCS, section 5.2.1.2, Stack constraints at a public interface */
|
||||
#define CPU_STACK_ALIGNMENT 8
|
||||
|
||||
#define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES
|
||||
|
||||
/*
|
||||
* Bitfield handler macros.
|
||||
*
|
||||
|
||||
@@ -563,6 +563,8 @@ typedef struct {
|
||||
*/
|
||||
#define CPU_STACK_ALIGNMENT 8
|
||||
|
||||
#define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES
|
||||
|
||||
#ifndef ASM
|
||||
|
||||
/*
|
||||
|
||||
@@ -465,6 +465,8 @@ typedef Context_Control CPU_Interrupt_frame;
|
||||
|
||||
#define CPU_STACK_ALIGNMENT 8
|
||||
|
||||
#define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES
|
||||
|
||||
/* ISR handler macros */
|
||||
|
||||
/*
|
||||
|
||||
@@ -383,6 +383,8 @@ extern Context_Control_fp _CPU_Null_fp_context;
|
||||
|
||||
#define CPU_STACK_ALIGNMENT 16
|
||||
|
||||
#define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES
|
||||
|
||||
/* macros */
|
||||
|
||||
#ifndef ASM
|
||||
|
||||
@@ -581,6 +581,8 @@ extern Context_Control_fp _CPU_Null_fp_context;
|
||||
*/
|
||||
#define CPU_STACK_ALIGNMENT CPU_ALIGNMENT
|
||||
|
||||
#define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES
|
||||
|
||||
/*
|
||||
* ISR handler macros
|
||||
*/
|
||||
|
||||
@@ -556,6 +556,8 @@ typedef struct {
|
||||
*/
|
||||
#define CPU_STACK_ALIGNMENT 0
|
||||
|
||||
#define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES
|
||||
|
||||
/*
|
||||
* ISR handler macros
|
||||
*/
|
||||
|
||||
@@ -354,6 +354,8 @@ extern void* _VBR;
|
||||
|
||||
#define CPU_STACK_ALIGNMENT 0
|
||||
|
||||
#define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES
|
||||
|
||||
#ifndef ASM
|
||||
|
||||
/* macros */
|
||||
|
||||
@@ -631,6 +631,8 @@ extern Context_Control_fp _CPU_Null_fp_context;
|
||||
|
||||
#define CPU_STACK_ALIGNMENT CPU_ALIGNMENT
|
||||
|
||||
#define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES
|
||||
|
||||
void mips_vector_exceptions( CPU_Interrupt_frame *frame );
|
||||
|
||||
/*
|
||||
|
||||
@@ -465,6 +465,8 @@ typedef struct {
|
||||
*/
|
||||
#define CPU_STACK_ALIGNMENT 0
|
||||
|
||||
#define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES
|
||||
|
||||
/*
|
||||
* ISR handler macros
|
||||
*/
|
||||
|
||||
@@ -87,6 +87,8 @@ extern "C" {
|
||||
*/
|
||||
#define CPU_STACK_ALIGNMENT 4
|
||||
|
||||
#define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES
|
||||
|
||||
/*
|
||||
* A Nios II configuration with an external interrupt controller (EIC) supports
|
||||
* up to 64 interrupt levels. A Nios II configuration with an internal
|
||||
|
||||
@@ -695,6 +695,14 @@ extern Context_Control_fp _CPU_Null_fp_context;
|
||||
*/
|
||||
#define CPU_STACK_ALIGNMENT 0
|
||||
|
||||
/**
|
||||
* The alignment of the interrupt stack in bytes.
|
||||
*
|
||||
* The alignment should take the stack ABI and the cache line size into
|
||||
* account.
|
||||
*/
|
||||
#define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES
|
||||
|
||||
/*
|
||||
* ISR handler macros
|
||||
*/
|
||||
|
||||
@@ -462,6 +462,8 @@ typedef Context_Control CPU_Interrupt_frame;
|
||||
|
||||
#define CPU_STACK_ALIGNMENT 0
|
||||
|
||||
#define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES
|
||||
|
||||
/* ISR handler macros */
|
||||
|
||||
/*
|
||||
|
||||
@@ -761,6 +761,8 @@ void ppc_set_interrupt_level( uint32_t level );
|
||||
|
||||
#define CPU_STACK_ALIGNMENT (PPC_STACK_ALIGNMENT)
|
||||
|
||||
#define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES
|
||||
|
||||
#ifndef ASM
|
||||
/* The following routine swaps the endian format of an unsigned int.
|
||||
* It must be static because it is referenced indirectly.
|
||||
|
||||
@@ -137,6 +137,8 @@ typedef Context_Control CPU_Interrupt_frame;
|
||||
#define CPU_CONTEXT_FP_SIZE 0
|
||||
Context_Control_fp _CPU_Null_fp_context;
|
||||
|
||||
#define CPU_CACHE_LINE_BYTES 64
|
||||
|
||||
#define CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK 0
|
||||
#if __riscv_xlen == 32
|
||||
#define CPU_STACK_MINIMUM_SIZE 4096
|
||||
@@ -148,6 +150,9 @@ Context_Control_fp _CPU_Null_fp_context;
|
||||
#define CPU_HEAP_ALIGNMENT CPU_ALIGNMENT
|
||||
#define CPU_PARTITION_ALIGNMENT CPU_ALIGNMENT
|
||||
#define CPU_STACK_ALIGNMENT 8
|
||||
|
||||
#define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES
|
||||
|
||||
#define _CPU_Initialize_vectors()
|
||||
|
||||
/*
|
||||
|
||||
@@ -438,6 +438,8 @@ void CPU_delay( uint32_t microseconds );
|
||||
|
||||
#define CPU_STACK_ALIGNMENT CPU_ALIGNMENT
|
||||
|
||||
#define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES
|
||||
|
||||
/*
|
||||
* ISR handler macros
|
||||
*/
|
||||
|
||||
@@ -823,6 +823,8 @@ extern const CPU_Trap_table_entry _CPU_Trap_slot_template;
|
||||
*/
|
||||
#define CPU_STACK_ALIGNMENT CPU_ALIGNMENT
|
||||
|
||||
#define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES
|
||||
|
||||
#ifndef ASM
|
||||
|
||||
/*
|
||||
|
||||
@@ -709,6 +709,8 @@ extern const CPU_Trap_table_entry _CPU_Trap_slot_template;
|
||||
|
||||
#define CPU_STACK_ALIGNMENT 16
|
||||
|
||||
#define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES
|
||||
|
||||
#ifndef ASM
|
||||
|
||||
/*
|
||||
|
||||
@@ -524,6 +524,8 @@ typedef struct {
|
||||
*/
|
||||
#define CPU_STACK_ALIGNMENT 4
|
||||
|
||||
#define CPU_INTERRUPT_STACK_ALIGNMENT CPU_CACHE_LINE_BYTES
|
||||
|
||||
/*
|
||||
* ISR handler macros
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user