Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VISTARA : MailBox command implementation for DDR SPD error info clear for dimm_id requested #40

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gadhiadevarsh
Copy link
Contributor

@gadhiadevarsh gadhiadevarsh commented Feb 19, 2025

Summary:
In this task, mailbox command to store and clear DDR SPD error is implemented. here 2 types of SPD errors are handled . Type 0 is SPD CRC ERROR and TYPE 1 is SPD NULL DATA ERROR TYPE 0(SPD CRC) ERROR is checked for all 4 DIMMs and if error is found, when comparing calculated CRC with available CRC, then DIMM_ID and the offset is stored in NVDATA
TYPE 1(SPD NULL DATA) ERROR is checked for all 4 DIMMs and if error is found,when reading first 4 bytes of the reading address, then DIMM_ID and the offset is stored in NVDATA
MailBox command ddr-err-spd-info-get(0xFB38) is implemented to retrive this error information from persistent memory (NVDATA) and send as a response to this command. MailBox command ddr-err-spd-info-clr(0xFB39) is implemented to clear this error information from NVDATA (persistent memory)

Test Plan:

  1. Modify the code to generate SPD NULL DATA error and if found then store the information in NVDATA.
  2. Retrive the error information using ./cxl ddr-err-spd-info-get mem0/mem1
  3. Reboot the host and again check if the information is persist
  4. Clear this error information using ./cxl ddr-err-spd-info-clr mem0/mem1 -i dimm_id
  5. Retrive the error information using ./cxl ddr-err-spd-info-get mem0/mem1
  6. Reboot the host and again check if the information is persist

Output

[root@DG18161 cxl]# ./cxl ddr-err-spd-info-clr

usage: cxl cxl-ddr-spd-err-info-clr [..] []
ex: cxl ddr-err-spd-info-clr -i 2
Above cmd to Clear SPD error information from nvdata for provided dimm_id
Option 'i': set DIMM_ID for which SPD Error info to be cleared

-v, --verbose         turn on debug
-i, --dimm_id <n>     Clear DDR SPD error data for DIMM_A(0), DIMM_B(1), DIMM_C(2), DIMM_D(3), ALL_DIMM(0xFF)

[root@DG18161 cxl]#
root@DG18161 cxl]# ./cxl ddr-err-spd-info-clr mem1 -i 7
mem1: invalid input options 0x7 (Expecting option 0,1,2,3,0xFF)

[root@dhcp-100-97-47-177 cxl]# ./cxl ddr-err-bist-info-get mem0
BIST error details for DDR (0)
DDR BIST error count 9
DDR BIST error info (col)10
DDR BIST error info (row)11
DDR BIST error info (bank)12
DDR BIST error info (cs)13
BIST error details for DDR (1)
DDR BIST error count 9
DDR BIST error info (col)10
DDR BIST error info (row)11
DDR BIST error info (bank)12
DDR BIST error info (cs)13
[root@dhcp-100-97-47-177 cxl]# ./cxl ddr-err-bist-info-clr mem0
[root@dhcp-100-97-47-177 cxl]# ./cxl ddr-err-bist-info-get mem0
BIST error details for DDR (0)
DDR BIST error count 0
DDR BIST error info (col)0
DDR BIST error info (row)0
DDR BIST error info (bank)0
DDR BIST error info (cs)0
BIST error details for DDR (1)
DDR BIST error count 0
DDR BIST error info (col)0
DDR BIST error info (row)0
DDR BIST error info (bank)0
DDR BIST error info (cs)0

[root@dhcp-100-97-47-177 cxl]# ./cxl ddr-err-spd-info-get mem0
SPD error details
DIMM_Id(0) spd_err_type (SPD_CRC) count (0) offset (0)
DIMM_Id(0) spd_err_type (SPD_NULL_DATA) count (0) offset (0)
DIMM_Id(1) spd_err_type (SPD_CRC) count (0) offset (0)
DIMM_Id(1) spd_err_type (SPD_NULL_DATA) count (90) offset (100)
DIMM_Id(2) spd_err_type (SPD_CRC) count (0) offset (0)
DIMM_Id(2) spd_err_type (SPD_NULL_DATA) count (90) offset (100)
DIMM_Id(3) spd_err_type (SPD_CRC) count (0) offset (0)
DIMM_Id(3) spd_err_type (SPD_NULL_DATA) count (90) offset (100)

