cpu的errata
芯片如果流片后,产生一些需要软件workaround的bug怎么处理呢?
在linux中,对于pci,有pci的quirk,对于cpu,有cpu的errata。
以arm为例,针对cpu执行 errata 的代码为:arch/arm64/kernel/cpu_errata.c
以arm较新的armN2 为例:
arch/arm64/kernel/cpu_errata.c
392: MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N2),
405: MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N2),
417: MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N2),
具体其中一个可以看到:
commit b9d216fcef4298de76519e2baeed69ba482467bd
Author: Suzuki K Poulose <suzuki.poulose@arm.com>
Date: Tue Oct 19 17:31:40 2021 +0100
arm64: errata: Add detection for TRBE overwrite in FILL mode
Arm Neoverse-N2 and the Cortex-A710 cores are affected
by a CPU erratum where the TRBE will overwrite the trace buffer
in FILL mode. The TRBE doesn't stop (as expected in FILL mode)
when it reaches the limit and wraps to the base to continue
writing upto 3 cache lines. This will overwrite any trace that
was written previously.
Add the Neoverse-N2 erratum(#2139208) and Cortex-A710 erratum
(#2119858) to the detection logic.
This will be used by the TRBE driver in later patches to work
around the issue. The detection has been kept with the core
arm64 errata framework list to make sure :
- We don't duplicate the framework in TRBE driver
- The errata detection is advertised like the rest
of the CPU errata.
Note that the Kconfig entries are not fully active until the
TRBE driver implements the work around.
水平有限,如果有错误,请帮忙提醒我。如果您觉得本文对您有帮助,可以点击下面的 推荐 支持一下我。版权所有,需要转发请带上本文源地址,博客一直在更新,欢迎 关注 。