Table of Contents

Overview

This documents provides driver details about the Xilinx DDR ECC controller driver used in Versal SOC.

Supporting Features

Xilinx Versal DDR ECC Controller supports

Missing features, Known Issues and Limitations

Kernel Configurations

The following kernel configuration options should be enabled for compiling the Xilinx Versal EDAC driver.

Enable the "EDAC Debug" configuration under CONFIG_EDAC - This is required for error injection support.

Device tree Node

memory-controller@f6150000 {
    compatible = "xlnx,versal-ddrmc";
    status = "okay";
    reg = <0x0 0xf6150000 0x0 0x2000>, <0x0 0xf6070000 0x0 0x20000>;
    reg-names = "base", "noc";
    interrupt-parent = <0x5>;
    interrupts = <0 0x93 4>;
    xlnx,mc-id = <0x0>;
};

Requirements

image-20240305-051804.png

The controller supports LPDDR configurations with different bus widths, such as DDR4x72 , LP4 x40 and LP4 x24.

On vck190 we have 64 bit DDR but only 32 lines are connected in the current setup for LPDDR in vck190.

When ECC is enabled in LPDDR4 configurations and the memory is only 16 bits, the rest of the bits are used for ECC.

LP4x24 and DDR4x72 is there is vck190 and the same is tested. We do not have 40 line LPDDR connected in vck190 this is not

tested.

Mainline Status

Test Procedure

DT changes:

Kernel Boot log for EDAC driver

root@xilinx-vc-p-a2197-00-reva-x-prc-01:~# dmesg | grep "edac"
[    1.648412] EDAC DEBUG: edac_mc_sysfs_init: device mc created
[    2.702865] EDAC DEBUG: edac_mc_alloc: allocating 2392 bytes for mci data (1 ranks, 1 csrows/channels)
[    2.702912] EDAC DEBUG: edac_mc_add_mc_with_groups:
[    2.702945] EDAC DEBUG: edac_create_sysfs_mci_device: device mc0 created
[    2.702975] EDAC MC0: Giving out device to module xlnx_edac controller xlnx_ddr_controller: DEV f6150000.memory-controller (INTERRUPT)

To reserve the test memory location for error injection

reserved-memory {
      #address-cells = <2>;
      #size-cells = <2>;
      ranges;

      reserved: buffer@0 {
         reusable;
         reg =<0x0 0x2002000 0x0 0x00100000>;
      };
   };

   reserved-driver@0 {
      compatible = "xlnx,reserved-memory";
      memory-region = <&reserved>;
   };

Test logs for CE and UE errors injection:

CE:

------------------------------------------------------------
root@xilinx-vc-p-a2197-00-reva-x-prc-01:~# echo 0x2600600 > address
root@xilinx-vc-p-a2197-00-reva-x-prc-01:~# echo 0 > inject_ce
root@xilinx-vc-p-a2197-00-reva-x-prc-01:~# devmem 0x2006000 32 0x12345
root@xilinx-vc-p-a2197-00-reva-x-prc-01:~# devmem 0x2006000
[  176.110595] EDAC MC0: 1 CE Error type:CE MC ID: 0 Addr at 2600600 Burst Pos: 0
[  176.110595]  on mc#0csrow#0channel#0 (csrow:0 channel:0 page:0x0 offset:0x0 grain:1 syndrome:0x0)
0x00012345

For the bit position is also reported 
dmesg | grep "calculate_ce_bit_value" | tail -1
[   29.155904] EDAC DEBUG: calculate_ce_bit_value: bit found is  0x00000000
 
UE:
-------------------------------------------------------------

root@xilinx-vc-p-a2197-00-reva-x-prc-01:~# echo 0x2600600 > address
root@xilinx-vc-p-a2197-00-reva-x-prc-01:~#echo "1,2" > inject_ue
root@xilinx-vc-p-a2197-00-reva-x-prc-01:~# devmem 0x2006000 32 0x12345
root@xilinx-vc-p-a2197-00-reva-x-prc-01:~# devmem 0x2006000
345735.933]PMC EAM ERR1: 0xC2000
[345736.112]Received EAM error. ErrorNodeId: 0x28100000, Register Mask: 0x2000. The corresponding Error ID: 0xD
 195.796797]  on mc#0csrow#0channel#0 (csrow:0 channel:0 page:0x0 offset:0x0 grain:[345760.208]PMC EAM ERR1: 0xC2000
Bus error

Change log

2023.2

None

2023.1

None

2022.2

None

2022.1

2021.2

2021.1

2020.2

Related Links