Firmware file configuration method and device, storage medium and electronic equipment
The firmware file of the protocol switch is configured through the substrate management controller, which solves the problem of inflexible configuration of CPU mounted hard disks, and realizes flexible adjustment and adaptability to hardware, improving the adaptability and data security of equipment.
Patent Information
- Application Number
- CN202411132365.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-08-16
AI Technical Summary
In the prior art, the configuration of the hard disk mounted by the CPU is inflexible and cannot be adjusted according to different scenarios, resulting in a lack of flexibility and general applicability under actual needs.
The protocol switch uses firmware files through the Baseboard Management Controller (BMC) configuration to realize the mapping relationship between the uplink port and the downlink port, allowing different firmware files to be switched to meet the needs of different scenarios, and flexibly adjust the hardware configuration of the CPU mounted.
It realizes flexible configuration of CPU mounted hard disk, improves hardware adaptability and flexibility, avoids the need for hardware device changes, and ensures the device's data security and topological relationship stability.
Smart Images

Figure CN119088295A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computers, and more specifically, to a method and device for configuring a firmware file, a storage medium, and an electronic device. Background Art
[0002] With the development of technology, large-capacity storage has become a necessary requirement for servers, and it is becoming more and more common for a single server to be equipped with more than a dozen Non-Volatile Memory Express (NVME) hard disks. In general, NVME hard disks will be directly connected to the port of the central processing unit (CPU), first using the port resources of CPU0 and then the port resources of CPU1. The order of NVME hard disks is also from left to right and from top to bottom.
[0003] However, in the related art, different wiring processes or installation processes need to be provided to meet the actual needs in different scenarios. In the hardware design process, the relationship between the corresponding NVME hard disks mounted on different ports of the CPU has been configured. Once the wiring is completed according to this configuration method, the configuration relationship cannot be changed later, and the flexibility and versatility are poor.
[0004] With regard to the problem in related technologies that the hard disk mounted on the CPU cannot be flexibly configured, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a method and device for configuring a firmware file, a storage medium, and an electronic device, so as to at least solve the problem that a hard disk mounted on a CPU cannot be flexibly configured.
[0006] According to an embodiment of the present application, a method for configuring a firmware file is provided, comprising: configuring a firmware file used by a protocol switch through a baseboard management controller BMC; wherein the protocol switch is used to implement the port expansion function of a target protocol, the protocol switch has N upstream ports and M downstream ports, the firmware file contains a mapping relationship between the upstream ports and the downstream ports, the upstream port is connected to a central processing unit, and the downstream port is used to mount a hard disk that communicates using the target protocol, and N and M are both positive integers greater than or equal to 2.
[0007] In an exemplary embodiment, configuring the firmware file used by the protocol switch through the baseboard management controller BMC includes: writing a first firmware file into a first flash memory through the BMC, wherein the firmware file includes the first firmware file, and the first firmware file has a first mapping relationship between the upstream port and the downstream port; sending first indication information to a programmable device through the BMC, wherein the first indication information is used to instruct the programmable device to switch the serial peripheral interface SPI bus channel of the protocol switch to the first flash memory; after the serial peripheral interface SPI bus channel of the protocol switch is switched to the first flash memory, the protocol switch uses the first firmware file in the first flash memory.
[0008] In an exemplary embodiment, the method further includes: after configuring the protocol switch to use the first firmware file through the BMC, in the case where the first fault information is obtained through the BMC, determining whether the protocol switch is currently using a damaged firmware file, wherein the first fault information is used to indicate that the first firmware file is damaged, and the first fault information is information sent to the BMC through a programmable device when the protocol switch determines that the first firmware file is damaged, and the firmware file includes the first firmware file, and the first firmware file has a first mapping relationship between the upstream port and the downstream port; in the case where it is determined that the protocol switch is not currently using the damaged firmware file, obtaining a second undamaged firmware file currently used by the protocol switch through the BMC, wherein the protocol When the switch determines that the first firmware file is damaged, the switch sends second indication information to the programmable device, where the second indication information is used to instruct the programmable device to switch the SPI bus channel of the protocol switch to the second flash memory, where the second flash memory stores the preset second firmware file, and after the SPI bus channel of the protocol switch is switched to the second flash memory, the protocol switch uses the second firmware file in the second flash memory, where the second firmware file has a second mapping relationship between the upstream port and the downstream port; when it is determined that the protocol switch currently uses a damaged firmware file, the BMC is used to instruct the protocol switch to use a third firmware file, where the firmware files include the third firmware file, and the third firmware file has a third mapping relationship between the upstream port and the downstream port.
[0009] In an exemplary embodiment, determining whether the protocol switch is currently using a damaged firmware file includes: determining that the protocol switch is currently using a damaged firmware file when second fault information is received through the BMC within a preset time; and determining that the protocol switch is not currently using a damaged firmware file when the second fault information is not received through the BMC within a preset time; wherein the second fault information is used to indicate that the second firmware file is damaged, and the second fault information is information sent to the BMC through the programmable device when the protocol switch determines that the second firmware file is damaged.
[0010] In an exemplary embodiment, the method further includes: after using the first firmware file through the BMC configuration protocol switch, sending the first firmware file to a backplane programmable device corresponding to a backplane connected to the protocol switch; wherein the backplane is provided with a hard disk that communicates using the target protocol, and the backplane programmable device determines the hard disk corresponding to the virtual port pin VPP address sent by the central processor based on the first firmware file.
[0011] In an exemplary embodiment, when M is equal to 4 and each downstream port allows mounting 4 hard disks that communicate using the target protocol, any four adjacent hard disk slots among the 16 hard disk slots connected to the protocol switch are respectively mapped to 4 different downstream ports.
[0012] In an exemplary embodiment, configuring the firmware file used by the protocol switch through the baseboard management controller BMC includes: configuring P firmware files used by P protocol switches through the BMC; wherein each of the P protocol switches is connected to Z central processing units, P is an integer greater than or equal to 1, Z is an integer greater than or equal to 0 and less than or equal to N, and the P firmware files contain a target firmware file and a specified firmware file, the target firmware file is a firmware file corresponding to the target protocol switch, the specified firmware file is a firmware file corresponding to the specified protocol switch, the target firmware file and the specified firmware file have a mapping relationship between a target downstream port in the target protocol switch and a specified upstream port in the specified protocol switch, the P protocol switches include the target protocol switch and the specified protocol switch, the downstream port in the target protocol switch includes the target downstream port, the target downstream port does not directly mount a hard disk, and the upstream port in the specified protocol switch includes the specified upstream port, and the specified upstream port is not connected to the central processing unit.
[0013] According to another embodiment of the embodiment of the present application, a firmware file configuration device is also provided, including: a configuration module, used to configure the firmware file used by the protocol switch through the baseboard management controller BMC; wherein the protocol switch is used to implement the port expansion function of the target protocol, the protocol switch has N upstream ports and M downstream ports, the firmware file has a mapping relationship between the upstream port and the downstream port, the upstream port is connected to the central processing unit, and the downstream port is used to mount a hard disk that uses the target protocol for communication, and N and M are both positive integers greater than or equal to 2.
[0014] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
[0015] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0016] According to another embodiment of the present application, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0017] Through this application, the baseboard management controller BMC is used to configure the firmware file used by the protocol switch. Since the firmware file reflects the mapping relationship between the upstream port and the downstream port of the protocol switch, the hardware mounted on the CPU can be flexibly adjusted by configuring the firmware file, thereby solving the problem of not being able to flexibly configure the hard disk mounted on the CPU. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 It is a hardware structure block diagram of a server device according to a method for configuring a firmware file in an embodiment of the present application;
[0020] Figure 2 is a flowchart of a method for configuring a firmware file according to an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of an optional hard disk configuration according to an embodiment of the present application;
[0022] Figure 4 is a schematic diagram of an optional hard disk architecture according to an embodiment of the present application;
[0023] Figure 5 is a schematic diagram of a partition mode of an optional protocol switch according to an embodiment of the present application;
[0024] Figure 6 is a schematic diagram of a topological structure of an optional protocol switch according to an embodiment of the present application;
[0025] Figure 7 is a schematic diagram of a topology of an optional protocol switch according to an embodiment of the present application;
[0026] Figure 8 This is a schematic diagram of an optional topology between two protocol switches according to an embodiment of the present application;
[0027] Fig. 9 is a schematic diagram of an optional topology between four protocol switches according to an embodiment of the present application;
[0028] Fig.10 is a structural block diagram of a firmware file configuration device according to an embodiment of the present application;
[0029] Fig.11 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0032] The firmware file configuration method embodiment provided in the embodiment of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a server device of a firmware file configuration method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0033] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the configuration method of the firmware file in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0034] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0035] In order to solve the above problems existing in the related art, a configuration method of a firmware file is provided in this embodiment, and its execution subject includes but is not limited to a baseboard management controller (Baseboard Management Controller, referred to as BMC), such as Figure 2 As shown, the process includes the following step S202:
[0036] Step S202: configuring a firmware file used by a protocol switch through a baseboard management controller BMC; wherein the protocol switch is used to implement an expansion function of a port of a target protocol, the protocol switch has N upstream ports and M downstream ports, the firmware file contains a mapping relationship between the upstream ports and the downstream ports, the upstream port is connected to a central processing unit, the downstream port is used to mount a hard disk that communicates using the target protocol, and N and M are both positive integers greater than or equal to 2.
[0037] Optionally, the protocol switch is a PCIE switch (Switch), the target protocol is a Peripheral Component Interconnect Express (PCIE) protocol, and the hard disk for communication is an NVME hard disk.
[0038] It should be noted that, in the present embodiment, the PCIE switch opens the partition mode, that is, a physical PCIE switch can be used as two virtual PCIE switches, for example, a PCIE switch with 6 ports can have two uplink ports, and the two uplink ports can be respectively connected to two different hosts (i.e., CPUs), then the four backplanes hanging under the PCIE switch, two of which are used as NVME hard disk slots for CPU0, and the other two backplanes can be used as NVME hard disk slots for CPU1. In addition, the remaining 4 downlink ports of the 6 ports can be attached to any uplink port, that is, downlink port 2 and downlink port 3 can be used as the downlink of uplink port 0, or as the downlink of uplink port 1, wherein the downlink port 2 and downlink port 3 are used as the downlink of uplink port 0, i.e., an optional mapping relationship between uplink ports and downlink ports.
[0039] In the above steps, the baseboard management controller BMC is used to configure the firmware file used by the protocol switch. Since the firmware file reflects the mapping relationship between the upstream port and the downstream port of the protocol switch, the hardware mounted on the CPU can be flexibly adjusted by configuring the firmware file, thereby solving the problem of being unable to flexibly configure the hard disk mounted on the CPU.
[0040] In an exemplary embodiment, the firmware file used by the protocol switch configured by the baseboard management controller BMC can be implemented by the following steps S11-S12:
[0041] Step S11: writing a first firmware file into a first flash memory through the BMC, wherein the firmware file includes the first firmware file, and the first firmware file has a first mapping relationship between the upstream port and the downstream port;
[0042] Optionally, refer to Figure 6 A protocol switch has multiple flash memories, such as a first flash memory and a second flash memory, each of which stores a firmware file of the protocol switch, wherein the BMC can modify the firmware file of the first flash memory through a serial peripheral interface (SPI) bus.
[0043] Step S12: Sending first indication information to the programmable device through the BMC, wherein the first indication information is used to instruct the programmable device to switch the serial peripheral interface SPI bus channel of the protocol switch to the first flash memory; after the serial peripheral interface SPI bus channel of the protocol switch is switched to the first flash memory, the protocol switch uses the first firmware file in the first flash memory.
[0044] Optionally, the programmable device includes, but is not limited to: a complex programmable logic device (Complex Programmable Logic Device, referred to as CPLD) and a field programmable gate array (Field-Programmable Gate Array, referred to as FPGA).
[0045] Optionally, refer to Figure 6 There are two flash memories (Flash) in the protocol switch, namely the first flash memory and the second flash memory, wherein the second flash memory is the default flash memory, the BMC sends the first indication information to the programmable device through the serial communication bus (Inter-Integrated Circuit, referred to as I2C), and the programmable device switches the serial peripheral interface SPI bus channel of the protocol switch to the first flash memory through the SPI switching circuit.
[0046] It should be noted that, through the above steps, the first indication information is sent to the programmable device through the BMC, so that the protocol switch uses firmware files in different flash memories, thereby meeting the requirements in different scenarios, improving the flexibility of configuring firmware files, and eliminating the need to modify the hardware device.
[0047] In an exemplary embodiment, the method further comprises the following steps S21-S23:
[0048] Step S21: after configuring the protocol switch to use the first firmware file through the BMC, in the case where the first fault information is obtained through the BMC, determining whether the protocol switch is currently using a damaged firmware file, wherein the first fault information is used to indicate that the first firmware file is damaged, and the first fault information is information sent to the BMC through a programmable device when the protocol switch determines that the first firmware file is damaged, and the firmware file includes the first firmware file, and the first firmware file has a first mapping relationship between the upstream port and the downstream port;
[0049] Step S22: when it is determined that the protocol switch is not currently using a damaged firmware file, obtaining, through the BMC, a second firmware file that is not damaged and currently used by the protocol switch, wherein, when the protocol switch determines that the first firmware file is damaged, second indication information is sent to the programmable device, the second indication information being used to instruct the programmable device to switch the SPI bus channel of the protocol switch to a second flash memory, the second flash memory storing a preset second firmware file, and after the SPI bus channel of the protocol switch is switched to the second flash memory, the protocol switch uses the second firmware file in the second flash memory, the second firmware file having a second mapping relationship between the upstream port and the downstream port;
[0050] Optionally, refer to Figure 6 When the first firmware file stored in the first flash memory is damaged, the BMC instructs the programmable device to switch to the second flash memory through the SPI switching circuit, wherein the second firmware file in the second flash memory stores a second mapping relationship between the default upstream port and the downstream port written in advance.
[0051] It should be noted that the BMC instructs the programmable device to switch the SPI bus channel of the protocol switch to the second flash memory in a timely manner, so as to use the second firmware file in the second flash memory to ensure that the topological relationship between the upstream port and the downstream port remains stable, avoid data loss, and protect the data security of the device.
[0052] Step S23: after determining that the protocol switch currently uses a damaged firmware file, instruct the protocol switch to use a third firmware file through the BMC, wherein the firmware file includes the third firmware file, and the third firmware file has a third mapping relationship between the uplink port and the downlink port.
[0053] Optionally, refer to Figure 6When the second firmware file is also damaged, the third firmware file can be written to the first flash memory through the BMC to overwrite the damaged first firmware file. After the third firmware file is written to the first flash memory through the BMC, the programmable device will switch the SPI bus channel of the protocol switch to the first flash memory through the SPI switching circuit.
[0054] Optionally, a third indication message is sent to the programmable device through the BMC, wherein the third indication message is used to instruct the programmable device to switch the serial peripheral interface SPI bus channel of the protocol switch to the first flash memory; after the serial peripheral interface SPI bus channel of the protocol switch is switched to the first flash memory, the protocol switch uses the third firmware file in the first flash memory.
[0055] In an exemplary embodiment, the above-mentioned determination of whether the protocol switch currently uses a damaged firmware file includes the following steps S31-S32:
[0056] Step S31: when the second fault information is received by the BMC within a preset time, determining that the protocol switch currently uses a damaged firmware file;
[0057] It should be noted that the second fault information is information sent by the protocol switch to the BMC through the programmable device after the BMC receives the first fault information.
[0058] That is, when the BMC receives the second fault information within the preset time, it means that when the first firmware file is damaged, the second firmware file is also damaged.
[0059] Step S32: when the second fault information is not received by the BMC within a preset time, determining that the protocol switch is not currently using a damaged firmware file; wherein the second fault information is used to indicate that the second firmware file is damaged, and the second fault information is information sent to the BMC through the programmable device when the protocol switch determines that the second firmware file is damaged.
[0060] It should be noted that, through the above steps, it is possible to quickly and accurately determine whether the protocol switch uses a damaged firmware file, thereby ensuring the security of device data.
[0061] In an exemplary embodiment, the method further includes the following steps: after using the first firmware file through the BMC configuration protocol switch, sending the first firmware file to a backplane programmable device corresponding to a backplane connected to the protocol switch; wherein the backplane is provided with a hard disk that communicates using the target protocol, and the backplane programmable device determines the hard disk corresponding to the virtual port pin VPP address sent by the central processor based on the first firmware file.
[0062] Optionally, refer to Figure 6 , four backplanes are mounted with sixteen NVME hard disks, and each backplane is provided with four NVME hard disks. The BMC sends the first firmware file to the backplane programmable devices corresponding to the four backplanes through I2C. The four backplanes can determine the hard disk corresponding to the virtual port pin address sent by the central processor through the first firmware file, and then determine whether to light up the NVME hard disks set for each of them.
[0063] It should be noted that by having BMC participate in the address setting of the virtual port pin VPP, the address confusion caused by the lighting of the NVME hard disk in the adjustment of the topology structure can be corrected, wherein the lighting is used to indicate the working status, read and write activities, error status, etc. of the NVME hard disk.
[0064] In an exemplary embodiment, when M is equal to 4 and each downstream port allows mounting 4 hard disks that communicate using the target protocol, any four adjacent hard disk slots among the 16 hard disk slots connected to the protocol switch are respectively mapped to 4 different downstream ports.
[0065] Optionally, refer to Figure 7 When the protocol switch has 4 downstream ports and each downstream port allows mounting 4 hard disks that use the target protocol for communication, the protocol switch can mount a total of 16 NVME hard disks, and each downstream port of the protocol switch can mount NVME hard disks set on different backplanes according to actual needs. For example, CPU0 is connected to the upstream port Port0 of the protocol switch, and the NVME hard disks mounted on the downstream port Port2 in the protocol switch are NVME0, NVME5, NVME9, and NVME13.
[0066] In an exemplary embodiment, configuring a firmware file used by a protocol switch through a baseboard management controller BMC includes the following steps: configuring P firmware files used by P protocol switches through the BMC; wherein each of the P protocol switches is connected to Z central processing units, P is an integer greater than or equal to 1, Z is an integer greater than or equal to 0 and less than or equal to N, and the P firmware files contain a target firmware file and a specified firmware file, the target firmware file is a firmware file corresponding to a target protocol switch, the specified firmware file is a firmware file corresponding to a specified protocol switch, the target firmware file and the specified firmware file have a mapping relationship between a target downstream port in the target protocol switch and a specified upstream port in the specified protocol switch, the P protocol switches include the target protocol switch and the specified protocol switch, the downstream port in the target protocol switch includes the target downstream port, the target downstream port does not directly mount a hard disk, and the upstream port in the specified protocol switch includes the specified upstream port, and the specified upstream port is not connected to the central processing unit.
[0067] Optionally, when P is equal to 2, refer to Figure 8 The topological relationship between the two CPUs shown in the figure is that each CPU is connected to only one protocol switch. In addition, the target protocol switch is protocol switch 0 connected to CPU0, and the designated protocol switch is protocol switch 1 connected to CPU1. The downlink port of protocol switch 0 is connected to the uplink port of protocol switch 1, and vice versa.
[0068] It should be noted that by modifying the connection relationship between the two protocol switches, the upstream CPU corresponding to each downstream port can be adjusted. For example, downstream port port3 of protocol switch 0 can be used as the downstream port of CPU1, and downstream port port4 of protocol switch 1 can be used as the downstream port of CPU0.
[0069] Optionally, when P is equal to 4, refer to Fig. 9 The figure shows the connection relationship between the four CPUs, wherein CPU0 is connected to protocol switch 0, CPU1 is connected to protocol switch 1, CPU2 is connected to protocol switch 2, and CPU3 is connected to protocol switch 3; and the downlink port of protocol switch 0 is connected to the uplink port of protocol switch 1, the downlink port of protocol switch 1 is connected to the uplink port of protocol switch 2, and the downlink port of protocol switch 2 is connected to the uplink port of protocol switch 3.
[0070] Obviously, the above-described embodiments are only embodiments of a part of the present invention, rather than all embodiments. In order to better understand the above method, the above process is described below in conjunction with embodiments, but it is not intended to limit the technical solutions of the embodiments of the present invention, specifically:
[0071] First, to better understand this solution, refer to Figure 3 The NVME hard disk configuration shown is explained as follows:
[0072] In general, the NVME hard disk directly connects to the CPU's downstream port, first using the port resources of CPU0, then the port resources of CPU1, refer to Figure 3 (a) in the sequence increases from left to right, and increases from top to bottom. Figure 3 (b) The sorting in (b) increases by one from left to right.
[0073] Secondly, refer to Figure 4 The hard disk architecture shown in the figure is composed of multiple CPU modules, each of which includes a CPU, independent local memory, and input / output controller. The CPUs are accessed through interconnection modules.
[0074] 1. The partition mode of the protocol switch is used in the present invention;
[0075] The solution of the present invention uses the partition mode of PCIE SWITCH (i.e. the above-mentioned protocol switch), that is, a physical PCIE SWITCH can be used as two virtual PCIE SWITCHs. Figure 5 For example, a 6-port PCIE Switch allows two upstream ports and allows connection to two different hosts. The downstream port can be adjusted by software and connected to any upstream port.
[0076] For example, port0 can be used as the upstream of port2 / 3 or port4 / 5; port4 can be used as the downstream of port0 or port1, but port4 can only have one upstream. Figure 5 As shown, there are four backplanes under the same PCIE SWITCH, two of which are used as NVME hard disk slots under CPU0, and the other two are used as NVME hard disk slots under CPU1.
[0077] Second, the present invention can flexibly adjust the topological relationship of ports;
[0078] like Figure 6As shown in the figure, the upstream port0 / port1 of the same protocol switch is connected to CPU0 and CPU1 respectively, and the 4 downstream ports are output as 8 x4x4 interfaces, which are connected to the NVME backplane through cables. Among them, the X4X4X4X4 signals of the 4 adjacent hard disk slots come from 4 different ports on the SWITCH. Due to the limited number of port resources of the SWITCH, the SWTCH cannot split the X16 of a downstream port and map it to two upstream ports respectively. The port source relationship of BP1 / BP2 / BP3 can only be consistent with BP0. That is, NVME0 / 4 / 8 / 12 come from the same port, NVME1 / 5 / 9 / 13 come from the same port, NVME2 / 6 / 10 / 14 come from the same port, and NVME3 / 7 / 11 / 15 come from the same port.
[0079] In addition, Flash0 (i.e., the first flash memory mentioned above) and Flash1 (i.e., the second flash memory mentioned above) store the firmware files of the Switch, which contain the topology settings of the ports of the Switch. Flash1 contains a firmware file with default topology settings, and Flash0 contains a firmware file that the BMC can modify the topology through the SPI bus. The CPLD can switch to load one of the firmware files in the falsh when the computer is turned on. The BMC notifies the CPLD of each backplane of the modified topology relationship to avoid confusion when the hard disk is turned on.
[0080] By photo Figure 6 The wiring process, the 4 NVME hard disk slots of each backplane, the PCIE signals come from the four ports of the Switch respectively. Through different topology settings in the firmware file of the Switch, any four adjacent hard disk slots can meet the 16 situations of being connected to cpu0 / 0 / 0 / 0, cpu0 / 0 / 0 / 1, cpu0 / 0 / 1 / 0, cpu0 / 0 / 1 / 1, cpu0 / 1 / 0 / 0, cpu0 / 1 / 0 / 1, cpu0 / 1 / 1 / 0, cpu0 / 1 / 1 / 1, cpu1 / 0 / 0 / 0, cpu1 / 0 / 0 / 1, cpu1 / 0 / 1 / 0, cpu1 / 0 / 1 / 1, cpu1 / 1 / 0 / 0, cpu1 / 1 / 0 / 1, cpu1 / 1 / 0 / 0, cpu1 / 1 / 0 / 1, cpu1 / 1 / 0 / 0, cpu1 / 1 / 0 / 1, cpu1 / 1 / 0 / 0, cpu1 / 1 / 0 / 1, cpu1 / 1 / 0 / 1, cpu1 / 1 / 0 / 0, cpu1 / 1 / 0 / 1, cpu1 / 1 / 0 / 1, cpu1 / 1 / 0 / 1, cpu1 / 1 / 0 / 1, cpu1 / 1 / 0 / 1, cpu1 / 1 / 0 / 1.
[0081] 3. Example 1 (the most basic implementation scheme of the present invention);
[0082] 1. Before booting, write the new topology to Flash0 through BMC.
[0083] 2. During the boot process, BMC notifies CPLD to switch the SPI channel of SWITCH to Flash0.
[0084] 3. When SWITCH is initialized, load the firmware file in Flash0 and configure the topology. Figure 7 , port2 / 4 is connected to CPU0, and port3 / 5 is connected to CPU1.
[0085] 4. When SWITCH is initialized, if the firmware file in Flash0 is damaged or the new topology cannot be executed, SWICH notifies CPLD to switch the SPI channel to Flash1, load the default topology, and notify BMC of the exception.
[0086] 5. BMC notifies the CPLD of each backplane of the topology mode executed during this startup. When the hard disk is turned on through the VPP mode, the backplane CPLD can accurately identify the actual hard disk slot represented by the VPP address.
[0087] 4. Embodiment 2;
[0088] Scalable, when there are two CPUs, each CPU is connected to only one PCIE SWITCH, and the two PCIE SWITCHs are directly connected using ports. By modifying the topological relationship of the two SWITCHs, adjust the upstream CPU corresponding to each downstream port. Figure 8 For example, port 3 of SWITCH0 is used as the downstream port of CPU1, and port 4 of SWITCH1 is used as the downstream port of CPU0. Then the NVME hard disks connected to the two SWITCHs downstream can be flexibly set as in the first embodiment, and the CPUs connected to the NVME hard disks can be flexibly set.
[0089] Five, embodiment three;
[0090] Scalable, when there are four CPUs, each CPU is only connected to one PCIE SWITCH, and the four PCIE SWITCHs are directly connected using ports. By modifying the topology of the SWITCH, an NVME hard disk on the downstream port can be connected to any of the four CPUs through a primary switch or a secondary switch. Fig. 9 To illustrate, set port 5 of SWITCH0 as the downstream of port 0, and set port 4 of SWITCH3 as the downstream of port 5. Then the NVME hard disk connected to port 4 of SWITCH3 is connected to CPU0 through SWITCH3 and SWITCH0, and serves as the NVME hard disk under CPU0.
[0091] Similar to the first and second embodiments, the topological relationship is written to Falsh0 of the four switches through the BMC before booting, and the switch loads a new firmware file when booting, so as to flexibly set the CPU connected to the NVME hard disk.
[0092] It should be noted that the present invention also has the following advantages:
[0093] (1) Adjust the PCIE bus topology by modifying the SWITCH firmware file to replace different wiring processes;
[0094] (2) By modifying the SWITCH firmware file through the BMC, the NVME hard disk can adjust the CPU PCIE resources without disassembling the machine and without powering off (turning off the machine, but the AC is powered on);
[0095] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0096] In this embodiment, a configuration device for a firmware file is also provided to implement the above-mentioned embodiments and preferred implementation modes, which have been described and will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the modules described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0097] Fig.10 : is a structural block diagram of a firmware file configuration device according to an embodiment of the present application, the device comprising:
[0098] The configuration module 1002 is used to configure the firmware file used by the protocol switch through the baseboard management controller BMC; wherein the protocol switch is used to implement the port expansion function of the target protocol, the protocol switch has N upstream ports and M downstream ports, the firmware file has a mapping relationship between the upstream ports and the downstream ports, the upstream port is connected to the central processing unit, and the downstream port is used to mount the hard disk that uses the target protocol for communication, and N and M are both positive integers greater than or equal to 2.
[0099] The above-mentioned device uses a baseboard management controller BMC to configure the firmware file used by the protocol switch. Since the firmware file reflects the mapping relationship between the upstream port and the downstream port of the protocol switch, the hardware mounted on the CPU can be flexibly adjusted by configuring the firmware file, thereby solving the problem of being unable to flexibly configure the hard disk mounted on the CPU.
[0100] In an exemplary embodiment, the configuration module 1002 includes: a writing unit, used to write a first firmware file into a first flash memory through the BMC, wherein the firmware file includes the first firmware file, and the first firmware file has a first mapping relationship between the upstream port and the downstream port; a sending unit, used to send first indication information to the programmable device through the BMC, wherein the first indication information is used to instruct the programmable device to switch the serial peripheral interface SPI bus channel of the protocol switch to the first flash memory; after the serial peripheral interface SPI bus channel of the protocol switch is switched to the first flash memory, the protocol switch uses the first firmware file in the first flash memory.
[0101] In an exemplary embodiment, the above-mentioned device also includes: a processing module, which is used to determine whether the protocol switch is currently using a damaged firmware file when first fault information is obtained through the BMC after the protocol switch is configured to use the first firmware file through the BMC, wherein the first fault information is used to indicate that the first firmware file is damaged, and the first fault information is information sent to the BMC through a programmable device when the protocol switch determines that the first firmware file is damaged, and the firmware file includes the first firmware file, and the first firmware file has a first mapping relationship between the upstream port and the downstream port; when it is determined that the protocol switch is not currently using the damaged firmware file, obtain the undamaged second firmware file currently used by the protocol switch through the BMC, wherein the first fault information is used to indicate that the first firmware file is damaged. When the protocol switch determines that the first firmware file is damaged, the protocol switch sends second indication information to the programmable device, where the second indication information is used to instruct the programmable device to switch the SPI bus channel of the protocol switch to a second flash memory, where the second flash memory stores a preset second firmware file. After the SPI bus channel of the protocol switch is switched to the second flash memory, the protocol switch uses the second firmware file in the second flash memory, where the second firmware file has a second mapping relationship between the upstream port and the downstream port. When it is determined that the protocol switch currently uses a damaged firmware file, the protocol switch is instructed to use a third firmware file through the BMC, where the firmware files include the third firmware file, where the third firmware file has a third mapping relationship between the upstream port and the downstream port.
[0102] In an exemplary embodiment, the processing module is further used to determine that the protocol switch is currently using a damaged firmware file when the second fault information is received through the BMC within a preset time; and to determine that the protocol switch is not currently using a damaged firmware file when the second fault information is not received through the BMC within a preset time; wherein the second fault information is used to indicate that the second firmware file is damaged, and the second fault information is information sent to the BMC through the programmable device when the protocol switch determines that the second firmware file is damaged.
[0103] In an exemplary embodiment, the above-mentioned device also includes: a sending module, which is used to send the first firmware file to a backplane programmable device corresponding to a backplane connected to the protocol switch after the first firmware file is used by the BMC configuration protocol switch; wherein the backplane is provided with a hard disk that uses the target protocol to communicate, and the backplane programmable device determines the hard disk corresponding to the virtual port pin VPP address sent by the central processing unit according to the first firmware file.
[0104] In an exemplary embodiment, when M is equal to 4 and each downstream port allows mounting 4 hard disks that communicate using the target protocol, any four adjacent hard disk slots among the 16 hard disk slots connected to the protocol switch are respectively mapped to 4 different downstream ports.
[0105] In an exemplary embodiment, the configuration module 1002 is further used to configure P firmware files used by P protocol switches through the BMC; wherein each of the P protocol switches is connected to Z central processing units, P is an integer greater than or equal to 1, Z is an integer greater than or equal to 0 and less than or equal to N, and the P firmware files include a target firmware file and a specified firmware file, the target firmware file is a firmware file corresponding to the target protocol switch, the specified firmware file is a firmware file corresponding to the specified protocol switch, the target firmware file and the specified firmware file have a mapping relationship between a target downstream port in the target protocol switch and a specified upstream port in the specified protocol switch, the P protocol switches include the target protocol switch and the specified protocol switch, the downstream port in the target protocol switch includes the target downstream port, the target downstream port does not directly mount a hard disk, and the upstream port in the specified protocol switch includes the specified upstream port, and the specified upstream port is not connected to the central processing unit.
[0106] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0107] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0108] Optionally, in this embodiment, the computer program may be configured to perform the following steps by means of the computer program:
[0109] S1, configuring a firmware file used by a protocol switch through a baseboard management controller BMC; wherein the protocol switch is used to implement an expansion function of a port of a target protocol, the protocol switch has N upstream ports and M downstream ports, the firmware file contains a mapping relationship between the upstream ports and the downstream ports, the upstream port is connected to a central processing unit, the downstream port is used to mount a hard disk that communicates using the target protocol, and N and M are both positive integers greater than or equal to 2.
[0110] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0111] The embodiment of the present application also provides an electronic device, such as Fig.11 As shown, the electronic device includes a memory 1102 and a processor 1104. The memory 1102 stores a computer program, and the processor 1104 is configured to execute the steps in any of the above method embodiments through the computer program.
[0112] Optionally, in this embodiment, the processor 1104 may be configured to perform the following steps through a computer program:
[0113] S1, configuring a firmware file used by a protocol switch through a baseboard management controller BMC; wherein the protocol switch is used to implement an expansion function of a port of a target protocol, the protocol switch has N upstream ports and M downstream ports, the firmware file contains a mapping relationship between the upstream ports and the downstream ports, the upstream port is connected to a central processing unit, the downstream port is used to mount a hard disk that communicates using the target protocol, and N and M are both positive integers greater than or equal to 2.
[0114] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0115] Alternatively, a person skilled in the art may understand that: Fig.11 The structure shown is for illustration only. Fig.11 The structure of the electronic device is not limited. For example, the electronic device may also include Fig.11 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig.11 Different configurations shown.
[0116] Among them, the memory 1102 can be used to store software programs and modules, such as the program instructions / modules corresponding to the configuration method of the firmware file and the configuration device of the firmware file in the embodiment of the present application. The processor 1104 executes various functional applications and data processing by running the software programs and modules stored in the memory 1102, that is, realizing the above-mentioned configuration method of the firmware file. The memory 1102 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1102 may further include a memory remotely arranged relative to the processor 1104, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include but are not limited to the Internet, corporate intranets, local area networks, mobile communication networks and combinations thereof. Among them, the memory 1102 can be specifically but not limited to being used to store information such as system configuration files. As an example, such as Fig.11 As shown, the memory 1102 may include but is not limited to the configuration module 1002 in the configuration device for the firmware file. In addition, other module units in the configuration device for the firmware file may also be included but are not limited to the configuration module 1002 in the configuration device for the firmware file, which will not be described in detail in this example.
[0117] Optionally, the transmission device 1106 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 1106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1106 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0118] In addition, the electronic device further includes: a display 1108; and a connection bus 1110, which is used to connect various module components in the electronic device.
[0119] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0120] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0121] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any one of the above method embodiments.
[0122] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0123] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for configuring a firmware file, It is characterized in that include: Configure the firmware file used by the protocol switch through the baseboard management controller BMC; Among them, the protocol switch is used to implement the expansion function of the port of the target protocol, the protocol switch has N upstream ports and M downstream ports, the firmware file has a mapping relationship between the upstream port and the downstream port, the upstream port is connected to the central processing unit, and the downstream port is used to mount a hard disk that uses the target protocol for communication, and N and M are both positive integers greater than or equal to 2.
2. The method according to claim 1, It is characterized in that The firmware file used by the baseboard management controller BMC configuration protocol switch includes: Writing a first firmware file into a first flash memory through the BMC, wherein the firmware file includes the first firmware file, and the first firmware file has a first mapping relationship between the upstream port and the downstream port; Sending first indication information to the programmable device through the BMC, wherein the first indication information is used to instruct the programmable device to switch the serial peripheral interface SPI bus channel of the protocol switch to the first flash memory; after the serial peripheral interface SPI bus channel of the protocol switch is switched to the first flash memory, the protocol switch uses the first firmware file in the first flash memory.
3. The method according to claim 1, It is characterized in that The method further comprises: After configuring the protocol switch to use the first firmware file through the BMC, in the case where the first fault information is obtained through the BMC, determining whether the protocol switch currently uses a damaged firmware file, wherein the first fault information is used to indicate that the first firmware file is damaged, and the first fault information is information sent to the BMC through a programmable device when the protocol switch determines that the first firmware file is damaged, and the firmware file includes the first firmware file, and the first firmware file has a first mapping relationship between the upstream port and the downstream port; In the case where it is determined that the protocol switch is not currently using a damaged firmware file, obtaining, through the BMC, a second firmware file that is not damaged and currently used by the protocol switch, wherein, in the case where the protocol switch determines that the first firmware file is damaged, second indication information is sent to the programmable device, the second indication information is used to instruct the programmable device to switch the SPI bus channel of the protocol switch to a second flash memory, the second flash memory stores a preset second firmware file, and after the SPI bus channel of the protocol switch is switched to the second flash memory, the protocol switch uses the second firmware file in the second flash memory, and the second firmware file has a second mapping relationship between the upstream port and the downstream port; After determining that the protocol switch currently uses a damaged firmware file, the protocol switch is instructed to use a third firmware file through the BMC, wherein the firmware file includes the third firmware file, and the third firmware file has a third mapping relationship between the upstream port and the downstream port.
4. The method according to claim 3, It is characterized in that Determining whether the protocol switch currently uses a damaged firmware file includes: In the case where the second fault information is received through the BMC within a preset time, determining that the protocol switch currently uses a damaged firmware file; In the case that the second fault information is not received through the BMC within a preset time, determining that the protocol switch is not currently using a damaged firmware file; The second fault information is used to indicate that the second firmware file is damaged, and the second fault information is information sent to the BMC through the programmable device when the protocol switch determines that the second firmware file is damaged.
5. The method according to claim 1, It is characterized in that The method further comprises: After configuring the protocol switch to use the first firmware file through the BMC, sending the first firmware file to a backplane programmable device corresponding to a backplane connected to the protocol switch; The backplane is provided with a hard disk that communicates using the target protocol, and the backplane programmable device determines the hard disk corresponding to the virtual port pin VPP address sent by the central processor according to the first firmware file.
6. The method according to claim 1, It is characterized in that When M is equal to 4 and each downstream port allows mounting 4 hard disks that communicate using the target protocol, any four adjacent hard disk slots among the 16 hard disk slots connected to the protocol switch are respectively mapped to 4 different downstream ports.
7. The method according to claim 1, It is characterized in that The firmware file used by the baseboard management controller BMC configuration protocol switch includes: Configure P firmware files used by P protocol switches through the BMC; Each of the P protocol switches is connected to Z central processing units, P is an integer greater than or equal to 1, Z is an integer greater than or equal to 0 and less than or equal to N, the P firmware files include a target firmware file and a specified firmware file, the target firmware file is a firmware file corresponding to the target protocol switch, the specified firmware file is a firmware file corresponding to the specified protocol switch, the target firmware file and the specified firmware file have a mapping relationship between a target downlink port in the target protocol switch and a specified uplink port in the specified protocol switch, the P protocol switches include the target protocol switch and the specified protocol switch, the downlink port in the target protocol switch includes the target downlink port, the target downlink port does not directly mount a hard disk, the uplink port in the specified protocol switch includes the specified uplink port, and the specified uplink port is not connected to the central processing unit.
8. A configuration device for a firmware file, It is characterized in that include: A configuration module is used to configure a firmware file used by a protocol switch through a baseboard management controller BMC; wherein the protocol switch is used to implement the port expansion function of the target protocol, the protocol switch has N upstream ports and M downstream ports, the firmware file has a mapping relationship between the upstream ports and the downstream ports, the upstream port is connected to a central processing unit, and the downstream port is used to mount a hard disk that uses the target protocol for communication, and N and M are both positive integers greater than or equal to 2.
9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Firmware upgrading system and method
CN115878528A
Switching chip, memory expansion module and memory expansion system
CN116886644A
Electronic equipment and port configuration method of PCIE Switch chip
CN117149690A
Storage configuration adjustment method, device and system of server, equipment and medium
CN117472289A
PCIE switch working mode updating method and related assembly
US20230393841A1
Cited By
Server system and NVMe card slot indicating lamp control method
CN120596401A
