-
Notifications
You must be signed in to change notification settings - Fork 4
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
Handle APML_ALERT assertion for SBRMI::[AlertSts] #103
Open
abinayaddhandapani
wants to merge
1
commit into
main
Choose a base branch
from
turin_review
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -502,29 +502,49 @@ void clearSbrmiAlertMask() | |
|
||
oob_status_t ret; | ||
|
||
sd_journal_print(LOG_ERR, | ||
"Clear Alert Mask bit of SBRMI Control register \n"); | ||
uint8_t buffer; | ||
for (uint8_t socNum = 0; socNum < num_of_proc; socNum++) | ||
{ | ||
sd_journal_print( | ||
LOG_INFO, | ||
"Clear Alert Mask bit of SBRMI Control register for socket %d\n", | ||
socNum); | ||
|
||
ret = read_register(p0_info, SBRMI_CONTROL_REGISTER, &buffer); | ||
uint8_t buffer; | ||
|
||
if (ret == OOB_SUCCESS) | ||
{ | ||
buffer = buffer & 0xFE; | ||
write_register(p0_info, SBRMI_CONTROL_REGISTER, | ||
static_cast<uint32_t>(buffer)); | ||
} | ||
ret = read_register(socNum, SBRMI_CONTROL_REGISTER, &buffer); | ||
|
||
if (num_of_proc == TWO_SOCKET) | ||
{ | ||
buffer = 0; | ||
ret = read_register(p1_info, SBRMI_CONTROL_REGISTER, &buffer); | ||
if (ret == OOB_SUCCESS) | ||
{ | ||
buffer = buffer & 0xFE; | ||
write_register(p1_info, SBRMI_CONTROL_REGISTER, | ||
write_register(socNum, SBRMI_CONTROL_REGISTER, | ||
static_cast<uint32_t>(buffer)); | ||
} | ||
|
||
for (uint8_t i = 0; i < sizeof(alert_status); i++) | ||
{ | ||
ret = read_register(socNum, alert_status[i], &buffer); | ||
|
||
if (ret == OOB_SUCCESS) | ||
{ | ||
if ((buffer & 0x0F) != 0) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. magic number: 0x0F |
||
{ | ||
sd_journal_print( | ||
LOG_INFO, | ||
"Socket%d: MCE Stat of SBRMIx[0x%x] is set to 0x%x\n", | ||
socNum, alert_status[i], buffer); | ||
|
||
buffer = buffer & 0xFF; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. magic number 0xFF |
||
write_register(socNum, alert_status[i], | ||
static_cast<uint32_t>(buffer)); | ||
} | ||
} | ||
else | ||
{ | ||
sd_journal_print(LOG_ERR, | ||
"Socket%d: Failed to read SBRMIx[0x%x]", | ||
socNum, alert_status[i]); | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
@@ -625,8 +645,6 @@ void performPlatformInitialization() | |
oob_status_t ret = OOB_MAILBOX_CMD_UNKNOWN; | ||
struct processor_info platInfo[INDEX_1]; | ||
|
||
std::cout << "perform performPlatformInitialization" << std::endl; | ||
|
||
if (platformInitialized == false) | ||
{ | ||
while (ret != OOB_SUCCESS) | ||
|
@@ -641,7 +659,6 @@ void performPlatformInitialization() | |
} | ||
sleep(INDEX_1); | ||
} | ||
std::cout << "platformInitialized " << std::endl; | ||
|
||
if (ret == OOB_SUCCESS) | ||
{ | ||
|
@@ -655,7 +672,6 @@ void performPlatformInitialization() | |
} | ||
else if (platInfo->family == TURIN_FAMILY_ID) | ||
{ | ||
std::cout << "Turin platform " << std::endl; | ||
currentHostStateMonitor(); | ||
|
||
clearSbrmiAlertMask(); | ||
|
@@ -668,6 +684,12 @@ void performPlatformInitialization() | |
|
||
runtimeErrPollingSupported = true; | ||
} | ||
else | ||
{ | ||
throw std::runtime_error( | ||
"This program is not supported for the platform 0x%x\n" + | ||
platInfo->family); | ||
} | ||
platformInitialized = true; | ||
apmlInitialized = true; | ||
} | ||
|
@@ -703,7 +725,7 @@ void apmlActiveMonitor() | |
{ | ||
ret = get_bmc_ras_oob_config(INDEX_0, &d_out); | ||
|
||
if(ret == OOB_MAILBOX_CMD_UNKNOWN) | ||
if (ret == OOB_MAILBOX_CMD_UNKNOWN) | ||
{ | ||
ret = esmi_get_processor_info(INDEX_0, plat_info); | ||
} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No cations required in case of read_register failure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case of write failure , it will logged in the write_register() API.
So we dont require it to be logged here. Also we continue the ADDC functionality even if the write_register() call fails.