linux IRQ Management(一)- ARM GIC

玄铁RISC-V为何成为x86与ARM之外的第三极 RISC-V是一种开源指令集架构(ISA),其核心价值在于开放性、模块化与可扩展性,区别于ARM的授权壁垒和x86的封闭生态。其技术原理基于精简指令设计、标准化扩展机制(如Zicsr、Zam)及可验证的硬件抽象层,赋予开发者对CPU微架构的深度定制权。这一确定性带来显著技术价值:缩短芯片开发周期、降低BOM成本、规避IP授权风险,并支撑功能安全认证(如ISO 26262、IEC 61850)。典型应用场景覆盖嵌入式实时控制、边缘AI协处理、车规级网关及服务器异构加速等对可控性、低延迟与高可信有严苛要求的领域 阅读详情
  • 学习ARM GIC (Generic Interrupt Controller )

1.Interrupt

  Interrupt是异步产生的,不是由CPU执行程序产生的,中断属于异常的一种,中断是唯一与CPU运行无关的异常。

2.Interrupt Controller

  Interrupt Controller是连接外设中断系统和CPU系统的桥梁。根据外设irq request line的多少,Interrupt Controller可以级联。

  The Generic Interrupt Controller (GIC) architecture defines:

  • The architectural requirements for handling all interrupt sources for any PE connected to a GIC.
  • A common interrupt controller programming interface applicable to uniprocessor or multiprocessor systems.

  The GIC is an architected resource that supports and controls interrupts. It provides:

  • registers for managing interrupt sources
  • interrupt behavior
  • the routing of interrupts to one or more PEs(Processing element)

  Support for:

  • Locality-specific Peripheral Interrupts (LPIs).
  • Private Peripheral Interrupts (PPIs).
  • Software Generated Interrupts (SGIs).
  • Shared Peripheral Interrupts (SPIs).
  • Interrupt masking and prioritization.
  • Uniprocessor and multiprocessor systems.
  • Wakeup events in power management environments.

GIC-400 Interrupt Controller:
在这里插入图片描述

2.1.Interrupts types

  • Peripheral interrupt: This is an interrupt asserted by a signal to the GIC.

    • SPI (Shared Peripheral Interrupt)
      This is a global peripheral interrupt that can be routed to a specified PE, or to one of a group of PEs.
    • PPI (Private Peripheral Interrupt)
      This is peripheral interrupt that targets a single, specific PE. An example of a PPI is an interrupt from the Generic Timer of a PE.
    • LPI (Locality-specific Peripheral Interrupt)
      In particular, LPIs are always message-based interrupts, and their configuration is held in tables in memory rather than registers.
  • Software-generated interrupt (SGI):
    This is an interrupt generated by software writing to a GICD_SGIR register in the GIC. The system uses SGIs for interprocessor communication.

2.2.Interrupt Identifiers

  Each interrupt source is identified by an ID number, referred to as an INTID. The available INTIDs are grouped into ranges, and each range is assigned to a particular type of interrupt.
在这里插入图片描述
2.3.Interrupt prioritization

  This section describes interrupt prioritization in the GIC architecture. Prioritization describes the:

  • Configuration and control of interrupt priority.
  • Order of execution of pending interrupts.
  • Determination of when interrupts are visible to a target PE, including:
    • Interrupt priority masking.
    • Priority grouping.
    • Preemption of an active interrupt

在这里插入图片描述
  通过设置GICD_IPRIORITYRn寄存器,来设置中断的优先级。这个寄存器是字节有效的,也就是一个字节,对应一个中断的优先级。优先级数值越小,那么这个中断的优先级越高。高优先级的中断,是可以抢占低优先级的中断。