[root@dhcp-100-97-47-177 cxl]#
Devarsh has entered dimm_id = 0[root@dhcp-100-97-47-177 cxl]# ./cxl ddr-err-spd-info-clr mem0 -i 1
Devarsh has entered dimm_id = 1[root@dhcp-100-97-47-177 cxl]# ./cxl ddr-err-spd-info-get mem0
SPD error details
DIMM_Id(0) spd_err_type (SPD_CRC) count (0) offset (0)
DIMM_Id(0) spd_err_type (SPD_NULL_DATA) count (0) offset (0)
DIMM_Id(1) spd_err_type (SPD_CRC) count (0) offset (0)
DIMM_Id(1) spd_err_type (SPD_NULL_DATA) count (0) offset (0)
DIMM_Id(2) spd_err_type (SPD_CRC) count (0) offset (0)
DIMM_Id(2) spd_err_type (SPD_NULL_DATA) count (90) offset (100)
DIMM_Id(3) spd_err_type (SPD_CRC) count (0) offset (0)
DIMM_Id(3) spd_err_type (SPD_NULL_DATA) count (90) offset (100)
[root@dhcp-100-97-47-177 cxl]# ./cxl ddr-err-spd-info-clr mem0 -i 2
Devarsh has entered dimm_id = 2[root@dhcp-100-97-47-177 cxl]# ./cxl ddr-err-spd-info-get mem0
SPD error details
DIMM_Id(0) spd_err_type (SPD_CRC) count (0) offset (0)
DIMM_Id(0) spd_err_type (SPD_NULL_DATA) count (0) offset (0)
DIMM_Id(1) spd_err_type (SPD_CRC) count (0) offset (0)
DIMM_Id(1) spd_err_type (SPD_NULL_DATA) count (0) offset (0)
DIMM_Id(2) spd_err_type (SPD_CRC) count (0) offset (0)
DIMM_Id(2) spd_err_type (SPD_NULL_DATA) count (0) offset (0)
DIMM_Id(3) spd_err_type (SPD_CRC) count (0) offset (0)
DIMM_Id(3) spd_err_type (SPD_NULL_DATA) count (90) offset (100)
[root@dhcp-100-97-47-177 cxl]#

Reviewers:

Subscribers:

Tasks:

Tags:

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 19, 2025
Summary:
In this task, mailbox command to store and clear DDR SPD error is implemented.
here 2 types of SPD errors are handled . Type 0 is SPD CRC ERROR and TYPE 1 is SPD NULL DATA ERROR
TYPE 0(SPD CRC) ERROR is checked for all 4 DIMMs and if error is found, when comparing calculated CRC with available CRC, then DIMM_ID and the offset
is stored in NVDATA
TYPE 1(SPD NULL DATA) ERROR is checked for all 4 DIMMs and if error is found,when reading first 4 bytes of the reading address, then DIMM_ID and the offset
is stored in NVDATA
MailBox command ddr-err-spd-info-get(0xFB38) is implemented to retrive this error information from persistent memory (NVDATA) and send as a response to this command.
MailBox command ddr-err-spd-info-clr(0xFB39) is implemented to clear this error information from NVDATA (persistent memory)

Test Plan:
1. Modify the code to generate SPD NULL DATA error and if found then store the information in NVDATA.
2. Retrive the error information using ./cxl ddr-err-spd-info-get mem0/mem1
3. Reboot the host and again check if the information is persist
4. Clear this error information using ./cxl ddr-err-spd-info-clr mem0/mem1 -i dimm_id
5. Retrive the error information using ./cxl ddr-err-spd-info-get mem0/mem1
6. Reboot the host and again check if the information is persist

Reviewers:

Subscribers:

Tasks:

Tags:
@gadhiadevarsh gadhiadevarsh changed the title VISTARA : MailBox command implementation for DDR SPD error counter. VISTARA : MailBox command implementation for DDR SPD error info clear for dimm_id requested Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants