features.rst 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.2-no-invariants-or-later
  2. =================
  3. EDAC/RAS features
  4. =================
  5. Copyright (c) 2024-2025 HiSilicon Limited.
  6. :Author: Shiju Jose <shiju.jose@huawei.com>
  7. :License: The GNU Free Documentation License, Version 1.2 without
  8. Invariant Sections, Front-Cover Texts nor Back-Cover Texts.
  9. (dual licensed under the GPL v2)
  10. - Written for: 6.15
  11. Introduction
  12. ------------
  13. EDAC/RAS components plugging and high-level design:
  14. 1. Scrub control
  15. 2. Error Check Scrub (ECS) control
  16. 3. ACPI RAS2 features
  17. 4. Post Package Repair (PPR) control
  18. 5. Memory Sparing Repair control
  19. High level design is illustrated in the following diagram::
  20. +-----------------------------------------------+
  21. | Userspace - Rasdaemon |
  22. | +-------------+ |
  23. | | RAS CXL mem | +---------------+ |
  24. | |error handler|---->| | |
  25. | +-------------+ | RAS dynamic | |
  26. | +-------------+ | scrub, memory | |
  27. | | RAS memory |---->| repair control| |
  28. | |error handler| +----|----------+ |
  29. | +-------------+ | |
  30. +--------------------------|--------------------+
  31. |
  32. |
  33. +-------------------------------|------------------------------+
  34. | Kernel EDAC extension for | controlling RAS Features |
  35. |+------------------------------|----------------------------+ |
  36. || EDAC Core Sysfs EDAC| Bus | |
  37. || +--------------------------|---------------------------+| |
  38. || |/sys/bus/edac/devices/<dev>/scrubX/ | | EDAC device || |
  39. || |/sys/bus/edac/devices/<dev>/ecsX/ |<->| EDAC MC || |
  40. || |/sys/bus/edac/devices/<dev>/repairX | | EDAC sysfs || |
  41. || +---------------------------|--------------------------+| |
  42. || EDAC|Bus | |
  43. || | | |
  44. || +----------+ Get feature | Get feature | |
  45. || | | desc +---------|------+ desc +----------+ | |
  46. || |EDAC scrub|<-----| EDAC device | | | | |
  47. || +----------+ | driver- RAS |----->| EDAC mem | | |
  48. || +----------+ | feature control| | repair | | |
  49. || | |<-----| | +----------+ | |
  50. || |EDAC ECS | +---------|------+ | |
  51. || +----------+ Register RAS|features | |
  52. || ______________________|_____________ | |
  53. |+---------|---------------|------------------|--------------+ |
  54. | +-------|----+ +-------|-------+ +----|----------+ |
  55. | | | | CXL mem driver| | Client driver | |
  56. | | ACPI RAS2 | | scrub, ECS, | | memory repair | |
  57. | | driver | | sparing, PPR | | features | |
  58. | +-----|------+ +-------|-------+ +------|--------+ |
  59. | | | | |
  60. +--------|-----------------|--------------------|--------------+
  61. | | |
  62. +--------|-----------------|--------------------|--------------+
  63. | +---|-----------------|--------------------|-------+ |
  64. | | | |
  65. | | Platform HW and Firmware | |
  66. | +--------------------------------------------------+ |
  67. +--------------------------------------------------------------+
  68. 1. EDAC Features components - Create feature-specific descriptors. For
  69. example: scrub, ECS, memory repair in the above diagram.
  70. 2. EDAC device driver for controlling RAS Features - Get feature's attribute
  71. descriptors from EDAC RAS feature component and registers device's RAS
  72. features with EDAC bus and expose the features control attributes via
  73. sysfs. For example, /sys/bus/edac/devices/<dev-name>/<feature>X/
  74. 3. RAS dynamic feature controller - Userspace sample modules in rasdaemon for
  75. dynamic scrub/repair control to issue scrubbing/repair when excess number
  76. of corrected memory errors are reported in a short span of time.
  77. RAS features
  78. ------------
  79. 1. Memory Scrub
  80. Memory scrub features are documented in `Documentation/edac/scrub.rst`.
  81. 2. Memory Repair
  82. Memory repair features are documented in `Documentation/edac/memory_repair.rst`.