Memory error processing method and apparatus, storage medium, and electronic device

CN116069541BActive Publication Date: 2026-09-08INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310165321.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-24
Publication Date
2026-09-08
Estimated Expiration
2043-02-24

AI Technical Summary

Technical Problem

[0005]本申请实施例提供了一种内存错误的处理方法、装置、存储介质及电子设备,以至少解决相关技术中无法修改内存可纠正错误的默认设置,存在无法满足客户需求的问题

Benefits of technology

[0018]In this embodiment of the invention, a method is adopted to support customers in selecting fixed settings (i.e., default settings) and dynamic settings (i.e., custom settings) by setting target parameters. First, when the BIOS obtains the target parameters from the target storage space, the target processing mode of the ARM server is determined according to the target parameters. Then, according to the target processing mode, the value of the target memory error is recorded to obtain the target value. Finally, based on the target value, it is determined whether to report the target memory error to the operating system. The target processing mode is one of the following: default mode or custom mode, and the target memory error is a correctable memory error.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116069541B_ABST
    Figure CN116069541B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a memory error processing method and device, a storage medium and an electronic device. The method comprises: in the case that the BIOS acquires a target parameter from a target storage space, determining a target processing mode of an ARM server according to the target parameter, wherein the target processing mode is one of a default mode and a custom mode; recording a value of a target memory error to obtain a target value according to the target processing mode, wherein the target memory error is a memory correctable error; and determining whether to report the target memory error to an operating system according to the target value. Through the present application, the problem that the default setting of the memory correctable error cannot be modified in the prior art, and the problem that the customer's requirements cannot be met are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and more specifically, to a method, apparatus, storage medium, and electronic device for handling memory errors. Background Technology

[0002] Currently, most data centers primarily use servers with x86 architecture Intel and AMD (Advanced Micro Devices) chips. However, as internet customers increasingly prioritize energy efficiency and cost-effectiveness, ARM architecture servers are also gaining traction in data centers. Because ARM architecture processors have more than twice the core count of traditional x86 processors and support cloud services such as cloud gaming and web services, the deployment of ARM architecture servers is expected to continue to grow.

[0003] Since all data runs on the memory of any server architecture, how to handle or report memory corruption, uncorrectable errors, or correctable errors is a critical issue. Frequent handling or reporting can lead to server system crashes. Typically, related technologies use default memory correctability thresholds and reporting targets set within the BIOS, with reporting only occurring when the threshold is reached. Customers cannot modify these default settings for memory correctability errors. However, different customers have different requirements for memory correctability thresholds and reporting targets, leading to situations where customer needs cannot be met.

[0004] There is currently no effective solution to the above problems. Summary of the Invention

[0005] This application provides a method, apparatus, storage medium, and electronic device for handling memory errors, in order to at least solve the problem in related technologies where the default settings for correcting memory errors cannot be modified, thus failing to meet customer needs.

[0006] According to one embodiment of this application, a method for handling memory errors is provided, comprising: when the BIOS obtains target parameters from the target storage space, determining the target processing mode of the ARM server according to the target parameters, wherein the target processing mode is one of the following: default mode, custom mode; recording the value of the target memory error according to the target processing mode to obtain the target value, wherein the target memory error is a correctable memory error; and determining whether to report the target memory error to the operating system according to the target value.

[0007] In one exemplary embodiment, the memory error handling method further includes: if the BIOS does not obtain the target parameter from the target storage space, the BIOS obtains the value of the target parameter from the first configuration file and stores the value of the target parameter in the target storage space; after storing the value of the target parameter in the target storage space, the BIOS is restarted in response to the second boot command.

[0008] In one exemplary embodiment, determining the target processing mode of the ARM server based on the target parameters includes: determining the target processing mode as a custom mode when the value of the target parameters is a first value; and determining the target processing mode as a default mode when the value of the target parameters is a second value.

[0009] In an exemplary embodiment, recording the value of the target memory error according to the target processing mode to obtain the target value includes: when the target processing mode is a custom mode, displaying a target interface to the target object and obtaining parameter information input by the target object on the target interface, wherein the parameter information includes at least one of the following: a first recording time period, a first threshold, a second threshold, and the second threshold being greater than the first threshold; recording the value of the target memory error based on the first recording time period to obtain the first target value.

[0010] In one exemplary embodiment, the method for handling memory errors further includes: when the target processing mode is the default mode, obtaining a default time period, a first default threshold, and a second default threshold, wherein the second default threshold is greater than the first default threshold; and recording the value of the target memory error based on the default time period to obtain a second target value.

[0011] In an exemplary embodiment, the parameter information further includes a target reporting object. Determining whether to report a target memory error to the operating system based on the target value includes: determining whether the first target value is an integer multiple of a first threshold; if the first target value is an integer multiple of the first threshold, generating first error log information for the target memory error and determining whether the target reporting object is the operating system; if the target reporting object is the operating system, reporting the first error log information to the operating system so that the operating system can repair the memory based on the target memory error; if the target reporting object is not the operating system, reporting the first error log information to the target reporting object so that the target reporting object can monitor the memory based on the target memory error; determining whether the first target value is greater than a second threshold; if the first target value is greater than the second threshold, clearing the first target value to zero and re-recording the value of the target memory error within a first recording time period.

[0012] In one exemplary embodiment, the method for handling memory errors further includes: if the first target value is not an integer multiple of the first threshold, clearing the first target value to zero, and re-recording the value of the target memory error based on the first recording time period.

[0013] In one exemplary embodiment, determining whether to report a target memory error to the operating system based on a target value includes: determining whether a second target value is an integer multiple of a first default threshold; if the second target value is an integer multiple of the first default threshold, generating second error log information of the target memory error and reporting the second error log information to the operating system so that the operating system can repair the memory based on the target memory error; determining whether the second target value is greater than a second default threshold; if the second target value is greater than the second default threshold, clearing the second target value to zero and re-recording the value of the target memory error within a default time period.

[0014] In one exemplary embodiment, the method for handling memory errors further includes: if the second target value is not an integer multiple of the first default threshold, clearing the second target value to zero and re-recording the value of the target memory error based on the default time period.

[0015] According to another embodiment of this application, a memory error processing apparatus is provided, comprising: a first determining module, configured to determine a target processing mode of an ARM server based on target parameters obtained by the BIOS from a target storage space, wherein the target processing mode is one of the following: a default mode or a custom mode; a processing module, configured to record the value of a target memory error based on the target processing mode to obtain a target value, wherein the target memory error is a correctable memory error; and a second determining module, configured to determine whether to report the target memory error to the operating system based on the target value.

[0016] According to yet another embodiment of this application, a computer-readable storage medium is also provided, in which a computer program is stored, wherein the computer program is configured to perform the steps in any of the above method embodiments when it is run.

[0017] According to yet another embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein a computer program is stored in the memory and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0018] In this embodiment of the invention, a method is adopted to support customers in selecting fixed settings (i.e., default settings) and dynamic settings (i.e., custom settings) by setting target parameters. First, when the BIOS obtains the target parameters from the target storage space, the target processing mode of the ARM server is determined according to the target parameters. Then, according to the target processing mode, the value of the target memory error is recorded to obtain the target value. Finally, based on the target value, it is determined whether to report the target memory error to the operating system. The target processing mode is one of the following: default mode or custom mode, and the target memory error is a correctable memory error.

[0019] During the above process, the BIOS can determine the target processing mode of the ARM server based on the target parameters during startup. This allows customers to choose either the default threshold scheme for correctable errors or to dynamically set relevant parameters for correctable errors (such as time parameters, thresholds, reporting objects, etc.) according to actual needs. This improves the stability and reliability of server operation, thereby enhancing the security and reliability of the data center. It provides customers with a variety of correctable error handling solutions, which can meet their diverse needs for different time parameters, different thresholds, and different reporting objects, thereby improving customer satisfaction and increasing customer loyalty.

[0020] Therefore, the technical solution of this invention provides customers with two setting methods: fixed settings and dynamic settings. This satisfies customers' needs for dynamic setting management based on actual business conditions, thereby improving customer satisfaction and customer loyalty. Furthermore, it solves the technical problem in the prior art where the default settings that can correct memory errors cannot be modified, thus failing to meet customer needs. Attached Figure Description

[0021] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0022] Figure 1 This is a flowchart of an optional memory error handling method according to an embodiment of this application;

[0023] Figure 2 This is a flowchart of an optional memory error handling system according to an embodiment of this application;

[0024] Figure 3 This is a flowchart illustrating an optional processing method using a custom mode according to an embodiment of this application;

[0025] Figure 4This is a flowchart illustrating an optional process using the default mode according to an embodiment of this application;

