My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Functions
gic.h File Reference
#include <sw_types.h>
#include <system_context.h>
#include <sw_board.h>
#include <sw_io.h>
#include <sw_debug.h>

Go to the source code of this file.

Macros

#define GIC_CPU_CTRL   0x00
 
#define GIC_CPU_PRIMASK   0x04
 
#define GIC_CPU_BINPOINT   0x08
 
#define GIC_CPU_INTACK   0x0c
 
#define GIC_CPU_EOI   0x10
 
#define GIC_CPU_RUNNINGPRI   0x14
 
#define GIC_CPU_HIGHPRI   0x18
 
#define GIC_DIST_CTRL   0x000
 
#define GIC_DIST_CTR   0x004
 
#define GIC_DIST_SECURITY   0x80
 
#define GIC_DIST_ENABLE_SET   0x100
 
#define GIC_DIST_ENABLE_CLEAR   0x180
 
#define GIC_DIST_PENDING_SET   0x200
 
#define GIC_DIST_PENDING_CLEAR   0x280
 
#define GIC_DIST_ACTIVE_BIT   0x300
 
#define GIC_DIST_CLEAR_ACTIVE_BIT   0x380
 
#define GIC_DIST_PRI   0x400
 
#define GIC_DIST_TARGET   0x800
 
#define GIC_DIST_CONFIG   0xc00
 
#define GIC_DIST_SOFTINT   0xf00
 
#define GIC_DIST_SOFTINT_NSATT_SET   (1 << 15)
 
#define GIC_DIST_SOFTINT_TAR_CORE0   (1 << 16)
 
#define GIC_DIST_SOFTINT_TAR_CORE1   (1 << 17)
 

Functions

int gic_active_irq (u32 gic_nr)
 reads the generic interrupt control register More...
 
int gic_ack_irq (u32 gic_nr, u32 irq)
 Acknowledges the interrupt request of Generic interrupt controller. More...
 
int gic_mask (u32 gic_nr, u32 irq)
 Masks a particular interrupt request of the generic interrupt controller. More...
 
int gic_unmask (u32 gic_nr, u32 irq)
 Unmask a particular interrupt request of the Generic interrupt controller. More...
 
int gic_dist_init (void)
 This function is to initialize distributor block of Generic interrupt controller. More...
 
int gic_cpu_init (void)
 This function is used to initialize CPU interfaces of Generic interrupt controller. More...
 
void generate_soft_int (u32 int_id)
 
void generate_soft_int_to_core0 (u32 int_id)
 Generate software interrupt specific to core0. More...
 

Macro Definition Documentation

#define GIC_CPU_BINPOINT   0x08
#define GIC_CPU_CTRL   0x00
#define GIC_CPU_EOI   0x10
#define GIC_CPU_HIGHPRI   0x18
#define GIC_CPU_INTACK   0x0c
#define GIC_CPU_PRIMASK   0x04
#define GIC_CPU_RUNNINGPRI   0x14
#define GIC_DIST_ACTIVE_BIT   0x300
#define GIC_DIST_CLEAR_ACTIVE_BIT   0x380
#define GIC_DIST_CONFIG   0xc00
#define GIC_DIST_CTR   0x004
#define GIC_DIST_CTRL   0x000
#define GIC_DIST_ENABLE_CLEAR   0x180
#define GIC_DIST_ENABLE_SET   0x100
#define GIC_DIST_PENDING_CLEAR   0x280
#define GIC_DIST_PENDING_SET   0x200
#define GIC_DIST_PRI   0x400
#define GIC_DIST_SECURITY   0x80
#define GIC_DIST_SOFTINT   0xf00
#define GIC_DIST_SOFTINT_NSATT_SET   (1 << 15)
#define GIC_DIST_SOFTINT_TAR_CORE0   (1 << 16)
#define GIC_DIST_SOFTINT_TAR_CORE1   (1 << 17)
#define GIC_DIST_TARGET   0x800

Function Documentation

void generate_soft_int ( u32  int_id)
Parameters
int_id
void generate_soft_int_to_core0 ( u32  int_id)

Generate software interrupt specific to core0.

Parameters
int_id
int gic_ack_irq ( u32  gic_nr,
u32  irq 
)

Acknowledges the interrupt request of Generic interrupt controller.

Parameters
gic_nr
irq
Returns
int gic_active_irq ( u32  gic_nr)

reads the generic interrupt control register

Parameters
gic_nr
Returns
int gic_cpu_init ( void  )

This function is used to initialize CPU interfaces of Generic interrupt controller.

Returns
int gic_dist_init ( void  )

This function is to initialize distributor block of Generic interrupt controller.

Returns
int gic_mask ( u32  gic_nr,
u32  irq 
)

Masks a particular interrupt request of the generic interrupt controller.

Parameters
gic_nr
irq
Returns
int gic_unmask ( u32  gic_nr,
u32  irq 
)

Unmask a particular interrupt request of the Generic interrupt controller.

Parameters
gic_nr
irq
Returns