mirror of
https://github.com/memtest86plus/memtest86plus.git
synced 2024-11-23 08:26:23 -06:00
Add config flag (enable_ecc_polling) to toggle ECC polling.
Currently disabled by default for v7 release
This commit is contained in:
parent
e5200c9b89
commit
2d92fddd02
@ -99,6 +99,8 @@ bool enable_sm = true;
|
||||
bool enable_bench = true;
|
||||
bool enable_mch_read = true;
|
||||
|
||||
bool enable_ecc_polling = false;
|
||||
|
||||
bool pause_at_start = true;
|
||||
|
||||
power_save_t power_save = POWER_SAVE_HIGH;
|
||||
|
@ -59,6 +59,7 @@ extern bool enable_sm;
|
||||
extern bool enable_tty;
|
||||
extern bool enable_bench;
|
||||
extern bool enable_mch_read;
|
||||
extern bool enable_ecc_polling;
|
||||
|
||||
extern bool pause_at_start;
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include "error.h"
|
||||
|
||||
#include "config.h"
|
||||
#include "cpuinfo.h"
|
||||
#include "memctrl.h"
|
||||
#include "msr.h"
|
||||
@ -43,7 +44,6 @@ void get_imc_config_amd_zen(void)
|
||||
{
|
||||
uint32_t smn_reg, offset;
|
||||
uint32_t reg_cha, reg_chb;
|
||||
uint32_t regl, regh;
|
||||
|
||||
imc.tCL_dec = 0;
|
||||
|
||||
@ -92,6 +92,9 @@ void get_imc_config_amd_zen(void)
|
||||
|
||||
// Detect ECC (x64 only)
|
||||
#if TESTWORD_WIDTH > 32
|
||||
if (enable_ecc_polling) {
|
||||
uint32_t regl, regh;
|
||||
|
||||
smn_reg = amd_smn_read(AMD_SMN_UMC_DRAM_ECC_CTRL + offset);
|
||||
if (smn_reg & (ECC_RD_EN | ECC_WR_EN)) {
|
||||
ecc_status.ecc_enabled = true;
|
||||
@ -129,6 +132,7 @@ void get_imc_config_amd_zen(void)
|
||||
|
||||
poll_ecc_amd_zen(false); // Clear ECC registers
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user