update the dir organization under kernel/int.md

This commit is contained in:
Yan_yan 2020-11-03 10:39:47 +08:00
parent c8ee70a874
commit 837ebd948d
1 changed files with 30 additions and 29 deletions

View File

@ -6,14 +6,14 @@
* [异常处理机制](#riscv_exception)
* [中断类型](#riscv_int_type)
* [中断控制器](#riscv_int_controller)
* [中断处理机制](#riscv_int_process)
* [中断服务程序](#riscv_int_service)
* [中断处理流程](#riscv_int_process2)
* [ARM CORTEX-M架构的中断和异常](#arm_interrupt)
* [概述](#arm_interrupt_intro)
* [异常处理机制](#arm_interrupt_process_mechnism)
* [中断类型](#arm_int_type)
* [中断控制器](#arm_int_controller)
* [中断处理机制](#riscv_int_process)
* [中断服务程序](#riscv_int_service)
* [中断处理流程](#riscv_int_process2)
* [中断函数接口](#riscv_int_api)
* [使用场景](#situation)
@ -82,32 +82,7 @@ RISC-V中断控制器如下图所示
![XiUOS RISC-V CONTROLLER](/images/int_riscv_controller.png)
### 中断处理机制
<span id="riscv_int_service"></span>
#### 中断服务程序
每一个中断源对应一个中断号,每一个中断号又通过中断向量表和中断服务程序进行关联。当中断产生后,通过中断向量表跳转到中断服务程序的入口地址进行执行。如下图所示:
<center>
![XiUOS ISR](/images/int_isr.png)
</center>
<span id="riscv_int_process2"></span>
#### 中断处理流程
CPU响应中断并进行处理通常经历以下过程保存当前线程的栈信息、跳转中断服务程序运行、恢复被打断的线程栈继续运行。
如下图所示:
<center>
![XiUOS PROCESS](/images/int_process.png)
</center>
<span id="arm_interrupt"></span>
@ -155,6 +130,32 @@ NVIC共支持1到240个外部中断输入IRQs。另外 NVIC还支持一
cortex-M系列包含一个NVIC嵌套中断向量控制器提供硬件嵌套中断服务。在中断发生时NVIC自动取出对应的服务例程入口地址并且直接调用无需软件判定中断源。另外M系列包含一个基本的systick定时器配合NVIC工作用于系统计数。NVIC控制器如下图所示
![NVIC CONTROLLER](/images/arm_nvic_controller.jpg)
<span id="riscv_int_process"></span>
### 中断处理机制
<span id="riscv_int_service"></span>
#### 中断服务程序
每一个中断源对应一个中断号,每一个中断号又通过中断向量表和中断服务程序进行关联。当中断产生后,通过中断向量表跳转到中断服务程序的入口地址进行执行。如下图所示:
<center>
![XiUOS ISR](/images/int_isr.png)
</center>
<span id="riscv_int_process2"></span>
#### 中断处理流程
CPU响应中断并进行处理通常经历以下过程保存当前线程的栈信息、跳转中断服务程序运行、恢复被打断的线程栈继续运行。
如下图所示:
<center>
![XiUOS PROCESS](/images/int_process.png)
</center>
<span id="riscv_int_api"></span>