[0026] Figure 5 This is a structural block diagram of an optional memory error handling apparatus according to an embodiment of this application. Detailed Implementation

[0027] The embodiments of this application will be described in detail below with reference to the accompanying drawings and examples.

[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0029] This embodiment provides an example of a memory error handling method. Figure 1 This is a flowchart of an optional memory error handling method according to an embodiment of this application, such as... Figure 1 As shown, the process includes the following steps:

[0030] Step S102: If the BIOS obtains the target parameters from the target storage space, determine the target processing mode of the ARM server based on the target parameters. The target processing mode is one of the following: default mode or custom mode.

[0031] Step S104: Record the value of the target memory error according to the target processing mode to obtain the target value, wherein the target memory error is a correctable memory error;

[0032] Step S106: Based on the target value, determine whether to report the target memory error to the operating system.

[0033] The above steps solve the problem that the default settings of memory, which cannot be modified to correct errors, in existing technologies and thus cannot meet customer needs. This allows for two setting methods: fixed and dynamic settings. This satisfies customers' needs for dynamic setting management based on actual business conditions, thereby improving customer satisfaction and increasing customer loyalty.

[0034] The execution order of steps S102 and S104 can be interchanged; that is, step S104 can be executed first, and then step S102 can be executed.

[0035] Specifically, in step S102, the target storage space can be the NVRAM area of ​​the BIOS, the target parameter can be the data corresponding to the BIOS control option, the default mode can be the mode set by the BIOS default setting, and the custom mode can be the mode in which the customer sets the threshold or the reporting object according to their needs.

[0036] Optionally, before the BIOS retrieves the target parameters from the target storage space, the ARM server's BIOS can be started by responding to the first boot instruction through devices such as application systems, processors, and electronic devices. For example, the ARM server's BIOS can be started by responding to the first boot instruction through a memory error handling system. The first boot instruction can be the instruction to start the BIOS. BIOS (Basic Input Output System) is a set of programs embedded in a ROM chip on the computer's motherboard. It stores the computer's most important basic input / output programs, power-on self-test (POST) programs, and system boot programs.

[0037] Optionally, in this embodiment, dynamic settings for the user are implemented by adding a BIOS control option, such as setting the time period for recording memory errors or setting the reporting objects. Specifically, a variable is added to the NVRAM area of ​​the BIOS, set to an initial value of 1 and enabled, i.e., the BIOS control option is enabled. Optionally, the BIOS control option is located at a starting address offset of 0x678 in the BIOS NVRAM area, and the variable length is 4 bytes. During the startup process, the BIOS obtains the value of the BIOS control option to determine whether the current processing mode is static or dynamic (i.e., whether the target processing mode is the default mode or a custom mode). If it is 1, it is determined to be dynamic (i.e., the target processing mode is a custom mode).

[0038] Optionally, the threshold settings for correctable errors in ARM architecture server memory mainly include time parameter settings, threshold 1 settings, and threshold 2 settings. When using the default settings of the BIOS image, the customer cannot modify the values ​​of the time parameter, threshold 1, and threshold 2, nor the reporting mechanism (i.e., the reporting object, such as reporting to the operating system OS and the baseboard management controller BMC) after triggering correctable errors. When the customer needs to modify certain parameters, they can enter the custom mode through the BIOS control options to adjust the parameters, i.e., adjust the time parameter, threshold 1, threshold 2, and reporting object, for example, only report to the BMC.

[0039] It should be noted that by adding a controllable option in the BIOS, the processing mode for correctable error logging of ARM architecture server memory can be set. When the default mode is in effect, the custom mode is disabled, and when the custom mode is in effect, the default mode is disabled. This provides customers with a variety of correctable error processing solutions, which can meet customers' various needs for different time parameters, different thresholds, and different reporting objects.

[0040] Specifically, in step S104, when the target processing mode is a custom mode, the value of the target memory error is recorded according to the custom mode to obtain the first target value; when the target processing mode is a default mode, the value of the target memory error is recorded according to the default mode to obtain the second target value.

[0041] Specifically, in step S106, if the target processing mode is a custom mode, it is determined whether to report the target memory error to the operating system based on the first target value; if the target processing mode is a default mode, it is determined whether to report the target memory error to the operating system based on the second target value.

