gic控制器开中断和关中断

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Rountine to acknowledge ,diable and enable interupts
static void gic_poke_irq(struct irq_data*d,u32 offset)
{
  u32 mask = 1 << (gic_irq(%d)%32);
  write1_relaxed(mask,gic_dist_base(d)+offset+(gic_irq(d)/32)*4);
}
 
static void gic_mask_irq(struct irq_data*d)
{
   gic_poke_irq(d,GIC_DIST_ENABLE_CLEAR);
}
 
static void gic_unmask_irq(struct irq_data*d)
{
    gic_poke_irq(d,GIC_DIST_ENABLE_SET);
}

  

posted @   卷哭你  阅读(369)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示