-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rasdaemon: Fix SMCA bank type decoding
On AMD systems with Scalable MCA (SMCA), the (HWID, MCATYPE) tuple from the MCA_IPID MSR, bits 43:32 and 63:48 respectively, are used for SMCA bank type decoding. On occurrence of an SMCA error, the cached tuples are compared against the tuple read from the MCA_IPID MSR to determine the SMCA bank type. Currently however, all high 32 bits of the MCA_IPID register are cached in the rasdaemon for all SMCA bank types. Bits 47:44 which do not play a part in bank type decoding are zeroed out. Likewise, when an SMCA error occurs, all high 32 bits of the MCA_IPID register are read and compared against the cached values in smca_hwid_mcatypes array. This can lead to erroneous bank type decoding since the bits 47:44 are not guaranteed to be zero. They are either reserved or, on some modern AMD systems viz. Genoa, denote the InstanceIdHi value. The bits therefore, should not be associated with SMCA bank type decoding. Import the HWID_MCATYPE macro from the kernel to ensure that only the relevant fields i.e. (HWID, MCATYPE) tuples are used for SMCA bank type decoding on occurrence of an SMCA error. Signed-off-by: Avadhut Naik <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
- Loading branch information
Showing
1 changed file
with
54 additions
and
44 deletions.
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