[0042] Based on the scheme defined in steps S102 to S106 above, it can be understood that in this embodiment of the invention, the method of supporting customer selection of fixed settings (i.e., default settings) and dynamic settings (i.e., custom settings) by setting target parameters is adopted. First, when the BIOS obtains the target parameters from the target storage space, the target processing mode of the ARM server is determined according to the target parameters. Then, according to the target processing mode, the value of the target memory error is recorded to obtain the target value. Finally, based on the target value, it is determined whether to report the target memory error to the operating system. The target processing mode is one of the following: default mode or custom mode, and the target memory error is a correctable memory error.

[0043] It is noteworthy that during the above process, the BIOS can determine the target processing mode of the ARM server based on the target parameters during startup. This allows customers to choose either the default threshold scheme for correctable errors or to dynamically set relevant parameters for correctable errors (such as time parameters, thresholds, reporting objects, etc.) according to actual needs. This improves the stability and reliability of server operation, thereby enhancing the security and reliability of the data center. It provides customers with a variety of correctable error handling solutions, which can meet their diverse needs for different time parameters, different thresholds, and different reporting objects, thereby improving customer satisfaction and increasing customer loyalty.

[0044] Therefore, the technical solution of this invention provides customers with two setting methods: fixed settings and dynamic settings. This satisfies customers' needs for dynamic setting management based on actual business conditions, thereby improving customer satisfaction and customer loyalty. Furthermore, it solves the technical problem in the prior art where the default settings that can correct memory errors cannot be modified, thus failing to meet customer needs.

[0045] In one exemplary embodiment, if the BIOS does not obtain the target parameter from the target storage space, the BIOS obtains the value of the target parameter from the first configuration file and stores the value of the target parameter in the target storage space; after storing the value of the target parameter in the target storage space, the BIOS is restarted in response to the second boot command.

[0046] Optionally, the first configuration file can be a Boardsetting.txt file, and the second startup command can be a reboot command. Optionally, when the BIOS starts, the BIOS will obtain the BIOS control option data (i.e., target parameters) through the NVRAM area. If it is the first update or the target parameters are not obtained from the NVRAM area, the BIOS will obtain the BIOS control option setting variables from the Boardsetting.txt file and update them to the BIOS NVRAM area (i.e., store the value of the target parameter to the target storage space), and then reboot.

[0047] Optionally, when the BIOS starts, it will also obtain the parameters of the BIOS memory correctable error threshold setting variable through the NVRAM area. When updating for the first time or when the memory correctable error threshold setting is not obtained from the NVRAM area, the BIOS will obtain the memory correctable error threshold setting from the Boardsetting.txt file and update it to the BIOS NVRAM area so that it can be displayed and settable in subsequent BIOS setup options.

[0048] Figure 2 This is a flowchart of an optional memory error handling system according to an embodiment of this application, such as... Figure 2 As shown, the BIOS obtains NVRAM parameters upon startup. If the NVRAM variables are not obtained, the BIOS updates the memory correctable error threshold and BIOS control options in the Boardsetting.txt file to the NVRAM area and then restarts the BIOS.

[0049] In one exemplary embodiment, determining the target processing mode of the ARM server based on the target parameters includes: determining the target processing mode as a custom mode when the value of the target parameters is a first value; and determining the target processing mode as a default mode when the value of the target parameters is a second value.

[0050] Optionally, the first value can be 1, and the second value can be 0. Optionally, if the NVRAM variable is obtained (i.e., if the BIOS obtains the target parameters from the target storage space), the memory error correction handling mode can be determined based on the NVRAM variable (i.e., the target processing mode of the ARM server is determined based on the target parameters), such as... Figure 2 As shown, when the NVRAM variable is obtained, it is determined whether the BIOS control option is 1. If it is 1, the target processing mode is determined to be custom mode. If it is not 1, for example, if it is 0, the target processing mode is determined to be default mode.

[0051] In an exemplary embodiment, recording the value of the target memory error according to the target processing mode to obtain the target value includes: when the target processing mode is a custom mode, displaying a target interface to the target object and obtaining parameter information input by the target object on the target interface, wherein the parameter information includes at least one of the following: a first recording time period, a first threshold, a second threshold, and the second threshold being greater than the first threshold; recording the value of the target memory error based on the first recording time period to obtain the first target value.

