Abnormal Diagnosis Method, Device, Medium and Product of Basic Input / Output System
By acquiring and comparing the running mirror and reference mirror in the BIOS abnormal state, the problem of insufficient granularity of BIOS abnormal diagnosis and low recovery efficiency in the prior art is solved, and efficient and accurate BIOS fault handling is achieved.
Patent Information
- Application Number
- CN202510332381.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-03-20
AI Technical Summary
The prior art is not fine enough in BIOS abnormal diagnosis, and the recovery efficiency is low, and the runtime BIOS mirror cannot be effectively collected, resulting in the inaccurate identification of specific abnormal areas in the BIOS mirror. The entire image needs to be replaced instead of only repairing the faulty part, resulting in inaccurate recovery efficiency.
When the current machine is in a preset abnormal state, the current running image of the basic input and output system of the current machine and the reference image stored in the first storage space, and the current running image is bitwise stored to the second storage space, and the error image of the exception bit segment is obtained based on the bit segment to be compared and/or the storage segment to be compared, the error image of the exception bit segment is obtained.
It significantly improves the efficiency and reliability of BIOS fault handling. Through bit-level storage management and online accurate diagnosis, it accurately identifies and repairs abnormal areas in the BIOS image, improving recovery efficiency.
Smart Images

Figure CN119847808B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, medium and product for diagnosing abnormality of a basic input and output system. Background Art
[0002] The Basic Input Output System (BIOS) is a set of programs that are fixed on the ROM (Read-Only Memory) chip on the computer motherboard. It stores important basic input and output programs, power-on self-test programs, and system self-startup programs, and can read and write specific information about system settings. In some cases, abnormal machine downtime may be related to unknown reasons for damage to the BIOS image, but since the BIOS is usually soldered on the motherboard when it leaves the factory, it is difficult to directly determine the specific problem. The current solution is mainly to restore its function by refreshing the BIOS.
[0003] On the other hand, the baseboard management controller (BMC) is used as the overall monitoring system of the server to monitor the operating status of the server. The BMC is designed to establish hardware connections with multiple devices including BIOS, and can obtain and provide various server-related information to operation and maintenance personnel when the system is not powered on, down, or abnormal.
[0004] In the related art, the existing technical solutions for BIOS firmware protection are mainly a series of checks based on BIOS startup or directly refreshing its firmware when the BIOS is abnormal. For example, patent CN114444083A proposes a server BIOS full life cycle security protection system based on BMC, which uses the BIOS trusted root key to verify the BIOS image during the abnormal system startup stage, and adopts a method similar to the basic input and output system recovery system and method proposed in patent CN114116020A, a data transmission method and electronic device proposed in CN105843712A, that is, directly switching to the backup BIOS or refreshing the overall image of the backup BIOS to achieve BIOS recovery.
[0005] However, the above-mentioned related technologies are not fine-grained enough to accurately identify the specific abnormal areas in the BIOS image, and the related technologies need to replace the entire image instead of just repairing the faulty part, resulting in low recovery efficiency. In addition, the related technologies lack an effective collection mechanism for the runtime BIOS image, which limits further research and analysis. In general, the current related technologies treat BIOS image abnormalities or damage as a "black box" and cannot understand the details of what is happening inside, which urgently needs to be solved. Summary of the invention
[0006] The present invention provides a basic input and output system abnormality diagnosis method, device, medium and product to solve the problems of insufficient granularity, low recovery efficiency and inability to effectively collect runtime BIOS images in the prior art in BIOS abnormality diagnosis. Through bit-level storage management and online precise diagnosis, the efficiency and reliability of BIOS fault processing are significantly improved.
[0007] To achieve the above object, a first embodiment of the present invention provides a method for diagnosing abnormalities in a basic input / output system, comprising the following steps:
[0008] Determine whether the current machine is in a preset abnormal state;
[0009] If the current machine is in the preset abnormal state, obtaining a current running image of a basic input / output system of the current machine and a reference image stored in the first storage space, and storing the current running image bit by bit in the second storage space;
[0010] Determine the bit segments to be compared and / or the storage segments to be compared, and compare the current running image with the reference image based on the bit segments to be compared and / or the storage segments to be compared to obtain an erroneous image of the abnormal bit segments.
[0011] Through the above-mentioned technical means, the problems of insufficient granularity, low recovery efficiency and inability to effectively collect runtime BIOS images in the existing technology in BIOS abnormality diagnosis are solved. Through bit-level storage management and online precise diagnosis, the efficiency and reliability of BIOS fault handling are significantly improved.
[0012] According to the method for diagnosing abnormalities of the basic input / output system proposed in the embodiment of the present invention, when the current machine is in a preset abnormal state, the current running image of the basic input / output system of the current machine and the reference image stored in the first storage space are obtained, and the current running image is stored bit by bit in the second storage space, and based on the bit segments to be compared and / or the storage segments to be compared, the current running image and the reference image are compared to obtain the error image of the abnormal bit segment. Thus, the problems of insufficient granularity, low recovery efficiency and inability to effectively collect runtime BIOS images in the prior art in BIOS abnormality diagnosis are solved, and the efficiency and reliability of BIOS fault handling are significantly improved through bit-level storage management and online precise diagnosis.
[0013] To achieve the above object, a second embodiment of the present invention provides an abnormality diagnosis device for a basic input / output system, comprising:
[0014] A judgment module is used to judge whether the current machine is in a preset abnormal state;
[0015] a processing module, configured to obtain a current running image of a basic input / output system of the current machine and a reference image stored in the first storage space if the current machine is in the preset abnormal state, and store the current running image bit by bit in the second storage space;
[0016] The diagnosis module is used to determine the bit segments to be compared and / or the storage segments to be compared, and compare the current running image with the reference image based on the bit segments to be compared and / or the storage segments to be compared to obtain the erroneous image of the abnormal bit segments.
[0017] According to the abnormal diagnosis device of the basic input / output system proposed in the embodiment of the present invention, when the current machine is in a preset abnormal state, the current running image of the basic input / output system of the current machine and the reference image stored in the first storage space are obtained, and the current running image is stored bit by bit in the second storage space, and based on the bit fragments to be compared and / or the storage fragments to be compared, the current running image and the reference image are compared to obtain the error image of the abnormal bit fragment. Thus, the problems of insufficient granularity, low recovery efficiency and inability to effectively collect runtime BIOS images in the prior art in BIOS abnormal diagnosis are solved, and the efficiency and reliability of BIOS fault processing are significantly improved through bit-level storage management and online precise diagnosis.
[0018] To achieve the above-mentioned purpose, the third aspect of the present invention proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the abnormality diagnosis method of the basic input / output system as described in the above-mentioned embodiment.
[0019] To achieve the above objectives, a fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the basic input / output system abnormality diagnosis method as described in the above embodiments.
[0020] To achieve the above objectives, a fifth aspect of the present invention provides a computer program product, including a computer program, which is executed to implement the basic input and output system abnormality diagnosis method as described in the above embodiments.
[0021] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0023] Figure 1 A flowchart of a method for diagnosing abnormality of a basic input and output system according to an embodiment of the present invention;
[0024] Figure 2 A flowchart of a BMC storing a running BIOS according to an embodiment of the present invention;
[0025] Figure 3 A schematic diagram of 6 bit segments of BIOS stored by default in a BMC according to an embodiment of the present invention;
[0026] Figure 4 A schematic diagram of a BMC webUI design according to an embodiment of the present invention;
[0027] Figure 5 A schematic diagram of a hardware structure according to an embodiment of the present invention;
[0028] Figure 6 A block diagram of an abnormality diagnosis device for a basic input / output system according to an embodiment of the present invention;
[0029] Figure 7 It is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present invention.
[0030] Figure numerals: 10 - abnormality diagnosis device of basic input and output system, 100 - judgment module, 200 - processing module, 300 - diagnosis module; 701 - memory, 702 - processor, 703 - communication interface. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0032] It should be noted that, in the description of the present invention, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present invention are used to distinguish similar objects, and are not used to describe a specific order or sequence.
[0033] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0034] The following describes the abnormal diagnosis method, device, medium and product of the basic input and output system of the embodiment of the present invention with reference to the accompanying drawings. In view of the problems mentioned in the above background technology that the granularity is not fine enough, the recovery efficiency is low, and the runtime BIOS image cannot be effectively collected in the BIOS abnormal diagnosis, the present invention provides an abnormal diagnosis method of the basic input and output system, in which, when the current machine is in a preset abnormal state, the current running image of the basic input and output system of the current machine and the reference image stored in the first storage space are obtained, and the current running image is stored bit by bit in the second storage space, and based on the bit fragments to be compared and / or the storage fragments to be compared, the current running image and the reference image are compared to obtain the erroneous image of the abnormal bit fragment. As a result, the problems of the prior art in the BIOS abnormal diagnosis that the granularity is not fine enough, the recovery efficiency is low, and the runtime BIOS image cannot be effectively collected are solved, and the efficiency and reliability of BIOS fault processing are significantly improved through bit-level storage management and online precise diagnosis.
[0035] Specifically, Figure 1 It is a flowchart of a method for diagnosing abnormality of a basic input / output system according to an embodiment of the present invention.
[0036] like Figure 1 As shown, the abnormality diagnosis method of the basic input and output system includes the following steps:
[0037] In step S101, it is determined whether the current machine is in a preset abnormal state.
[0038] Among them, the preset abnormal state refers to the abnormal situation that occurs during the operation of the server or computer system, indicating that the current machine may have a fault or is in a downtime state, and further diagnosis and repair are required.
[0039] Specifically, the embodiment of the present invention can determine whether the current machine is in a preset abnormal state according to the cumulative number of BIOS startup failures within a preset time period. If the cumulative number of BIOS startup failures within the preset time period exceeds a preset threshold, it is determined that the current machine is in a preset abnormal state.
[0040] For example, an embodiment of the present invention can use a baseboard management controller to monitor the BIOS startup process through a hardware link. When the Watchdog detects that the cumulative number of BIOS startup failures exceeds a preset threshold (such as 3 times) within a preset time period (such as 10 minutes), it is determined that the current machine is in a preset abnormal state.
[0041] In step S102, if the current machine is in a preset abnormal state, the current running image of the basic input and output system of the current machine and the reference image stored in the first storage space are obtained, and the current running image is stored bit by bit in the second storage space.
[0042] Furthermore, in some embodiments, before obtaining the current running image of the basic input / output system of the current machine and storing the reference image in the first storage space, it also includes: obtaining the number of startup failures of the basic input / output system; if the number of startup failures of the basic input / output system is less than or equal to a preset number, restarting the basic input / output system.
[0043] The preset number of times may be a number set by those skilled in the art according to actual conditions, such as 3 times, and is not specifically limited here.
[0044] Specifically, if Figure 2 As shown, the embodiment of the present invention can monitor the BIOS startup process through the BMC Watchdog after the BIOS is started, and determine whether the Watchdog triggers the BIOS startup failure warning. If the BIOS startup failure warning is not triggered, it means that the BIOS startup is successful. On the contrary, if the Watchdog triggers the BIOS startup failure warning, it is further determined whether the number of BIOS startup failure warnings is greater than the preset number. If the number of BIOS startup failure warnings is less than or equal to the preset number, the BMC triggers the BIOS restart process, and attempts to restore the normal operation of the system by reinitializing and loading the BIOS program to avoid downtime caused by temporary faults.
[0045] Furthermore, if the number of BIOS boot failure warnings is greater than the preset number, it indicates that there is a serious abnormality in the BIOS. The BMC obtains the currently running BIOS image through the hardware connection with the BIOS and stores it bit by bit in an independent storage unit, providing a data basis for subsequent diagnosis and repair.
[0046] Therefore, by storing the BIOS image bit by bit, the storage efficiency can be significantly improved, the required content can be stored in a targeted manner, and the redundant storage space can be reduced. In addition, when the number of failures does not reach the threshold, restarting is prioritized instead of immediately triggering image acquisition, avoiding excessive diagnostic operations caused by occasional errors.
[0047] Further, in some embodiments, obtaining the current running image of the basic input and output system of the current machine includes: determining whether an image acquisition instruction manually triggered by a user is received; if an image acquisition instruction manually triggered by a user is received, obtaining the current running image based on the image acquisition instruction manually triggered by the user, otherwise, automatically obtaining the current running image when the number of startup failures of the basic input and output system is greater than a preset number.
[0048] Specifically, when the machine crashes, the BMC obtains the currently running BIOS image through a hardware line linked to the BIOS, and directly stores the image bit by bit in an independent storage unit. The current running image of the basic input and output system of the current machine can be obtained manually, that is, after the operation and maintenance personnel find that the machine crashes, they can obtain it manually. In addition, it can also be obtained automatically.
[0049] Furthermore, the baseboard management controller can receive the image acquisition instruction manually triggered by the user through a preset interactive interface (such as Web UI). For example, after the operation and maintenance personnel find that the current machine is down, they click the "Get Current Image" button through the BMC Web page. At this time, based on the image acquisition instruction manually triggered by the user, the current running image is obtained and stored bit by bit in the second storage space.
[0050] The above technical means provide a flexible mechanism that allows you to choose the most suitable operation mode according to the actual situation. Operation and maintenance personnel can quickly collect necessary diagnostic information by manually triggering the image acquisition command. At the same time, without manual intervention, the system can also automatically perform image acquisition operations based on preset conditions, ensuring effective fault detection even in unattended or emergency situations.
[0051] Further, in some embodiments, the second storage space includes multiple storage units, and storing the current running image bit by bit in the second storage space includes: dividing the current running image based on the multiple storage units, and storing the divided current running image bit by bit in the multiple storage units.
[0052] The storage unit may be a non-volatile memory (such as Flash) or a volatile memory (such as RAM). The specific selection depends on the application scenario and is not specifically limited here.
[0053] Specifically, each bit of data of the currently running image is allocated to a corresponding storage unit. For example, the first bit of the image is stored in storage unit 1, the second bit is stored in storage unit 2, and so on.
[0054] Therefore, by dividing the current running image by bits, it is ensured that each bit of data can be stored and accessed independently, thereby improving the flexibility and accuracy of storage.
[0055] Furthermore, if no image acquisition instruction manually triggered by the user is received, the number of BIOS startup failures continues to be monitored. If the number of startup failures of the basic input and output system is greater than the preset number, it means that there is a more serious abnormality in the BIOS and further diagnosis and repair operations are required. At this time, the current running image acquisition operation is automatically triggered to automatically acquire the current running image and store the current running image bit by bit in the second storage space.
[0056] Furthermore, in some embodiments, before obtaining the current running image of the basic input / output system of the current machine and storing the reference image in the first storage space, it also includes: obtaining the current upload image in the upload image phase of refreshing the basic input / output system; using the current upload image as a reference image and storing it in the first storage space.
[0057] Furthermore, in some embodiments, before the currently uploaded image is used as a reference image, the method further includes: verifying the currently uploaded image, so that when the verification result shows that there is no abnormality, the currently uploaded image is used as a reference image.
[0058] Specifically, in the image upload stage of the BMC BIOS refresh function, the current uploaded image uploaded by the user is received through the BMC's Web interface or other interactive methods, and the current uploaded image of the BIOS is image verified. The verification method can be a verification method in the prior art and is not specifically limited here.
[0059] Further, after confirming that the current uploaded image is normal through verification, it is determined that the current uploaded image is complete and has not been tampered with or damaged, and the current uploaded image is used as a reference image, and the reference image is stored in the first storage space bit by bit, each bit corresponds to an independent storage unit, wherein the first storage space includes multiple storage units, and the storage unit can use a volatile memory or a non-volatile memory, and the specific selection depends on the application scenario and requirements. Exemplarily, the total size of the reference image of the BIOS in the embodiment of the present invention can be 32M.
[0060] Through the above technical solution, by obtaining the current uploaded image during the upload image stage of refreshing the BIOS, and verifying the integrity of the current uploaded image to ensure that it has not been tampered with or damaged, and storing it as a reference image in the first storage space, a verified and reliable reference image is obtained, thereby providing an accurate data basis for subsequent comparative diagnosis and repair operations, ensuring the accuracy of diagnosis and repair.
[0061] In step S103, the to-be-compared bit segments and / or the to-be-compared storage segments are determined, and based on the to-be-compared bit segments and / or the to-be-compared storage segments, the current running image and the reference image are compared to obtain the erroneous image of the abnormal bit segments.
[0062] Among them, in some embodiments, the bit segments to be compared may include at least one of SEC (Security, security stage) bit segments, BDS (Boot Device Selection, boot device selection stage) bit segments, DXE (Driver Execution Environment, driver execution environment stage) bit segments, PEI (Pre-EFI Initialization, pre-EFI initialization stage) bit segments, RT (Runtime, runtime stage) bit segments and AL (Application Loading, application loading stage) bit segments, and the SEC bit segment, BDS bit segment, DXE bit segment, PEI bit segment, RT bit segment and AL bit segment each include at least one bit.
[0063] Specifically, since the data in the BIOS internal storage unit is a partitioned space, it is generally Figure 3 The SEC stage, BDS stage, DXE stage, PEI stage, RT stage and AL stage are shown. Therefore, the BMC stores the SEC bit segment, BDS bit segment, DXE bit segment, PEI bit segment, RT bit segment and AL bit segment by default, but is not limited to this segmentation mode, and displays the name of the bit segment in the external interface designed later for subsequent automatic stage comparison and diagnosis, so as to quickly understand the specific abnormal stage or abnormal segment, which helps R&D personnel to quickly understand the problem and improve the efficiency of problem solving.
[0064] Further, in some embodiments, based on the to-be-compared bit segment and / or the to-be-compared storage segment, the current running image and the reference image are compared to obtain an erroneous image of the abnormal bit segment, including: based on the to-be-compared bit segment and / or the to-be-compared storage segment, determining a first comparison bit segment from the current running image, and determining a second comparison bit segment from the reference image; judging whether the image of the first comparison bit segment is consistent with the image of the second comparison bit segment; if the image of the first comparison bit segment is inconsistent with the image of the second comparison bit segment, treating the first comparison bit segment as the abnormal bit segment, and treating the image of the first comparison bit segment as the erroneous image.
[0065] The bit segments to be compared refer to predefined bit segments in the BIOS image, and the storage segments to be compared refer to custom storage segments manually input through the baseboard management controller interface.
[0066] For example, the above UI interface can be as follows: Figure 4 As shown, the BIOS selection stage at the top of the operation area is designed as a drop-down box, allowing the user to select one of the default SEC bit segments, BDS bit segments, DXE bit segments, PEI bit segments, RT bit segments and AL bit segments to be diagnosed, or to select a complete image (such as 32M) for full comparison. The BMC of the embodiment of the present invention provides bit-level access including but not limited to Redfish or IPMI (Intelligent Platform Management Interface) and other protocols, allowing R&D personnel to read, download or modify specific bits as needed through the interface, and present this interface to users more clearly through the UI interface.
[0067] Furthermore, if Figure 4 As shown, the embodiment of the present invention supports the bit-level comparison diagnosis function. The user can choose to directly compare the preset bit stage, or can choose to customize the input specified storage segment, and compare the correct image when uploading and the image when the startup fails, so as to accurately locate the error bit in the image. Among them, the comparison diagnosis function of the embodiment of the present invention can be implemented by the hardware accelerator or software algorithm in the prior art. If the comparison result is inconsistent, the diagnosis result is "abnormal", indicating that a certain segment of the BIOS image actually running has been tampered with or damaged, and the detected abnormal bit segment needs to be repaired.
[0068] Furthermore, the specific comparison method of the embodiment of the present invention can be to read the first comparison bit segment of the current running image from the second storage space and read the second bit segment from the first storage space according to the bit segment to be compared or the storage segment to be compared. For example, if the "DXE stage" is selected, that is, the bit segment to be compared is the DXE bit segment, then the DXE bit segment (that is, the first bit segment) in the current image is extracted, and the corresponding DXE bit segment (that is, the second bit segment) of the reference image is read from the first storage space to ensure that the ranges of the two bit segments are consistent, and to determine whether the image of the first comparison bit segment is consistent with the image of the second comparison bit segment, and to compare the first comparison bit segment with the second comparison bit segment bit by bit, if the image of the first comparison bit segment is inconsistent with the image of the second comparison bit segment, then the first comparison bit segment is marked as an abnormal bit segment, and the image of the first comparison bit segment is used as an error image.
[0069] In addition, the embodiment of the present invention also supports the download function of the running BIOS image, supports bit-by-bit download or overall download, and the download function can be implemented through a network interface (such as Ethernet) or a local interface (such as USB), which is not specifically limited here.
[0070] Through the above-mentioned technical means, through bit-level access, comparison, and diagnostic functions, it is possible to accurately locate the error bits in the image, improve the accuracy and efficiency of diagnosis, and enable R&D personnel to quickly understand the problem points and improve the efficiency of problem solving.
[0071] Furthermore, in some embodiments, after comparing the current running image with the reference image to obtain the error image of the abnormal bit segment, it also includes: determining the current repair mode of the error image, and determining the target image according to the current repair mode; and repairing the error image by the target image.
[0072] The current repair mode may include a first repair mode and a second repair mode. The first repair mode may be an automatic repair mode, and the second repair mode may be a manual repair mode.
[0073] Therefore, through the online repair function, the diagnosed error bits can be repaired quickly, only the abnormal fragments can be repaired, the system downtime can be reduced, and multiple repair modes can be provided to adapt to different actual situations. Automatic repair is suitable for common and known error types and can quickly solve the problem; manual repair allows users to perform more sophisticated repair operations by uploading new images when facing complex or special problems. This flexibility enables the system to better meet the needs of different users.
[0074] Further, in some embodiments, the current repair mode is the first repair mode, and determining the target image according to the current repair mode includes: extracting a target bit segment corresponding to the abnormal bit segment from the first storage space, and using the image of the target bit segment as the target image.
[0075] Specifically, if Figure 4 As shown, the embodiment of the present invention supports an online repair function, and can automatically or manually repair the error bits of the diagnosed abnormal bit fragments. After comparing the current running image and the reference image to obtain the error image of the abnormal bit fragment, according to the system configuration or user instructions, the current repair mode is determined to be automatic repair (i.e., the first repair mode) or manual repair (i.e., the second repair mode), and the target image is determined according to the current repair mode, so as to repair the error image through the target image.
[0076] Further, if the current repair mode is the first repair mode, the baseboard management controller selects the correct BIOS image that has been stored to repair the abnormal erroneous image according to the comparison bit, that is, extracts the correct bit segment corresponding to the abnormal bit segment in the reference image from the first storage space as the target bit segment, and uses the image of the target bit segment as the target image, and uses the target image to repair the erroneous image of the abnormal bit segment.
[0077] Through the above-mentioned technical means, by determining the current repair mode and determining the target image accordingly, the system can quickly start the repair process. When in automatic repair mode, no human intervention is required, which further speeds up the repair speed and reduces system downtime.
[0078] Further, in some embodiments, the current repair mode is the second repair mode, and the target image is determined according to the current repair mode, including: judging whether a new image uploaded by the user is received; if a new image is received, the new image is used as the target image, otherwise, a reminder instruction is sent to a preset mobile terminal to remind the user to upload a new image.
[0079] Among them, the preset mobile terminal refers to a mobile device used to receive system notifications or reminders, such as a smart phone or other portable information receiving wireless terminal device that can receive notification information and has networking capabilities, and is not specifically limited here.
[0080] Specifically, the web interface of the baseboard management controller or other interactive methods are used to check whether a new image uploaded by the user is received. If a new BIOS image is received, the new BIOS image is used as the target image, and the new BIOS image is used to repair the abnormal error image. If no new image is received, a reminder instruction is sent to a preset mobile terminal to remind the user to upload a new image.
[0081] Therefore, the second repair mode, namely the manual repair mode, gives users more autonomy and choice. Users can choose the most appropriate image for repair according to their own needs and actual conditions, thereby adapting to a wider range of fault scenarios.
[0082] In order to facilitate those skilled in the art to more clearly and intuitively understand the abnormality diagnosis method of the basic input and output system proposed by the present invention, the following is combined with Figure 5 The hardware architecture design involved in the abnormality diagnosis method of the basic input and output system of the present invention is introduced in detail.
[0083] Specifically, if Figure 5 As shown, the user uploads and downloads the BIOS image through the web page of the baseboard management controller on the PC. After receiving the correct BIOS image uploaded by the user, the BMC will store it bit by bit in the space of BIOS 0. Since the basic input and output system can only interact with one device through SPI (Serial Peripheral Interface) at the same time, during the boot phase, the SPI link of the CPU (Central Processing Unit) and BIOS 1 is connected. After the machine crashes more than the preset number of times, the BMC switches the SPI linked to the BIOS, obtains the running image data of the BIOS and stores it bit by bit in the space of BIOS 1. A new diagnostic repair process is added in the BMC to handle the diagnosis, download, and repair logic of the BIOS, and a web page is provided to the customer through the IPMI protocol or the Redfish protocol (including but not limited to the above two protocols). During diagnosis, the BMC processes the data of BIOS 0 and BIOS 1 according to the bits specified by the user to determine whether the specified area is consistent. When downloading and exporting, the baseboard management controller accesses the bit storage data of BIOS 1 and exports the data to the user's PC through Ethernet. In the repair phase, when the repair mode is the automatic repair mode, the BMC refreshes the correct fragment of BIOS 0 into the designated running BIOS 1 through SPI. When the repair mode is the manual repair mode, the baseboard management controller stores the newly uploaded BIOS by the user at the location of BIOS 0, and then refreshes the designated bit fragment into BIOS 1, then switches back the SPI link between the CPU and BIOS, and restarts the computer.
[0084] Therefore, a method for basic input / output system image management, online diagnosis, downloading and repairing based on bit storage proposed in an embodiment of the present invention can realize bit-level storage, online comparative diagnosis, downloading and repairing of basic input / output system images, and significantly improve the efficiency and reliability of basic input / output system management. Through this method, R&D personnel or users can more directly understand the specific situation of the BIOS image when the machine crashes abnormally. The present invention is suitable for scenarios such as servers and data centers that require high reliability and rapid fault recovery, and has broad application prospects.
[0085] In addition, the bit-level download function of the embodiment of the present invention can facilitate R&D personnel to download specified segments, perform basic input and output system debugging and analysis, and improve R&D efficiency.
[0086] According to the method for diagnosing abnormalities of the basic input / output system proposed in the embodiment of the present invention, when the current machine is in a preset abnormal state, the current running image of the basic input / output system of the current machine and the reference image stored in the first storage space are obtained, and the current running image is stored bit by bit in the second storage space, and based on the bit segments to be compared and / or the storage segments to be compared, the current running image and the reference image are compared to obtain the error image of the abnormal bit segment. Thus, the problems of insufficient granularity, low recovery efficiency and inability to effectively collect runtime BIOS images in the prior art in BIOS abnormality diagnosis are solved, and the efficiency and reliability of BIOS fault handling are significantly improved through bit-level storage management and online precise diagnosis.
[0087] Next, the abnormality diagnosis device for a basic input / output system according to an embodiment of the present invention will be described with reference to the accompanying drawings.
[0088] Figure 6 It is a block diagram of an abnormality diagnosis device for a basic input-output system according to an embodiment of the present invention.
[0089] like Figure 6 As shown, the basic input and output system abnormality diagnosis device 10 includes: a judgment module 100, a processing module 200 and a diagnosis module 300.
[0090] Among them, the judgment module 100 is used to judge whether the current machine is in a preset abnormal state; the processing module 200 is used to obtain the current running image of the basic input and output system of the current machine and the reference image stored in the first storage space if the current machine is in the preset abnormal state, and store the current running image bit by bit in the second storage space; the diagnosis module 300 is used to determine the bit fragment to be compared and / or the storage fragment to be compared, and based on the bit fragment to be compared and / or the storage fragment to be compared, compare the current running image and the reference image to obtain the erroneous image of the abnormal bit fragment.
[0091] Further, in some embodiments, after comparing the current running image and the reference image to obtain the erroneous image of the abnormal bit fragment, the diagnosis module 300 is also used to: determine the current repair mode of the erroneous image, and determine the target image according to the current repair mode; and repair the erroneous image through the target image.
[0092] Further, in some embodiments, the current repair mode is the first repair mode, and the diagnosis module 300 is used to: extract a target bit segment corresponding to the abnormal bit segment from the first storage space, and use the mirror of the target bit segment as the target mirror.
[0093] Further, in some embodiments, the current repair mode is the second repair mode, and the diagnostic module 300 is used to: determine whether a new image uploaded by the user is received; if a new image is received, the new image is used as the target image, otherwise, a reminder instruction is sent to a preset mobile terminal to remind the user to upload a new image.
[0094] Furthermore, in some embodiments, the diagnostic module 300 is used to: determine a first comparison bit segment from the current running image and determine a second comparison bit segment from the reference image based on the bit segment to be compared and / or the storage segment to be compared; determine whether the image of the first comparison bit segment is consistent with the image of the second comparison bit segment; if the image of the first comparison bit segment is inconsistent with the image of the second comparison bit segment, treat the first comparison bit segment as an abnormal bit segment and treat the image of the first comparison bit segment as an error image.
[0095] Furthermore, in some embodiments, before obtaining the current running image of the basic input / output system of the current machine and the reference image stored in the first storage space, the processing module 200 is also used to: obtain the number of startup failures of the basic input / output system; if the number of startup failures of the basic input / output system is less than or equal to a preset number, restart the basic input / output system.
[0096] Further, in some embodiments, the processing module 200 is used to: determine whether an image acquisition instruction manually triggered by a user is received; if an image acquisition instruction manually triggered by a user is received, obtain the current running image based on the image acquisition instruction manually triggered by the user; otherwise, when the number of startup failures of the basic input and output system is greater than a preset number, automatically obtain the current running image.
[0097] Furthermore, in some embodiments, before obtaining the current running image of the basic input / output system of the current machine and storing the reference image in the first storage space, the processing module 200 is also used to: obtain the current upload image in the upload image phase of refreshing the basic input / output system; use the current upload image as a reference image and store it in the first storage space.
[0098] Furthermore, in some embodiments, before using the currently uploaded image as a reference image, the processing module 200 is further used to: verify the currently uploaded image, so as to use the currently uploaded image as a reference image when the verification result shows that there is no abnormality.
[0099] Furthermore, in some embodiments, the second storage space includes a plurality of storage units, and the processing module 200 is used to: divide the current running image based on the plurality of storage units, and store the divided current running image bit by bit into the plurality of storage units.
[0100] Further, in some embodiments, the bit segments to be compared include at least one of SEC bit segments, BDS bit segments, DXE bit segments, PEI bit segments, RT bit segments, and AL bit segments.
[0101] Further, in some embodiments, the SEC bit segment, the BDS bit segment, the DXE bit segment, the PEI bit segment, the RT bit segment, and the AL bit segment each include at least one bit.
[0102] It should be noted that the above explanations of the embodiment of the method for diagnosing abnormalities in a basic input-output system are also applicable to the apparatus for diagnosing abnormalities in a basic input-output system of this embodiment, and will not be repeated here.
[0103] According to the abnormal diagnosis device of the basic input / output system proposed in the embodiment of the present invention, when the current machine is in a preset abnormal state, the current running image of the basic input / output system of the current machine and the reference image stored in the first storage space are obtained, and the current running image is stored bit by bit in the second storage space, and based on the bit fragments to be compared and / or the storage fragments to be compared, the current running image and the reference image are compared to obtain the error image of the abnormal bit fragment. Thus, the problems of insufficient granularity, low recovery efficiency and inability to effectively collect runtime BIOS images in the prior art in BIOS abnormal diagnosis are solved, and the efficiency and reliability of BIOS fault processing are significantly improved through bit-level storage management and online precise diagnosis.
[0104] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device may include:
[0105] A memory 701 , a processor 702 , and a computer program stored in the memory 701 and executable on the processor 702 .
[0106] When the processor 702 executes the program, the abnormality diagnosis method of the basic input and output system provided in the above embodiment is implemented.
[0107] Furthermore, the electronic device further comprises:
[0108] The communication interface 703 is used for communication between the memory 701 and the processor 702 .
[0109] The memory 701 is used to store computer programs that can be executed on the processor 702 .
[0110] The memory 701 may include a high-speed RAM (Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.
[0111] If the memory 701, the processor 702 and the communication interface 703 are implemented independently, the communication interface 703, the memory 701 and the processor 702 can be connected to each other through a bus and communicate with each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0112] Optionally, in a specific implementation, if the memory 701, the processor 702 and the communication interface 703 are integrated on a chip, the memory 701, the processor 702 and the communication interface 703 can communicate with each other through an internal interface.
[0113] The processor 702 may be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention.
[0114] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned method for diagnosing abnormalities of a basic input and output system is implemented.
[0115] An embodiment of the present invention further provides a computer program product, including a computer program, which is executed to implement the abnormality diagnosis method of the basic input and output system as described in the above embodiment.
[0116] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0117] The above is a detailed introduction to a basic input-output system abnormality diagnosis method provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, the present invention can also be improved and modified, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A method for diagnosing abnormality of a basic input / output system, characterized in that: The following steps are involved: Determine whether the current machine is in a preset abnormal state; If the current machine is in the preset abnormal state, obtaining a current running image of a basic input / output system of the current machine and a reference image stored in the first storage space, and storing the current running image bit by bit in the second storage space; Determine a to-be-compared bit segment and a to-be-compared storage segment, and compare the current running image with the reference image based on the to-be-compared bit segment and the to-be-compared storage segment to obtain an erroneous image of the abnormal bit segment; Wherein, the step of comparing the current running image with the reference image to obtain the error image of the abnormal bit segment based on the bit segment to be compared and the storage segment to be compared includes: determining a first comparison bit segment from the current running image based on the bit segment to be compared and the storage segment to be compared, and determining a second comparison bit segment from the reference image, and obtaining the error image of the abnormal bit segment according to the first comparison bit segment and the second comparison bit segment; The to-be-aligned bit fragments include at least one of a SEC bit fragment, a BDS bit fragment, a DXE bit fragment, a PEI bit fragment, a RT bit fragment, and an AL bit fragment.
2. The method for diagnosing abnormality of a basic input / output system according to claim 1, characterized in that: After comparing the current running image with the reference image to obtain the erroneous image of the abnormal bit segment, the method further includes: Determine a current repair mode of the erroneous image, and determine a target image according to the current repair mode; The erroneous image is repaired by using the target image.
3. The method for diagnosing abnormality of a basic input / output system according to claim 2, characterized in that: The current repair mode is a first repair mode, and determining a target image according to the current repair mode includes: A target bit segment corresponding to the abnormal bit segment is extracted from the first storage space, and a mirror of the target bit segment is used as the target mirror.
4. The method for diagnosing abnormality of a basic input / output system according to claim 2, characterized in that: The current repair mode is the second repair mode, and determining the target image according to the current repair mode includes: Determine whether a new image uploaded by the user is received; If the new image is received, the new image is used as the target image; otherwise, a reminder instruction is sent to a preset mobile terminal to remind the user to upload the new image.
5. The method for diagnosing abnormality of a basic input / output system according to claim 1, characterized in that: Obtaining an error image of the abnormal bit segment according to the first comparison bit segment and the second comparison bit segment includes: Determining whether the mirror image of the first comparison bit segment is consistent with the mirror image of the second comparison bit segment; If the mirror image of the first comparison bit segment is inconsistent with the mirror image of the second comparison bit segment, the first comparison bit segment is used as the abnormal bit segment, and the mirror image of the first comparison bit segment is used as the error mirror image.
6. The method for diagnosing abnormality of a basic input / output system according to claim 1, characterized in that: Before obtaining the current running image of the basic input / output system of the current machine and storing the reference image in the first storage space, the method further includes: Obtaining the number of startup failures of the basic input and output system; If the number of startup failures of the basic input output system is less than or equal to a preset number, the basic input output system is restarted.
7. The method for diagnosing abnormality of a basic input / output system according to claim 5, characterized in that: The obtaining of the current running image of the basic input and output system of the current machine includes: Determine whether an image acquisition instruction manually triggered by a user is received; If the image acquisition instruction manually triggered by the user is received, the current running image is acquired based on the image acquisition instruction manually triggered by the user; otherwise, when the number of startup failures of the basic input and output system is greater than a preset number, the current running image is automatically acquired.
8. The method for diagnosing abnormality of a basic input / output system according to claim 1, characterized in that: Before obtaining the current running image of the basic input / output system of the current machine and storing the reference image in the first storage space, the method further includes: In the upload image phase of refreshing the basic input / output system, obtaining the current upload image; The currently uploaded image is used as the reference image and stored in the first storage space.
9. The method for diagnosing abnormality of a basic input / output system according to claim 8, characterized in that: Before using the currently uploaded image as the reference image, the method further includes: The currently uploaded image is verified, so that when the verification result is normal, the currently uploaded image is used as the reference image.
10. The method for diagnosing abnormality of a basic input / output system according to claim 1, characterized in that: The second storage space includes a plurality of storage units, and storing the currently running image bit by bit into the second storage space includes: Based on the multiple storage units, the current running image is divided, and the divided current running image is stored bit by bit in the multiple storage units.
11. The method for diagnosing abnormality of a basic input / output system according to claim 1, characterized in that: The SEC bit segment, the BDS bit segment, the DXE bit segment, the PEI bit segment, the RT bit segment, and the AL bit segment each include at least one bit.
12. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the abnormality diagnosis method for a basic input / output system as claimed in any one of claims 1 to 11.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program is executed by a processor to implement the abnormality diagnosis method of a basic input-output system as claimed in any one of claims 1 to 11.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the abnormality diagnosis method of the basic input and output system as claimed in any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Data transmission method and electronic equipment
CN105843712A
BIOS refreshing method, device and equipment and readable storage medium
CN112115481A
Basic input and output system mirror image verification method, device, equipment and medium
CN115048655A