TW201216062A - Data protection method for damaged memory cells - Google Patents

Data protection method for damaged memory cells Download PDF

Info

Publication number
TW201216062A
TW201216062A TW99134596A TW99134596A TW201216062A TW 201216062 A TW201216062 A TW 201216062A TW 99134596 A TW99134596 A TW 99134596A TW 99134596 A TW99134596 A TW 99134596A TW 201216062 A TW201216062 A TW 201216062A
Authority
TW
Taiwan
Prior art keywords
memory
page
backup
damaged
data
Prior art date
Application number
TW99134596A
Other languages
Chinese (zh)
Inventor
Ying-Chih Lu
Yu-Hui Wang
Original Assignee
Inventec Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inventec Corp filed Critical Inventec Corp
Priority to TW99134596A priority Critical patent/TW201216062A/en
Publication of TW201216062A publication Critical patent/TW201216062A/en

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

A data protection method for damaged memory cells is provided. In the method, a power-on self test (POST) is executed and an initial backup memory in the memory is reserved for the interrupt handler to use as backup pages. Then, an operating system is executed, in which a memory controller detects and corrects a correctable error occurred in each of the pages, accumulates the number of the detected correctable errors, and compares the accumulated number with a threshold. When the accumulated number is larger than the threshold, the corresponding page is determined as a damaged page and a backup page is statically obtained from the initial backup memory or dynamically obtained from the operating system, so as to backup data in the damaged page to the backup page and record the mapping addresses of the damaged page and the backup page in a page mapping table. Therefore, when the operating system accesses the damaged page, the memory controller changes to access the backup page according to the page mapping table.

Description