[0052] Optionally, the target object can be the customer, and the target interface can be a custom input interface. When the target processing mode is custom mode, the BIOS setup option can be used to display a custom input interface to the customer, allowing the customer to set the memory correctable error handling scheme according to actual needs. For example, the reporting object can be set to BMC, that is, when the memory correctable error reaches the threshold, only the memory correctable error record will be reported to BMC.

[0053] Optionally, when the target processing mode is custom mode, the BIOS default settings will be completely disabled, and the control of the memory correctable error record and the actual setting requirements will be set by the customer. That is, the customer enters the corresponding parameter information on the target interface, for example, setting the first recording time period to 1 hour, setting the first threshold (i.e., threshold 1) to 1000, and setting the second threshold (i.e., threshold 2) to 10000.

[0054] Optionally, threshold 1 is located at the starting address offset of 0x670 in the NVRAM area of ​​the BIOS, and the variable length is 4 bytes. Threshold 2 is located at the starting address offset of 0x674 in the NVRAM area of ​​the BIOS, and the variable length is 4 bytes.

[0055] Furthermore, based on the first recording time period, the values ​​of the target memory errors are recorded to obtain the first target value. For example, the values ​​of the target memory errors are recorded within one hour to obtain the first target value.

[0056] Figure 3 This is a flowchart illustrating an optional processing method using a custom mode according to an embodiment of this application, such as... Figure 3 As shown, when the target processing mode is custom mode, the BIOS setup is started to display the input interface to the customer, who can set the memory error correction count time, threshold 1 and threshold 2, etc. according to their actual needs.

[0057] It should be noted that by obtaining the parameter information input by the target object on the target interface, the customer can dynamically set the relevant parameters of the correctable error according to the actual needs, providing the customer with a variety of correctable error handling solutions. This can meet the customer's various needs for different time parameters, different thresholds, and different reporting objects, thereby improving customer satisfaction.

[0058] In one exemplary embodiment, when the target processing mode is the default mode, a default time period, a first default threshold, and a second default threshold are obtained, wherein the second default threshold is greater than the first default threshold; based on the default time period, the value of the target memory error is recorded to obtain the second target value.

[0059] Optionally, the default time period, the first default threshold, and the second default threshold can be fixed preset values. For example, the default time period can be preset to 24 hours, the first default threshold to 500, and the second default threshold to 5000.

[0060] Optionally, when the target processing mode is the default mode, the BIOS default settings take effect, and the error correction can be implemented according to the BIOS default settings. Based on the default time period, the value of the target memory error is recorded to obtain the second target value. For example, the value of the target memory error is recorded within 24 hours to obtain the second target value.

[0061] Figure 4 This is a flowchart illustrating an optional processing method using the default mode according to an embodiment of this application, such as... Figure 4 As shown, when the target processing mode is the default mode, the BIOS default setting memory error correction threshold mechanism is activated, that is, the default time period, the first default threshold, and the second default threshold are obtained.

[0062] It should be noted that when customers do not need to modify the parameters related to correctable memory errors, the default BIOS settings can be used to handle correctable memory errors, providing customers with a correctable error handling solution, saving customers time and improving customer satisfaction.

[0063] In an exemplary embodiment, the parameter information further includes a target reporting object. Determining whether to report a target memory error to the operating system based on the target value includes: determining whether the first target value is an integer multiple of a first threshold; if the first target value is an integer multiple of the first threshold, generating first error log information for the target memory error and determining whether the target reporting object is the operating system; if the target reporting object is the operating system, reporting the first error log information to the operating system so that the operating system can repair the memory based on the target memory error; if the target reporting object is not the operating system, reporting the first error log information to the target reporting object so that the target reporting object can monitor the memory based on the target memory error; determining whether the first target value is greater than a second threshold; if the first target value is greater than the second threshold, clearing the first target value to zero and re-recording the value of the target memory error within a first recording time period.

[0064] Optionally, the target reporting object can be a reporting object set by the customer according to actual needs, such as OS, BMC, etc. When the target processing mode is custom mode, the customer will also set the reporting object according to actual needs, for example, setting the reporting object to BMC.

[0065] For example, when the target processing mode is custom mode, the customer sets the first recording time period to 1 hour, the first threshold (i.e., threshold 1) to 1000, and the second threshold (i.e., threshold 2) to 10000. Within 1 hour, the value of the target memory error is recorded. After obtaining the first target value, it is determined whether the first target value is an integer multiple of the first threshold (e.g., 1000). If the first target value is an integer multiple of 1000, the first error log information of the target memory error is generated, and it is determined whether the target reporting object is the operating system. If the target reporting object is the operating system, it is assumed that the customer has not modified the reporting object, and the first error log information is reported to the operating system so that the operating system can repair the memory based on the target memory error.

