diff --git a/docs/2_OSLab/g2/boot.md b/docs/2_OSLab/g2/boot.md index f8387396..d17118c4 100644 --- a/docs/2_OSLab/g2/boot.md +++ b/docs/2_OSLab/g2/boot.md @@ -48,7 +48,18 @@ SECTIONS { ## boot.S -CPU 启动代码位于 `kernel/src/arch/aarch64/boot/boot.S`,主要流程如下: +CPU 启动代码位于 `kernel/src/arch/aarch64/boot/boot.S`,负责初始化一些系统寄存器,并将当前异常级别(exception level)切换到 EL1。 + +AArch64 有 4 个异常级别,相当于 x86 的特权级,分别为: + +* EL0: Applications. +* EL1: OS kernel and associated functions that are typically described as privileged. +* EL2: Hypervisor. +* EL3: Secure monitor. + +在 RustOS 中,内核将运行在 EL1 上,用户程序将运行在 EL0 上。 + +`boot.S` 的主要流程如下: 1. 获取核的编号,目前只使用 0 号核,其余核将被闲置: @@ -66,7 +77,7 @@ CPU 启动代码位于 `kernel/src/arch/aarch64/boot/boot.S`,主要流程如 b halt ``` -2. 读取当前异常级别(Exception level): +2. 读取当前异常级别: ```armasm # read the current exception level into x0 (ref: C5.2.1) diff --git a/docs/2_OSLab/g2/drivers.md b/docs/2_OSLab/g2/drivers.md index dd94d133..2d415c91 100644 --- a/docs/2_OSLab/g2/drivers.md +++ b/docs/2_OSLab/g2/drivers.md @@ -1 +1,11 @@ -# 驱动 +# 设备驱动 + +## Mini UART + +## Timer + +## Mailbox + +## Framebuffer + +## Console diff --git a/docs/2_OSLab/g2/interrupt.md b/docs/2_OSLab/g2/interrupt.md new file mode 100644 index 00000000..4f576652 --- /dev/null +++ b/docs/2_OSLab/g2/interrupt.md @@ -0,0 +1 @@ +# 中断 diff --git a/docs/2_OSLab/g2/peripherals.md b/docs/2_OSLab/g2/peripherals.md deleted file mode 100644 index 83ddc310..00000000 --- a/docs/2_OSLab/g2/peripherals.md +++ /dev/null @@ -1 +0,0 @@ -# 外围设备 diff --git a/docs/2_OSLab/g2/raspi3.md b/docs/2_OSLab/g2/raspi3.md index c9fb8eec..268ec5f5 100644 --- a/docs/2_OSLab/g2/raspi3.md +++ b/docs/2_OSLab/g2/raspi3.md @@ -11,7 +11,7 @@ * [概述](overview.md) * [环境配置](environment.md) * [启动](boot.md) -* [外围设备](peripherals.md) +* [中断](interrupt.md) * [内存管理](memory.md) * [上下文切换](context.md) -* [驱动](drivers.md) +* [设备驱动](drivers.md)