A processing method and device for an external device in a server
By determining the data space mode and firmware program operation mode in the multi-CPU server platform, and deciding whether to run the firmware program based on CPU information, the problem of address conflicts in multiple PCIe devices under Legacy mode is solved, server downtime is avoided, and system maintainability is improved.
Patent Information
- Application Number
- CN202211676885.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-26
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2042-12-26
AI Technical Summary
In the multi-CPU server platform of X86 system, when the number of PCIe devices exceeds 256, the multi-SEGMENT mode cannot be supported under Legacy mode, resulting in duplicate bus/device/function addresses of the external card. When the BIOS calls the Legacy PCI option rom on the external card of CPU1, it cannot confirm whether the accessed external card is on CPU0 or CPU1, resulting in an error.
By determining the data space mode configured by the server for the at least two external devices when the server accesses at least two external devices, and in the multi-data space mode, the operating mode of the firmware program is determined. In the specified operating mode, the CPU information used to process the external device firmware program is determined separately, and if the CPU information indicates that the current CPU is a specified CPU, the firmware program is skipped to avoid server downtime caused by external device address access errors.
It realizes the server downtime caused by errors in external device address access in multi-data space mode, improves the maintainability of the server system, and does not require additional hardware equipment or occupying system resources.
Smart Images

Figure CN115794690B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of servers, and in particular to a processing method and device based on an external device in a server. Background Art
[0002] There are many PCI (Peripheral Component Interconnect, a local bus standard) devices and PCIe (Peripheral Component Interconnect express, a high-speed serial computer expansion bus standard) devices in the server system. In order to implement certain functions or initialize registers, these external devices generally have a built-in firmware program called PCI option rom (a firmware execution program that comes with a PCI / PCIe external card).
[0003] Currently, the program running modes of the X86 system can be divided into Legacy mode (traditional computer running mode) and UEFI (Unified Extensible Firmware Interface) mode. In Legacy mode, the PCI option rom is referred to as Legacy option rom.
[0004] When software in an X86 system reads and writes PCI / PCIe devices, there are two access methods: access based on the hexadecimal addresses CF8 and CFC in I / O (input and output), and access mapped to the memory address space through ECAM (Enhanced Configuration Access Mechanism). When the Legacy PCI optionrom reads and writes PCI / PCIe devices, due to some restrictions, only the first access method can be used, and the first access method can only support a maximum of 256 BUS (computer system buses), that is, it can only support single SEGMENT (data file space) mode, and cannot support multi-SEGMENT mode.
[0005] In a multi-CPU server platform of the X86 system, there are sometimes more than 256 PCIE devices, and the multi-SEGMENT mode needs to be used. Generally, one CPU is divided into one segment, that is, CPU0 is divided into segment0, and CPU1 is divided into segment1. Therefore, the bus / device / function addresses of the external cards of each CPU will be repeated. Therefore, in Legacy mode, when the BIOS (Basic Input Output System) calls the Legacy PCI option rom on the external card of CPU1, it cannot confirm whether the accessed external card is the external card on CPU0 or CPU1, resulting in an error. Summary of the Invention
[0006] In view of the above problems, embodiments of the present application are proposed to provide a processing method and device for external devices in a server that overcome the above problems or at least partially solve the above problems.
[0007] To solve the above problems, embodiments of the present application disclose a processing method for external devices in a server, the method includes:
[0008] When the server accesses at least two external devices, determine the data space mode configured by the server for the at least two external devices;
[0009] When the data space mode is a multi-data space mode, determine the running mode configured by the server for the firmware programs in the at least two external devices; wherein, in the multi-data space mode, each external device is configured with a data space, and the same external device address exists in each data space;
[0010] When the running mode is a specified running mode, respectively determine the CPU information for processing the firmware programs in the at least two external devices, and when the CPU information indicates that the current CPU is the specified CPU, skip running the firmware program to avoid server downtime caused by incorrect access to the external device address.
[0011] Optionally, determining the data space mode configured by the server for the at least two external devices includes:
[0012] Obtain the configuration space value configured by the server for the at least two external devices;
[0013] According to the configuration space value, determine the data space mode configured by the server for the at least two external devices.
[0014] Optionally, according to the configuration space value, determining the data space mode configured by the server for the at least two external devices includes:
[0015] When the configuration space value is greater than a preset value, it is determined that the data space mode configured by the server for at least two external devices is a multi-data space mode;
[0016] When the configuration space value is less than a preset value, it is determined that the data space mode configured by the server for at least two external devices is a single-data space mode.
[0017] Optionally, after determining the data space mode configured by the server for at least two external devices, the method further includes:
[0018] When the data space mode is a single-data space mode, run the firmware program.
[0019] Optionally, after determining the running mode configured by the server for the firmware program in at least two external devices, the method further includes:
[0020] When the running mode is a non-specified running mode, skip running the firmware program.
[0021] Optionally, after respectively determining the CPU information for processing the firmware program in at least two external devices, the method further includes:
[0022] When the CPU information indicates that the current CPU is a non-specified CPU, run the firmware program.
[0023] Optionally, before determining the data space mode configured by the server for at least two external devices, the method further includes:
[0024] Pre-load the firmware program.
[0025] An embodiment of the present application also discloses a processing device based on external devices in a server, and the device includes:
[0026] A data space mode judgment module, configured to determine the data space mode configured by the server for at least two external devices when the server accesses at least two external devices;
[0027] A running mode judgment module, configured to determine the running mode configured by the server for the firmware program in at least two external devices when the data space mode is a multi-data space mode; wherein, in the multi-data space mode, each external device is configured with a data space, and there is the same external device address in each data space;
[0028] The CPU information determination module is used to determine the CPU information for processing the firmware programs in at least two external devices respectively when the operating mode is the specified operating mode, and skip running the firmware programs when the CPU information indicates that the current CPU is the specified CPU, so as to avoid server downtime caused by external device address access errors.
[0029] An embodiment of the present application also discloses an electronic device, which is characterized by including a processor, a memory, and a computer program stored on the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the method for processing external devices in the server as described above.
[0030] An embodiment of the present application also discloses a non-volatile readable storage medium, which is characterized in that a computer program is stored on the non-volatile readable storage medium. When the computer program is executed by the processor, it implements the method for processing external devices in the server as described above.
[0031] The embodiments of the present application have the following advantages:
[0032] In the embodiments of the present application, when at least two external devices are connected to the server, the data space mode configured by the server for the at least two external devices is determined. When the data space mode is the multi-data space mode, the operating mode configured by the server for the firmware programs in the at least two external devices is determined. Among them, in the multi-data space mode, each external device is configured with a data space, and the same external device address exists in each data space. When the operating mode is the specified operating mode, the CPU information for processing the firmware programs in the at least two external devices is determined respectively, and when the CPU information indicates that the current CPU is the specified CPU, the firmware programs are skipped from running, so as to avoid server downtime caused by external device address access errors, realizing a method for processing external devices based on the configuration space and operating mode, avoiding server downtime caused by external device address access errors when running firmware programs in the multi-data space mode, and without the need to provide additional hardware devices or occupy system resources, greatly improving the maintainability of the server system. Description of the Drawings
[0033] Figure 1 is a flowchart of the steps of an embodiment of the method for processing external devices in the server of the present application;
[0034] Figure 2 is a flowchart of the steps of another embodiment of the method for processing external devices in the server of the present application;
[0035] Figure 3 is a flowchart of the steps of another embodiment of the method for processing external devices in the server of the present application;
[0036] Figure 4 is a flowchart of steps of another embodiment of a method for processing an external device in a server according to the present application;
[0037] Figure 5 is a schematic flowchart of a method for processing an external device in a server according to an embodiment of the present application;
[0038] Figure 6 is a structural block diagram of an embodiment of a device for processing an external device in a server according to the present application;
[0039] Figure 7 is a structural block diagram of an electronic device provided by an embodiment of the present application;
[0040] Figure 8 is a structural block diagram of a non - volatile readable storage medium provided by an embodiment of the present application. Detailed implementation manners
[0041] To make the above - mentioned objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below with reference to the accompanying drawings and specific implementation manners.
[0042] Refer to Figure 1 , which shows a flowchart of steps of an embodiment of a method for processing an external device in a server according to the present application. The method may include the following steps:
[0043] Step 101: When at least two external devices are connected to the server, determine the data space mode configured by the server for the at least two external devices.
[0044] When the BIOS of the server is started, if at least two external devices are already connected to the server, determine the data space mode configured by the server for the at least two external devices.
[0045] In some embodiments of the present application, before determining the data space mode configured by the server for the at least two external devices in step 101, the method may further include the following steps:
[0046] Pre - load the firmware program.
[0047] Since at least two external devices are connected to the server, when the BIOS of the server is started, the firmware programs in the connected external devices are pre - loaded, so that there is no need to reload when it is determined that the firmware program needs to be run.
[0048] In some embodiments of the present application, after step 101, the method may further include the following steps:
[0049] When the data space mode is the single data space mode, run the firmware program.
[0050] If the current data space mode is the single data space mode, the external devices are all configured in the same data space. Correspondingly, there is only the external device address of this data space. When running the firmware program, the server will not crash due to incorrect access to the external device address. Therefore, it is determined that the firmware program needs to be run.
[0051] Step 102: When the data space mode is the multi - data space mode, determine the running mode configured by the server for the firmware programs of at least two external devices; wherein, in the multi - data space mode, each external device is configured with a data space, and there are the same external device addresses in each data space.
[0052] If the current data space mode is the multi - data space mode, it is necessary to further determine the running mode configured by the server for the firmware programs of at least two external devices.
[0053] Step 103: When the running mode is the specified running mode, respectively determine the CPU information for processing the firmware programs of at least two external devices, and when the CPU information indicates that the current CPU is the specified CPU, skip running the firmware program to avoid server downtime caused by incorrect access to the external device address.
[0054] If the current running mode is the specified running mode, it is necessary to respectively determine the CPU information for processing the firmware programs of at least two external devices, so as to determine the current CPU indicated by the CPU information.
[0055] Whether it is the specified CPU. If the CPU information indicates that the current CPU is the specified CPU and the firmware program 5 is still continued to run, an access error will occur due to repeated traversal of the external device address. Therefore, it is necessary to skip running the firmware program to avoid server downtime caused by incorrect access to the external device address.
[0056] Among them, the specified running mode is the running mode that can run the firmware program; the specified CPU is the CPU other than the first running CPU.
[0057] In the embodiments of the present application, when at least two external devices are connected to the server, the data space mode configured by the server for the at least two external devices is determined. When the data space mode is a multi-data space mode, the operating mode configured by the server for the firmware program in the at least two external devices is determined. Wherein, in the multi-data space mode, each external device is configured with a data space, and the same external device address exists in each data space. When the operating mode is the specified operating mode, the CPU information for processing the firmware program in the at least two external devices is respectively determined. 5 And when the CPU information indicates that the current CPU is the specified CPU, the firmware program is skipped from running.
[0058] To avoid server downtime caused by incorrect access to the external device address, an external device processing method based on the configuration space and the operating mode is implemented, avoiding server downtime caused by incorrect access to the external device address when running the firmware program in the multi-data space mode, and without the need to provide additional hardware devices or occupy system resources, greatly improving the maintainability of the server system.
[0059] 0 Refer to Figure 2 , showing the step flowchart of another embodiment of the processing method for external devices in the server of the present application. The method may include the following steps:
[0060] Step 201, when at least two external devices are connected to the server, obtain the configuration space value configured by the server for the at least two external devices.
[0061] When starting the BIOS of the server, if at least two external devices are connected to the server, obtain the configuration space value configured by the server for the at least two external devices to determine the data space mode configured by the server for the at least
[0062] two external devices.
[0063] In some embodiments of the present application, before determining the data space mode configured by the server for the at least two external devices in step 201, the method may further include the following steps:
[0064] Pre-load the firmware program.
[0065] Since at least two external devices are connected to the server, when starting the BIOS of the server, the firmware program in the connected external devices will be pre-loaded, so that there is no need to re-load when it is determined that the firmware program needs to be run.
[0066] In some embodiments of the present application, obtaining the configuration space value configured by the server for the at least two external devices in step 201 may include the following sub-steps:
[0067] Sub-step 11: Scan at least two external devices to obtain a scan result.
[0068] When starting the BIOS of the server, scan at least two external devices to obtain a scan result for the external devices.
[0069] Sub-step 12: Determine the configuration space value configured by the server for at least two external devices according to the scan result.
[0070] After obtaining the scan result, since the scan result includes the configuration information of the external devices, the configuration space value configured by the server for at least two external devices can be determined according to the scan result.
[0071] Step 202: Determine the data space mode configured by the server for at least two external devices according to the configuration space value.
[0072] By analyzing the configuration space value, the data space mode configured by the server for at least two external devices can be determined.
[0073] In some embodiments of the present application, step 202 may include the following sub-steps:
[0074] Sub-step 21: When the configuration space value is greater than a preset value, determine that the data space mode configured by the server for at least two external devices is a multi-data space mode.
[0075] The preset value is the maximum memory value occupied by one data space. When the configuration space value is greater than the preset value, it can be determined that there is more than one current data space, and thus it is determined that the data space mode configured by the server for at least two external devices is a multi-data space mode.
[0076] Sub-step 22: When the configuration space value is less than the preset value, determine that the data space mode configured by the server for at least two external devices is a single-data space mode.
[0077] The preset value is the maximum memory value occupied by one data space. When the configuration space value is less than the preset value, it can be determined that there is only one current data space, and thus it is determined that the data space mode configured by the server for at least two external devices is a single-data space mode.
[0078] In some embodiments of the present application, after step 202, the method may further include the following steps:
[0079] When the data space mode is a single-data space mode, run the firmware program.
[0080] If the current data space mode is the single data space mode, the external devices are all configured in the same data space. Correspondingly, there is only the external device address of this data space, and the operation of the firmware program will not cause the server to crash due to incorrect access to the external device address. Therefore, it is determined that the firmware program needs to be run.
[0081] In some embodiments of the present application, the preset value may be 256M.
[0082] Step 203: In the case where the data space mode is the multi-data space mode, determine the operation mode configured by the server for the firmware programs of at least two external devices; wherein, in the multi-data space mode, each external device is configured with a data space, and the same external device address exists in each data space.
[0083] If the current data space mode is the multi-data space mode, it is necessary to further determine the operation mode configured by the server for the firmware programs of at least two external devices.
[0084] Step 204: In the case where the operation mode is the specified operation mode, respectively determine the CPU information for processing the firmware programs of at least two external devices, and in the case where the CPU information indicates that the current CPU is the specified CPU, skip running the firmware program to avoid server crashes caused by incorrect access to the external device address.
[0085] If the current operation mode is the specified operation mode, it is necessary to respectively determine the CPU information for processing the firmware programs of at least two external devices, so as to determine whether the current CPU indicated by the CPU information is the specified CPU. If the CPU information indicates that the current CPU is the specified CPU and the firmware program continues to run, an access error will occur due to repeated traversal of the external device address. Therefore, it is necessary to skip running the firmware program to avoid server crashes caused by incorrect access to the external device address.
[0086] Among them, the specified operation mode is the operation mode that can run the firmware program; the specified CPU is the CPU other than the first running CPU.
[0087] In the embodiments of the present application, when at least two external devices are connected to the server, the data space mode configured by the server for the at least two external devices is determined. When the data space mode is a multi-data space mode, the running mode configured by the server for the firmware programs in the at least two external devices is determined. Among them, in the multi-data space mode, each external device is configured with a data space, and the same external device address exists in each data space. When the running mode is the specified running mode, the CPU information for processing the firmware programs in the at least two external devices is determined respectively. When the CPU information indicates that the current CPU is the specified CPU, the running of the firmware programs is skipped to avoid server downtime caused by incorrect access to the external device address. A method for processing external devices based on the configuration space and running mode is implemented, avoiding server downtime caused by incorrect access to the external device address when running firmware programs in the multi-data space mode, without the need to provide additional hardware devices or occupy system resources, greatly improving the maintainability of the server system.
[0088] Referring to Figure 3 , a flowchart of steps of another embodiment of the method for processing external devices in the server according to the present application is shown. The method may include the following steps:
[0089] Step 301: When at least two external devices are connected to the server, determine the data space mode configured by the server for the at least two external devices.
[0090] When the BIOS of the server is started, if at least two external devices are connected to the server, the data space mode configured by the server for the at least two external devices is determined.
[0091] In some embodiments of the present application, before determining the data space mode configured by the server for the at least two external devices in step 301, the method may further include the following steps:
[0092] Preload the firmware programs.
[0093] Since at least two external devices are connected to the server, when the BIOS of the server is started, the firmware programs in the connected external devices are preloaded, so that there is no need to reload when it is determined that the firmware programs need to be run.
[0094] In some embodiments of the present application, after step 301, the method may further include the following steps:
[0095] When the data space mode is a single data space mode, run the firmware programs.
[0096] If the current data space mode is the single data space mode, the external devices are all configured in the same data space. Correspondingly, there is only the external device address of this data space, and running the firmware program will not cause the server to crash due to incorrect access to the external device address. Therefore, it is determined that the firmware program needs to be run.
[0097] Step 302: In the case where the data space mode is the multi-data space mode, determine the running mode configured by the server for the firmware programs of at least two external devices; wherein, in the multi-data space mode, each external device is configured with one data space, and the same external device address exists in each data space.
[0098] If the current data space mode is the multi-data space mode, it is necessary to further determine the running mode configured by the server for the firmware programs of at least two external devices.
[0099] Step 303: In the case where the running mode is the non-specified running mode, skip running the firmware program.
[0100] The non-specified running mode is a running mode that does not require running the firmware program. If the current running mode is the non-specified running mode, it is necessary to skip running the firmware program.
[0101] Step 304: In the case where the running mode is the specified running mode, respectively determine the CPU information for processing the firmware programs of at least two external devices, and in the case where the CPU information indicates that the current CPU is the specified CPU, skip running the firmware program to avoid the server crashing due to incorrect access to the external device address.
[0102] If the current running mode is the specified running mode, it is necessary to respectively determine the CPU information for processing the firmware programs of at least two external devices, so as to determine whether the current CPU indicated by the CPU information is the specified CPU. If the CPU information indicates that the current CPU is the specified CPU and the firmware program continues to run, an access error will occur due to repeated traversal of the external device address. Therefore, it is necessary to skip running the firmware program to avoid the server crashing due to incorrect access to the external device address.
[0103] Among them, the specified running mode is a running mode that can run the firmware program; the specified CPU is the CPU other than the first running CPU.
[0104] In an embodiment of the present application, when at least two external devices are connected to the server, the data space mode configured by the server for the at least two external devices is determined. When the data space mode is a multi-data space mode, the operating mode configured by the server for the firmware programs in the at least two external devices is determined. Among them, in the multi-data space mode, each external device is configured with a data space, and the same external device address exists in each data space. When the operating mode is a specified operating mode, the CPU information for processing the firmware programs in the at least two external devices is determined respectively. When the CPU information indicates that the current CPU is a specified CPU, the firmware program is skipped to avoid server downtime caused by incorrect access to the external device address. An external device processing method based on the configuration space and the operating mode is implemented, avoiding server downtime caused by incorrect access to the external device address when running the firmware program in the multi-data space mode, without the need to provide additional hardware devices and without occupying system resources, greatly improving the maintainability of the server system.
[0105] Referring to Figure 4 , a step flowchart of another embodiment of the external device processing method based on the server in the present application is shown. The method may include the following steps:
[0106] Step 401, when at least two external devices are connected to the server, determine the data space mode configured by the server for the at least two external devices.
[0107] When the BIOS of the server is started, if at least two external devices are already connected to the server, the data space mode configured by the server for the at least two external devices is determined.
[0108] In some embodiments of the present application, before determining the data space mode configured by the server for the at least two external devices in step 401, the method may further include the following steps:
[0109] Preload the firmware program.
[0110] Since at least two external devices are connected to the server, when the BIOS of the server is started, the firmware programs in the connected external devices are preloaded, so that there is no need to reload when it is determined that the firmware program needs to be run.
[0111] In some embodiments of the present application, after step 401, the method may further include the following steps:
[0112] When the data space mode is a single data space mode, run the firmware program.
[0113] If the current data space mode is the single data space mode, external devices are all configured in the same data space. Correspondingly, there is only the external device address of this data space, and the running of the firmware program will not cause the server to crash due to incorrect access to the external device address. Therefore, it is determined that the firmware program needs to be run.
[0114] Step 402: In the case where the data space mode is the multi - data space mode, determine the running mode configured by the server for the firmware programs of at least two external devices; wherein, in the multi - data space mode, each external device is configured with one data space, and the same external device address exists in each data space.
[0115] If the current data space mode is the multi - data space mode, it is necessary to further determine the running mode configured by the server for the firmware programs of at least two external devices.
[0116] Step 403: In the case where the running mode is the specified running mode, respectively determine the CPU information for processing the firmware programs of at least two external devices, and in the case where the CPU information indicates that the current CPU is the specified CPU, skip running the firmware program to avoid server crashes caused by incorrect access to the external device address.
[0117] If the current running mode is the specified running mode, it is necessary to respectively determine the CPU information for processing the firmware programs of at least two external devices, so as to determine whether the current CPU indicated by the CPU information is the specified CPU. If the CPU information indicates that the current CPU is the specified CPU and the firmware program is still continued to run, access errors will occur due to repeated traversal of the external device address. Therefore, it is necessary to skip running the firmware program to avoid server crashes caused by incorrect access to the external device address.
[0118] Among them, the specified running mode is the running mode that can run the firmware program; the specified CPU is the CPU other than the first running CPU.
[0119] Step 404: In the case where the CPU information indicates that the current CPU is a non - specified CPU, run the firmware program.
[0120] The non - specified CPU is the first running CPU. Therefore, when it is necessary to traverse the external device address, only access the external device address in the data space corresponding to the first running CPU to complete the traversal, and there is no need to access the external device address in the data space corresponding to other CPUs. Therefore, if the CPU information indicates that the current CPU is a non - specified CPU, the firmware program can be run.
[0121] In the embodiments of the present application, when at least two external devices are connected to the server, the data space mode configured by the server for the at least two external devices is determined. When the data space mode is the multi-data space mode, the operation mode configured by the server for the firmware programs in the at least two external devices is determined. Among them, in the multi-data space mode, each external device is configured with a data space, and the same external device address exists in each data space. When the operation mode is the specified operation mode, the CPU information for processing the firmware programs in the at least two external devices is determined respectively. When the CPU information indicates that the current CPU is the specified CPU, the firmware program is skipped to avoid server downtime caused by incorrect access to the external device address. A method for processing external devices based on the configuration space and operation mode is implemented, avoiding server downtime caused by incorrect access to the external device address when the firmware program is running in the multi-data space mode, without the need to provide additional hardware devices or occupy system resources, greatly improving the maintainability of the server system.
[0122] The following describes the step processes involved in the above multiple method embodiments:
[0123] As Figure 5 shown, the method embodiment for processing external devices in the server of the present application may include the following processes:
[0124] 1) The BIOS boots up.
[0125] 2) Scan the external PCIe card devices (i.e., external devices) to obtain the scan results.
[0126] 3) Prepare to load the external card legacy option rom (i.e., firmware program).
[0127] 4) According to the scan results, determine whether the PCI configuration space size option (i.e., configuration space value) is
[0128] greater than 256M. If so, determine that the current is the multi-segment mode (i.e., multi-data space mode), and 5 further determine the startup mode (i.e., the operation mode configured by the server for the firmware programs in the at least two external devices). If not, determine that the current is the single-segment mode (i.e., single-data space mode), and execute the external card legacy option rom.
[0129] 5) Determine whether the startup mode selection option selects the Legacy mode (i.e., specified operation mode).
[0130] 5) Determine whether the startup mode selection option selects the Legacy mode (i.e., specified operation mode).
[0131] If so, further determine whether the current external card is the card connected to CPU1 (i.e., the specified CPU). If not, skip and execute the legacy option rom of this external card.
[0132] 6) Determine whether the current external card is the card connected to CPU1. If so, skip and execute the legacy option rom of this external card. If not, execute the legacy option rom of this external card.
[0133] 7) After executing the legacy option rom of the external card, continue to execute the subsequent other codes of the BIOS.
[0134] It should be noted that for the method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of the present application are not limited by the described action sequences, because according to the embodiments of the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential for the embodiments of the present application.
[0135] Refer to Figure 6 , which shows a structural block diagram of an embodiment of a processing device based on external devices in a server according to an embodiment of the present application. The device may include the following modules:
[0136] The data space mode determination module 601 is used to determine the data space mode configured by the server for at least two external devices when the server accesses at least two external devices.
[0137] In some embodiments of the present application, the device may further include the following modules:
[0138] The firmware program preloading module is used to preload the firmware program.
[0139] In some embodiments of the present application, the data space mode determination module 601 may include the following sub-modules:
[0140] The configuration space value acquisition sub-module is used to acquire the configuration space value configured by the server for at least two external devices when the server accesses at least two external devices.
[0141] In some examples of the present application, the configuration space value acquisition sub-module may include the following units:
[0142] The external device scanning unit is used to scan at least two external devices to obtain a scanning result.
[0143] A configuration space value determination unit, configured to determine, according to a scanning result, a configuration space value configured by the server for at least two external devices.
[0144] A data space judgment sub-module, configured to determine, according to the configuration space value, a data space mode configured by the server for at least two external devices.
[0145] In some examples of this application, the data space judgment sub-module may include the following units:
[0146] A multi-data space mode determination unit, configured to determine that the data space mode configured by the server for at least two external devices is a multi-data space mode when the configuration space value is greater than a preset value.
[0147] A single-data space mode determination unit, configured to determine that the data space mode configured by the server for at least two external devices is a single-data space mode when the configuration space value is less than a preset value.
[0148] In some embodiments of this application, the device may further include the following modules:
[0149] A single-data space operation module, configured to run a firmware program when the data space mode is a single-data space mode.
[0150] An operation mode judgment module 602, configured to determine, when the data space mode is a multi-data space mode, an operation mode configured by the server for the firmware program in at least two external devices; wherein, in the multi-data space mode, each external device is configured with a data space, and there are the same external device addresses in each data space.
[0151] In some embodiments of this application, the device may further include the following modules:
[0152] A non-specified operation mode skipping module, configured to skip running the firmware program when the operation mode is a non-specified operation mode.
[0153] A CPU information determination module 603, configured to, when the operation mode is a specified operation mode, respectively determine the CPU information for processing the firmware program in at least two external devices, and skip running the firmware program when the CPU information indicates that the current CPU is a specified CPU, so as to avoid server downtime caused by incorrect access to the external device address.
[0154] In some embodiments of this application, the device may further include the following modules:
[0155] A non-specified CPU operation module, configured to run the firmware program when the CPU information indicates that the current CPU is a non-specified CPU.
[0156] In the embodiments of the present application, when at least two external devices are connected to the server, the data space mode configured by the server for the at least two external devices is determined. When the data space mode is a multi-data space mode, the operating mode configured by the server for the firmware programs in the at least two external devices is determined. Among them, in the multi-data space mode, each external device is configured with a data space, and the same external device address exists in each data space. When the operating mode is a specified operating mode, the CPU information for processing the firmware programs in the at least two external devices is determined respectively. When the CPU information indicates that the current CPU is the specified CPU, the execution of the firmware programs is skipped to avoid server downtime caused by incorrect access to the external device address, realizing an external device processing method based on the configuration space and operating mode, avoiding server downtime caused by incorrect access to the external device address when running firmware programs in the multi-data space mode, and without the need to provide additional hardware devices or occupy system resources, greatly improving the maintainability of the server system.
[0157] For the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple. For the relevant parts, please refer to the corresponding descriptions in the method embodiments.
[0158] An embodiment of the present application further provides an electronic device, such as Figure 7 , which may include a processor 701, a memory 702, and a computer program stored on the memory 702 and capable of running on the processor 701. When the computer program is executed by the processor 701, it implements the above-mentioned processing method for external devices in the server.
[0159] An embodiment of the present application further provides a non-volatile readable storage medium, such as Figure 8 , and a computer program is stored on the non-volatile readable storage medium 800. When the computer program is executed by the processor, it implements the above-mentioned processing method for external devices in the server.
[0160] The embodiments in this specification are all described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the embodiments, reference can be made to each other.
[0161] Those skilled in the art should understand that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the embodiments of the present application can take the form of completely hardware embodiments, completely software embodiments, or embodiments combining software and hardware aspects. Moreover, the embodiments of the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.
[0162] Embodiments of the present application are described with reference to the flowcharts and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal devices generate means for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks.
[0163] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including instruction means, and the instruction means implement the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks.
[0164] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks.
[0165] Although the preferred embodiments of the embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they know the basic creative concepts. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.
[0166] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or terminal device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising the said element.
[0167] The above has introduced in detail a processing method and device for an external device in a server provided by the present application. Specific examples are used in this text to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A processing method for external devices in a server, characterized in that, the method includes: When the server accesses at least two external devices, determining the data space mode configured by the server for the at least two external devices; When the data space mode is a multi-data space mode, determining the operating mode configured by the server for the firmware programs in the at least two external devices; wherein, in the multi-data space mode, each external device is configured with a data space, and there are the same external device addresses in each data space; When the operating mode is a specified operating mode, respectively determining the CPU information for processing the firmware programs in the at least two external devices, and when the CPU information indicates that the current CPU is a specified CPU, skipping the execution of the firmware programs to avoid the server crashing due to incorrect access to the external device addresses; After determining the operating mode configured by the server for the firmware programs in the at least two external devices, the method further includes: When the operating mode is a non-specified operating mode, skipping the execution of the firmware programs; After respectively determining the CPU information for processing the firmware programs in the at least two external devices, the method further includes: When the CPU information indicates that the current CPU is a non-specified CPU, running the firmware programs.
2. The method according to claim 1, characterized in that, the determining the data space mode configured by the server for the at least two external devices includes: Obtaining the configuration space value configured by the server for the at least two external devices; Determining the data space mode configured by the server for the at least two external devices according to the configuration space value.
3. The method according to claim 2, characterized in that, the determining the data space mode configured by the server for the at least two external devices according to the configuration space value includes: When the configuration space value is greater than a preset value, determining that the data space mode configured by the server for the at least two external devices is a multi-data space mode; When the configuration space value is less than a preset value, determining that the data space mode configured by the server for the at least two external devices is a single-data space mode.
4. The method according to claim 1 or 3, characterized in that, after determining the data space mode configured by the server for the at least two external devices, the method further includes: When the data space mode is a single-data space mode, running the firmware programs.
5. The method according to claim 1, characterized in that, before determining the data space mode configured by the server for the at least two external devices, the method further includes: Preloading the firmware programs.
6. A processing device for external devices in a server, characterized in that, the device includes: A data space mode determination module, configured to determine a data space mode configured by the server for at least two external devices when the server accesses at least two external devices; An operation mode determination module, configured to determine an operation mode configured by the server for a firmware program in at least two external devices when the data space mode is a multi-data space mode; wherein, in the multi-data space mode, each external device is configured with a data space, and there are the same external device addresses in each data space; A CPU information determination module, configured to respectively determine CPU information for processing a firmware program in at least two external devices when the operation mode is a specified operation mode, and skip running the firmware program when the CPU information indicates that the current CPU is a specified CPU, so as to avoid the server crashing due to an incorrect access to the external device address; A non-specified operation mode skipping module, configured to skip running the firmware program when the operation mode is a non-specified operation mode; A non-specified CPU operation module, configured to run the firmware program when the CPU information indicates that the current CPU is a non-specified CPU.
7. An electronic device, characterized in that, it includes a processor, a memory, and a computer program stored on the memory and capable of running on the processor, and when the computer program is executed by the processor, it implements the method according to any one of claims 1 to 5.
8. A non-volatile readable storage medium, characterized in that, a computer program is stored on the non-volatile readable storage medium, and when the computer program is executed by a processor, it implements the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
System and a method for server PCIe equipment to position fault causes
CN109614259A
Server Control Method and Server Control Device
US20150205676A1