[0066] Optionally, if the target reporting object is not the operating system, for example, if the customer changes the target reporting object to the BMC, the first error log information is reported to the target reporting object (i.e., the BMC) so that the target reporting object monitors memory based on the target memory error.

[0067] Further, it is determined whether the first target value is greater than the second threshold (e.g., 10000). If the first target value is greater than 10000, the counter is reset to zero, and the target memory error value is re-recorded within the current hour. Figure 3As shown, when the counter value of threshold 1 exceeds 1000 but does not exceed 10000 within 1 hour, error log information is sent to BMC in multiples of 1000; when the counters of threshold 1 and threshold 2 both exceed the preset threshold within 1 hour, the counters of threshold 1 and threshold 2 are cleared and the timing is restarted.

[0068] In one exemplary embodiment, if the first target value is not an integer multiple of the first threshold, the first target value is cleared to zero, and the target memory error value is re-recorded based on the first recording time period.

[0069] Optionally, if the first target value is not an integer multiple of the first threshold (e.g., 1000), that is, if the threshold 1 and threshold 2 are not reached within 1 hour, and no correctable error record is sent to the BMC, the counter is reset to zero, and the target memory error value is recorded again with a 1-hour recording interval.

[0070] In one exemplary embodiment, determining whether to report a target memory error to the operating system based on a target value includes: determining whether a second target value is an integer multiple of a first default threshold; if the second target value is an integer multiple of the first default threshold, generating second error log information of the target memory error and reporting the second error log information to the operating system so that the operating system can repair the memory based on the target memory error; determining whether the second target value is greater than a second default threshold; if the second target value is greater than the second default threshold, clearing the second target value to zero and re-recording the value of the target memory error within a default time period.

[0071] Optionally, when the target processing mode is the default mode, the error correction can be implemented according to the BIOS default settings. For example, the default time period is 24 hours, the first default threshold is 500, and the second default threshold is 5000. Within 24 hours, the value of the target memory error is recorded. After obtaining the second target value, it is determined whether the second target value is an integer multiple of the first default threshold (e.g., 500). If the second target value is an integer multiple of 500, a second error log information of the target memory error is generated and reported to the operating system so that the operating system can repair the memory based on the target memory error.

[0072] In this embodiment, the default setting reporting object of the BIOS is the operating system, which is used as an example for illustration. This does not constitute a limitation on the reporting object. For example, the default setting reporting object of the BIOS can also be the operating system OS and the baseboard management controller (BMC).

[0073] Furthermore, it is determined whether the second target value is greater than the second default threshold (e.g., 5000). If the second target value is greater than 5000, the counter is reset to zero, and the target memory error value is re-recorded within 24 hours. Figure 4 As shown, the BIOS default memory threshold time is set to 24 hours, with threshold 1 at 500 and threshold 2 at 5000. That is, if the memory correctable error threshold record value exceeds threshold 1 but does not exceed threshold 2 within 24 hours, a memory correctable error will be triggered and recorded in the OS log, and the number of times it is sent is a multiple of 500. If the memory correctable error threshold exceeds both threshold 1 and threshold 2 within 24 hours, the number of times the memory correctable error record is triggered will be reported to the OS, and at the same time, the counters for threshold 1 and threshold 2 will be cleared and the count will start again.

[0074] In one exemplary embodiment, if the second target value is not an integer multiple of the first default threshold, the second target value is cleared to zero, and the target memory error value is re-recorded based on the default time period.

[0075] Optional, such as Figure 4 As shown, if the second target value is not an integer multiple of the first default threshold (e.g., 500), that is, if neither threshold 1 nor threshold 2 reaches the preset value within 24 hours, no record is triggered in the OS, the counter is cleared, and the target memory error value is recorded again with a 24-hour recording interval.

[0076] It should be noted that in this embodiment, a BIOS control option is added to support static and dynamic management of memory correctable errors. This allows customers to manage memory correctable errors according to the actual operation of their data centers and their specific requirements. Customers can set time parameters, thresholds, and reporting objects according to their actual needs, which meets the various needs of customers for different time parameters, different thresholds, and different reporting objects, and provides customers with a variety of correctable error handling solutions.

