linux/Documentation/translations/zh_TW/arch/loongarch/irq-chip-model.rst
Hu Haowen f949cb7590 docs/zh_TW: update contents for zh_TW
The content of zh_TW was too outdated comparing to the original files.
Consequently carry out improvements in order to both keep track of sources
and fix several grammatical mistakes in traditional Chinese.

This is a thorough rewrite of the previous patch:
    https://lore.kernel.org/linux-doc/20230807120006.6361-1-src.res.211@gmail.com/
in order to get rid of text damage and merging errors, created based on
linux-next (date: Oct. 9, 2023).

Signed-off-by: Hu Haowen <src.res.211@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20231011051212.17580-1-src.res.211@gmail.com
2023-10-11 16:47:27 -06:00

159 lines
5.5 KiB
ReStructuredText
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

.. SPDX-License-Identifier: GPL-2.0
.. include:: ../../disclaimer-zh_TW.rst
:Original: Documentation/arch/loongarch/irq-chip-model.rst
:Translator: Huacai Chen <chenhuacai@loongson.cn>
==================================
LoongArch的IRQ芯片模型層級關係
==================================
目前基於LoongArch的處理器如龍芯3A5000只能與LS7A芯片組配合工作。LoongArch計算機
中的中斷控制器即IRQ芯片包括CPUINTCCPU Core Interrupt Controller、LIOINTC
Legacy I/O Interrupt Controller、EIOINTCExtended I/O Interrupt Controller
HTVECINTCHyper-Transport Vector Interrupt Controller、PCH-PICLS7A芯片組的主中
斷控制器、PCH-LPCLS7A芯片組的LPC中斷控制器和PCH-MSIMSI中斷控制器
CPUINTC是一種CPU內部的每個核本地的中斷控制器LIOINTC/EIOINTC/HTVECINTC是CPU內部的
全局中斷控制器每個芯片一個所有核共享而PCH-PIC/PCH-LPC/PCH-MSI是CPU外部的中
斷控制器在配套芯片組裏面。這些中斷控制器或者說IRQ芯片以一種層次樹的組織形式
級聯在一起一共有兩種層級關係模型傳統IRQ模型和擴展IRQ模型
傳統IRQ模型
===========
在這種模型裏面IPIInter-Processor Interrupt和CPU本地時鐘中斷直接發送到CPUINTC
CPU串口UARTs中斷髮送到LIOINTC而其他所有設備的中斷則分別發送到所連接的PCH-PIC/
PCH-LPC/PCH-MSI然後被HTVECINTC統一收集再發送到LIOINTC最後到達CPUINTC::
+-----+ +---------+ +-------+
| IPI | --> | CPUINTC | <-- | Timer |
+-----+ +---------+ +-------+
^
|
+---------+ +-------+
| LIOINTC | <-- | UARTs |
+---------+ +-------+
^
|
+-----------+
| HTVECINTC |
+-----------+
^ ^
| |
+---------+ +---------+
| PCH-PIC | | PCH-MSI |
+---------+ +---------+
^ ^ ^
| | |
+---------+ +---------+ +---------+
| PCH-LPC | | Devices | | Devices |
+---------+ +---------+ +---------+
^
|
+---------+
| Devices |
+---------+
擴展IRQ模型
===========
在這種模型裏面IPIInter-Processor Interrupt和CPU本地時鐘中斷直接發送到CPUINTC
CPU串口UARTs中斷髮送到LIOINTC而其他所有設備的中斷則分別發送到所連接的PCH-PIC/
PCH-LPC/PCH-MSI然後被EIOINTC統一收集再直接到達CPUINTC::
+-----+ +---------+ +-------+
| IPI | --> | CPUINTC | <-- | Timer |
+-----+ +---------+ +-------+
^ ^
| |
+---------+ +---------+ +-------+
| EIOINTC | | LIOINTC | <-- | UARTs |
+---------+ +---------+ +-------+
^ ^
| |
+---------+ +---------+
| PCH-PIC | | PCH-MSI |
+---------+ +---------+
^ ^ ^
| | |
+---------+ +---------+ +---------+
| PCH-LPC | | Devices | | Devices |
+---------+ +---------+ +---------+
^
|
+---------+
| Devices |
+---------+
ACPI相關的定義
==============
CPUINTC::
ACPI_MADT_TYPE_CORE_PIC;
struct acpi_madt_core_pic;
enum acpi_madt_core_pic_version;
LIOINTC::
ACPI_MADT_TYPE_LIO_PIC;
struct acpi_madt_lio_pic;
enum acpi_madt_lio_pic_version;
EIOINTC::
ACPI_MADT_TYPE_EIO_PIC;
struct acpi_madt_eio_pic;
enum acpi_madt_eio_pic_version;
HTVECINTC::
ACPI_MADT_TYPE_HT_PIC;
struct acpi_madt_ht_pic;
enum acpi_madt_ht_pic_version;
PCH-PIC::
ACPI_MADT_TYPE_BIO_PIC;
struct acpi_madt_bio_pic;
enum acpi_madt_bio_pic_version;
PCH-MSI::
ACPI_MADT_TYPE_MSI_PIC;
struct acpi_madt_msi_pic;
enum acpi_madt_msi_pic_version;
PCH-LPC::
ACPI_MADT_TYPE_LPC_PIC;
struct acpi_madt_lpc_pic;
enum acpi_madt_lpc_pic_version;
參考文獻
========
龍芯3A5000的文檔
https://github.com/loongson/LoongArch-Documentation/releases/latest/download/Loongson-3A5000-usermanual-1.02-CN.pdf (中文版)
https://github.com/loongson/LoongArch-Documentation/releases/latest/download/Loongson-3A5000-usermanual-1.02-EN.pdf (英文版)
龍芯LS7A芯片組的文檔
https://github.com/loongson/LoongArch-Documentation/releases/latest/download/Loongson-7A1000-usermanual-2.00-CN.pdf (中文版)
https://github.com/loongson/LoongArch-Documentation/releases/latest/download/Loongson-7A1000-usermanual-2.00-EN.pdf (英文版)
.. note::
- CPUINTC即《龍芯架構參考手冊卷一》第7.4節所描述的CSR.ECFG/CSR.ESTAT寄存器及其
中斷控制邏輯;
- LIOINTC即《龍芯3A5000處理器使用手冊》第11.1節所描述的“傳統I/O中斷”
- EIOINTC即《龍芯3A5000處理器使用手冊》第11.2節所描述的“擴展I/O中斷”
- HTVECINTC即《龍芯3A5000處理器使用手冊》第14.3節所描述的“HyperTransport中斷”
- PCH-PIC/PCH-MSI即《龍芯7A1000橋片用戶手冊》第5章所描述的“中斷控制器”
- PCH-LPC即《龍芯7A1000橋片用戶手冊》第24.3節所描述的“LPC中斷”。