2.4. GICv2 框架图
在这里插入图片描述
2.5.GICv3 Programmers’ model

  The register interface of a GICv3 interrupt controller is split into three groups:

  • Distributor interface

  • Redistributor interface

  • CPU interface
    在这里插入图片描述
    如上所示:

  • Distributor

    • The Distributor block performs interrupt prioritization and distribution to the CPU interface blocks that connect to the processors in the system.
    • The Distributor block registers are identified by the GICD_ prefix. They contain global settings that affect all PEs connected to the interrupt controller.
  • Redistributors

    • Enabling and disabling SGIs and PPIs.
    • Setting the priority level of SGIs and PPIs.
    • Setting each PPI to be level-sensitive or edge-triggered.
    • Assigning each SGI and PPI to an interrupt group.
    • Controlling the state of SGIs and PPIs.
    • Base address control for the data structures in memory that support the associated interrupt properties and pending state for LPIs.
    • Power management support for the connected PE
  • CPU interfaces

    • Each CPU interface block performs priority masking and preemption handling for a connected processor in the system.A GIC can implement up to eight CPU interfaces, numbered from 0-7.
    • CPU interface block registers are identified by the GICC_ prefix.
    • When describing a GIC that includes the GIC Virtualization Extensions, a CPU interface is sometimes called a physical CPU interface, to avoid possible confusion with a virtual CPU interface.
  • Virtual CPU interfaces

    • The GIC Virtualization Extensions add a virtual CPU interface for each processor in the system.
  • GIC registers
    使用memory-mapped的方式去访问的,即内存会留有一片空间给GIC,cpu通过访问这部分空间,对gic进行操作。寄存器,分为以下:

    • GICD_*:Distributor registers
    • GICH_*:Virtual interface control registers
    • GICV_*:Virtual interface control registers
    • GICC_*:Virtual cpu interface registers
    • GICR_*:Redistributors registers

  GICv2寄存器都是通过memory-mapped的方式访问,但是中断在一个soc系统中,是经常会产生的,那么处理器就会经常的读取gic的寄存器,而使用memory-mapped的方式去访问,就会影响中断响应速度。在之后的GICv3,v3中,就加入了使用系统寄存器来进行访问,加快中断处理。

2.5.1.Distributor(中断分发器)

  The GIC-400 Distributor receives interrupts and presents the highest priority pending interrupt to each CPU interface.
在这里插入图片描述
  收集所有的中断来源,并且为每个中断源设置中断优先级,中断分组,中断目的core。当有中断产生时,将当前最高优先级中断,发送给对应的cpu interface。Distributor 功能:

  • 全局中断使能
  • 每个中断的使能
  • 中断的优先级
  • 中断的分组
  • 中断的目的core
  • 中断触发方式
  • 对于SGI中断,传输中断到指定的core
  • 每个中断的状态管理
  • 提供软件,可以修改中断的pending状态

  Global settings
  The Distributor control register (GICD_CTLR) must be configured to enable the interrupt groups and to set the routing mode.

  • Enable Affinity routing (ARE bits)
    The ARE bits in GICD_CTLR control whether affinity routing is enabled. If affinity routing is not enabled, GICv3 can be configured for legacy operation . Whether affinity routing is enabled or not can be controlled separately for Secure and Non-secure state.
  • Enables
    GICD_CTLR contains separate enable bits for Group 0, Secure Group 1 and Non-secure Group 1:
    • GICD_CTLR.EnableGrp1S enables distribution of Secure Group 1 interrupts.
    • GICD_CTLR.EnableGrp1NS enables distribution of Non-secure Group 1 interrupts.
    • GICD_CTLR.EnableGrp0 enables distribution of Group 0 interrupts.

2.5.2.Cpu Interface

  Each CPU interface block provides the interface for a processor that is connected to the GIC. CPU interface hosts registers to mask, identify and control states of interrupts forwarded to that core.Each CPU interface provides a programming interface for:

  • enabling the signaling of interrupt requests to the processor
  • acknowledging an interrupt
  • indicating completion of the processing of an interrupt
  • setting an interrupt priority mask for the processor
  • defining the preemption policy for the processor
  • determining the highest priority pending interrupt for the processor.

  When enabled, a CPU interface takes the highest priority pending interrupt for its connected processor and determines whether the interrupt has sufficient priority for it to signal the interrupt request to the processor. To determine whether to signal the interrupt request to the processor, the CPU interface considers the interrupt priority mask and the preemption settings for the processor. At any time, the connected processor can read the priority of its highest priority active interrupt from its GICC_HPPIR, a CPU interface register.