[0077] In this embodiment, a single BIOS image can support different memory correctable error threshold settings and the selection of reporting objects. When the customer does not need to make manual settings, the BIOS default 24-hour memory correctable error handling mechanism can be used. When the customer believes that the default scheme is not applicable or needs to adjust the time interval, threshold, or reporting object, the BIOS control option can be enabled and adjusted according to the requirements.

[0078] Therefore, the technical solution of this invention provides customers with two setting methods: fixed settings and dynamic settings. This satisfies customers' needs for dynamic setting management based on actual business conditions, thereby improving customer satisfaction and customer loyalty. Furthermore, it solves the technical problem in the prior art where the default settings that can correct memory errors cannot be modified, thus failing to meet customer needs.

[0079] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the memory error handling methods described in the various embodiments of this application.

[0080] This embodiment also provides a memory error handling apparatus for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0081] Figure 5 This is a structural block diagram of a memory error handling apparatus according to an embodiment of this application, such as... Figure 5 As shown, the device includes: a first determining module 502, used to determine the target processing mode of the ARM server based on the target parameters obtained by the BIOS from the target storage space, wherein the target processing mode is one of the following: default mode or custom mode; a processing module 504, used to record the value of the target memory error according to the target processing mode to obtain the target value, wherein the target memory error is a correctable memory error; and a second determining module 506, used to determine whether to report the target memory error to the operating system based on the target value.

[0082] It should be noted that the first determining module 502, the processing module 504 and the second determining module 506 mentioned above correspond to steps S102 to S106 in the above embodiments. The examples and application scenarios implemented by the three modules and the corresponding steps are the same, but are not limited to the content disclosed in the above method embodiments.

[0083] Optionally, the memory error handling device further includes: a first acquisition module, used to acquire the value of the target parameter from a first configuration file and store the value of the target parameter in the target storage space when the BIOS does not acquire the target parameter from the target storage space; and a first boot module, used to respond to a second boot command and restart the BIOS after storing the value of the target parameter in the target storage space.

[0084] Optionally, the first determining module includes: a third determining unit, used to determine the target processing mode as a custom mode when the value of the target parameter is a first value; and a fourth determining unit, used to determine the target processing mode as a default mode when the value of the target parameter is a second value.

[0085] Optionally, the processing module includes: a second acquisition unit, used to display the target interface to the target object and acquire the parameter information input by the target object on the target interface when the target processing mode is a custom mode, wherein the parameter information includes at least one of the following: a first recording time period, a first threshold, a second threshold, and the second threshold being greater than the first threshold; and a first processing unit, used to record the value of the target memory error based on the first recording time period to obtain the first target value.

[0086] Optionally, the memory error handling device further includes: a third acquisition module, used to acquire a default time period, a first default threshold, and a second default threshold when the target processing mode is the default mode, wherein the second default threshold is greater than the first default threshold; and a second processing module, used to record the value of the target memory error based on the default time period to obtain a second target value.

[0087] Optionally, the parameter information also includes the target reporting object. The second determining module includes: a first judging unit, used to judge whether the first target value is an integer multiple of the first threshold; a second judging unit, used to generate first error log information of the target memory error when the first target value is an integer multiple of the first threshold, and to judge whether the target reporting object is the operating system; a third processing unit, used to report the first error log information to the operating system when the target reporting object is the operating system, so that the operating system can repair the memory based on the target memory error; a fourth processing unit, used to report the first error log information to the target reporting object when the target reporting object is not the operating system, so that the target reporting object can monitor the memory based on the target memory error; a third judging unit, used to judge whether the first target value is greater than the second threshold; and a fifth processing unit, used to clear the first target value to zero when the first target value is greater than the second threshold, and to re-record the value of the target memory error within the first recording time period.

[0088] Optionally, the memory error handling device further includes: a sixth processing module, used to clear the first target value to zero and re-record the target memory error value based on the first recording time period if the first target value is not an integer multiple of the first threshold.

[0089] Optionally, the second determining module further includes: a fourth judging unit, used to judge whether the second target value is an integer multiple of the first default threshold; a seventh processing unit, used to generate second error log information of the target memory error when the second target value is an integer multiple of the first default threshold, and report the second error log information to the operating system so that the operating system can repair the memory based on the target memory error; a fifth judging unit, used to judge whether the second target value is greater than the second default threshold; and an eighth processing unit, used to clear the second target value to zero when the second target value is greater than the second default threshold, and re-record the value of the target memory error within a default time period.

