A computer system includes a processor coupled to a DRAM through a memory
controller. The processor switches the DRAM to a low power refresh mode
in which DRAM cells are refreshed at a sufficiently low rate that data
retention errors may occur. Prior to switching the DRAM to the low power
refresh mode, the processor identifies a region of an array of DRAM cells
that contains essential data that needs to be protected from such data
retention errors. The processor then reads data from the identified
region, and either the DRAM or the memory controller generates error
checking and correcting syndromes from the read data. The syndromes are
stored in the DRAM, and the low power refresh mode is then entered. Upon
exiting the low power refresh mode, the processor again reads the data
from the identified region, and the read data is checked and corrected
using the syndromes.