2.5.3.Interrupt states

  The interrupt controller maintains a state machine for each SPI, PPI and SGI interrupt source. This state machine consists of four states:

  • Inactive
    The interrupt source is not currently asserted.
  • Pending
    The interrupt source has been asserted, but the interrupt has not yet been acknowledged by a PE.
  • Active
    The interrupt source has been asserted, and the interrupt has been acknowledged by a PE.
  • Active and Pending
    An instance of the interrupt has been acknowledged, and another instance is now pending.
    在这里插入图片描述
    State change:
  • Inactive to Pending
    An interrupt transitions from inactive to pending when the interrupt source is asserted.At this point the GIC asserts the interrupt signal to the PE (if the interrupt is enabled and is of sufficient priority).
  • Pending to Active & Pending
    The interrupt transitions from pending to active and pending when a PE acknowledges the interrupt by reading one of the GICC_IAR(Interrupt Acknowledge Registers,for Group 0 interrupts) or GICC_AIAR(Aliased Interrupt Acknowledge Register,for Group 1 interrupts) in the CPU interface. This read is typically part of an interrupt handling routine that executes after an interrupt exception is taken. However, software can also poll the GICC_IAR.At this point the GIC deasserts the interrupt signal to the PE.
  • Active and Pending to Active
    The interrupt transitions from active and pending to active when the peripheral de-asserts the interrupt signal. This typically happens in response to the interrupt handling software that is executing on the PE writing to a status register in the peripheral.
  • Active to Inactive
    The interrupt goes from active to inactive when the PE writes to one of the EOIRs (End of Interrupt Registers) in the CPU interface. This indicates that the PE has finished handling the interrupt.

中断状态机描述:
在这里插入图片描述

2.5.4.Interrupt lifecycle在这里插入图片描述

  • Generate interrupt. An interrupt is generated either by the peripheral or by software.
  • Distribute. The IRI(Interrupt Routing Infrastructure) performs interrupt grouping, interrupt prioritization, and controls the forwarding of interrupts to the CPU interfaces.
  • Deliver. A physical CPU interface delivers interrupts to the corresponding PE.
  • Activate. When software running on a PE acknowledges an interrupt, the GIC sets the highest active priority to that of the activated interrupt, and for SPIs, SGIs, and PPIs the interrupt becomes active.
  • Priority drop. Software running on the PE signals to the GIC that the highest priority interrupt has been handled to the point where the running priority can be dropped. The running priority then has the value that it had before the interrupt was acknowledged. This is the point where the end of interrupt is indicated by the interrupt handler. The end of the interrupt can be configured to also perform deactivation of the interrupt.
  • Deactivation. Deactivation clears the active state of the interrupt, and thereby allows the interrupt, when it is pending, to be taken again. Deactivation is not required for LPIs. Deactivation can be configured to occur at the same time as the priority drop, or it can be configured to occur later as the result of an explicit interrupt deactivation operation. This latter approach allows for software architectures where there is an advantage to separating interrupt handling into initial handling and scheduled handling.

  When the processor acknowledges the interrupt at the CPU interface:

  • Distributor changes the status of the interrupt from pending to either active, or active and pending.
  • CPU interface can signal another interrupt to the processor, to preempt interrupts that are active on the processor. If there is no pending interrupt with sufficient priority for signaling to the processor, the interface deasserts the interrupt request signal to the processor.

  When the interrupt handler on the processor has completed the processing of an interrupt, it writes to the CPU interface to indicate interrupt completion. There are two stages to interrupt completion:

  • priority drop(优先级重置): the priority of the processed interrupt can no longer prevent the signaling of another interrupt to the processor.
  • interrupt deactivation(中断无效): the Distributor removes the active state of the interrupt. Either:
    • from active and pending, to pending
    • from active, to idle.

  这两个stages是否同时发生或者单独发生可以通过the GICC_CTLR.EOI(End of Interrupt) mode bit determines:

  • the two stages happen together, when the processor writes to the CPU interface End of Interrupt register.
  • the two stages are separated, so that:
    • priority drop happens when the processor writes to the CPU interface End of Interrupt register.
    • interrupt deactivation happens later, when the processor writes to the CPU interface Deactivate Interrupt register.

  重点中断完成为什么定义2个stage?
  中断处理程序希望是越短越好,但是有些中断处理程序,就是比较长,在这种情况下,就会使其他中断得不到响应,从而影响实时性。比如当前cpu在响应优先级为4的中断A,但是这个中断A的中断处理程序比较长,此时如果有优先级为5的中断B到来,那么cpu是不会响应这个中断的。
  在软件上,将中断处理程序分为两部分,分为上半部和下半部。在上半部分,完成中断最紧急的任务,然后就可以通知GIC,降低当前的中断处理优先级,以便其他中断能够得到响应。在下半部分,处理该中断的其他事情。在这种机制下,低优先级的中断,不用等待高优先级的中断,完全执行完中断处理程序后,就可以被cpu所响应,提高实时性。
  为了实现上述机制,就将中断完成分成了2步。还是刚刚的例子,cpu在响应优先级为4的中断A,当中断A的上半部分完成后,通知GIC,优先级重置(drop priority),GIC将当前的最高优先级中断重置,重置到响应中断A之前的优先级,比如优先级6,那么此时优先级为5的中断B,就可以被cpu响应。最后中断A的下半部分完成后,通知GIC,将该中断A的状态,设置为inactive状态,此时中断A就真正的完成了。

  当然,也可以不将中断完成分成2步,就1步。通过控制 GICC_CTLR寄存器的EOImode比特,来决定是否将中断完成分成2步。

