Patent ID: 8689041
Filing Date: 2014-04-01
Classification: G06F

Abstract:
1. A method for protecting data in damaged memory cells by dynamically switching memory mode, adaptable to an electronic device having a memory, wherein the memory comprises a memory controller and at least one memory module, each of the at least one memory module is consisted of a plurality of memory cells, and the memory cells are divided into a plurality of pages, the method comprising: executing a power-on self-test (POST), and activating a mirror memory mode to protect data of the at least one memory module; executing an operating system and detecting an uncorrectable error occurred in each of the pages of the at least one memory module by using the memory controller when the operating system reads the memory, when the uncorrectable error is detected in one of the pages, determining that the memory module having the page is a damaged memory module, and switching the mirror memory mode to a spare memory mode to protect the data of the at least one memory module; detecting a correctable error of each of the at least one memory module without the uncorrectable error by using the memory controller; accumulating a number of times occurring the correctable error of each of the at least one memory module, and comparing the number with a threshold; when the number of times occurring the correctable error of one of the at least one memory module is greater than or equal to the threshold, determining that the memory module is a damaged memory module; switching the spare memory mode to a page memory mode, replacing the damaged memory module with one of other undamaged memory modules, and protecting the correctable error in undamaged memory modules by using at least one undamaged page of the damaged memory module, wherein when activating the mirror memory mode, the spare memory mode or the page memory mode, further comprises: transmitting an IPMI command to a board management controller to notify the board management controller memory mode which memory mode is currently used.