Option read-only memory loading method, computer program product, device and medium
By determining the target device and option read-only memory in the basic input and output system, using setting information and watchdog timing detection, controlling the loading process, the problem of long loading time and downtime in the server is solved, and the problem of long loading time and risk of downtime in the server is realized. Faster start-up and higher reliability.
Patent Information
- Application Number
- CN202411149287.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-08-21
AI Technical Summary
In the server, the process of loading the basic input and output system with read-only memory needs to take up memory for a long time and there is a risk of running off, resulting in a downtime. How to reduce this risk is an urgent problem that technicians need to solve.
By determining the target device to be initialized and its option read-only memory, obtaining setting information, detecting whether the option read-only memory is loaded, and operating according to the detection results, using a whitelist to control the loading process, setting the watchdog timing to detect the timeout, and Skip loading in the timeout situation and generate log requests for troubleshooting.
It effectively shortens the startup time of the basic input and output system, reduces the probability of equipment abnormalities causing runaway, reduces the risk of downtime of the basic input and output system, and improves the reliability and maintainability of the server.
Smart Images

Figure CN118672664B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and more particularly to an option read-only memory loading method, a computer program product, a device and a medium. Background Art
[0002] In a server, Option Rom is the firmware used for device initialization and system startup. The Basic Input Output System (BIOS) needs to load Option Rom during the startup process to initialize the corresponding device.
[0003] However, the process of loading the option read-only memory by the BIOS to initialize the device needs to be performed in the memory, and the BIOS is a single-threaded operation. Loading the option read-only memory takes a certain amount of time. When multiple option read-only memories are configured on a server, the startup time of the BIOS will be very long. In addition, when the BIOS loads the option read-only memory, it needs to operate the registers provided by the device firmware. When the device firmware or the device hardware is abnormal, it may cause the BIOS to run away, which in turn manifests as a BIOS crash.
[0004] In summary, how to reduce the downtime risk of the basic input and output system is a problem that needs to be solved urgently by those skilled in the art. Summary of the invention
[0005] The purpose of the present invention is to provide an option read-only memory loading method, which can solve the technical problem of how to reduce the downtime risk of a basic input and output system to a certain extent. The present invention also provides a computer program product, an electronic device and a computer-readable storage medium.
[0006] In order to achieve the above object, the present invention provides the following technical solutions:
[0007] In a first aspect, a method for loading an option read-only memory is provided, which is applied to a basic input and output system, and comprises:
[0008] Determine the target device to be initialized;
[0009] Determining an option read-only memory of the target device;
[0010] Get setting information;
[0011] Detecting whether to load the option read-only memory of the target device according to the setting information, and obtaining a detection result;
[0012] The option read-only memory of the target device is operated according to the detection result.
[0013] On the other hand, the setting information includes a white list recording device information for loading the option read-only memory;
[0014] Detecting whether to load the option read-only memory of the target device according to the setting information, and obtaining a detection result, including:
[0015] Detecting whether there is information of the target device in the whitelist;
[0016] If the whitelist contains information about the target device, obtaining a detection result indicating that the option read-only memory of the target device is loaded;
[0017] If the information of the target device does not exist in the whitelist, a detection result indicating that loading of the option read-only memory of the target device is prohibited is obtained.
[0018] On the other hand, detecting whether the whitelist contains information about the target device includes:
[0019] Generate a device identification of the target device;
[0020] generating location information of the target device;
[0021] Detecting whether the device identification and the location information are both in the whitelist;
[0022] If the device identification and the location information are both in the whitelist, determining that the whitelist contains information about the target device;
[0023] If the device identification and the location information are not both in the white list, it is determined that the information of the target device does not exist in the white list.
[0024] On the other hand, it also includes:
[0025] Obtaining user update information of the setting information;
[0026] The setting information is updated according to the update information.
[0027] On the other hand, obtaining the user's update information of the setting information includes:
[0028] The update information of the setting information by the user is received through the installation setting interface provided by the basic input and output system.
[0029] On the other hand, obtaining the user's update information of the setting information includes:
[0030] Receiving update information of the setting information by a user transmitted by a baseboard management controller;
[0031] The baseboard management controller receives the update information through a network setting interface of the baseboard management controller itself.
[0032] On the other hand, operating the option read-only memory of the target device according to the detection result includes:
[0033] In response to starting to load the option read-only memory of the target device, sending a start signal to a management device, and sending information of the target device to the management device, so that the management device controls the watchdog to start timing;
[0034] In response to the completion of loading the option read-only memory of the target device, a shutdown signal is sent to the management device so that the management device controls the watchdog to end timing, thereby enabling the management device to detect whether the target device has timed out from loading according to the timing duration of the watchdog.
[0035] On the other hand, it also includes:
[0036] Restarting in response to receiving a restart signal sent by the management device;
[0037] The restart signal includes a restart signal generated by the management device after determining that the target device has timed out from loading according to the timing duration of the watchdog.
[0038] On the other hand, before obtaining the setting information, it also includes:
[0039] Acquire timed-out device information, where the timed-out device information includes device information of loading timed-out recorded by the management device;
[0040] Detecting whether the information of the target device is in the timeout device information;
[0041] If the information of the target device is not in the timeout device information, executing the step of obtaining setting information;
[0042] If the information of the target device is in the timeout device information, skipping the loading of the option read-only memory of the target device;
[0043] The clearing condition of the timed device information includes any one of AC power failure and updating the setting information.
[0044] On the other hand, if the information of the target device is after the timeout device information, it also includes:
[0045] Generate a log indicating a timeout in loading the target device;
[0046] Print the log to a serial port, and / or transmit the log to a baseboard management controller to request troubleshooting of the target device.
[0047] On the other hand, sending a start signal to the management device includes:
[0048] Sends an enable signal to a CPLD.
[0049] On the other hand, sending a start signal to the management device includes:
[0050] Sends a start signal to the baseboard management controller.
[0051] In a second aspect, a computer program product is provided, comprising a computer program / instruction, which, when executed by a processor, implements the steps of any of the above-mentioned option read-only memory loading methods.
[0052] According to a third aspect, an electronic device is provided, including:
[0053] Memory for storing computer programs;
[0054] A processor is used to implement the steps of any of the above-mentioned optional read-only memory loading methods when executing the computer program.
[0055] According to a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any of the above-mentioned option read-only memory loading methods are implemented.
[0056] The present invention provides an option read-only memory loading method, which is applied to a basic input / output system, to determine a target device to be initialized; determine the option read-only memory of the target device; obtain setting information; detect whether to load the option read-only memory of the target device according to the setting information, and obtain a detection result; and operate the option read-only memory of the target device according to the detection result. The beneficial effect of the present invention is that the basic input / output system can detect whether to load the option read-only memory of the target device according to the setting information, and operate the option read-only memory of the target device according to the detection result. In this way, the process of loading the option read-only memory of the basic input / output system is controlled by the setting information, and all option read-only memories are no longer loaded, which can shorten the startup time of the basic input / output system, and reduce the probability of the basic input / output system running away due to device abnormality, thereby reducing the risk of downtime of the basic input / output system. The computer program product, electronic device and computer-readable storage medium provided by the present invention also solve the corresponding technical problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0058] Figure 1 A flowchart of an option read-only memory loading method provided by an embodiment of the present invention;
[0059] Figure 2 This is a schematic diagram of the server structure;
[0060] Figure 3 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention;
[0061] Figure 4 Another structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0062] 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.
[0063] See also Figure 1 , Figure 1 The present invention provides a flowchart of an option read-only memory loading method according to an embodiment of the present invention.
[0064] An option read-only memory loading method provided by an embodiment of the present invention is applied to a basic input and output system and may include the following steps:
[0065] Step S101: Determine the target device to be initialized.
[0066] In practical applications, since the option ROM is used by the BIOS to initialize the device, the BIOS may first determine the target device to be initialized so as to decide whether to load the option ROM corresponding to the target device.
[0067] It should be noted that the type of the target device can be flexibly determined according to the application scenario. For example, the target device can be a PCIe (peripheral component interconnect express, a high-speed serial computer expansion bus standard) device, and specifically can be a network card, an NVMe (non-volatile memory express, a non-volatile memory host controller interface specification) disk, an FC (Fibre Channel, Fibre Channel) card, a RAID (Redundant Arrays of Independent Disks, disk array) card, etc. Its type can be flexibly determined according to the application scenario.
[0068] It should also be noted that the structure of the server where the basic input and output system of the present invention is located can be determined as needed, for example, Figure 2 As shown, the basic input and output system is connected to the processor through SPI (Serial Peripheral Interface), the processor is connected to the nvme disk, network card, system disk, SAS (Serial Attached SCSI, serial small computer system interface) card, BMC (Board Management Controller) through PCIe, and the processor is connected to CPLD (Complex Programmable Logic Device) through IIC (Inter-Integrated Circuit, integrated circuit bus), etc.
[0069] Step S102: Determine the option read-only memory of the target device.
[0070] Step S103: Acquire setting information.
[0071] Step S104: Detect whether to load the option read-only memory of the target device according to the setting information, and obtain a detection result.
[0072] Step S105: operating the option read-only memory of the target device according to the detection result.
[0073] In actual applications, after the basic input and output system determines the target device, it can determine the option read-only memory of the target device; then, the setting information is obtained, and the setting information is used to determine whether to load the option read-only memory, and the setting information can only record the option read-only memory that needs to be loaded, so that the option read-only memory that is not in the setting information is not required to be loaded, etc., and the loading or not information of each option read-only memory can also be recorded. In addition, since the option read-only memory is bound to the device, the setting information can also record the information whether to load the device, so as to determine whether to load the corresponding option read-only memory. According to the setting information, whether to load the option read-only memory of the target device is detected, and the detection result is obtained. According to the detection result, the option read-only memory of the target device is operated, that is, in response to the detection result indicating that the option read-only memory of the target device is loaded, the option read-only memory of the target device is loaded; in response to the detection result indicating that the loading of the option read-only memory of the target device is prohibited, the loading of the option read-only memory of the target device is prohibited, that is, the loading of the option read-only memory of the target device is skipped. At this time, BUS (bus) and MMIO (Memory-mapped I / O) resources can still be allocated to the target device.
[0074] It should be noted that whether the option read-only memory of various devices is loaded or not can be determined by the user according to application requirements or the device startup situation. For example, some nvme data disks are only used as data disks and not as system disks. There is no need to load Option Rom for these data disks. Only PCIe enumeration and resource allocation are required. After BIOS boots to OS (operating system), OS loads the corresponding OS driver to drive the nvme data disk. Similarly, some network card devices will not be used in the BIOS startup phase, such as some expandable external network cards. Some server designs will not use external network cards for PXE (Preboot eXecution Environment) startup function, nor will they be used as Wake on Lan interfaces, and there is no need to perform network configuration and connection in BIOS Setup. These external network card devices do not need to load Option Rom.
[0075] It should also be noted that the storage location of the option read-only memory can be flexibly determined according to the application scenario. For example, some Option Roms are stored on the board, while others are stored in the BIOS binary. For example, some network card device firmware contains Option Roms. By scanning the expansion rom register in the PCIe device configuration space, it can be determined whether it contains Option Roms. If so, it is copied to the memory for execution; some network card firmware does not have Option Roms. In order to use certain functions of the network card in the BIOS startup phase, it is necessary to set the Option Rom of the network card model in the buildin of the BIOS code to initialize the network card. Other PCIe devices, such as Nvme devices, FC devices, SAS devices, raid card devices, etc., have corresponding Option Roms that are loaded in the BIOS phase.
[0076] In actual applications, the setting information may include a white list for recording device information for loading option read-only memory, and the setting information may be stored in BIOS flash nvram; accordingly, in the process of detecting whether to load the option read-only memory of the target device according to the setting information, it may be detected whether there is information of the target device in the white list; if there is information of the target device in the white list, a detection result of the option read-only memory indicating that the target device is loaded is obtained; if there is no information of the target device in the white list, a detection result of the option read-only memory indicating that loading the target device is prohibited is obtained. In this way, it is only necessary to record the device information for which the option read-only memory needs to be loaded with the help of the white list, without having to record the information of whether all the option read-only memories are loaded or not, thereby reducing the data volume of the setting information and facilitating the basic input and output system to apply the setting information.
[0077] In a specific application scenario, in the process of detecting whether there is information about the target device in the whitelist, the device identification of the target device can be generated; the location information of the target device can be generated; and whether the device identification and location information are both in the whitelist can be detected; if the device identification and location information are both in the whitelist, it is determined that there is information about the target device in the whitelist; if the device identification and location information are not both in the whitelist, it is determined that there is no information about the target device in the whitelist. That is, the whitelist records the identification information and location information of the device. Only when the device identification and location information are both in the whitelist can it be determined that the information of the target device is in the whitelist, which can improve the accuracy of the device information recorded in the whitelist, so that the loading process of the option read-only memory can be more accurately controlled.
[0078] In a specific application scenario, the device identification information may be composed of the device's vendor identification, device identification, and type identification, and the vendor identification, device identification, and type identification may be obtained through the device's configuration space; the device's location information may be determined by the device's BDF (Bus, Device, Function) number or physical slot, etc. The whitelist may be as shown in Table 1.
[0079] Table 1 Whitelist structure table
[0080]
[0081] In a specific application scenario, in the process of detecting whether there is device information in the whitelist, the manufacturer identifier, device identifier and type identifier of the device can also be converted into corresponding numerical values respectively, and the three numerical values are added to obtain the sum value; the BDF number or physical slot of the device is hashed to obtain a hash value, the sum value is concatenated with the hash value to obtain the device information, and then it is detected whether the device information is in the whitelist. If so, it is determined that the device information is in the whitelist; if not, it is determined that the device information does not exist in the whitelist.
[0082] From this implementation process, it can be seen that the present invention converts the manufacturer identification, device identification and type identification of the device into corresponding numerical values respectively, so as to process the identification information of the device through quantization, and adds the three numerical values to obtain the summed value, so as to unify the manufacturer identification, device identification and type identification together and reduce the amount of information of the device identification; then, the BDF number or physical slot of the device is hash-encoded to obtain a hash value, and the summed value is spliced with the hash value to obtain the device information in digital form, which ensures the uniqueness and validity of the device information while streamlining the amount of device information, so as to facilitate the subsequent rapid application of the device information to detect whether there is corresponding device information in the whitelist.
[0083] In actual applications, as the server runs, the user may need to control the loading process of the option read-only memory. In order to meet this demand of the user, the basic input and output system can also obtain the user's update information on the setting information; and update the setting information according to the update information.
[0084] In a specific application scenario, the basic input / output system can receive the user's update information on the setting information through the installation setting interface provided by the basic input / output system during the process of obtaining the user's update information on the setting information. It can also receive the user's update information on the setting information transmitted by the baseboard management controller; wherein the baseboard management controller receives the update information through the baseboard management controller's own network setting interface, that is, the user first inputs the update information into the baseboard management controller's own network setting interface, and then transmits the update information to the baseboard management controller through the network setting interface, and finally the baseboard management controller transmits the update information to the basic input / output system.
[0085] In actual applications, during the process of loading a single option ROM by the basic input / output system, there is an abnormal loading of this option ROM, which causes the basic input / output system to fall into an infinite loop and affects the loading of other option ROMs. In order to avoid this situation, the loading process of the option ROM can be restricted, that is, during the process of loading the option ROM of the target device, in response to starting to load the option ROM of the target device, an on signal is sent to the management device, and the information of the target device is sent to the management device, so that the management device controls the watchdog to start timing; in response to ending the loading of the option ROM of the target device, a off signal is sent to the management device, so that the management device controls the watchdog to end timing, and then the management device detects whether the target device has timed out according to the timing duration of the watchdog. For example, when the timing duration of the watchdog exceeds 800ms, 1000ms, or 1100ms, the management device determines that the target device has timed out. In this way, during the process of the basic input / output system recording the option read-only memory, the management device can detect whether the device has timed out by using the timing of the watchdog, thereby making statistics on the time-consuming information of the basic input / output system loading the option read-only memory with the help of the management device, thereby completing the statistics of the time-consuming information of the option read-only memory without occupying the performance of the basic input / output system.
[0086] In a specific application scenario, after the management device determines that the target device has timed out from loading based on the watchdog timing, it can generate a restart signal and send it to the basic input and output system. Accordingly, the basic input and output system restarts in response to receiving the restart signal sent by the management device to reload the option read-only memory.
[0087] In a specific application scenario, the management device can also record the device information of the loading timeout to generate the timeout device information for reference by the basic input and output system, that is, the basic input and output system can also obtain the timeout device information before obtaining the setting information. The timeout device information can be stored in the register of the CPLD, etc. The timeout device information includes the device information of the loading timeout recorded by the management device. Correspondingly, if the device has not timed out, the management device can clear the received device information; detect whether the information of the target device is in the timeout device information; if the information of the target device is not in the timeout device information, execute the step of obtaining the setting information; if the information of the target device is in the timeout device information, skip the loading of the option read-only memory of the target device; and the clearing condition of the timeout device information can include any one of AC power failure and updating the setting information, that is, the timeout device information needs to be cleared when the AC power fails, and the timeout device information needs to be cleared when the setting information is updated. In this way, the timeout device information can be updated to avoid the option read-only memory of a certain device from being unable to be loaded.
[0088] From this implementation process, it can be seen that when there is timeout device information, the basic input and output system can first apply the timeout device information to detect whether the loading of the target device has timed out. If it has timed out, the option read-only memory of the target device will not be loaded. If it has not timed out, it will decide whether to load the option read-only memory of the target device according to the setting information. It can also avoid the basic input and output system from loading the option read-only memory of the timed-out target device again, thereby avoiding the basic input and output system from timing out when loading the option read-only memory, further reducing the risk of downtime of the basic input and output system, and improving the reliability and maintainability of the server.
[0089] In a specific application scenario, after the target device information is in the timeout device information, a log representing the timeout of loading the target device can also be generated; the log is printed to the serial port, and / or the log is transmitted to the baseboard management controller to request troubleshooting of the target device, thereby ensuring that the basic input and output system can be booted normally to the OS.
[0090] In specific application scenarios, the type of management device can be flexibly determined as needed. For example, in the process of sending an enable signal to the management device, the enable signal can be sent to a complex programmable logic device, or sent to a baseboard management controller, etc.
[0091] The invention provides an option read-only memory loading method, which is applied to a basic input / output system, and determines a target device to be initialized; determines the option read-only memory of the target device; obtains setting information; detects whether to load the option read-only memory of the target device according to the setting information, and obtains a detection result; and operates the option read-only memory of the target device according to the detection result. The beneficial effect of the invention is that the basic input / output system can detect whether to load the option read-only memory of the target device according to the setting information, and operates the option read-only memory of the target device according to the detection result. In this way, the process of loading the option read-only memory of the basic input / output system is controlled by the setting information, and all the option read-only memories are no longer loaded, which can shorten the startup time of the basic input / output system, and can reduce the probability of the basic input / output system running away due to device abnormality, thereby reducing the downtime risk of the basic input / output system.
[0092] Based on the above embodiment, the present invention further provides an option read-only memory loading system, which is applied to a basic input and output system and may include:
[0093] A first determining module, used to determine a target device to be initialized;
[0094] A second determination module, used for determining an option read-only memory of a target device;
[0095] A first acquisition module, used to acquire setting information;
[0096] A first detection module is used to detect whether the option read-only memory of the target device is loaded according to the setting information, and obtain a detection result;
[0097] The first processing module is used to operate the option read-only memory of the target device according to the detection result.
[0098] The description of the corresponding modules in the option read-only memory loading system provided by the embodiment of the present invention can be found in the above embodiment, which will not be repeated here.
[0099] The present invention also provides an electronic device and a computer-readable storage medium, both of which have the corresponding effects of the option read-only memory loading method provided in the embodiment of the present invention. Figure 3 , Figure 3 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.
[0100] An electronic device provided by an embodiment of the present invention includes a memory 201 and a processor 202. The memory 201 stores a computer program. When the processor 202 executes the computer program, the steps of the option read-only memory loading method described in any of the above embodiments are implemented.
[0101] See also Figure 4 Another electronic device provided in an embodiment of the present invention may also include: an input port 203 connected to the processor 202, used to transmit commands input from the outside to the processor 202; a display unit 204 connected to the processor 202, used to display the processing results of the processor 202 to the outside; a communication module 205 connected to the processor 202, used to realize communication between the electronic device and the outside. The display unit 204 can be a display panel, a laser scanning display, etc.; the communication method adopted by the communication module 205 includes but is not limited to mobile high-definition link technology (Mobile High-Definition Link, MHL), Universal Serial Bus (Universal Serial Bus, USB), High-Definition Multimedia Interface (High-Definition Multimedia Interface, HDMI), wireless connection: wireless fidelity technology (WIreless Fidelity, WiFi), Bluetooth communication technology, low-power Bluetooth communication technology, and communication technology based on IEEE802.11s.
[0102] An embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the option read-only memory loading method described in any of the above embodiments are implemented.
[0103] The computer-readable storage medium involved in the present invention includes random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM (Compact Disc Read-Only Memory), or any other form of storage medium known in the technical field.
[0104] A computer program product provided by an embodiment of the present invention includes a computer program / instruction. When the computer program / instruction is executed by a processor, the following steps are implemented:
[0105] Determine the target device to be initialized;
[0106] Determine the target device's option read-only memory;
[0107] Get setting information;
[0108] Detecting whether to load the option read-only memory of the target device according to the setting information, and obtaining the detection result;
[0109] The option read-only memory of the target device is operated according to the detection result.
[0110] A computer program product provided by an embodiment of the present invention includes a computer program / instruction, which implements the following steps when executed by a processor: setting information including a white list that records device information for loading an option read-only memory; detecting whether there is information of a target device in the white list; if there is information of the target device in the white list, obtaining a detection result of the option read-only memory that indicates that the target device is loaded; if there is no information of the target device in the white list, obtaining a detection result of the option read-only memory that indicates that loading the target device is prohibited.
[0111] A computer program product provided by an embodiment of the present invention includes a computer program / instruction, which implements the following steps when executed by a processor: generating a device identification of a target device; generating location information of the target device; detecting whether the device identification and location information are both in a whitelist; if the device identification and location information are both in the whitelist, determining that there is information about the target device in the whitelist; if the device identification and location information are not both in the whitelist, determining that there is no information about the target device in the whitelist.
[0112] A computer program product provided by an embodiment of the present invention includes a computer program / instruction. When the computer program / instruction is executed by a processor, the following steps are implemented: obtaining update information of setting information by a user; and updating the setting information according to the update information.
[0113] A computer program product provided by an embodiment of the present invention includes a computer program / instruction. When the computer program / instruction is executed by a processor, the following steps are implemented: receiving update information of setting information by a user through an installation setting interface provided by a basic input and output system.
[0114] A computer program product provided by an embodiment of the present invention includes a computer program / instruction, which implements the following steps when executed by a processor: receiving user update information on setting information transmitted by a baseboard management controller; wherein the baseboard management controller receives the update information through the baseboard management controller's own network setting interface.
[0115] A computer program product provided by an embodiment of the present invention includes a computer program / instruction, which implements the following steps when executed by a processor: in response to starting to load the option read-only memory of a target device, sending an on signal to a management device, and sending information of the target device to the management device, so that the management device controls the watchdog to start timing; in response to ending loading the option read-only memory of the target device, sending a off signal to the management device, so that the management device controls the watchdog to end timing, and then the management device detects whether the target device has timed out from loading according to the timing duration of the watchdog.
[0116] A computer program product provided by an embodiment of the present invention includes a computer program / instruction, which implements the following steps when executed by a processor: restarting in response to receiving a restart signal sent by a management device; wherein the restart signal includes a restart signal generated by the management device after determining that the target device has timed out from loading based on the timing duration of a watchdog.
[0117] A computer program product provided by an embodiment of the present invention includes a computer program / instruction, which implements the following steps when executed by a processor: before obtaining setting information, obtaining timeout device information, the timeout device information includes device information of loading timeout recorded by a management device; detecting whether the information of a target device is in the timeout device information; if the information of the target device is not in the timeout device information, executing the step of obtaining setting information; if the information of the target device is in the timeout device information, skipping the loading of an option read-only memory of the target device; wherein a condition for clearing the timeout device information includes the establishment of any one of AC power failure and updating the setting information.
[0118] A computer program product provided by an embodiment of the present invention includes a computer program / instruction, which implements the following steps when executed by a processor: if the information of the target device is after the timeout device information, generate a log indicating the timeout of loading the target device; print the log to a serial port, and / or transmit the log to a baseboard management controller to request fault repair of the target device.
[0119] A computer program product provided by an embodiment of the present invention includes a computer program / instruction. When the computer program / instruction is executed by a processor, the following steps are implemented: sending an enable signal to a complex programmable logic device.
[0120] A computer program product provided by an embodiment of the present invention includes a computer program / instruction. When the computer program / instruction is executed by a processor, the following steps are implemented: sending an enable signal to a baseboard management controller.
[0121] For the description of the relevant parts of the option read-only memory loading system, electronic device, computer-readable storage medium, and computer program product provided by the embodiment of the present invention, please refer to the detailed description of the corresponding parts in the option read-only memory loading method provided by the embodiment of the present invention, which will not be repeated here. In addition, the parts of the above technical solutions provided by the embodiment of the present invention that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive elaboration.
[0122] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, 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 other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0123] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An option ROM loading method, It is characterized in that Applicable to basic input and output systems, including: Determine the target device to be initialized; Determining an option read-only memory of the target device; Get setting information; Detecting whether to load the option read-only memory of the target device according to the setting information, and obtaining a detection result; operating the option read-only memory of the target device according to the detection result; Wherein, the setting information includes a white list recording device information of the loading option read-only memory; Detecting whether to load the option read-only memory of the target device according to the setting information, and obtaining a detection result, including: Generate a device identification of the target device, where the identification information of the device consists of a manufacturer identification, a device identification, and a type identification of the device, and the manufacturer identification, the device identification, and the type identification are obtained through a configuration space of the device; Generate location information of the target device, where the location information of the device is determined by the BDF number or physical slot of the device; The manufacturer identifier, device identifier and type identifier of the device are respectively converted into corresponding numerical values, and the three numerical values are added to obtain a sum value; Hash the BDF number or physical slot of the device to obtain a hash value, and concatenate the sum value with the hash value to obtain the device information; Check whether the device information is in the whitelist; If yes, then obtaining a detection result representing loading the option read-only memory of the target device; If not, obtaining a detection result indicating that loading of the option read-only memory of the target device is prohibited; The step of operating the option read-only memory of the target device according to the detection result includes: In response to starting to load the option read-only memory of the target device, sending a start signal to a management device, and sending information of the target device to the management device, so that the management device controls the watchdog to start timing; the management device includes a complex programmable logic device; In response to the completion of loading the option read-only memory of the target device, sending a shutdown signal to the management device, so that the management device controls the watchdog to end timing, and then the management device detects whether the loading of the target device has timed out according to the timing duration of the watchdog; Restarting in response to receiving a restart signal sent by the management device; The restart signal includes a restart signal generated by the management device after determining that the target device has timed out from loading according to the timing duration of the watchdog.
2. The option ROM loading method according to claim 1, It is characterized in that Also includes: Obtaining update information of the setting information by the user; The setting information is updated according to the update information.
3. The option ROM loading method according to claim 2, It is characterized in that Obtaining the user's update information for the setting information, including: The update information of the setting information by the user is received through the installation setting interface provided by the basic input and output system.
4. The option ROM loading method according to claim 3, It is characterized in that Obtaining the user's update information for the setting information, including: Receiving update information of the setting information by a user transmitted by a baseboard management controller; The baseboard management controller receives the update information through a network setting interface of the baseboard management controller itself.
5. The option ROM loading method according to claim 1, It is characterized in that Before getting the setting information, it also includes: Acquire timed-out device information, where the timed-out device information includes device information of loading timed-out recorded by the management device; Detecting whether the information of the target device is in the timeout device information; If the information of the target device is not in the timeout device information, executing the step of obtaining setting information; If the information of the target device is in the timeout device information, skipping the loading of the option read-only memory of the target device; The clearing condition of the timed device information includes any one of AC power failure and updating the setting information.
6. The option ROM loading method according to claim 5, It is characterized in that If the information of the target device is after the timeout device information, it also includes: Generate a log indicating a timeout in loading the target device; Print the log to a serial port, and / or transmit the log to a baseboard management controller to request troubleshooting of the target device.
7. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instruction is executed by a processor, the steps of the option read-only memory loading method according to any one of claims 1 to 6 are implemented.
8. An electronic device, It is characterized in that include: Memory for storing computer programs; A processor, configured to implement the steps of the option read-only memory loading method according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the option read-only memory loading method according to any one of claims 1 to 6 are implemented.