2.6.中断案例分析

  How the GIC-400 handles two physical interrupts of different priority.In the example, interrupts N and M:
• Are set to be level-sensitive.
• Are SPIs, so they are signaled using the active-HIGH IRQS input.
• Target the same processor.
• Are configured to be Group 0 and the GICC_CTLR of the target CPU interface has the FIQEn bit set, so they are signaled to that CPU as FIQs.
在这里插入图片描述

  • T1 The Distributor detects the assertion of Group 0 interrupt M.
  • T2 The Distributor sets interrupt M to pending.
  • T17 The CPU interface asserts nFIQCPU[n].
    The assertion of nFIQCPU[n] occurs some CLK cycles after interrupt M becomes pending. In Figure B-1, the latency at the physical interface is tph = 15 clock cycles.
  • T42 The Distributor detects the assertion of a higher priority Group 0 interrupt, N.
  • T43 The Distributor replaces interrupt M with interrupt N as the highest priority pending interrupt and sets N to pending.
  • T58 tph clock cycles after interrupt N became pending, the CPU interface asserts nFIQCPU[n]. The state of nFIQCPU[n] is unchanged because nFIQCPU[n] was asserted at T17. The CPU interface updates the InterruptID field in the GICC_IAR, to contain the ID value for interrupt N.
  • T61 The processor reads the GICC_IAR, acknowledging the highest priority pending interrupt, N.The Distributor sets interrupt N to active and pending.
  • T61-T131 The processor services interrupt N.
  • T64 3 clock cycles after interrupt N has been acknowledged, the CPU interface
    deasserts nFIQCPU[n].
  • T126 The peripheral deasserts interrupt N.
  • T128 The pending state is removed from N.
  • T131 The processor writes to the End of Interrupt Register, GICC_EOIR, with the ID of interrupt N and the Distributor deactivates interrupt N.
  • T146 tph clock cycles after GICC_EOIR was written to for N, the Distributor forwards the new highest priority pending interrupt, M, to the CPU interface, which asserts nFIQCPU[n].
  • T211 The processor reads the GICC_IAR, acknowledging the highest priority pending interrupt, M, and the Distributor sets interrupt M to active and pending.
  • T214 3 clock cycles after interrupt M has been acknowledged, the CPU interface deasserts nFIQCPU[n].

