hw/cxl/cxl-mailbox-utils: Add device DDR5 ECS control feature
authorShiju Jose <shiju.jose@huawei.com>
Fri, 5 Jul 2024 12:30:38 +0000 (13:30 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 21 Jul 2024 18:42:04 +0000 (14:42 -0400)
commit2d41ce38fb9af3e66f85c8b8f9c3f83148c3d549
tree254dc4d86572e3af425114f8b67d1533d5efc2f6
parentd88f667414106c7216485774293d0831c2482d20
hw/cxl/cxl-mailbox-utils: Add device DDR5 ECS control feature

CXL spec 3.1 section 8.2.9.9.11.2 describes the DDR5 Error Check Scrub (ECS)
control feature.

The Error Check Scrub (ECS) is a feature defined in JEDEC DDR5 SDRAM
Specification (JESD79-5) and allows the DRAM to internally read, correct
single-bit errors, and write back corrected data bits to the DRAM array
while providing transparency to error counts. The ECS control feature
allows the request to configure ECS input configurations during system
boot or at run-time.

The ECS control allows the requester to change the log entry type, the ECS
threshold count provided that the request is within the definition
specified in DDR5 mode registers, change mode between codeword mode and
row count mode, and reset the ECS counter.

Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Reviewed-by: Fan Ni <fan.ni@samsung.com>
Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
Link: https://lore.kernel.org/r/20240223085902.1549-4-shiju.jose@huawei.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240705123039.963781-5-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/cxl/cxl-mailbox-utils.c
hw/mem/cxl_type3.c
include/hw/cxl/cxl_device.h