[0090] Optionally, the memory error handling device further includes: a ninth processing module, used to clear the second target value to zero and re-record the target memory error value based on the default time period if the second target value is not an integer multiple of the first default threshold.

[0091] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0092] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when run.

[0093] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0094] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0095] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0096] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0097] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0098] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.

Claims

1. A method for handling memory errors, characterized in that, include: When the BIOS obtains the target parameters from the target storage space, it determines the target processing mode of the ARM server based on the target parameters. The target processing mode is one of the following: default mode or custom mode. According to the target processing mode, the value of the target memory error is recorded to obtain the target value, wherein the target memory error is a correctable memory error; Based on the target value, determine whether to report the target memory error to the operating system; The determination of the target processing mode of the ARM server based on the target parameters includes: If the value of the target parameter is the first value, the target processing mode is determined to be the custom mode; If the value of the target parameter is the second value, the target processing mode is determined to be the default mode; Specifically, based on the target processing mode, the target memory error value is recorded to obtain the target value, including: When the target processing mode is the custom mode, the target interface is displayed to the target object, and the parameter information input by the target object on the target interface is obtained, wherein the parameter information includes at least one of the following: a first recording time period, a first threshold, and a second threshold, wherein the second threshold is greater than the first threshold; Based on the first recording time period, the value of the target memory error is recorded to obtain the first target value; The parameter information also includes the target reporting object, wherein determining whether to report the target memory error to the operating system based on the target value includes: Determine whether the first target value is an integer multiple of the first threshold; If the first target value is an integer multiple of the first threshold, generate the first error log information of the target memory error, and determine whether the target reporting object is the operating system; When the target reporting object is the operating system, the first error log information is reported to the operating system so that the operating system can repair the memory based on the target memory error; If the target reporting object is not the operating system, the first error log information is reported to the target reporting object so that the target reporting object can monitor the memory based on the target memory error; Determine whether the first target value is greater than the second threshold; If the first target value is greater than the second threshold, the first target value is cleared to zero, and the target memory error value is re-recorded within the first recording time period.

2. The method according to claim 1, characterized in that, The method further includes: If the BIOS does not obtain the target parameter from the target storage space, the BIOS obtains the value of the target parameter from the first configuration file and stores the value of the target parameter in the target storage space. After storing the value of the target parameter into the target storage space, the BIOS is restarted in response to the second boot command.

3. The method according to claim 1, characterized in that, The method further includes: When the target processing mode is the default mode, a default time period, a first default threshold, and a second default threshold are obtained, wherein the second default threshold is greater than the first default threshold; Based on the default time period, the value of the target memory error is recorded to obtain the second target value.

4. The method according to claim 1, characterized in that, The method further includes: If the first target value is not an integer multiple of the first threshold, the first target value is cleared to zero, and the target memory error value is re-recorded based on the first recording time period.

5. The method according to claim 3, characterized in that, Based on the target value, determining whether to report the target memory error to the operating system includes: Determine whether the second target value is an integer multiple of the first default threshold; If the second target value is an integer multiple of the first default threshold, a second error log information of the target memory error is generated, and the second error log information is reported to the operating system so that the operating system can repair the memory based on the target memory error; Determine whether the second target value is greater than the second default threshold; If the second target value is greater than the second default threshold, the second target value is cleared to zero, and the target memory error value is re-recorded within the default time period.

6. The method according to claim 5, characterized in that, The method further includes: If the second target value is not an integer multiple of the first default threshold, the second target value is cleared to zero, and the target memory error value is recorded again based on the default time period.

7. A memory error handling apparatus, characterized in that, For performing the method according to any one of claims 1 to 6, comprising: The first determining module is used to determine the target processing mode of the ARM server based on the target parameters obtained by the BIOS from the target storage space, wherein the target processing mode is one of the following: default mode or custom mode; The processing module is used to record the value of the target memory error according to the target processing mode to obtain the target value, wherein the target memory error is a correctable memory error; The second determining module is used to determine whether to report the target memory error to the operating system based on the target value.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, it implements the steps of the memory error handling method according to any one of claims 1 to 6.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the memory error handling method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data processing system for acquiring target associated equipment

    CN112765473A

  • PCIE (Peripheral Component Interface Express) error correction processing method, device, equipment and medium

    CN113704013A