GIC介绍 (三)——GIC400 Register

news/2025/3/14 17:47:50/

GIC400 Register

gic寄存器

gic寄存器,分为两部分,一部分是distributor的寄存器,另一部分是cpu interface的寄存器。
在这里插入图片描述

两部分的寄存器,均是通过memory-mapped的方式来访问。

在这里插入图片描述在这里插入图片描述

Distribution

  • Distributor Control Register GICD_CTLR enable or disable distribution,global interrupt enable
    在这里插入图片描述

    在disable 期间,register工作正常,GICV2可以通过操作寄存器配置int的pending或active状态

  • Interrupt Controller Type Register, GICD_TYPER
    • whether the GIC implements the Security Extensions
    • the maximum number of interrupt IDs that the GIC supports
    • the number of CPU interfaces implemented
    • if the GIC implements the Security Extensions, the maximum number of implemented Lockable Shared Peripheral Interrupts (LSPIs).

    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

在这里插入图片描述

  • Distributor Implementer Identification Register, GICD_IIDR

    Provides information about the implementer and revision of the Distributor.
    在这里插入图片描述

  • Interrupt Group Registers, GICD_IGROUPRn
    在这里插入图片描述

    Typically, the reset value of all GICD_IGROUPR registers is zero, so that all interrupts are Group 0 unless reprogrammed as Group 1 by Secure accesses to the appropriate GICD_IGROUPR registers.

  • Interrupt Set-Enable Registers, GICD_ISENABLERn

在这里插入图片描述

Disabling an interrupt only disables the forwarding of the interrupt from the Distributor to any CPU interface. It does not prevent the interrupt from changing state, for example becoming pending, or active and pending if it is already active.

  • Interrupt Clear-Enable Registers, GICD_ICENABLERn

在这里插入图片描述

Writing a 1 to an GICD_ICENABLERn bit only disables the forwarding of the corresponding interrupt from the Distributor to any CPU interface. It does not prevent the interrupt from changing state, for example becoming pending, or active and pending if it is already active.

  • Interrupt Set-Pending Registers, GICD_ISPENDRn

    在这里插入图片描述

  • Interrupt Clear-Pending Registers, GICD_ICPENDRn

在这里插入图片描述

  • Interrupt Set-Active Registers, GICD_ISACTIVERn

在这里插入图片描述

  • Interrupt Clear-Active Registers**, GICD_ICACTIVERn**

在这里插入图片描述

  • Interrupt Priority Registers, GICD_IPRIORITYRn
    • These registers are byte-accessible
    • The GICD_IPRIORITYRs provide an 8-bit priority field for each interrupt supported by the
      GIC. This field stores the priority of the corresponding interrupt. 256
    • A GIC might implement fewer than eight priority bits, but must implement at least bits [7:4]
      of each field.
    • The number of implemented GICD_IPRIORITYRs is (8*(GICD_TYPER.ITLinesNumber+1)).
    • The lower the value, the greater the priority of the corresponding interrupt.

在这里插入图片描述

  • Interrupt Processor Targets Registers, GICD_ITARGETSRn

    • The GICD_ITARGETSRs provide an 8-bit CPU targets field for each interrupt supported by the GIC.
    • These registers are byte-accessible.
    • Has no effect on any active interrupt. This means that removing a CPU interface from a targets list does not cancel an active state for that interrupt on that CPU interface.Has an effect on any pending interrupts.
    • The registers that contain the SGI and PPI interrupts are read-only and the value is the CPU number of the current access
    • GICD_ITARGETSR0 to GICD_ITARGETSR7 are read-only, and each field returns a value that corresponds only to the processor reading the register.
      在这里插入图片描述
  • Interrupt Configuration Registers, GICD_ICFGRn

    • The GICD_ICFGRs provide a 2-bit Int_config field for each interrupt supported by the GIC.
    • Before changing the value of a programmable Int_config field, software must disable the
      corresponding interrupt,
    • The number of implemented GICD_ICFGRs is (2*(GICD_TYPER.ITLinesNumber+1)).
    • SGI is level_sensitive

在这里插入图片描述

  • Private Peripheral Interrupt Status Register, GICD_PPISR
    • Enables a processor to access the status of the PPI inputs on the Distributor.
    • A processor can only read the status of its own PPI and cannot read the status of PPIs for other processors

在这里插入图片描述
在这里插入图片描述

  • Shared Peripheral Interrupt Status Registers, GICD_SPISRn

    Enables a processor to access the status of the IRQS inputs on the Distributor.

在这里插入图片描述
在这里插入图片描述

  • Software Generated Interrupt Register, GICD_SGIR

    Controls the generation of SGIs.

在这里插入图片描述

在这里插入图片描述

