mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-08-31 22:23:05 +00:00

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
47 lines
1.7 KiB
ReStructuredText
47 lines
1.7 KiB
ReStructuredText
.. include:: ../../disclaimer-zh_TW.rst
|
||
|
||
:Original: Documentation/arch/parisc/debugging.rst
|
||
|
||
:翻譯:
|
||
|
||
司延騰 Yanteng Si <siyanteng@loongson.cn>
|
||
|
||
.. _tw_parisc_debugging:
|
||
|
||
=================
|
||
調試PA-RISC
|
||
=================
|
||
|
||
好吧,這裏有一些關於調試linux/parisc的較底層部分的信息。
|
||
|
||
|
||
1. 絕對地址
|
||
=====================
|
||
|
||
很多彙編代碼目前運行在實模式下,這意味着會使用絕對地址,而不是像內核其他
|
||
部分那樣使用虛擬地址。要將絕對地址轉換爲虛擬地址,你可以在System.map中查
|
||
找,添加__PAGE_OFFSET(目前是0x10000000)。
|
||
|
||
|
||
2. HPMCs
|
||
========
|
||
|
||
當實模式的代碼試圖訪問不存在的內存時,會出現HPMC(high priority machine
|
||
check)而不是內核oops。若要調試HPMC,請嘗試找到系統響應程序/請求程序地址。
|
||
系統請求程序地址應該與(某)處理器的HPA(I/O範圍內的高地址)相匹配;系統響應程
|
||
序地址是實模式代碼試圖訪問的地址。
|
||
|
||
系統響應程序地址的典型值是大於__PAGE_OFFSET (0x10000000)的地址,這意味着
|
||
在實模式試圖訪問它之前,虛擬地址沒有被翻譯成物理地址。
|
||
|
||
|
||
3. 有趣的Q位
|
||
============
|
||
|
||
某些非常關鍵的代碼必須清除PSW中的Q位。當Q位被清除時,CPU不會更新中斷處理
|
||
程序所讀取的寄存器,以找出機器被中斷的位置——所以如果你在清除Q位的指令和再
|
||
次設置Q位的RFI之間遇到中斷,你不知道它到底發生在哪裏。如果你幸運的話,IAOQ
|
||
會指向清除Q位的指令,如果你不幸運的話,它會指向任何地方。通常Q位的問題會
|
||
表現爲無法解釋的系統掛起或物理內存越界。
|
||
|