2.7.中断分组

  The GICv3 architecture supports the ARM TrustZone technology. Each INTID must be assigned a group and security setting. GICv3 supports three combinations:
在这里插入图片描述  Group 0 interrupts are always signaled as FIQs. Group 1 interrupts are signaled as either IRQs or FIQs depending on the current Security state and Exception level of the PE.

2.8.Interrupt enables

For peripheral interrupts, a processor:

  • enables an interrupt by writing to the appropriate GICD_ISENABLERn(Interrupt Set-Enable Registers) bit
  • disables an interrupt by writing to the appropriate GICD_ICENABLERn(Interrupt Clear-Enable Registers) bit

3.Linux GIC code

drivers/irqchip目录下保存在各种不同的中断控制器的驱动代码:

  • irq-gic-common.c中是GIC V2和V3的通用代码;
  • irq-gic.c是V2 specific的代码;
  • irq-gic-v3.c是V3 specific的代码

参考资料:
http://www.lujun.org.cn/?p=3874
Arm® Generic Interrupt Controller Architecture Specification GIC architecture version 3 and version 4.pdf
GICv3_Software_Overview_Official_Release_B.pdf

LS1046A CPU架构与DPAA2加速引擎实战解析 在嵌入式网络与通信设备开发中,多核处理器架构是提升系统性能的核心。其原理在于通过多个CPU核心并行处理任务,并借助缓存一致性协议确保数据同步。这种架构的技术价值在于显著提升了数据吞吐量和实时处理能力,尤其适用于网关、路由器和边缘计算等场景。其中,硬件加速引擎如DPAA2(数据路径加速架构)和CAAM(密码加速与保障模块)是关键,它们能将网络包处理、加解密等繁重任务从CPU卸载,实现接近线速的性能。本文以NXP LS1046A处理器为例,深入探讨其四核Cortex-A72架构、缓存层次、中断控制,以及如何与D 阅读详情

相关推荐

GICv3_Software_Overview_Official_Release_B.pdf

This document provides a software focused overview of the features of GICv3, and describes the operation of a GICv3 compliant interrupt controller. It is also a primer on how to configure a GICv3 interrupt controller for use in a bare metal environment. This document compliments the ARM® Generic Interrupt Controller Architecture Specification GIC architecture version 3.0 and 4.0. It is not a replacement or alternative. Refer to the ARM® Generic Interrupt Controller Architecture Specification GIC architecture version 3.0 and 4.0 for detailed descriptions of registers and behaviors.

GICv3_LPI机制

中断号0-15保留用于SGI的中断号。能产生MSI中断的设备,都有一个DeviceDI(设备ID),它产生的每一个MSI中断都有一个EventID(事件ID)。它们标识CPU核私有的中断源,并且独立于另一个内核上的相同中断源,比如,每个核的计时器。对于原来的SPI,它也是可以使用MSI的方式传递的,这个功能是可选的。在这样一个速食的时代,坚持做自己,慢下来,潜心琢磨,心怀敬畏,领悟知识,才能向下扎到根,向上捅破天,背着世界往前行!在复杂系统中有成本上千的中断时,就需要成本上千的中断信号线,这太复杂了。

jia_weihui的博客 1510

ARM Generic Interrupt Controller Architecture Specification.zip

ARM Generic Interrupt Controller Architecture Specification

GICv3软件overview手册之介绍