201216062 w 34904twf.doc/n 六、發明說明: 【發明所屬之技術領域】 本發明是有關於一種資料保護方法,且 一種受損記憶胞的資料保護方法。 ,^疋有關於 【先前技術】 隨著電子科技的發達,各種資訊的交流無不 種儲存媒體,而其巾的記憶體因其運作速率快 j 腦中不可或缺的储存舰。然而,由於t訊傳輸量日〜 對於傳送速率的要求也日益提升,導致^㈣者= 記憶體容量及速度的要求逐漸提高。 、 —然而’在提高記憶體容量的同時,記憶體中記憶胞的 密度也相朗高’而隨著雜電路在半導體記憶元件上密 度的增加,每個記憶胞的尺寸就必須減少。因此,一個記 憶胞在需要得到較小尺規、又要得到其原本電容的情況 下不僅製程變的複雜,在糸統高速存取的要求下,記憶 胞出現錯誤的機率也會增加。 記憶體發生錯誤的情況可分為可修正錯誤 (Correctable Error,CE)及不可修正錯誤(Uncorrectable201216062 w 34904twf.doc/n VI. Description of the Invention: [Technical Field] The present invention relates to a data protection method and a data protection method for damaged memory cells. [^ Previous] With the development of electronic technology, all kinds of information exchanges are all kinds of storage media, and the memory of the towel is fast because of its fast operation. However, due to the t-transmission volume, the requirements for the transmission rate are also increasing, resulting in a gradual increase in the memory capacity and speed requirements of ^(4). However, while increasing the memory capacity, the density of the memory cells in the memory is also high. As the density of the hybrid circuits on the semiconductor memory elements increases, the size of each memory cell must be reduced. Therefore, in the case where a memory cell needs to obtain a smaller ruler and obtain its original capacitance, not only the process becomes complicated, but also the probability of a memory cell error increases due to the high-speed access of the system. The error of the memory can be divided into Correctable Error (CE) and Uncorrectable (Uncorrectable)

Error ’ UE)。可修正錯誤(Correctable Error,CE) —般 為單位元錯誤(Single Bit Error,SBE)或是發生錯誤之位 元數目與位子在電子裝置之可修正範圍内的多位元錯誤 (Multi-BitError,MBE)。其中,可修正錯誤仍可透過錯 誤偵測與修正(Error Detection and Correction,EDC)方 201216062 100427.TW 34904twf.doc/n 、、彈1·生地仏正。對於此種錯誤,習知技術是藉由在記憶體 配置備S (Spare) !己憶體模組的方式,以在記憶體發生 I修正^誤時作為資料備份之用。然而,此備用記憶體會 占用大量的記憶體空間而造成記憶體的浪 費,而將資料備 二f用記憶體的動作也會花費相當時間’結果使 整體的效能下降。 雜另1方面’對於不可修正錯誤,習知技術是使用記憶 體=一半作為重複⑽贿)記龍,以在織體發生不 正錯誤時作騎料修正之用。然而,此備航憶體會 用半的錢體m結果則造成記紐的浪費, 並使付系統整體的效能下降。 【發明内容】 ㈤種受損記憶胞的資料保護方法,藉由動 i Γ寻備份頁面’以備份受損記憶胞中的資 料可保5蔓叉損§己憶胞的資料。 本發明提出·-種受損記憶胞的㈣保護方法 包括記憶體的電子裝詈,於 怜單元,,愔罝H 體包括記憶體控制器及記 隱早疋Alt早7L由多個記憶胞組成 分為多個頁“ 謂胞係劃 此方㈣隸/個頁各自包括上述記憶胞的一部分。 =法係先執行開機程序,並在該記憶體中保留— =讀'體以提供給中斷處理模組使用, 模“ ==咖當作剛開始的備份頁面,此初= 匕括至>、—個備份頁面且為頁面之倍數。接著執 5 34904twf.doc/n 201216062 订作業系統,並在作業系統讀取記憶體時,透過記 ^偵測修正各個頁面中記憶胞所出,現的可修正錯^。= 後,累計上述頁面各自出現可修正錯誤的次數,並與 ^值比較,而當有頁面的可修正錯誤的次數大於門 面,損頁面’而由備份記憶體取得備:頁 得的備份卻^ (r刀始備份記顏或動態從作業系統取 以將初始備份記憶體之頁面快用完時), 又貝 的資料備份至備份頁面,以及將此受損 =備彳〃頁㈣對映位址記錄於記憶體控制器中的頁面 即由記憶體控制器根據頁面映射表中的對映位址,改^存 取備份頁面的資料。 又马存 ,本,明之—實施例中,上述執行開機程序的步驟更 匕括在雜體的系統資料區中保留-記㈣區段,以作^ 電:裝置之中斷處模組與作㈣統之應闕組交換資料 用0 之—實施例中,上述執行開機程序的步驟更 =斷處理模組,並致能當可修正錯誤出現時的系 包括Γ執行作業系統的步驟更 取得備份記之I:用=,向作業系統動態 / 者上述執行作業系統的步驟更包括 從:I0S中取得所保留之記憶體的記憶體區段金 初始備伤錢體的基底位址與大小,故作業系統將不會也 201216062 100427.TW 34904twf.doc/n 不能使用此些記憶體。 在本發明之-實施例中,上述透過記憶體控制器谓測 修正各個頁面中記憶胞所出現的可修正錯誤的步驟包括在 記憶體控制器積測修正到可修正錯誤時,將出現可修正錯 誤的頁面位址記錄於暫存器,並發出系統中斷,以執曰 斷處理模組。 在本發明之-實施例中,上述累計各個頁面出現可修 φ f錯誤的次數的步驟包括由中斷處理模組讀取記憶體控制 器之暫存器中所έ己錄之出現可修正錯誤的頁面,並累計此 頁面出現可修正錯誤的次數。 ^ 在本發明之一實施例中,上述動態從作業系統取得備 份,憶體的步驟包括由中斷處理模組寫入一頁面請求於系 先資料區巾保㈣記憶體區段,接著纟應帛模組檢視系統 資料區之記憶體區段的資料,以檢視中斷處理模組所發出 的頁面請求,然後向作業系統取得備份記憶體,以提供給 φ +斷處嗎組制,情處理模組賤備份記憶體當作備 份頁面使用。 在本發明之一實施例中,上述由應用模組檢視系統資 4區之記憶體區段的資料,以檢視中斷處理模組所發出的 頁面凊求的步驟包括由應用模組使用一詢問(p〇mng)方 法檢視系統資料區之記憶體區段的資料,以檢視中斷處理 模組所發出的頁面請求。 在本發明之一實施例中,上述由應用模組向作業系統 知備份記憶體,以提供給中斷處理模組使用的步驟包括 201216062 luwz/.i W 34904twf.doc/n 由應用模組將備份記憶體的基底位址及尺寸記錄於系統資 料區中保留的記憶體區段,以提供給中斷處理模組使用。 在本發明之一實施例中,上述由應用模組取得備份記 憶體,以提供給中斷處理模組使用的步驟包括由中斷處理 模組查詢一頁面使用表,以從備份記憶體中取得一空置頁 面來作為備份頁面,並將此備份頁面的使用狀態更新為使 用中,以及將受損頁面的使用狀況更新為受損。 在本發明之一實施例中,在上述由中斷處理模組查詢 頁面使用表以從備份記憶體中取得空置頁面作為備份頁面 _ 的步驟中’若中斷處理模組查詢頁面使用表時發現備份記 憶體已無空置頁面,則禁能當可修正錯誤出現時的系統中 斷功能。 在本發明之一實施例中,在上述由中斷處理模組查詢 頁面使用表以從備份記憶體中取得空置頁面作為備份頁面 的步驟中,若中斷處理模組查詢頁面使用表時發現備份記 憶體空置頁面已不多,可再動態從作業系統取得一記憶空 間以作為備份記憶體。 鲁 在本發明之一實施例中’在上述由中斷處理模組查詢 頁面使用表以從備份記憶體中取得空置頁面作為備份頁面 的步驟中,若中斷處理模組查詢頁面使用表時發現備份記 憶體已無空置頁面,則傳送一控制指令(IPMI OEM command)至基板管理控制器’以由基板管理控制器發出 警示訊息。 在本發明之一實施例中,上述之電子裝置包括透過傳 8 201216062 100427.TW 34904twf.doc/n 統基本輸入輸出系統(Legacy Basic Input/Output System, Legacy BIOS )或延伸韌體介面基本輸入輸出系統 (Extensible Firmware Interface BIOS,EFI BIOS)進行開 機。 在本發明之一實施例中,上述之可修正錯誤包括單位 元錯誤,或是發:生錯誤之位元數目與位子在電子裝置之可 修正範圍内的多位元錯誤。 φ 基於上述,本發明之受損記憶胞的資料保護方法係使 用曰曰片組之§己憶體位址重映射(remapping )方法,將受損 頁面的位址轉到正常頁面的位址,因此可在不修改作業系 統以及不事先保留備用(spare)記憶體模組或重複記憶體 的狀況下,達成受損記憶胞的資料保護。 為讓本發明之上述特徵和優點能更明顯易懂,下文特 舉實施例,並配合所附圖式作詳細說明如下。 【實施方式】 曰由於作業系統可看到整個記憶體的使用狀況,故為了 提升系統效能’較妓將記《劃分成頁面的方式來管 理,並在各個頁面中記憶胞發生可修正錯誤(Correctable Error’ CE)的次數超過一定量時,只將此頁面從記憶體中 移除。藉此,除了可以預防不可修正錯誤(Unc〇rrectable Error、UE)外,還可保留更多的記憶體給作業系統運用, 進而增加系統整體的效能。本發明即是根據上述概念所發 展出來的種文損§&憶胞的資料保護方法,以下即舉實施 201216062 1UU42/.1 w 34904twf.doc/n 例說明其詳細實施方式。 圖1是依據本發明一實施例所繪示之電子裝置的系統 架構示意圖。請參照圖卜本實施例之1〇〇包括處理器110、 記憶體120及中斷處理模組130,而記憶體120中包括記 憶體控制器140以及由多個記憶胞組成的記憶單元15〇。 其中,處理器110例如是中央處理單元(Central Processing Unit,CPU),而記憶單元150例如是動態隨機存取記憶 體(Dynamic Random Access Memory,DRAM)或其他種 類的記憶體,在此並不設限。此外,中斷處理模組13〇例如 是系統管理中斷處理程式(System Management Interrupt handler,SMI handler) ’而用以服務處理器110所接收到 的系統管理中斷(System Management Interrupt ’ SMI)。 詳言之,當電子裝置100中的元件觸發系統管理中斷 時’即會發送系統管理中斷訊息至處理器11〇,而處理器 U〇在接收到此訊號時,即進入系統管理模式(SystemError ' UE). Correctable Error (CE) is generally a Single Bit Error (SBE) or a multi-bit error in the number of bits in which the error occurred and the position within the correctable range of the electronic device (Multi-BitError, MBE). Among them, the error correction and error correction (EDC) can still be corrected by the error detection and correction (EDC) 201216062 100427.TW 34904twf.doc/n. For such errors, the conventional technique is to use a method of storing a S (Spare) memory module in the memory to use as a data backup when the memory is corrected. However, this spare memory consumes a large amount of memory space and causes a waste of memory, and it takes a considerable amount of time to use the memory for the data, resulting in a decrease in overall performance. Miscellaneous 1 aspect For the uncorrectable error, the conventional technique uses memory = half as a repetition (10) bribe to record the dragon, in order to make corrections to the riding when the texture is not correct. However, the result of using this half of the money will result in a waste of the journal and the overall effectiveness of the payment system. SUMMARY OF THE INVENTION (5) A data protection method for a damaged memory cell, by backing up the backup page to backup the data in the damaged memory cell can protect the data of the vine. The invention proposes that the (four) protection method of the damaged memory cell includes the electronic decoration of the memory, the unit of the pity, the body of the 愔罝H body including the memory controller, and the recording of the early morning 疋 Alt 7L consists of a plurality of memory cells. Divided into multiple pages "The cell system is divided into four parts. The four pages each include a part of the above memory cells. = The law system first executes the boot process and retains in the memory - = read 'body to provide for interrupt processing The module is used, the module " == coffee as the backup page of the beginning, this is = to the >, a backup page and is a multiple of the page. Then, 5 34904twf.doc/n 201216062 is ordered to operate the system, and when the operating system reads the memory, the memory of each page is corrected by recording the detection, and the current error can be corrected. After the accumulating, the number of times the above-mentioned pages can be corrected is compared with the value of ^, and when the number of correctable errors of the page is greater than the facade, the page is damaged and the backup memory is obtained: the backup of the page is ^ (r-snap backup or dynamic from the operating system to use up the initial backup memory page), back to the backup page, and the damage = backup page (four) mapping The page recorded in the memory controller is changed by the memory controller according to the mapping address in the page mapping table to access the data of the backup page. In addition, in the embodiment, the above-mentioned steps of executing the booting procedure are further included in the system data area of the miscellaneous, and the (four) section is reserved for the power: the interrupted module of the device and the work (4) In the embodiment, the above-mentioned step of executing the booting procedure further interrupts the processing module, and enables the step of executing the operating system when the correctable error occurs. I: Using the =, moving to the operating system / the above-mentioned execution of the operating system further includes: obtaining the base address and size of the initial memory of the memory segment of the memory of the reserved memory from the IOS, so the operation The system will not be able to use this memory as well. 201216062 100427.TW 34904twf.doc/n. In the embodiment of the present invention, the step of correcting the correctable error occurring in the memory cell in each page by the memory controller pre-measure includes including the correctable correction when the memory controller integrates the correction to the correctable error The wrong page address is recorded in the scratchpad and a system interrupt is issued to execute the processing module. In the embodiment of the present invention, the step of accumulating the number of times that each page can be repaired φ f error includes reading, by the interrupt processing module, the occurrence of the correctable error in the register of the memory controller. Page, and accumulate the number of times this page appears to correct the error. In an embodiment of the present invention, the dynamics obtains a backup from the operating system, and the step of restoring the body includes writing a page request by the interrupt processing module to the memory area of the data area (4), and then responding to the memory. The module examines the data of the memory segment of the data area of the system to view the page request sent by the interrupt processing module, and then obtains the backup memory from the operating system to provide the φ + break group, the situation processing module贱Backup memory is used as a backup page. In an embodiment of the present invention, the step of viewing, by the application module, the data of the memory segment of the system 4 to view the page request sent by the interrupt processing module includes using an inquiry by the application module ( The p〇mng) method examines the data of the memory segment of the system data area to view the page request issued by the interrupt processing module. In an embodiment of the present invention, the step of using the application module to the operating system to back up the memory for use by the interrupt processing module includes 201216062 luwz/.i W 34904twf.doc/n being backed up by the application module The base address and size of the memory are recorded in the memory segment reserved in the system data area for use by the interrupt processing module. In an embodiment of the present invention, the step of obtaining the backup memory by the application module for use by the interrupt processing module includes querying, by the interrupt processing module, a page usage table to obtain a vacancy from the backup memory. The page is used as a backup page, and the usage status of this backup page is updated to be in use, and the usage status of the damaged page is updated to be damaged. In an embodiment of the present invention, in the step of querying the page usage table by the interrupt processing module to obtain the vacant page from the backup memory as the backup page _, the backup memory is found when the interrupt processing module queries the page usage table. If there is no vacant page, the system interrupt function when the error occurs can be disabled. In an embodiment of the present invention, in the step of querying the page usage table by the interrupt processing module to obtain the vacant page from the backup memory as the backup page, if the interrupt processing module queries the page usage table, the backup memory is found. There are not many vacant pages, and a memory space can be dynamically obtained from the operating system as backup memory. In an embodiment of the present invention, in the step of querying the page usage table by the interrupt processing module to obtain a vacant page from the backup memory as a backup page, if the interrupt processing module queries the page usage table, the backup memory is found. If there is no vacant page, an IPMI OEM command is sent to the baseboard management controller to send a warning message to the baseboard management controller. In an embodiment of the present invention, the electronic device includes a basic input/output (Legacy Basic Input/Output System, Legacy BIOS) or a extended firmware interface basic input/output system. The system (Extensible Firmware Interface BIOS, EFI BIOS) is powered on. In an embodiment of the invention, the correctable error includes a unit error, or a number of bits of the error and a multi-bit error of the position within the correctable range of the electronic device. φ Based on the above, the data protection method for the damaged memory cell of the present invention uses the § replied address remapping method of the smear group to transfer the address of the damaged page to the address of the normal page, Data protection of damaged memory cells can be achieved without modifying the operating system and without preserving spare memory modules or repetitive memory. The above described features and advantages of the present invention will become more apparent from the description of the appended claims. [Embodiment] 曰Because the operating system can see the usage status of the entire memory, in order to improve the system performance, it will be managed in a way that is divided into pages, and the memory can be corrected in each page (Correctable When the number of Error's CE exceeds a certain amount, only this page is removed from the memory. In this way, in addition to preventing uncorrectable errors (Unc〇rrectable Error, UE), more memory can be reserved for the operating system, thereby increasing the overall performance of the system. The present invention is a data protection method for a genus s&'s memory that has been developed according to the above concept. The following is a detailed description of a detailed implementation of the method of 201216062 1UU42/.1 w 34904twf.doc/n. FIG. 1 is a schematic diagram of a system architecture of an electronic device according to an embodiment of the invention. Referring to the embodiment of the present invention, the processor 110, the memory 120, and the interrupt processing module 130 are included, and the memory 120 includes a memory controller 140 and a memory unit 15A composed of a plurality of memory cells. The processor 110 is, for example, a central processing unit (CPU), and the memory unit 150 is, for example, a dynamic random access memory (DRAM) or other kinds of memory, and is not provided here. limit. Further, the interrupt processing module 13 is, for example, a system management interrupt handler (SMI handler), and is used to receive a system management interrupt (SMI) received by the processor 110. In detail, when the component in the electronic device 100 triggers the system management interrupt, the system management interrupt message is sent to the processor 11〇, and the processor U〇 enters the system management mode when receiving the signal.

Management Mode,SMM ),而由基本輸入輸出系統(Basic Input Output System ’ BIOS)在此模式下執行系統管理中 斷處理程式,以服務系統管理中斷。 圖2是依據本發明一實施例所繪示之受損記憶胞的資 料保護方法的流程圖。請參照圖2,本實施例的方法適用 於圖1的電子裝置1〇〇,以下則搭配圖1之電子裝置1〇〇 中的各個元件說明此方法的詳細步驟。 首先,當電子裝置100的電源開啟後,即由處理器1 執行開機程序,並在記憶體120中保留一初始備份記憶體 201216062 100427.TW 34904twf.doc/n (此大小要為頁面大小之倍數,例如若頁面大小為8KB, 則此初始備份記憶體可為1MB)以供備份頁面使用,作業 系統不能使用此初始備份記憶體(步驟S202),此備份記 憶體包括至少一個備份頁面。其中,處理器110例如是執 行傳統基本輸入輸出系統(Legacy Basic Input/OutputManagement Mode (SMM), and the Basic Input Output System ('BIOS) executes the system management interrupt handler in this mode to manage system interrupts. 2 is a flow chart of a method for protecting a damaged memory cell according to an embodiment of the invention. Referring to Fig. 2, the method of the present embodiment is applied to the electronic device 1 of Fig. 1. The detailed steps of the method will be described below with reference to the elements in the electronic device 1A of Fig. 1. First, when the power of the electronic device 100 is turned on, the processor 1 executes the booting process, and an initial backup memory 201216062 100427.TW 34904twf.doc/n is reserved in the memory 120 (this size is a multiple of the page size) For example, if the page size is 8 KB, the initial backup memory can be 1 MB for use by the backup page, and the initial backup memory cannot be used by the operating system (step S202). The backup memory includes at least one backup page. The processor 110 is, for example, a conventional basic input/output system (Legacy Basic Input/Output).

System’Legacy BIOS)或延伸韌體介面基本輸入輸出系統 (Extensible Firmware Interface BIOS,EFI BIOS)以進行System'Legacy BIOS) or Extendable Firmware Interface BIOS (EFI BIOS) for

開機’保留初始備份記憶體的作法於Legacy BIOS時是使 用ACPI INT 15h之E820h功能呼叫,而於EFI BIOS時是 使用 EFI 介面 GetMemoryMap()。 在開機程序完成後,處理器11〇接著執行電子裝置1〇〇 的作業系統,並在作業系統讀取記憶體12〇時,透過記憶 體控制器14G彳貞測修正各個頁面巾記憶胞所出_可修正 錯,(步驟S2。”。上述的可修正錯誤包括單位元錯誤, 或疋發生錯誤之位元數目與位子在電子裝置之可修正範圍 内的多位元錯誤,在此不設限。 理器UG例如會先致能錯誤中斷暫存器 ‘ 正錯誤出現時的系統中斷功能。而當記憶 暫^器142 Φ貞職正到可修正錯誤時,即會在錯誤頁面 鱗出現此可修正錯誤的1面位址,並發出 =讀==模組"。。而中斷處理模= 錯誤的百a 1暫存11 142中所記錄之出現可於正 得知哪個頁面發生可修正錯誤。 接者,由中斷處理模組130累計各個頁面出現可修正 201216062 100427.TW 34904twf.doc/n 錯誤的次數’並與一門檻值比較,而判斷所累計的次數是 否超過此門檻值(步驟S206)。此處的門檻值例如是一個 預設值,或是由使用者自行設定的數值。詳言之,當電子 裝置100開機時,例如會在BIOS的開機晝面上顯示一個 設定介面,以供使用者設定數值。 當中斷處理模組13〇判斷有頁面的可修正錯誤的次數 大於門檻值時,即將此頁面判定為受損頁面,而由備份記 憶體取得一個備份頁面,以將受損頁面中的資料備份至備Booting 'Reserving the initial backup memory is the E820h function call using ACPI INT 15h for Legacy BIOS and GetMemoryMap() for EFI BIOS. After the booting process is completed, the processor 11 then executes the operating system of the electronic device 1,, and when the operating system reads the memory 12〇, the memory controller 14G detects and corrects the memory of each page. _ can correct the error, (step S2.) The above-mentioned correctable error includes a unit error, or a number of bits in which the error occurred and a multi-bit error in the correct range of the electronic device, and there is no limit here. For example, the processor UG will first enable the system interrupt function when the error interrupt register is positive. When the memory device 142 贞 贞 正 到 可 可 可 可 可 可 可 可 可 可 可 142 142 142 142 Fix the wrong 1st address and issue =read ==module". and the interrupt processing mode = the error recorded in the hundred a 1 temporary storage 11 142 can be known which page has a correctable error Then, the interrupt processing module 130 accumulates the number of times that each page can correct the 201216062 100427.TW 34904twf.doc/n error and compares it with a threshold value, and determines whether the accumulated number of times exceeds the threshold value (step S206). ). The threshold value here is, for example, a preset value or a value set by the user. In detail, when the electronic device 100 is powered on, for example, a setting interface is displayed on the boot surface of the BIOS for use. When the interrupt processing module 13 determines that the number of correctable errors of the page is greater than the threshold value, the page is determined to be a damaged page, and a backup page is obtained by the backup memory to be in the damaged page. Backup of data to backup

伤,面,需知備份記憶體是為初始備份記憶體或動態由作 業系統中獲得之(步驟S208)。 在資料備份完畢後,中斷處理模組130即將上述受損 頁面及備份頁面的對映位址記錄於記憶體控制器140中的 頁面=表147 (步驟S21G)。其中,中斷處理模組13〇 例如疋採用δ己憶體位址重映射(remapping)方法,將受損 ^面=址映射至備份頁面的位址,並分別在頁面映射表 址。的工白攔位中填人所述受損頁面以及備份頁面的位Injury, face, it is known that the backup memory is obtained for the initial backup memory or dynamically by the operating system (step S208). After the data backup is completed, the interrupt processing module 130 records the mapped address of the damaged page and the backup page in the page=table 147 in the memory controller 140 (step S21G). The interrupt processing module 13 〇 〇 〇 疋 疋 疋 δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ δ Fill in the damaged page and the position of the backup page in the white block

制器,二==取受損頁面時’記憶體控 份頁面;映位址,改為存取備 料的功效。 _保護受敎憶胞的資 業系記憶體位址重映射(rema_g)方法,作 制器14。的重;位址’然而經由記憶體控 映射’最終存取到的則是備份頁面的對映位Controller, two == when the damaged page is taken, the memory control page; the address is changed, and the effect of accessing the material is changed. _ Protection of the memory cell's memory address remapping (rema_g) method, the processor 14. The weight of the backup page is the final access to the address 'but via the memory control map'

12 201216062 100427-TW 34904t^.doc/n 址 =在本實施例中者作業系统的程式無需更改。 理器是,在另 例中’在電手裝置刚之處 理盗110在執行開機程序的過程中, 的系統資料區中保留一個記憶體區段,:乍為:二0 =組,與作業系統之應關組交換資料之^以= 再舉一實施例詳細說明。12 201216062 100427-TW 34904t^.doc/n address = The program of the operating system in this embodiment does not need to be changed. The processor is, in another example, 'the memory segment is reserved in the system data area during the process of executing the booting process in the handcuff device 110: 乍 is: 2 0 = group, and the operating system The information exchanged by the group should be described in detail with reference to an embodiment.

圖3是依據本發明一實施例所繪示之 料保護方法的流程圖。請參照圖3, 、二上由 於圖1的電子裝置100 ’以下則搭配圖i之 中的各個元件說明此方法的詳細步驟。 、 首先’當電子裝置⑽的電源開啟後,即由處理写11〇 =丁開,序(步驟S302”在執行開機程序時,處理器 ⑽例如疋在記憶體12〇的系統資料區中保留—個記憶體 區段,以作為電子裝置100的中斷處理模组m與作^系 統的應用模組交換資料之用(步驟S304)。其中,處^器 110例如是保留位址介於9FC00h至9FFFFh ^間濟J ^ 1千位元組(KB)的記憶體區段。 董為 值得注意的是’上述的處理器110例如是執行Legacy BIOS以進行開機,而處理器u〇保留的記憶體區段例如 疋位於延伸基本輸入輸出糸統的資料區(Extende(j bios Data Area,EBDA)内。在另一實施例中,處理器11〇例 如是執行延伸韌體介面BIOS (EFI BIOS)以進行開機, 並使用此延伸韌體介面保留記憶體區段。保留的記憶體區 段的作法於Legacy BIOS時是使用ACPI INT 15h之 201216062 i \jwj. /. i vy 34904twf.doc/n E820h功能呼叫,而於EFI BIOS時是使用EFI BIOS介面3 is a flow chart of a method of protecting a material according to an embodiment of the invention. Referring to Figure 3, and the electronic device 100' of Figure 1 below, the detailed steps of the method are illustrated in conjunction with the elements of Figure i. First, when the power of the electronic device (10) is turned on, that is, by the process of writing 11 〇 = 丁, the sequence (step S302), when executing the booting process, the processor (10), for example, is retained in the system data area of the memory 12 — - The memory segment is used as the interrupt processing module m of the electronic device 100 to exchange data with the application module of the system (step S304), wherein the device 110 is, for example, a reserved address between 9FC00h and 9FFFFh. ^ Memory section of the J ^ 1 kilobyte (KB). Dong Wei is worth noting that the above processor 110 is, for example, a memory area that executes the Legacy BIOS to boot, and the processor u〇 remains. The segment is, for example, located within an extension of the basic input/output system (Extende (j bios Data Area, EBDA). In another embodiment, the processor 11 is, for example, executing an extended firmware interface BIOS (EFI BIOS). Power on, and use this extended firmware interface to retain the memory segment. The reserved memory segment is used in the Legacy BIOS when using ACPI INT 15h 201216062 i \jwj. /. i vy 34904twf.doc/n E820h feature call And when using EFI BIOS is to use EF I BIOS interface

GetMem^yMapO。以上兩者僅為舉例說明,在此並不限定。 接著’處理器110係在記憶體12〇中保留初始備份記 憶體提供給情處理模組13〇當作備份頁面使用(步驟 S306)。需進一步說明的是,中斷處理模組13〇使用此初 始備份記紐當作備份頁岐用,當初始備份記憶體之頁 面快用元時,中斷處理模組13〇透過應用模組17〇可動態 由作業系統18G取得適量之備份記憶體(例如誦),當 由作業系統所取得之備份記憶體之頁面也㈣完時,可再 從作業系統所取備份記憶體,依此類推。其中,備份記憶 體包括至少-個備份頁面,而這些備份記㈣區塊的位址 可以是連續的或是不連續的記憶體區塊。意即,備份記憶 ,的谷里為單頁面容量的倍數,例如,若頁面容量為八 千位元組(8KB),則備份記憶體的容量即為八千位元植 的倍數(例如1MB)。 然後’處理n 1 ίο會啟動中斷處理模組(步驟S3〇8)。 =中斷處理模組例如是系統管理中斷處理程式,而可用以 中斷事件。此外,處理器11〇亦致能當可修正錯 的系統中斷功能(步驟S31G)。意即,每當記憶 14〇偵測修正到可修正錯誤出現時,即會觸 ==發送系統管理中斷訊息至處理器11G,而由處理 處理模組13G。其中,處理器11G例如藉由將 控制器ho的錯誤中斷暫存器141致能,而啟動可 0正錯S吳出現時的系統中斷功能。 201216062 100427.TW 34904twf.doc/n 需說明的是,在處理器11G執行完開機程序的過程 中,還可根據使用者的操作,執行Bl〇s的設定程式( u碗y)或其他軟體工具,以供使用者修改可修正錯誤次數 的Π檻值(例如·· 5次),或是修改記憶體控制器所使用 的頁面尺寸(例如.· 8KB),歧初始備份記憶體大小 如:128個8KB頁面尺寸之記憶體,其為1MB)及每次向 作業系統要的備份記顏大小(例如:128個跑頁面尺 寸之記憶體,其為1MB)。 當處理器110執行完開機程序後,接著即執行作業系 統(步驟S312),此時作業系統由則〇8之介面可知道上 述由處理器11G在記憶體12G中所保留的記憶體區段與備 份記憶體縣底絲與大彳、,故作業系騎不會也不能使 用此些記憶體區塊。 在作業系統讀取記憶體120時,處理器no即透過記 憶體控制S14(H貞着正各個f面巾記憶朗出現的可修 正錯誤(步驟S314)。詳言之,當記憶體控制器14〇偵測 修正到可修正錯誤時,.即會在錯誤頁面暫存器142中記錄 出現此可修正錯誤的頁面位址,並發出系統中斷,以執行 中斷處理模組13〇。而中斷處理模組13〇也是藉由讀取此 錯誤頁面暫存器142中所記錄之出現可修正錯誤的頁面, 而得知哪個頁面發生可修正錯誤。 接著’由中斷處理模組130累計各個頁面出現可修正 錯疾的次數’並與一門檻值比較,而判斷所累計的次數是 否超過此門檻值(步驟S316)。 15 201216062 34904twf.d〇c/n 田中斷處理模址13〇判斷有頁面的可修正錯誤的次數 大於門梭值時’即將此頁面判定為受損頁面,而由備份記 憶體取得備份頁面(步驟S318),以將受損頁面中的資料 備份至備份以。詳言之,中斷處賴纟且⑽使用初始備 η隐體當作備份頁面’但當其備份頁面快用完時,則須 從作,系統獲得備份記憶體,詳言之,中斷處理模組 γο例如疋透過上述處理器11〇在記憶體12〇的系統資料 1中所保留的讀、體區段,與作㈣統巾的制模組交換 資料,以取得備份記憶體。 轳的:中斷處理模組130查詢頁面使用表時發現備份記憶 F 士空置頁面快用完,則再會透過記憶體120之系統資料 Α的舌己憶體區段,與作業系統中的應用模組交換資料, 以動1從作業系統取得—記憶空間以作為備份記憶體。 來說’圖4是依據本發明—實施例所繪示之動態 丨it统取得備份頁面的範例。圖5是依據本發明-實 往、日不之動態從作業系統取得備份頁面的方法流程 Μέ 3時參照圖4及圖5 ’本實施例係藉由在中斷處理 、、且、系統資料區160、應用模組170及作業系統180 取得備份記憶 拽哭2 本實施例係由中斷處理模組13G在上述由處 由宜°己憶體120之系統資料區160中保留的記憶體 £丰又中寫入頁面請求(步驟S502)。 雕 ^由應用模組〗70檢視此系統資料區160之記憶 的貧料’以檢視中斷處理模組13G所發出的頁面請 16 201216062 100427.TW 34904twf.doc/n 求(步驟S504)。其中,應用模組170例如是藉由詢問 (Polling)方法來檢視系統資料區160之記憶體區段的資 料’並檢視中斷處理模組130是否正在請求備份記憶體。 當應用模組170檢視到頁面請求時,即呼叫作業系統 180 ’以取得備份記憶體(步驟S506),並將所取得之備 份記憶體的基底位址及尺寸記錄在系統資料區16〇的記惊 體區段中(步驟S508)。最後’中斷處理模組13〇即藉由 存取此糸統貪料區160的記憶體區段,而取得備份記憶體 (步驟 S510)。 圖6是依據本發明一實施例所繪示之系統資料區 中保留之記憶體區段的範例。其中,系統資料區16〇包括 圖6所纟會示之請求尺寸161、請求狀態162、回應尺寸163 及回應基底位址164等四個欄位。其中,中斷處理模組13〇 例如是在請求尺寸161中寫入所欲請求之備份記憶體的尺 寸’並在請求狀態162寫入1以觸發此備份記憶體的請求。 應用模組170在從作業系統18〇取得備份記憶體後,即將 所取得之備份記憶體的基底位址及尺寸記錄分別記錄在回 應尺寸163及回應基底位址164中,並在記錄完畢後在請 求狀態162寫入〇以代表請求完成。藉此,中斷處理模= bo即藉由讀取此回應尺寸163及回應基底位址164,獲得 所請求之備份記憶體的基底位址及尺寸。 回到圖3的步驟S318,當中斷處理模組13〇取得備份 記憶體後,還進一步查詢一個頁面使用表,以從備份記憶 體中取得一個空置頁面來作為備份頁面,並將此備份頁面 17 201216062 100427.TW 34904twf.doc/n 的使用狀態更新為使用中,以及將受損頁面的使用狀態更 新為受損(步驟S320)。其中,所述的頁面使用表例如是 儲存在系統管理模式(System Management Mode,SMM) 的隨機存取記憶體(RAM)中,在此並不設限。 舉例來說,圖7(a)及圖7(b)是依據本發明一實施例所 繪示之更新頁面使用表的範例。請參照圖7(a)及圖7(b), 本實施例之頁面使用表710及720中包括頁面位址及頁面 使用狀態兩個攔位,頁面使用表710係記錄受損頁面及備 份頁面的原始狀態,而頁面使用表720則記錄受損頁面及 備份頁面的更新後的狀態。在本實施例中,〇〇代表頁面為 正常狀態;01代表頁面為使用中狀態;10代表頁面為受損 狀態;11則為保留狀態。由圖7⑷及圖7(b)可知,頁面X 在頁面使用狀態欄位中的數位由01轉變為10即代表頁面 X的狀態由使用中狀態轉變為受損狀態,而頁面y在頁面 使用狀態攔位中的數位由00轉變為01則代表頁面y的狀 態由正常狀態轉變為使用中狀態。 需說明的是,若中斷處理模組130查詢頁面使用表時 發現備份記憶體已無空置頁面,且無法再從作業系統取得 記憶空間,即代表已無法利用備份記憶體備份受損頁面的 資料,此時中斷處理模組130例如會將可修正錯誤出現時 的系統中斷功能禁能,或是傳送控制指令(IPMI OEM command )至基板管理控制器(Baseboard Management Controller,BMC),以由基板管理控制器發出警示訊息, 而告知系統管理員進行記憶體單元150的更換或其他合適 201216062 100427.TW 34904twf.doc/n 動作。 在更新頁面使用表之後’中斷處理模組13〇即將受損 頁面中的資料備份至備份頁面(步驟S322)。其中,中斷 處理模組130例如是將頁面的尺寸寫入記憶體控制器14〇 中的頁面尺寸暫存器143,將受損頁面及備份頁面的位址 分別寫入記憶體控制器140中的來源頁面暫存器144、目 的頁面暫存器145 ’並致能(設為1)備份暫存器146,而 控制記憶體控制器14〇將受損頁面中的資料備份至備份頁 面。而藉由檢視備份暫存器146的狀態是否回覆(設為〇), 即可得知資料備份是否完成。 在資料備份完畢後,中斷處理模組13〇即將上述受損 =面及備份頁©賴映位址記錄於記憶體控制器Μ的 映射表147 (步驟随)。其中’中斷處理模㈣〇 ;==:;=rping)方法,將受損 制二時’記憶體控 份頁面的資料(步驟S32=表中的對映位址,改為存取備 料的功效。 )’而達到保護受損記憶胞的資 由將記憶體劃分損=的資料保護方法係藉 可修正錯誤的次數超過—定量時在胞發生 τ 〇將此頁面從記憶體中 201216062 100427.TW 34904twf.d〇c/n 移除。採用此漸近式移除頁面的方式除了可以預防不可修 i錯誤發生外’朗為使用動態方式,於備份記憶體之頁 Φ快用完時才向作業系統要—塊備份記憶體區塊,故是以 漸進式方式向作業系統要記憶體區塊,故還可提供較多的 。己憶體給作業系統運用’因此可增加系統整體的效能。 雖然本發明已以實施例揭露如上,然其並非用以限定 本發明’任何所屬技術領域中具有通常知識者,在不脫離 本發明之精神和範圍内,當可作些許之更動與潤飾,故本 發明之保護範圍當視後附之申請專利範圍所界定者為準。 【圖式簡單說明】 圖1是依據本發明一實施例所繪示之電子裝置的系統 架構示意圖。 圖2是依據本發明一實施例所繪示之受損記憶胞的資 料保護方法的流程圖。 圖3是依據本發明一實施例所繪示之受損記憶胞的資 料保護方法的流程圖。 圖4是依據本發明一實施例所繪示之動態從作業系統 取得備份頁面的範例。 圖5是依據本發明一實施例所繪示之動態從作業系統 取得備份頁面的方法流程圖。 圖6是依據本發明一實施例所繪示之系統資料區16〇 中保留之記憶體區段的範例。 圖7(a)及圖7(b)是依據本發明一實施例所繪示之更新 20 201216062 100427.TW 34904twf.doc/n 頁面使用表的範例。 【主要元件符號說明】 100 :電子裝置 110 :處理器 120 :記憶體 130 :中斷處理模組 140 :記憶體控制器 141 :錯誤中斷暫存器 142 :錯誤頁面暫存器 143 :頁面尺寸暫存器 144 :來源頁面暫存器 145 :目的頁面暫存器 146 :備份暫存器 147 :頁面映射表 150 :記憶單元 160 ..糸統育料區 161 :請求尺寸 162 :請求狀態 163 :回應尺寸 164 :回應基底位址 170 :應用模組 180 :作業系統 710、720 :頁面使用表 21 201216062 ΐυϋ42/.1 W 34904twf.doc/n S202〜S212 :本發明一實施例之受損記憶胞的資料保 護方法的步驟 S302〜S326 :本發明一實施例之受損記憶胞的資料保 護方法的步驟 S502〜S510 :本發明一實施例之動態從作業系統取得 備份頁面的方法步驟GetMem^yMapO. The above two are merely illustrative and are not limited herein. Then, the processor 110 retains the initial backup memory provided to the processing module 13 in the memory 12 as a backup page (step S306). It should be further noted that the interrupt processing module 13 uses the initial backup note as a backup page. When the page of the initial backup memory is fast, the interrupt processing module 13 can pass through the application module 17 Dynamically, the operating system 18G obtains an appropriate amount of backup memory (for example, 诵). When the page of the backup memory obtained by the operating system is also (4) finished, the backup memory can be taken from the operating system, and so on. The backup memory includes at least one backup page, and the address of the backup (four) block may be a continuous or discontinuous memory block. That is to say, the backup memory is a multiple of the single page capacity. For example, if the page capacity is eight kilobytes (8 KB), the backup memory capacity is a multiple of eight kilobits (for example, 1 MB). . Then 'processing n 1 ίο will start the interrupt processing module (step S3 〇 8). = The interrupt handling module is, for example, a system management interrupt handler that can be used to interrupt events. Further, the processor 11 is also enabled to correct the error of the system interrupt function (step S31G). That is, whenever the memory detection correction is corrected to the occurrence of the correctable error, the system management interrupt message is sent to the processor 11G, and the processing module 13G is processed. Among them, the processor 11G activates the system interrupt function when the error 00 is present, for example, by enabling the error interrupt register 141 of the controller ho. 201216062 100427.TW 34904twf.doc/n It should be noted that, in the process of executing the booting process by the processor 11G, the setting program of the Bluss (u bowl y) or other software tools can be executed according to the user's operation. For the user to modify the threshold for correcting the number of errors (for example, 5 times), or to modify the page size used by the memory controller (for example, 8 KB), the initial backup memory size is: 128 The memory of 8KB page size, which is 1MB) and the size of the backup record to the operating system each time (for example, the memory of 128 running page sizes, which is 1MB). After the processor 110 executes the booting process, the operating system is executed (step S312). At this time, the operating system can know the memory segment retained by the processor 11G in the memory 12G by the interface of the terminal 8. Back up the memory of the county and the big scorpion, so the operating system will not be able to use these memory blocks. When the operating system reads the memory 120, the processor no passes the memory control S14 (H is correcting the error that occurs in the memory of each of the f-faces (step S314). In detail, when the memory controller 14〇 When the detection is corrected to the correctable error, the page address where the correctable error occurs is recorded in the error page register 142, and a system interrupt is issued to execute the interrupt processing module 13〇. The interrupt processing module is executed. 13〇 also reads the page that can correct the error recorded in the error page register 142, and knows which page has a correctable error. Then 'the interrupt processing module 130 accumulates each page to correct the error. The number of illnesses ' is compared with a threshold value, and it is judged whether the accumulated number of times exceeds the threshold value (step S316). 15 201216062 34904twf.d〇c/n Field interrupt processing template address 13 〇 judges that there is a page correctable error When the number of times is greater than the door shuttle value, 'this page is determined to be a damaged page, and the backup page is obtained by the backup memory (step S318) to back up the data in the damaged page to the backup. The interruption is based on (10) using the initial η hidden body as the backup page 'but when the backup page is running out, the system must obtain the backup memory. In detail, the interrupt processing module γο The read and body segments retained in the system data 1 of the memory 12 by the processor 11 are exchanged with the module for the (4) system to obtain backup memory. 轳: Interrupt processing module 130 When the query page uses the table, it is found that the backup memory F vacant page is running out, and then the data is exchanged with the application module in the operating system through the tongue data section of the system data of the memory 120. From the operating system, the memory space is used as the backup memory. [4] FIG. 4 is an example of obtaining a backup page by the dynamic system according to the present invention. FIG. 5 is a view of the present invention. The method flow for obtaining the backup page from the operating system is not shown in FIG. 4 and FIG. 5 'This embodiment is obtained by the interrupt processing, the system data area 160, the application module 170, and the operating system 180. memory Crying 2 In this embodiment, the interrupt processing module 13G writes a page request in the above-mentioned memory stored in the system data area 160 of the memory unit 120 (step S502). The module 70 checks the memory of the system data area 160 to view the page sent by the interrupt processing module 13G (step S504). The application module 170 For example, the data of the memory segment of the system data area 160 is viewed by a polling method and the interrupt processing module 130 is checked whether the backup memory is being requested. When the application module 170 views the page request, the operating system 180' is called to obtain the backup memory (step S506), and the base address and size of the obtained backup memory are recorded in the system data area 16〇. In the stunning section (step S508). Finally, the interrupt processing module 13 obtains the backup memory by accessing the memory segment of the cryptographic region 160 (step S510). FIG. 6 is a diagram showing an example of a memory segment retained in a system data area according to an embodiment of the invention. The system data area 16 includes four fields, such as the request size 161, the request status 162, the response size 163, and the response base address 164, which are shown in FIG. The interrupt processing module 13 is, for example, writing the size of the backup memory to be requested in the request size 161 and writing 1 in the request state 162 to trigger the request of the backup memory. After the application module 170 obtains the backup memory from the operating system 18, the base address and the size record of the obtained backup memory are recorded in the response size 163 and the response base address 164, respectively, and are recorded after the recording is completed. The request status 162 is written to 完成 to complete the request. Thereby, the interrupt processing mode = bo obtains the base address and size of the requested backup memory by reading the response size 163 and the response base address 164. Returning to step S318 of FIG. 3, after the interrupt processing module 13 obtains the backup memory, it further queries a page usage table to obtain a vacant page from the backup memory as a backup page, and the backup page 17 The usage status of 201216062 100427.TW 34904twf.doc/n is updated to be in use, and the usage status of the damaged page is updated to be damaged (step S320). The page usage table is, for example, stored in a random access memory (RAM) of a System Management Mode (SMM), and is not limited herein. For example, FIG. 7(a) and FIG. 7(b) are examples of an updated page usage table according to an embodiment of the invention. Referring to FIG. 7(a) and FIG. 7(b), the page usage tables 710 and 720 of the embodiment include two address blocks: a page address and a page usage state, and the page usage table 710 records the damaged page and the backup page. The original state, and the page usage table 720 records the updated state of the damaged page and the backup page. In this embodiment, 〇〇 represents that the page is in a normal state; 01 represents a page in use state; 10 represents a damaged state; and 11 is a reserved state. 7(4) and 7(b), the number of digits of the page X in the page usage status field is changed from 01 to 10, which means that the state of the page X changes from the in-use state to the damaged state, and the page y is in the page usage state. The transition from 00 to 01 in the block indicates that the state of page y transitions from the normal state to the in-use state. It should be noted that if the interrupt processing module 130 queries the page usage table and finds that the backup memory has no vacant pages, and can no longer obtain the memory space from the operating system, it means that the backup memory cannot be used to back up the damaged pages. At this time, the interrupt processing module 130 disables the system interrupt function when the correctable error occurs, or transmits the IPMI OEM command to the Baseboard Management Controller (BMC) to be controlled by the baseboard management. The device issues a warning message and informs the system administrator to perform a replacement of the memory unit 150 or other suitable 201216062 100427.TW 34904twf.doc/n action. After updating the page usage table, the interrupt processing module 13 备份 backs up the data in the damaged page to the backup page (step S322). The interrupt processing module 130 writes, for example, the size of the page into the page size register 143 in the memory controller 14 , and writes the addresses of the damaged page and the backup page into the memory controller 140 respectively. The source page register 144, the destination page register 145' and enable (set to 1) the backup register 146, and control the memory controller 14 to back up the data in the damaged page to the backup page. By checking whether the status of the backup register 146 is replied (set to 〇), it can be known whether the data backup is completed. After the data backup is completed, the interrupt processing module 13 records the damaged area and the backup page © the mapping table 147 of the memory controller (steps). The 'interrupt processing mode (four) 〇; ==:; = rping) method, the data of the memory control page will be damaged (step S32 = the mapping address in the table, the effect of accessing the preparation material) The data protection method that protects the damaged memory cell and divides the memory into the data = the number of times the error can be corrected is more than - when the quantitation occurs in the cell τ 〇 this page from the memory 201216062 100427.TW 34904twf.d〇c/n Removed. The method of removing the page by using the asymptotic method can not only prevent the occurrence of the unrepairable error, but also use the dynamic mode. When the page Φ of the backup memory is used up, the operating system is required to block the memory block. In the progressive mode, the operating system requires memory blocks, so more can be provided. The use of the memory system for the operating system can therefore increase the overall efficiency of the system. The present invention has been disclosed in the above embodiments, and it is not intended to limit the invention to those skilled in the art, and it is possible to make some modifications and refinements without departing from the spirit and scope of the invention. The scope of the invention is defined by the scope of the appended claims. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a schematic diagram of a system architecture of an electronic device according to an embodiment of the invention. 2 is a flow chart of a method for protecting a damaged memory cell according to an embodiment of the invention. 3 is a flow chart of a method for protecting a damaged memory cell according to an embodiment of the invention. FIG. 4 is a diagram showing an example of dynamically obtaining a backup page from an operating system according to an embodiment of the invention. FIG. 5 is a flow chart of a method for dynamically obtaining a backup page from an operating system according to an embodiment of the invention. FIG. 6 is an illustration of a memory segment retained in a system data area 16A according to an embodiment of the invention. 7(a) and 7(b) are diagrams showing an example of an update 20 201216062 100427.TW 34904twf.doc/n page usage table according to an embodiment of the invention. [Main component symbol description] 100: electronic device 110: processor 120: memory 130: interrupt processing module 140: memory controller 141: error interrupt register 142: error page register 143: page size temporary storage 144: Source page register 145: Destination page register 146: Backup register 147: Page mapping table 150: Memory unit 160: 育 cultivating area 161: Request size 162: Request status 163: Response size 164: response base address 170: application module 180: operating system 710, 720: page usage table 21 201216062 ΐυϋ 42 /.1 W 34904twf.doc / n S202 ~ S212: data of damaged memory cells according to an embodiment of the present invention Steps S302 to S326 of the protection method: Steps S502 to S510 of the data protection method for the damaged memory cell according to an embodiment of the present invention: a method for dynamically obtaining a backup page from the operating system according to an embodiment of the present invention

22twenty two

Claims (1)

201216062 100427.TW 34904twf.doc/n 七、申請專利範圍: 1. -種受損記憶胞的資料保護方法,適用於包括一記 =的-憶體包括—記憶體控制器及一記 劃分=個頁面,該些頁面各自包括該些記憶胞Γ: 分,該方法包括下列步驟: 執行-開機程序,並在該記憶體中 憶體以提供給—中斷處理模 初始備伤。己 括至少-備份頁面;模碰用’如讀備份記憶體包 執行-作業系統,並在該作業系統讀取 ==侧測修正各該些頁面中記憶二 門植些頁面各自出現該可修正錯誤的次數,並與一 當該其—之射修正 值時,判定該頁面為-受指百Α ;^人数大於該門檻 或動態從難業系統取得 2始備份記憶體 備份頁面其中之…以^餘5己憶體中取得該至少一 頁面;、 績伤該受損頁面中的資料至該備份 憶體芬===-對映位址於該記 根據面時,由該記憶體控制器 資料。 對映位址’改為躲該備份頁面的 23 201216062 I00427..1-VV 34904twf.doc/n 2. 如申請專利範圍第丨項所述之受損記憶胞的資料 保護方法,其中執行該開機程序的步驟更包括: 在該記憶體的一系統資料區中保留一記憶體區段,以 作為該電子裝置之一中斷處理模组與該作業系統之—應用 模組交換資料之用。 〜 3. 如申請專利範圍第2項所述之受損記憶胞的資料 保護方法’其中執行該作業系統的步驟更包括: ’ 由該作業系統中取得所保留之該記憶體的該記憶體 區段與該初始備份記憶體的一基底位址與大小。" 4·如申請專利範圍第3項所述之受損記憶胞的資料 保護方法,其中透過該記憶體控制器偵測修正各該些頁面 中記憶胞所出現的該可修正錯誤,以及累計各該面 現該可修正錯誤的次數的步驟包括: 當該記憶體控制器偵測修正到該可修正錯誤時, 出現該可修正錯誤的該頁面於一暫存器,並發出一= 斷’以執行該中斷處理模組; …— 由該中斷處理模組讀取該記憶體控制器之 中所記錄之出現該可修正錯誤的該頁面;以及 累計該頁面出現該可修正錯誤的次數。 ㈣4韻叙綠賴胞的資料 ==法,其中動歧該作業系統取得該備份記憶體的步 由該中斷處理模組寫人—頁面請求 中保留的該記憶體區段; 兄貧枓£ 24 201216062 100427.TW 34904twf.doc/n 由該應賴組檢視該系、崎料區之觀憶體區段的 資料,以檢視該巾斷處賴組所發出的該頁面請求丨以及 由該應用模組向該作業系統取得該備份記憶體,以提 供給該中斷處理模組使用。 6.如申請專職圍第5項所述之受損記憶胞的資料 保遵方法’其巾由該應賴崎視該系統資料區之該記憶201216062 100427.TW 34904twf.doc/n VII. Patent application scope: 1. A data protection method for damaged memory cells, which is applicable to including a memory = memory device and a memory controller and a division = The pages, each of which includes the memory cells: The method includes the following steps: an execution-start procedure, and the memory is provided in the memory to provide an initial interrupt to the interrupt processing mode. At least - backup page; mode touch with 'such as read backup memory package execution - operating system, and in the operating system read == side test correction each of these pages memory two pages each of these pages appear the correctable error The number of times, and when it is the correct value of the shot, it is determined that the page is - alleged; ^ number is greater than the threshold or dynamic from the difficult system to obtain the 2 backup memory backup page... Obtaining at least one page in the remaining 5; and the data in the damaged page to the backup memory:===-the mapping address is recorded by the memory controller . The mapping address 'is changed to the backup page 23 201216062 I00427..1-VV 34904twf.doc/n 2. The data protection method for the damaged memory cell as described in the scope of the patent application, wherein the booting is performed The steps of the program further include: retaining a memory segment in a system data area of the memory to exchange data between the interrupt processing module of the electronic device and the application module of the operating system. ~ 3. The method for protecting data of damaged memory cells as described in claim 2, wherein the step of executing the operating system further comprises: 'taking the memory area of the memory retained by the operating system A base address and size of the segment and the initial backup memory. " 4. The data protection method for damaged memory cells according to claim 3, wherein the memory controller detects and corrects the correctable error occurring in the memory cells in each of the pages, and accumulates The step of correcting the number of errors in each of the faces includes: when the memory controller detects the correction to the correctable error, the page in which the correctable error occurs is in a register and issues a == Executing the interrupt processing module; ... - reading, by the interrupt processing module, the page recorded in the memory controller where the correctable error occurs; and accumulating the number of times the page has the correctable error. (4) The data of the 4 rhyme green cell == method, wherein the operating system obtains the backup memory by the interrupt processing module to write the person-page request reserved in the memory segment; 201216062 100427.TW 34904twf.doc/n The data of the observatory section of the department and the Kasuga area is inspected by the group to view the request of the page issued by the group of the towel and the application model The group obtains the backup memory from the operating system for use by the interrupt processing module. 6. If you apply for the information on the damaged memory cells mentioned in item 5 of the full-time division, the method of compliance is as follows: 體區段的資料’以檢視該情處理模組所發出的該頁面請 求的步驟包括: 由該應用模組㈣-詢問方法或—中斷方法檢視該 系統資料⑤找記紐區段的㈣,以檢視該巾斷處理模 組所發出的該頁面請求。 7.如申請專職圍第5項所述之受損記憶胞的資料 保濩方法’其+㈣應帛模㈣該作業彡絲得該備份記 憶體,以提供給該中斷處理模組使用的步驟包括: 由該應用模組記錄該備份記憶體的一基底位址及一 尺寸於§亥系統資料區中保留的該記憶體區段,以提供給該 中斷處理模組使用。 8.如申請專利範圍第5項所述之受損記憶胞的資料 保護方法’其中由該應用模組取得該備份記憶體,以提供 給該中斷處理模組使用的步驟包括: 由該中斷處理模組查詢一頁面使用表,以從該備份記 憶體中取得一空置頁面作為該備份頁面,並更新該備份頁 面的一使用狀態為使用中,以及更新該受損頁面的該使用 狀態為受損。 25 201216062 iOWUA w 34904twf.doc/n 9.如申請專利範圍第s 保護方法,其中由兮由齡本項所述之受損記憶胞的資料 份記憶體中取得該空置頁面作為該^份頁面的步驟 更包括: 右該中斷處理模組查詢該頁面使用表時發現該備份 記憶體之該空置頁面的數量少於—預設值時,動態從該作 業糸統取得-記憶空_作為該備份記憶體。The data of the body segment's step of reviewing the page request issued by the processing module includes: (4) by the application module (4)-interrogation method or the interruption method, the system data 5 is found (4) View the page request sent by the towel processing module. 7. If you apply for the data protection method for damaged memory cells as described in item 5 of the full-time division, the + (4) should be modeled. (4) The operation is to obtain the backup memory to provide the steps for the interrupt processing module. The method includes: recording, by the application module, a base address of the backup memory and a memory segment reserved in the data area of the data system for use by the interrupt processing module. 8. The data protection method for damaged memory cells according to claim 5, wherein the step of obtaining the backup memory by the application module for use by the interrupt processing module comprises: processing by the interrupt The module queries a page usage table to obtain a vacant page from the backup memory as the backup page, and updates a usage status of the backup page to be in use, and updates the usage status of the damaged page to be damaged. . 25 201216062 iOWUA w 34904twf.doc/n 9. The method of claim s, wherein the vacant page is obtained from the data memory of the damaged memory cell described in this item as the page The step further includes: when the interrupt processing module queries the page usage table and finds that the number of the vacant pages of the backup memory is less than a preset value, dynamically obtaining from the operating system - memory empty _ as the backup memory body. 10.如申請專利範圍第1項所述之受損記憶胞的資料 保護方法,其中該電子裝置包括透過一傳統基本輸入輸出 系統(Legacy Basic Input/Output System,Legacy BIOS ) 或一延伸韌體介面基本輸入輸出系統(Extensible Firmware Interface BIOS,EFI BIOS)進行開機。10. The data protection method for damaged memory cells according to claim 1, wherein the electronic device comprises a legacy basic input/output system (Legacy BIOS) or an extended firmware interface. The basic input/output system (Extensible Firmware Interface BIOS, EFI BIOS) is turned on. 2626
TW99134596A 2010-10-11 2010-10-11 Data protection method for damaged memory cells TW201216062A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW99134596A TW201216062A (en) 2010-10-11 2010-10-11 Data protection method for damaged memory cells

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW99134596A TW201216062A (en) 2010-10-11 2010-10-11 Data protection method for damaged memory cells

Publications (1)

Publication Number Publication Date
TW201216062A true TW201216062A (en) 2012-04-16

Family

ID=46787055

Family Applications (1)

Application Number Title Priority Date Filing Date
TW99134596A TW201216062A (en) 2010-10-11 2010-10-11 Data protection method for damaged memory cells

Country Status (1)

Country Link
TW (1) TW201216062A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108447520A (en) * 2018-05-03 2018-08-24 睿力集成电路有限公司 Memory circuit device and memory device detecting method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108447520A (en) * 2018-05-03 2018-08-24 睿力集成电路有限公司 Memory circuit device and memory device detecting method
CN108447520B (en) * 2018-05-03 2023-10-13 长鑫存储技术有限公司 Memory circuit device and memory detection method

Similar Documents

Publication Publication Date Title
US11907200B2 (en) Persistent memory management
JP6556911B2 (en) Method and apparatus for performing an annotated atomic write operation
US9772938B2 (en) Auto-commit memory metadata and resetting the metadata by writing to special address in free space of page storing the metadata
US8516298B2 (en) Data protection method for damaged memory cells
US11966295B2 (en) Capacitor energy management for unexpected power loss in datacenter SSD devices
TW201839611A (en) Data storage devices and methods for rebuilding a mapping table thereof
TW201619971A (en) Green nand SSD application and driver
KR20160048814A (en) Persistent data structures
CN109656895B (en) Distributed storage system, data writing method, device and storage medium
BR112014005623B1 (en) METHOD OF RECORDING PENDING WRITINGS IN A STORAGE SET AND COMPUTER-READABLE STORAGE MEDIA
US9990150B2 (en) Method to provide transactional semantics for updates to data structures stored in a non-volatile memory
TW201222254A (en) Method for protecting data in damaged memory cells by dynamically switching memory mode
EP3336702B1 (en) Metadata recovery method and device
CN111666046B (en) Data storage method, device and equipment
KR20180013693A (en) System and method for integrating overprovisioned memory devices
CN103365792A (en) Information processing apparatus, and method of controlling information processing apparatus
TW201216062A (en) Data protection method for damaged memory cells
CN102455979B (en) Data protection method for damaged memory cell
CN111142792B (en) Power-down protection method of storage device
CN115705153A (en) Conditional update and deferred lookup
CN115599592A (en) Memory mirroring method and computing device
JP2021022213A (en) Storage system, storage control device and program
US11928497B2 (en) Implementing erasure coding with persistent memory
CN114564456B (en) Distributed storage file recovery method and device
US10725931B2 (en) Logical and physical address field size reduction by alignment-constrained writing technique