Zephyr API Documentation  3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
arch.h File Reference

Nios II specific kernel interface header This header contains the Nios II specific kernel interface. More...

Go to the source code of this file.

Macros

#define ARCH_STACK_PTR_ALIGN   4
 
#define ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p)
 
#define NIOS2_BADADDR_CAUSE_MASK
 

Enumerations

enum  nios2_exception_cause {
  NIOS2_EXCEPTION_UNKNOWN = -1 , NIOS2_EXCEPTION_RESET = 0 , NIOS2_EXCEPTION_CPU_ONLY_RESET_REQUEST = 1 , NIOS2_EXCEPTION_INTERRUPT = 2 ,
  NIOS2_EXCEPTION_TRAP_INST = 3 , NIOS2_EXCEPTION_UNIMPLEMENTED_INST = 4 , NIOS2_EXCEPTION_ILLEGAL_INST = 5 , NIOS2_EXCEPTION_MISALIGNED_DATA_ADDR = 6 ,
  NIOS2_EXCEPTION_MISALIGNED_TARGET_PC = 7 , NIOS2_EXCEPTION_DIVISION_ERROR = 8 , NIOS2_EXCEPTION_SUPERVISOR_ONLY_INST_ADDR = 9 , NIOS2_EXCEPTION_SUPERVISOR_ONLY_INST = 10 ,
  NIOS2_EXCEPTION_SUPERVISOR_ONLY_DATA_ADDR = 11 , NIOS2_EXCEPTION_TLB_MISS = 12 , NIOS2_EXCEPTION_TLB_EXECUTE_PERM_VIOLATION = 13 , NIOS2_EXCEPTION_TLB_READ_PERM_VIOLATION = 14 ,
  NIOS2_EXCEPTION_TLB_WRITE_PERM_VIOLATION = 15 , NIOS2_EXCEPTION_MPU_INST_REGION_VIOLATION = 16 , NIOS2_EXCEPTION_MPU_DATA_REGION_VIOLATION = 17 , NIOS2_EXCEPTION_ECC_TLB_ERR = 18 ,
  NIOS2_EXCEPTION_ECC_FETCH_ERR = 19 , NIOS2_EXCEPTION_ECC_REGISTER_FILE_ERR = 20 , NIOS2_EXCEPTION_ECC_DATA_ERR = 21 , NIOS2_EXCEPTION_ECC_DATA_CACHE_WRITEBACK_ERR = 22
}
 

Functions

static ALWAYS_INLINE unsigned int arch_irq_lock (void)
 
static ALWAYS_INLINE void arch_irq_unlock (unsigned int key)
 
static ALWAYS_INLINE bool arch_irq_unlocked (unsigned int key)
 
void arch_irq_enable (unsigned int irq)
 
void arch_irq_disable (unsigned int irq)
 
uint32_t sys_clock_cycle_get_32 (void)
 
static uint32_t arch_k_cycle_get_32 (void)
 
uint64_t sys_clock_cycle_get_64 (void)
 
static uint64_t arch_k_cycle_get_64 (void)
 
static ALWAYS_INLINE void arch_nop (void)
 

Detailed Description

Nios II specific kernel interface header This header contains the Nios II specific kernel interface.

It is included by the generic kernel interface header (include/arch/cpu.h)

Macro Definition Documentation

◆ ARCH_IRQ_CONNECT

#define ARCH_IRQ_CONNECT (   irq_p,
  priority_p,
  isr_p,
  isr_param_p,
  flags_p 
)
Value:
{ \
Z_ISR_DECLARE(irq_p, 0, isr_p, isr_param_p); \
}

◆ ARCH_STACK_PTR_ALIGN

#define ARCH_STACK_PTR_ALIGN   4

◆ NIOS2_BADADDR_CAUSE_MASK

#define NIOS2_BADADDR_CAUSE_MASK
Value:
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition: util_macro.h:44
@ NIOS2_EXCEPTION_TLB_WRITE_PERM_VIOLATION
Definition: arch.h:126
@ NIOS2_EXCEPTION_SUPERVISOR_ONLY_DATA_ADDR
Definition: arch.h:122
@ NIOS2_EXCEPTION_MPU_DATA_REGION_VIOLATION
Definition: arch.h:128
@ NIOS2_EXCEPTION_MISALIGNED_TARGET_PC
Definition: arch.h:118
@ NIOS2_EXCEPTION_TLB_READ_PERM_VIOLATION
Definition: arch.h:125
@ NIOS2_EXCEPTION_MISALIGNED_DATA_ADDR
Definition: arch.h:117
@ NIOS2_EXCEPTION_ECC_DATA_ERR
Definition: arch.h:132

Enumeration Type Documentation

◆ nios2_exception_cause

Enumerator
NIOS2_EXCEPTION_UNKNOWN 
NIOS2_EXCEPTION_RESET 
NIOS2_EXCEPTION_CPU_ONLY_RESET_REQUEST 
NIOS2_EXCEPTION_INTERRUPT 
NIOS2_EXCEPTION_TRAP_INST 
NIOS2_EXCEPTION_UNIMPLEMENTED_INST 
NIOS2_EXCEPTION_ILLEGAL_INST 
NIOS2_EXCEPTION_MISALIGNED_DATA_ADDR 
NIOS2_EXCEPTION_MISALIGNED_TARGET_PC 
NIOS2_EXCEPTION_DIVISION_ERROR 
NIOS2_EXCEPTION_SUPERVISOR_ONLY_INST_ADDR 
NIOS2_EXCEPTION_SUPERVISOR_ONLY_INST 
NIOS2_EXCEPTION_SUPERVISOR_ONLY_DATA_ADDR 
NIOS2_EXCEPTION_TLB_MISS 
NIOS2_EXCEPTION_TLB_EXECUTE_PERM_VIOLATION 
NIOS2_EXCEPTION_TLB_READ_PERM_VIOLATION 
NIOS2_EXCEPTION_TLB_WRITE_PERM_VIOLATION 
NIOS2_EXCEPTION_MPU_INST_REGION_VIOLATION 
NIOS2_EXCEPTION_MPU_DATA_REGION_VIOLATION 
NIOS2_EXCEPTION_ECC_TLB_ERR 
NIOS2_EXCEPTION_ECC_FETCH_ERR 
NIOS2_EXCEPTION_ECC_REGISTER_FILE_ERR 
NIOS2_EXCEPTION_ECC_DATA_ERR 
NIOS2_EXCEPTION_ECC_DATA_CACHE_WRITEBACK_ERR 

Function Documentation

◆ arch_irq_disable()

void arch_irq_disable ( unsigned int  irq)

◆ arch_irq_enable()

void arch_irq_enable ( unsigned int  irq)

◆ arch_irq_lock()

static ALWAYS_INLINE unsigned int arch_irq_lock ( void  )
static

◆ arch_irq_unlock()

static ALWAYS_INLINE void arch_irq_unlock ( unsigned int  key)
static

◆ arch_irq_unlocked()

static ALWAYS_INLINE bool arch_irq_unlocked ( unsigned int  key)
static

◆ arch_k_cycle_get_32()

static uint32_t arch_k_cycle_get_32 ( void  )
inlinestatic

◆ arch_k_cycle_get_64()

static uint64_t arch_k_cycle_get_64 ( void  )
inlinestatic

◆ arch_nop()

static ALWAYS_INLINE void arch_nop ( void  )
static

◆ sys_clock_cycle_get_32()

uint32_t sys_clock_cycle_get_32 ( void  )

◆ sys_clock_cycle_get_64()

uint64_t sys_clock_cycle_get_64 ( void  )