...
  • SGI Clear-Pending Registers, GICD_CPENDSGIRn

    The GICD_CPENDSGIRs provide a clear-pending bit for each supported SGI and source processor combination

在这里插入图片描述

  • SGI Set-Pending Registers, GICD_SPENDSGIRn

    The GICD_SPENDSGIRn registers provide a set-pending bit for each supported SGI and source processor combination.

在这里插入图片描述

CPU interface

在这里插入图片描述

GICC_CTLR(0x0000):CPU Interface Control,控制中断是否传给CPU核,控制中断是IRQ还是FIQ

GICC_PMR(0x0004):Priority Mask,控制优先级门限,低于门限的中断不会转发到CPU

GICC_BPR(0x0008):Binary Point Register,是将优先级分成2部分:Group priority 、Subpriority,只使用优先级的Group priority部分,忽略Subpriority部分

详解:比如GIC-400的默认值是2,则优先级的[7:3]作为Group priority ,[2:0]作为Subpriority,则总共可生成32个优先级,与GICD_IPRIORITYRn保持一致

GICC_IAR(0x000C):Interrupt Acknowledge,只读,可以查看当前pending的最高优先级中断

GICC_EOIR(0x0010):End of Interrupt,只写,中断处理完成后需要写该寄存器

GICC_RPR(0x0014):Running Priority,只读,当前处理中断的优先级

GICC_HPPIR(0x0018):Highest Priority Pending ,只读,处于active状态的中断里优先级最高的

GICC_IIDR(0x00FC):ID寄存器,GIC-400的值是0x0202143B

GICC_DIR(0x1000):Deactivate Interrupt ,只写,移除中断的Active状态

GICC_IIDR(0x00FC):ID寄存器,GIC-400的值是0x0202143B

GICC_DIR(0x1000):Deactivate Interrupt ,只写,移除中断的Active状态

GICC_APRn 为在电源管理中保存和恢复状态提供支持 。


http://www.ppmy.cn/news/806877.html

相关文章

GIC 介绍 (二)—gic400 使用

GIC V2(gic400) GIC400,支持最大8个core,在gicv2中,gic由两个大模块组成:distributor 和 cpu interface distributor:实现中断分发,对于PPI,SGI是各个core独有的中断,不参与目的core的仲裁&…

GICV2GICV3的基础知识

当时把这个笔记在本地,搞忘了转载的地址,麻烦看到了联系我。感谢前辈的文章 1、gic概念 gic : general interrupt controller(1)、模型 ARM gicv2/gicv3的详解 (2)、分类 GIC中断控制器的分类:gicv1(已弃用)&…

Linux 中断管理之ARM GIC V3 初始化

1.ARM GIC V3中断控制器介绍 GIC(Generic Interrupt Controller)是一个通用的中断控制器,用来接收硬件中断信号,并经过一定处理后,分发给对应的CPU进行处理。GIC V3是其中一个版本,支持的中断类型如下表&a…

GICv3和GICv4虚拟化

本文档翻译自文档Arm Generic Interrupt Controller v3 and v4 - Virtualization 1 虚拟化 Armv8-A选择性的支持虚拟化。为了完成该功能,GICv3也支持虚拟化。GICv3中对虚拟化的支持包括如下功能: CPU Interface寄存器的硬件虚拟化产生和发送虚拟中断的…

GICv3/v4-软件概述

目录内容 2 介绍→主要介绍GIC架构历史3 GICv3基础→概念理解,尤其是编程模型的理解4 GIC配置→如何配置GIC的各种寄存器,使其正常工作5 处理中断→讲解中断的处理流程6 LPI配置→理解ITS服务和基于消息的中断7 SGI中断→如何发送接收软中断8 虚拟化→如…

[gic]-ARM gicv3/gicv4的详细介绍-2020/08

快速链接: . 👉👉👉 个人博客笔记导读目录(全部) 👈👈👈 付费专栏-付费课程 【购买须知】: 【精选】ARMv8/ARMv9架构入门到精通-[目录] 👈👈👈 gic目录 1、gic概念(1)、…

【转】ARM GIC中断系列(八):gicv3架构-波形为例、系列总结

花了一天,边玩边看,把这个系列看完了。感叹确实卢俊前辈对于gic的掌握程度。 肯定很多的东西看了就忘了,这是正常的,在以后如果有用到的话,再回过头来,结合实践应该会映像深刻。 1、波形 以下以gic600与…

【k8s】k8s的yaml文件解释,如何部署一个java.jar包

前言: k8s的yaml文件解释,如何部署一个java,jar包 YAML语法格式: 大小写敏感;使用缩进表示层级关系;不支持Tab键制表符缩进,只使用空格缩进;缩进的空格数目不重要,只要相同层级的元…