From: santino.wang <santino.wang@mediatek.com>
To: Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>
Cc: <linux-mediatek@lists.infradead.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <light.chen@mediatek.com>,
<Fred-WY.Chen@mediatek.com>, <arnab.layek@mediatek.com>,
Santino Wang <santino.wang@mediatek.com>
Subject: [RFC PATCH 11/11] Documentation: ABI: add the sysfs attributes of the MediaTek DRAM ECC driver
Date: Mon, 2 Nov 2026 17:23:33 +0800 [thread overview]
Message-ID: <20261102092334.138759-12-santino.wang@mediatek.com> (raw)
In-Reply-To: <20261102092334.138759-1-santino.wang@mediatek.com>
From: Santino Wang <santino.wang@mediatek.com>
Document the error counters, the retired page counters, the recorded
error addresses and the policy attributes that the driver adds under
its class device.
Signed-off-by: Santino Wang <santino.wang@mediatek.com>
---
.../ABI/testing/sysfs-class-mtk-dram-ecc | 182 ++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 183 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-class-mtk-dram-ecc
diff --git a/Documentation/ABI/testing/sysfs-class-mtk-dram-ecc b/Documentation/ABI/testing/sysfs-class-mtk-dram-ecc
new file mode 100644
index 000000000000..7b31bd663c53
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-mtk-dram-ecc
@@ -0,0 +1,182 @@
+What: /sys/class/mtk-dram-ecc/mtk-dram-ecc0/counters/volatile_ce
+ /sys/class/mtk-dram-ecc/mtk-dram-ecc0/counters/volatile_uce_inline
+ /sys/class/mtk-dram-ecc/mtk-dram-ecc0/counters/volatile_uce_ondie
+ /sys/class/mtk-dram-ecc/mtk-dram-ecc0/counters/volatile_uce
+Date: November 2026
+KernelVersion: 7.4
+Contact: Santino Wang <santino.wang@mediatek.com>
+Description:
+ Number of corrected (CE) and uncorrectable (UCE) DRAM ECC errors
+ reported since the system booted, as a decimal number.
+
+ Inline ECC detects every UCE, including one that originates in the
+ DRAM die, so volatile_uce_inline is the total number of UCEs and
+ volatile_uce is equal to it. volatile_uce_ondie counts the subset
+ that on-die ECC also flagged.
+
+ Access: Read
+
+What: /sys/class/mtk-dram-ecc/mtk-dram-ecc0/counters/agg_ce
+ /sys/class/mtk-dram-ecc/mtk-dram-ecc0/counters/agg_uce_inline
+ /sys/class/mtk-dram-ecc/mtk-dram-ecc0/counters/agg_uce_ondie
+ /sys/class/mtk-dram-ecc/mtk-dram-ecc0/counters/agg_uce
+Date: November 2026
+KernelVersion: 7.4
+Contact: Santino Wang <santino.wang@mediatek.com>
+Description:
+ Number of corrected (CE) and uncorrectable (UCE) DRAM ECC errors
+ accumulated across boots, as a decimal number. The counters are kept
+ in EFI variables that the system firmware creates.
+
+ As for the volatile counters, agg_uce_inline is the total number of
+ UCEs, agg_uce is equal to it and agg_uce_ondie counts the subset that
+ on-die ECC also flagged.
+
+ Access: Read
+
+What: /sys/class/mtk-dram-ecc/mtk-dram-ecc0/retired/by_ce
+ /sys/class/mtk-dram-ecc/mtk-dram-ecc0/retired/by_uce
+Date: November 2026
+KernelVersion: 7.4
+Contact: Santino Wang <santino.wang@mediatek.com>
+Description:
+ Number of pages retired since the system booted because of
+ corrected errors (by_ce) or uncorrectable errors (by_uce), as a
+ decimal number. Each page is counted once.
+
+ Access: Read
+
+What: /sys/class/mtk-dram-ecc/mtk-dram-ecc0/addresses/current_boot_ce
+ /sys/class/mtk-dram-ecc/mtk-dram-ecc0/addresses/current_boot_uce
+Date: November 2026
+KernelVersion: 7.4
+Contact: Santino Wang <santino.wang@mediatek.com>
+Description:
+ System physical addresses of the corrected (current_boot_ce) and
+ uncorrectable (current_boot_uce) errors reported since the system
+ booted, one hexadecimal address per line. At most 256 addresses are
+ kept for each kind.
+
+ Access: Read
+
+What: /sys/class/mtk-dram-ecc/mtk-dram-ecc0/policy/containment/enabled
+Date: November 2026
+KernelVersion: 7.4
+Contact: Santino Wang <santino.wang@mediatek.com>
+Description:
+ Whether the secure firmware handles and reports DRAM ECC errors.
+ While it is disabled, the secure firmware only clears the error
+ source and publishes no record. Writing the value sends it to
+ the secure firmware.
+
+ Access: Read, Write
+ Valid values: Represented as boolean
+
+What: /sys/class/mtk-dram-ecc/mtk-dram-ecc0/policy/containment/default_severity
+Date: November 2026
+KernelVersion: 7.4
+Contact: Santino Wang <santino.wang@mediatek.com>
+Description:
+ Severity the secure firmware reports for a contained uncorrectable
+ error that is not covered by an entry of policy/address_range.
+ Writing the value sends it to the secure firmware.
+
+ Access: Read, Write
+ Valid values: "fatal" or "recoverable"
+
+What: /sys/class/mtk-dram-ecc/mtk-dram-ecc0/policy/storm_protection/threshold
+Date: November 2026
+KernelVersion: 7.4
+Contact: Santino Wang <santino.wang@mediatek.com>
+Description:
+ Number of error interrupts within policy/storm_protection/time_window
+ at which the secure firmware stops reporting DRAM ECC interrupts, to
+ protect the system from an interrupt storm. Writing the value sends it
+ to the secure firmware.
+
+ Access: Read, Write
+ Valid values: Represented as unsigned integer
+
+What: /sys/class/mtk-dram-ecc/mtk-dram-ecc0/policy/storm_protection/time_window
+Date: November 2026
+KernelVersion: 7.4
+Contact: Santino Wang <santino.wang@mediatek.com>
+Description:
+ Length of the window, in milliseconds, in which the secure firmware
+ counts error interrupts for policy/storm_protection/threshold.
+ Writing the value sends it to the secure firmware.
+
+ Access: Read, Write
+ Valid values: Represented as unsigned integer
+
+What: /sys/class/mtk-dram-ecc/mtk-dram-ecc0/policy/storm_protection/cooldown
+Date: November 2026
+KernelVersion: 7.4
+Contact: Santino Wang <santino.wang@mediatek.com>
+Description:
+ Time, in milliseconds, after which the secure firmware reports DRAM
+ ECC interrupts again once storm protection has stopped them. Writing
+ the value sends it to the secure firmware.
+
+ Access: Read, Write
+ Valid values: Represented as unsigned integer
+
+What: /sys/class/mtk-dram-ecc/mtk-dram-ecc0/policy/leaky_bucket/threshold
+Date: November 2026
+KernelVersion: 7.4
+Contact: Santino Wang <santino.wang@mediatek.com>
+Description:
+ Number of corrected errors on a page at which the page is retired.
+ Writing 0 restores the default of 100.
+
+ Access: Read, Write
+ Valid values: 0 to 10000
+
+What: /sys/class/mtk-dram-ecc/mtk-dram-ecc0/policy/leaky_bucket/decay_interval_sec
+Date: November 2026
+KernelVersion: 7.4
+Contact: Santino Wang <santino.wang@mediatek.com>
+Description:
+ Interval, in seconds, at which the corrected error count of every
+ tracked page is decreased by one. Writing 0 restores the default of
+ 3600.
+
+ Access: Read, Write
+ Valid values: 0 to 86400
+
+What: /sys/class/mtk-dram-ecc/mtk-dram-ecc0/policy/leaky_bucket/max_tracked
+Date: November 2026
+KernelVersion: 7.4
+Contact: Santino Wang <santino.wang@mediatek.com>
+Description:
+ Maximum number of pages whose corrected error count is tracked at
+ the same time. Writing 0 restores the default of 16.
+
+ Access: Read, Write
+ Valid values: 0 to 16
+
+What: /sys/class/mtk-dram-ecc/mtk-dram-ecc0/policy/address_range/entries
+Date: November 2026
+KernelVersion: 7.4
+Contact: Santino Wang <santino.wang@mediatek.com>
+Description:
+ Address ranges for which the secure firmware overrides the default
+ severity of an uncorrectable error. Reading lists the table held by
+ the secure firmware, one range per line, as
+ "<start> <end> <severity>" with hexadecimal addresses, where the end
+ address is exclusive.
+
+ Writing "<start> <end> <severity>" adds or updates one range. The
+ severity is "fatal" or "recoverable".
+
+ Access: Read, Write
+
+What: /sys/class/mtk-dram-ecc/mtk-dram-ecc0/policy/address_range/clear
+Date: November 2026
+KernelVersion: 7.4
+Contact: Santino Wang <santino.wang@mediatek.com>
+Description:
+ Writing anything to this attribute removes every range from the
+ table of policy/address_range/entries.
+
+ Access: Write
diff --git a/MAINTAINERS b/MAINTAINERS
index e7d25be97f24..d1ab5806ad9c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -17032,6 +17032,7 @@ L: linux-kernel@vger.kernel.org
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
L: linux-mediatek@lists.infradead.org (moderated for non-subscribers)
S: Maintained
+F: Documentation/ABI/testing/sysfs-class-mtk-dram-ecc
F: drivers/soc/mediatek/dram-ecc/
F: include/uapi/linux/mtk_dram_ecc_netlink.h
--
2.45.2
next prev parent reply other threads:[~2026-11-02 9:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 9:23 [RFC PATCH 00/11] soc: mediatek: add a DRAM ECC error handling driver santino.wang
2026-11-02 9:23 ` [RFC PATCH 01/11] soc: mediatek: dram-ecc: add the DRAM ECC driver skeleton santino.wang
2026-11-02 13:41 ` Krzysztof Kozlowski
2026-11-02 9:23 ` [RFC PATCH 02/11] soc: mediatek: dram-ecc: add the SMC interface to the secure firmware santino.wang
2026-11-02 9:23 ` [RFC PATCH 03/11] soc: mediatek: dram-ecc: add tracepoints santino.wang
2026-11-02 19:57 ` Jonathan Cameron
2026-11-02 9:23 ` [RFC PATCH 04/11] soc: mediatek: dram-ecc: handle GHES vendor records from the firmware santino.wang
2026-11-02 9:23 ` [RFC PATCH 05/11] soc: mediatek: dram-ecc: add error counters and the address lists santino.wang
2026-11-02 13:42 ` Krzysztof Kozlowski
2026-11-02 9:23 ` [RFC PATCH 06/11] soc: mediatek: dram-ecc: keep error counters across boots santino.wang
2026-11-02 9:23 ` [RFC PATCH 07/11] soc: mediatek: dram-ecc: add containment policy and storm protection santino.wang
2026-11-02 9:23 ` [RFC PATCH 08/11] soc: mediatek: dram-ecc: add the corrected error leaky bucket santino.wang
2026-11-02 20:19 ` Jonathan Cameron
2026-11-02 9:23 ` [RFC PATCH 09/11] soc: mediatek: dram-ecc: add a generic netlink event interface santino.wang
2026-11-02 20:20 ` Jonathan Cameron
2026-11-02 9:23 ` [RFC PATCH 10/11] soc: mediatek: dram-ecc: report an uncorrectable error of the previous boot santino.wang
2026-11-02 13:44 ` Krzysztof Kozlowski
2026-11-02 9:23 ` santino.wang [this message]
2026-11-02 20:36 ` [RFC PATCH 00/11] soc: mediatek: add a DRAM ECC error handling driver Jonathan Cameron
2026-11-02 20:44 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261102092334.138759-12-santino.wang@mediatek.com \
--to=santino.wang@mediatek.com \
--cc=Fred-WY.Chen@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=arnab.layek@mediatek.com \
--cc=light.chen@mediatek.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®