RTEMS  5.0.0
Files | Macros | Functions | Variables
RISC-V AMBA Driver Handler

AMBA Plag & Play Bus Driver Macros. More...

Files

file  amba.h
 

Macros

#define GRLIB_IO_AREA   0xfff00000
 
#define GRLIB_CONF_AREA   0xff000
 
#define GRLIB_AHB_SLAVE_CONF_AREA   (1 << 11)
 
#define GRLIB_AHB_CONF_WORDS   8
 
#define GRLIB_APB_CONF_WORDS   2
 
#define GRLIB_AHB_MASTERS   64
 
#define GRLIB_AHB_SLAVES   64
 
#define GRLIB_APB_SLAVES   16
 
#define GRLIB_CLOCK_INDEX   0
 
#define GRLIB_COUNTER_GPTIMER_INDEX   GRLIB_CLOCK_INDEX
 
#define GRLIB_GPTIMER_0_FREQUENCY_SET_BY_BOOT_LOADER   1000000
 
#define GRLIB_IRQMPSTATUS_CPUNR   28
 
#define GRLIB_IRQCTRL_ACQUIRE(_lock_context)   rtems_interrupt_lock_acquire( &GRLIB_IrqCtrl_Lock, _lock_context )
 
#define GRLIB_IRQCTRL_RELEASE(_lock_context)   rtems_interrupt_lock_release( &GRLIB_IrqCtrl_Lock, _lock_context )
 
#define GRLIB_Cpu_Unmask_interrupt(_source, _cpu)
 
#define GRLIB_Cpu_Mask_interrupt(_source, _cpu)
 
#define GRLIB_Enable_interrupt_broadcast(_source)
 
#define GRLIB_Disable_interrupt_broadcast(_source)
 
#define BSP_Cpu_Is_interrupt_masked(_source, _cpu)   (!(GRLIB_IrqCtrl_Regs->mask[_cpu] & (1U << (_source))))
 

Functions

void gptimer_initialize (void)
 
void irqmp_initialize (void)
 

Variables

struct ambapp_bus ambapp_plb
 
uint32_t GRLIB_Cpu_Index
 
const unsigned char GRLIB_mp_irq
 
volatile struct irqmp_regsGRLIB_IrqCtrl_Regs
 
struct ambapp_devGRLIB_IrqCtrl_Adev
 
int GRLIB_IrqCtrl_EIrq
 
volatile struct gptimer_regsGRLIB_Timer_Regs
 
struct ambapp_devGRLIB_Timer_Adev
 
rtems_interrupt_lock GRLIB_IrqCtrl_Lock
 

Detailed Description

AMBA Plag & Play Bus Driver Macros.

Macro Definition Documentation

◆ GRLIB_Cpu_Mask_interrupt

#define GRLIB_Cpu_Mask_interrupt (   _source,
  _cpu 
)
Value:
do { \
rtems_interrupt_lock_context _lock_context; \
GRLIB_IRQCTRL_ACQUIRE( &_lock_context ); \
GRLIB_IrqCtrl_Regs->mask[_cpu] &= ~(1U << (_source)); \
GRLIB_IRQCTRL_RELEASE( &_lock_context ); \
} while (0)

◆ GRLIB_Cpu_Unmask_interrupt

#define GRLIB_Cpu_Unmask_interrupt (   _source,
  _cpu 
)
Value:
do { \
rtems_interrupt_lock_context _lock_context; \
GRLIB_IRQCTRL_ACQUIRE( &_lock_context ); \
GRLIB_IrqCtrl_Regs->mask[_cpu] |= (1U << (_source)); \
GRLIB_IRQCTRL_RELEASE( &_lock_context ); \
} while (0)

◆ GRLIB_Disable_interrupt_broadcast

#define GRLIB_Disable_interrupt_broadcast (   _source)
Value:
do { \
rtems_interrupt_lock_context _lock_context; \
uint32_t _mask = 1U << ( _source ); \
GRLIB_IRQCTRL_ACQUIRE( &_lock_context ); \
GRLIB_IrqCtrl_Regs->bcast &= ~_mask; \
GRLIB_IRQCTRL_RELEASE( &_lock_context ); \
} while (0)

◆ GRLIB_Enable_interrupt_broadcast

#define GRLIB_Enable_interrupt_broadcast (   _source)
Value:
do { \
rtems_interrupt_lock_context _lock_context; \
uint32_t _mask = 1U << ( _source ); \
GRLIB_IRQCTRL_ACQUIRE( &_lock_context ); \
GRLIB_IrqCtrl_Regs->bcast |= _mask; \
GRLIB_IRQCTRL_RELEASE( &_lock_context ); \
} while (0)