Page MenuHomeFreeBSD

Pondicherry2 memory controller (ECC) driver
Needs ReviewPublic

Authored by stevek on Apr 18 2023, 6:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 21, 8:55 PM
Unknown Object (File)
Wed, May 1, 1:10 AM
Unknown Object (File)
Dec 20 2023, 5:06 AM
Unknown Object (File)
Oct 21 2023, 2:22 AM
Unknown Object (File)
Jun 28 2023, 11:09 PM
Unknown Object (File)
Jun 27 2023, 8:47 AM
Unknown Object (File)
Jun 19 2023, 8:49 PM
Unknown Object (File)
Jun 16 2023, 3:52 AM
Subscribers

Details

Reviewers
mav
markj
kib
Summary

Address decoding implemented by reading MCH registers to get the
mapping bet ween address bits and physical location in RAM

Decoding has two stages:

  1. Convert physical address to PMI.
  2. Convert PMI to location in DRAM.

Only single channel and slice memory configuration.

Correctable errors:
Process a CMC(correctable machine check) by decoding the faulty
address and printing its location in DRAM (bank,rank etc.) to
the console.

Uncorrectable errors:
If the board was rebooted due to an UCE log that in dmesg.

Device sysctls:

  1. Read correctable ECC error count: sysctl dev.pnd2_edac.0.ce_count
  2. Enable/Disable patrol scrub: sysctl dev.pnd2_edac.0.patrol_scrub=1/0

Errors are injected by writing to a newly created sysctl, 2 for
UCE and 1 for CE.

Note: the error injection feature must be enabled in firmware.

Usage:

  1. Inject uncorrectable ECC error: sysctl dev.pnd2_edac.0.err_inject=1
  2. Inject correctable ECC error: sysctl dev.pnd2_edac.0.err_inject=2

Note: error injection feature must be enabled in BIOS by enabling
"Security relaxation".

Sponsored by: Juniper Networks, Inc.
Obtained from: Semihalf

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 51009
Build 47900: arc lint + arc unit

Event Timeline

No module provided for the driver?

sys/dev/pnd2_edac/pnd2_edac.c
368
379
382

It is cosmetics, but I think that kmem_alloc_attr() is more reasonable KPI to use there.

398

Don't you need some lock to ensure that two threads do not stomp on each other accesses to the registers, if sysctls are issued in parallel?

That said, I am curious are there any requirements that the whole injection sequence was performed from the same core?

420

This is arguably better expressed as atomic_store_32/atomic_load_32. We abstract the specific compiler volatile semantic.