本文档提供了GICv3特性的软件overview,并且描述GICV3中断控制器的操作。它也只是如何在裸机环境下配置GICV3中断控制器的简介。 本文档是ARM通用中断控制器架构手册V3.0和V4.0的简介。它不能代替这两文档。可以查阅这两文档了解更多详细的寄存器和行为。 1. 范围 GICV3允许很多不同的配置和使用。本文档只是作简单的介绍,且为所有使用的子集。它仅描述如下情况: (1)存在两种安全状态; (2)亲和路由在两种安全状态下使能; (3...

flyingnosky的专栏 1007

ARM-gic官方文档资料打包下载-gicv2v3-gic500等.rar

ARM gicv2、ARM gicv3的官方pdf文档精简版、详细版 共计6篇文档。值得学习. GICv3 and GICv4 Software Overview.pdf Arm Generic Interrupt Controller Architecture Specification GIC architecture version 3 and version 4.pdf ARM Generic Interrupt Controller Architecture Specification.pdf GIC-500 Cycle Model User Guide.pdf ......

Forest_Stay_Focused_Premium_v4.14.1.apk

您是否曾经沉迷于手机并且无法放下手机?Forest提供了一个有趣的解决方案来消除您的手机上瘾。您可以在森林里种种子。在接下来的时间里,这种种子将逐渐长成一棵树。但是,如果您无法抗拒诱惑并离开此应用以查看Facebook或玩游戏,那么您的树将凋谢。通过这种有趣的机制,成就感和责任感将驱使我们的用户毫不费力地远离手机。 特征 •一种自我激励和有趣的方式来帮助您 克服手机上瘾•保持专注并完成更多工作 •与朋友分享森林并与之竞争 •以简单而愉快的方式跟踪历史 •赚取奖励并解锁更多树种 •自定义您的白名单:离开森林并在白名单中使用应用程序不会杀死您的树。 我们还提供浏览器扩展。在www.forestapp.cc上找到更多信息! 鸣谢 *声音设计:李石匡 *该应用中出现的某些图标是Freepik从www.flaticon.com制作的,并根据CC BY 3.0许可

GIC源码系列(三):GICv3驱动初始化

这里我们介绍GICv3驱动的基础框架,后续再介绍GICv4的支持。中。同时仅介绍ACPI方式下GICv3驱动。该驱动由宏对不同中断控制器版本进行不同的初始化,这里对GICv3驱动通过函数**acpi_avalidate_gic_table()gic_acpi_init()**进行初始化。

叫好与叫座虽然不是对立面,但想在同一个作品中达到双重效果很难。 1058

原理图转PCB

本文讲述了原理图的编译、原理图转PCB的步骤和易错点。

m0_58083051的博客 3294

linux IRQ Management(七)- 中断处理流程

了解如何申请irq 1.Introduction   如何向Linux Kernel中的中断子系统注册中断处理函数? 2.High-level interrupt-management interfaces   The generic IRQ layer provides a set of function interfaces for device drivers to grab IRQ d...

weixin_41028621的博客 5015

从解压到编译:手把手带你用TeXstudio搞定第一篇ACM LaTeX论文

本文详细指导如何使用TeXstudio从解压ACM LaTeX模板到成功编译第一篇学术论文的全过程。涵盖环境准备、模板配置、TeXstudio设置及常见问题排查,特别针对ACM会议论文格式要求,帮助学术新人快速掌握LaTeX写作技巧。

weixin_30655569的博客 258

HIL(硬件在环)技术汇总梳理

HIL(Hardware-in-the-Loop)测试领域的知名公司有dSPACE、NI、Vector和speedgoat等,本文是针对这几家HIL技术的对比分析。

Mr.Cssust的博客 3701

ARM GIC中断路由机制解析与AM62L硬件固定路由实践

中断管理是嵌入式多核系统的核心机制,它负责将外设产生的中断请求高效、准确地分发到合适的CPU核心进行处理。其基本原理是通过中断控制器(如ARM GIC)中的路由寄存器,设定每个中断号与目标CPU核心的映射关系,这直接影响系统的实时性、负载均衡与整体性能。在工程实践中,开发者通常通过设备树(Device Tree)声明中断或在Linux内核中使用`smp_affinity`及`irq_set_affinity`等API动态调整中断亲和性(Affinity),以实现性能优化。然而,在某些特定SoC(如TI AM

weixin_30536513的博客 457

pgsql行列转换

‌是PostgreSQL中的一个函数,用于将一个字符串根据正则表达式进行分割,并将结果返回为一个表格,每个分割后的部分作为一行‌‌。string_agg() 函数是 PostgreSQL 中的一个聚合函数,用于将一个列中的值连接成一个字符串。

chimchim66的博客 3510

AM62L中断控制器架构解析:从路由器到GIC的嵌入式系统中断管理

中断控制器是现代嵌入式系统的核心组件,负责协调CPU与众多外设之间的异步事件通信。其基本原理是通过硬件信号线接收外部事件请求,依据预设优先级进行仲裁与分发,最终触发CPU中断服务例程。在复杂的多核SoC设计中,中断管理技术价值尤为凸显,它直接决定了系统的实时性、可靠性与功耗表现。AM62L处理器采用了两级中断架构,通过可编程的**中断路由器(INTR_ROUTER)** 实现硬件解耦与灵活映射,再经由符合ARM标准的**通用中断控制器(GIC)** 完成最终仲裁与核间分发。这种设计特别适用于工业自动化、汽车

451

单窗算法的地表温度反演:谷歌地球引擎GEE代码

该论文基于Statistical Mono-Window(SMW)算法,对地表温度加以求解。其中,简单地说,SMW算法即是通过简单的线性关系,对由单热红外波段所得的大气表观亮温与地表温度之间的经验关系加以表示,从而计算得到LST。

2301_78834737的博客 574

【100%通过率】华为od机试C卷【出差 / 员工派遣】C++ 实现

某公司部门需要派遣员工去国外做项目。现在,代号为 x 的国家和代号为 y 的国家分别需要 cntx 名和 cnty 名员工部门每个员工有一个员工号 (1,2,3,......),工号连续,从 1开始。部长派遣员工的规则:

MISAYAONE的博客 2199

手撕ARM64启动栈(一):QEMU + TF-A → OP-TEE → U-Boot → Linux 全链路总览

ARM 官方提供的参考固件实现,本文用作 BL1/BL2/BL31:开源 TEE 实现,本仓库用作 BL32,运行在 S-EL1,通过 opteed(SPD)与 BL31 交互,提供 TA 运行环境U-Boot:本仓库用作 BL33/Normal World bootloader,通过 ARM semihosting(,非网络/非fw_cfg)从宿主机文件系统读取内核与 initrd,bootm跳转内核。

Fifty的博客 503

深度强化学习训练结果曲线绘制教程

使用python语言,只调用matplotlib库,绘制训练过程中保存的强化学习训练曲线。模仿经典论文中的训练曲线,多次训练取平均,并绘制出阴影区域。

加斯顿工程师的博客 913

深入解析AM64x/AM243x A53子系统:架构、中断与ECC安全机制

在嵌入式系统设计中,高性能多核处理器是满足工业自动化和汽车电子严苛需求的核心。其子系统架构决定了计算性能、实时响应和系统可靠性。通过深入理解核心集群配置、中断路由机制以及电源时钟管理,工程师能够优化系统设计,实现高效的异构计算与功耗控制。其中,功能安全(Functional Safety)机制,特别是针对缓存的ECC(错误检查和纠正)保护与错误注入测试,是构建符合ISO 26262等安全标准的高可靠性系统的关键技术。本文以德州仪器(TI)AM64x/AM243x处理器的Arm Cortex-A53子系统为例

cuanku6549的博客 484

OceanSim: 基于Isaac Sim GPU 加速水下机器人感知仿真框架

OceanSim 采用先进的基于物理的渲染技术,对水下视觉和声学传感器进行精确建模。与其他模拟引擎相比,OceanSim 的渲染速度要快得多。作为 NVIDIA Issac Sim 的扩展,OceanSim 采用了多功能设计。通过融入快速发展的 NVIDIA Omniverse 生态系统,我们的模拟器自然而然地在机器人学习和水下机器人技术之间架起了一座桥梁,从而促进了水下应用中体现型人工智能技术的开发和部署。OceanSim 将以开放源码的方式提供,使研究界能够以合作的模式作出贡献。

机器人控制与仿真应用 2062

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

嵌入式Linux驱动移植实战:从设备树适配到内核API兼容

Linux设备驱动是连接硬件与操作系统的核心组件,其本质是遵循内核框架规范、通过标准接口管理硬件资源的软件模块。驱动的工作原理基于中断处理、内存映射和总线协议,通过抽象硬件差异实现设备无关性。在嵌入式开发中,驱动移植的技术价值在于复用成熟代码、加速产品开发并降低硬件适配成本,广泛应用于物联网设备、工业控制和消费电子等领域。本文聚焦驱动移植的典型场景,深入解析跨平台移植中设备树适配与内核API兼容的关键步骤,涵盖中断处理、资源管理等核心热词,并探讨电源管理、sysfs接口等高级优化实践,为嵌入式工程师提供从移

weixin_34405557的博客 357

华为的C语言编程规范.pdf

华为技术有限公司内部技术规范。本规范制定了编写C语言程序的基本原则、规则和建议。从代码的清晰、简洁、可测试、安全、程序效率、可移植各个方面对C语言编程作出了具体指导。

Linux 驱动研究 —— SDIO (6)

全文围绕三大核心展开:首先讲解CMD52与CMD53命令码的底层逻辑,教你如何精准下达读写任务;其次剖析数据传输状态机与DMA机制,介绍系统如何通过硬件自动搬运数据并利用CRC校验保障传输安全;最后深入探讨SDIO异步中断与电源管理,详细还原了外设拉低引脚触发硬中断、内核专用线程被唤醒接管,以及将任务精准交付给驱动的完整闭环。整篇文档层层递进,是一套从指令交互、数据搬运到事件处理的硬核技术全景解析。

kdxiaojie的博客 625

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

NXP QorIQ平台SATA驱动配置与性能优化实战指南

在嵌入式Linux系统开发中,存储子系统是保障数据可靠性与系统性能的核心组件。SATA(串行ATA)作为一种成熟的高速存储接口标准,通过AHCI(高级主机控制器接口)协议与操作系统交互,为嵌入式设备连接大容量固态硬盘或机械硬盘提供了高效的数据通道。其技术价值在于实现了高带宽、低延迟的块设备访问,是构建本地存储、日志系统和根文件系统的基石。在工业控制、边缘计算和网络通信等应用场景中,稳定的存储性能直接关系到系统的实时性与可靠性。本文聚焦于NXP QorIQ系列处理器(如LS1046A、P5020)的SATA控

weixin_33980459的博客 441

基于RK3568的UBoot功能开发和启动Kernel:实战

基于正点原子RK3568开发板实战UBoot功能开发和启动Kernel

weixin_43390831的博客 220

制作RootFS

本文介绍了Linux系统中RootFS(根文件系统)的概念及其制作方法。RootFS是内核默认创建的顶层挂载实例,通过initramfs加载最小工具和驱动后,再切换到真正的业务根文件系统。文章详细演示了使用debootstrap工具在Ubuntu/Debian系统中制作ARM架构嵌入式设备的RootFS步骤,包括环境准备、QEMU模拟支持、chroot配置、基础软件安装和打包过程。同时解释了内核启动所需的三个核心文件(内核镜像、initrd和业务RootFS)的作用,并探讨了initrd与initramfs

fanged的专栏 1822

深入解析AM64x PCIe子系统:中断机制与地址转换实战指南

在计算机体系结构中,中断机制与地址转换是确保外设与CPU高效协同工作的两大核心技术。中断作为外设与CPU通信的异步信号机制,其核心原理在于允许设备在需要服务时主动打断CPU当前任务,从而实现实时响应。现代PCIe总线在此基础上发展出MSI和MSI-X等基于消息的信号中断,它们通过向特定内存地址写入数据来传递中断向量,大幅提升了中断处理的并发性和效率,对于构建高性能、低延迟的计算系统具有重要价值。地址转换则是连接不同地址空间的关键,它通过硬件单元(如iATU)将PCIe设备的总线地址映射到系统的物理地址,确保

weixin_30268921的博客 367
上一篇: 数据结构
下一篇: linux IRQ Management(二)- ARM异常模式
Hacker_Albert
博客等级 码龄9年 472粉丝 244原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址