Service board and its upgrade method, device, system, and storage medium

By resetting the BAR space size and address of the service board card, the valid load of the information correction information is solved, the problem of the child cards not being mixed in the existing technology is solved, the flexible plug-in of the daughter cards and the expansion of the machine frame are achieved, and the development cost is reduced.

CN114968296BActive Publication Date: 2025-05-30ZHEJIANG UNIVIEW TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110220941.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-26
Publication Date
2025-05-30
Estimated Expiration
2041-02-26

AI Technical Summary

Technical Problem

The slots of the existing frame can only be inserted into fixed business board cards, and the daughter cards cannot be mixed, resulting in poor expansion and flexibility. Each frame-type device is developed to redevelop a daughter card that is suitable for the frame, which increases the development cost.

Method used

By determining whether the service board plugged in to the frame slot is a child card of the frame, if not, reset the BAR space size of the base address register of the service board and the payload of the address correction information, so that it can be upgraded to the BAR space size matching the frame.

Benefits of technology

It realizes that different versions of daughter cards can be inserted into different frames and used normally, which increases the expansion and flexibility of frames and saves development costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114968296B_ABST
    Figure CN114968296B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a service board and its upgrade method, device, system, and storage medium, which relate to the field of computer technology. The method includes: determining whether the service board inserted into the slot of the chassis is a daughter card corresponding to the chassis; when it is determined that the service board inserted into the slot of the chassis is not a daughter card corresponding to the chassis, and the base address register (BAR) space of the service board is larger than the BAR space allocated by the chassis to the daughter card, resetting the size of the BAR space of the service board to a first preset value, and setting the valid payload of the address correction information of the service board to a second preset value, so that when the service board detects that the valid payload is the second preset value, it performs an upgrade according to the size of the reconfigured BAR space. The method of the embodiments of the present application can enable the service board that is not of the chassis to be adapted to the chassis after upgrade, achieving the effect of mixed insertion of daughter cards, thereby greatly increasing the expandability and flexibility of the chassis and saving costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technologies. Specifically, this application relates to a service board and its upgrade method, device, system, and storage medium. Background Art

[0002] With the rapid development of the Internet, computer rooms and data centers have also been constructed on a large scale. Frame devices such as large frame switches, firewalls, storage devices, etc. play a crucial role as core devices among them.

[0003] The structures of these frame devices (also known as chassis) are similar, mainly including a chassis of the main architecture, a mid-mounted or rear-mounted backplane, and multiple slots with different functions. These slots are used to insert different types of boards. The chassis can be equipped with different service boards according to actual needs to meet different service requirements.

[0004] However, currently, the slots of the chassis can only insert fixed service boards as daughter cards of the slot, and the daughter cards cannot be mixed, resulting in a significant reduction in scalability and flexibility. Moreover, for each developed frame device, a daughter card adapted to the chassis needs to be developed again, thus greatly increasing the development cost. Summary of the Invention

[0005] This application provides a service board and its upgrade method, device, system, and storage medium, which can solve the problem in the prior art that the chassis and the daughter card need to be adapted and the daughter cards cannot be mixed. The technical solutions are as follows:

[0006] In a first aspect, an upgrade method for a service board is provided. The method includes:

[0007] Determine whether the service board inserted into the slot of the chassis is the daughter card corresponding to the chassis;

[0008] When it is determined that the service board inserted into the slot of the chassis is not the daughter card corresponding to the chassis, and the base address register (BAR) space of the service board is greater than the BAR space allocated by the chassis to the daughter card, reset the size of the BAR space of the service board to a first preset value,

[0009] and set the payload of the address correction information of the service board to a second preset value, so that when the service board detects that the payload is the second preset value, it is upgraded according to the size of the reconfigured BAR space.

[0010] In a possible implementation, the determining whether the service board inserted into the slot of the chassis is the daughter card corresponding to the chassis includes:

[0011] Obtain the value of the connection status register of the service board;

[0012] Compare the value of the connection status register with the PCIE bandwidth of the chassis. When the value of the connection status register is different from the PCIE bandwidth of the chassis, determine that the service board is not the daughter card corresponding to the chassis.

[0013] In another possible implementation, setting the payload of the address correction information of the service board to a second preset value includes:

[0014] By modifying the value of the device control register, set the payload of the address correction information of the service board stored in the device control register to a second preset value.

[0015] In another possible implementation, resetting the size of the base address register BAR space of the service board further includes:

[0016] Determine the first preset value according to the size of the total memory of the chassis, the maximum number of daughter cards accommodated by the chassis, and the size of the image file of each daughter card, where the first preset value is greater than the size of the image file.

[0017] In a second aspect, a method for upgrading a service board is provided, and the method includes:

[0018] When it is detected that the payload of the address correction information of the service board is set to a second preset value, upgrade the service board according to the size of the base address register BAR space of the service board obtained, so that the BAR space of the upgraded service board matches the chassis into which the service board is plugged, where the second preset value is set when the chassis determines that the service board plugged into the slot of the chassis is not the daughter card corresponding to the chassis and the BAR space of the service board is greater than the BAR space allocated by the chassis to the corresponding daughter card.

[0019] In a possible implementation, when it is detected that the payload of the address correction information of the service board is set to a second preset value, upgrading the service board according to the size of the base address register BAR space of the service board obtained includes:

[0020] When it is detected that the payload of the address correction information of the service board is set to a second preset value, set the original address offset of the service board to a first preset value, where the first preset value is the size of the BAR space of the service board reset by the chassis when it determines that the service board is not the daughter card corresponding to the chassis and the BAR space of the service board is greater than the BAR space allocated by the chassis to the daughter card;

[0021] Based on the first preset value, perform an erase operation and a write operation on the flash memory corresponding to the service board card.

[0022] In another possible implementation manner, the performing an erase operation and a write operation on the flash memory corresponding to the service board card based on the first preset value includes:

[0023] Erase the mirror file of the base address corresponding to the original address offset on the flash memory;

[0024] After detecting that the erase operation is completed, write the mirror file of the base address corresponding to the obtained first preset value into the flash memory.

[0025] In yet another possible implementation manner, it further includes:

[0026] Obtain the size of the base address register BAR space of the service board card.

[0027] In a third aspect, an upgrade device for a service board card is provided, including: a chassis and a processor, where

[0028] The chassis is provided with at least one slot, and each slot is used for plugging in a daughter card;

[0029] The processor is electrically connected to each slot, and is used to determine whether the service board card plugged into the slot of the chassis is the daughter card corresponding to the chassis. When it is determined that the service board card plugged into the slot of the chassis is not the daughter card corresponding to the chassis, and the base address register BAR space of the service board card is greater than the BAR space allocated by the chassis to the daughter card, reset the size of the BAR space of the service board card to a first preset value, and set the payload of the address correction information of the service board card to a second preset value, so that when the service board card detects that the payload is the second preset value, it performs an upgrade according to the size of the reconfigured BAR space.

[0030] In a fourth aspect, a service board card is provided, including:

[0031] A memory for storing a base address;

[0032] A processor, electrically connected to a memory, is configured to be plugged into a slot in a chassis of an upgrade device of a service board, and is used to upgrade the service board according to the size of the base address register (BAR) space of the service board obtained when it is detected that the payload of the address correction information of the service board is set to a second preset value, so that the BAR space of the upgraded service board matches the chassis into which the service board is plugged. Wherein, the second preset value is set when it is determined that the service board plugged into the slot of the chassis is not a daughter card of the chassis, and the BAR space of the service board is greater than the BAR space allocated by the chassis to its corresponding daughter card.

[0033] In a fifth aspect, an upgrade system for a service board is provided, including the upgrade device for a service board shown in the third aspect of the present application and the service board shown in the fourth aspect of the present application.

[0034] In a sixth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, it implements the upgrade method for a service board shown in the first aspect or the second aspect of the present application.

[0035] The beneficial effects brought by the technical solution provided by the present application at least include:

[0036] When it is determined that the service board plugged into the slot of the chassis is not a daughter card of the chassis, and the BAR space of the service board is greater than the BAR space allocated by the chassis to its corresponding daughter card, by resetting the size of the BAR space of the service board to a first preset value and setting the payload of the address correction information of the service board to a second preset value, when the service board detects that the payload is the second preset value, it is upgraded according to the size of the reconfigured BAR space. The BAR space of the upgraded service board is the same as the BAR space of the daughter card of the chassis, that is, the service board that was originally not compatible with the chassis can be upgraded to be compatible with the chassis. The upgraded and compatible service board can implement the same or similar functions as the daughter card of the service board, and can achieve the effect of mixed insertion of daughter cards, thereby increasing the expandability and flexibility of the chassis and saving costs.

[0037] Additional aspects and advantages of the present application will be given in part in the following description, which will become apparent from the following description, or can be understood through the practice of the present application. Description of the Drawings

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for describing the embodiments of the present application will be briefly introduced below.

[0039] Figure 1Schematic flowchart of a method for upgrading a service board card provided by an embodiment of the present application;

[0040] Figure 2 Schematic flowchart of a method for upgrading a service board card provided by another embodiment of the present application;

[0041] Figure 3 Schematic flowchart of a method for upgrading a service board card provided by yet another embodiment of the present application;

[0042] Figure 4 Schematic flowchart of the upgrade process in a method for upgrading a service board card provided by an embodiment of the present application;

[0043] Figure 5 Schematic structural diagram of an upgrade device for a service board card provided by yet another embodiment of the present application;

[0044] Figure 6 Schematic structural diagram of an upgrade device for a service board card provided by an embodiment of the present application;

[0045] Figure 7 Schematic structural diagram of a service board card provided by an embodiment of the present application;

[0046] Figure 8 Schematic structural diagram of an upgrade system for a service board card provided by an embodiment of the present application.

[0047] Explanation of reference numerals:

[0048] 60 - Upgrade device for the service board card;

[0049] 601 - Chassis, 11 - At least one slot, 12 - Service board card, 602 - Processor;

[0050] 701 - Memory, 702 - Processor. Detailed description of the specific implementation

[0051] The embodiments of the present application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions from beginning to end. The embodiments described below by referring to the accompanying drawings are exemplary and are only used to explain the present application and cannot be construed as a limitation to the present invention.

[0052] Those skilled in the art of the present technology can understand that, unless specifically stated otherwise, the singular forms "a", "an", "the", and "said" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of the present application means the presence of the described features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or their groups. It should be understood that when we say an element is "connected" or "coupled" to another element, it can be directly connected or coupled to other elements, or there may also be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The phrase "and / or" used herein includes all or any unit and all combinations of one or more related listed items.

[0053] Those skilled in the art of the present technology can understand that, unless otherwise defined, all terms used herein (including technical terms and scientific terms) have the same meaning as the general understanding of those of ordinary skill in the art to which the present invention pertains. It should also be understood that terms such as those defined in a general dictionary should be understood to have a meaning consistent with the meaning in the context of the prior art, and will not be interpreted with an idealized or overly formal meaning unless specifically defined as here.

[0054] First, several nouns related to the present application are introduced and explained:

[0055] PCIE: It is a high-speed serial computer expansion bus standard, belonging to high-speed serial point-to-point dual-channel high-bandwidth transmission. The devices connected (referred to as PCIE devices) are allocated exclusive channel bandwidth and do not share the bus bandwidth. The bandwidth of PCIE devices has various specifications, which can range from PCIE×1 to ×32. For example: ×1, ×2, ×4, ×8. Theoretically, the unidirectional transmission bandwidth of ×1 can reach 250MB / s, and the bidirectional transmission bandwidth can even reach 500MB / s.

[0056] BAR: Base Address Register. Each PCIE device has a corresponding BAR address, and there can be multiple BAR addresses.

[0057] DDR: Double Data Rate synchronous dynamic random access memory.

[0058] Sub-card: A service board card that can be inserted and removed in a frame device.

[0059] PAYLOAD: Payload, which is a parameter of the register in a PCIE device.

[0060] The current chassis equipment has poor scalability and flexibility. The chassis can only plug in the matching daughter cards and does not allow mixed insertion of daughter cards. Therefore, the development cost is relatively high. For each new product developed, both the chassis and the daughter cards need to be re-developed.

[0061] In view of this, the inventors of the present application propose an upgrade method, device and system for service boards, as well as a computer-readable storage medium. By identifying and reading the PCIE configuration information of the daughter card, such as the PCIE bandwidth information of the daughter card, to distinguish the version of the daughter card, and by configuring the BAR space and PAYLOAD value of the daughter card to achieve the effect of mixed insertion and upgrade of the daughter card, it can achieve that daughter cards of different versions can be inserted into different chassis and can be used normally after upgrade, and greatly increase the scalability and flexibility of the chassis and save costs.

[0062] To make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application and how the technical solution of the present application solves the above technical problems will be described in detail below with specific embodiments in conjunction with the accompanying drawings. These several optional embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0063] An upgrade method for service boards is provided in the embodiments of the present application, as Figure 1 shown. The method includes:

[0064] S101. Determine whether the service board plugged into the slot of the chassis is the daughter card corresponding to the chassis.

[0065] S102. When it is determined that the service board plugged into the slot of the chassis is not the daughter card corresponding to the chassis and the base address register (BAR) space of the service board is greater than the BAR space allocated by the chassis to the corresponding daughter card, reset the size of the BAR space of the service board to a first preset value, and set the payload of the address correction information of the service board to a second preset value, so that when the service board detects that the payload is the second preset value, it is upgraded according to the size of the reconfigured BAR space.

[0066] Optionally, in this embodiment, in the above step S102, the step of determining whether the service board plugged into the slot of the chassis is the daughter card corresponding to the chassis may include: after resetting the size of the BAR space of the service board to the first preset value, setting the payload of the address correction information of the service board to the second preset value.

[0067] In this embodiment, resetting the size of the base address register (BAR) space of the service board card to a first preset value may further include: determining the first preset value according to the size of the total memory of the chassis, the maximum number of daughter cards accommodated by the chassis, and the size of the image file of each daughter card, where the first preset value is greater than the size of the image file. For example: If the total space supported by the chassis is 512 megabytes, the chassis supports a total of 120 daughter cards, and each daughter card can support the images of 2 FPGAs, then the first preset value needs to be greater than the size of the FPGA image.

[0068] Optionally, in this embodiment, the first preset value may be 4 megabytes (M).

[0069] In some embodiments, S101 may specifically include:

[0070] Obtain the value of the connection status register of the service board card.

[0071] Determine whether the service board card is a daughter card corresponding to the chassis according to the value of the connection status register.

[0072] Specifically, in this embodiment, it may be determined by comparing the value of the connection status register with the PCIe bandwidth of the chassis. If the two are the same, the service board card is a daughter card corresponding to the chassis; if the two are different, the service board card is not a daughter card corresponding to the chassis.

[0073] Optionally, in this embodiment, the starting address of the PCIe device capability set of the service board card may be obtained through the PCIe device parameters of the service board card and the ID of the PCIe device capability set, and then according to this starting address and the first address offset, the value of the connection LINKCTL status register of the PCIe device of the service board card is obtained. The first address offset is the address offset corresponding to the LINKCTL status register.

[0074] The PCIe device capability set is a set including the capability indicators of the service board card. For example: The capability indicators of the service board card may include: rate, bandwidth, etc. The starting address of the PCIe device capability set is the starting address among the addresses corresponding to each capability indicator in the PCIe device capability set. For example: The capability indicators in the PCIe device capability set include A, B, and C, each capability indicator has a corresponding address, and the addresses of the three capability indicators are 2 - 4, 5 - 6, and 7 - 9 in sequence, then the starting address of the PCIe device capability set is 2.

[0075] In some embodiments, setting the payload of the address correction information of the service board card in S102 to a second preset value may specifically include:

[0076] By modifying the value of the device control register, set the payload of the address correction information of the service board card stored in the device control register to the second preset value.

[0077] Optionally, in this embodiment, the second preset value may be 256.

[0078] The embodiment of the present application also provides an upgrade method for a service board card, as Figure 2 shown, the method includes:

[0079] S201. When it is detected that the payload of the address correction information of the service board card is set to the second preset value, upgrade the service board card according to the size of the base address register (BAR) space of the obtained service board card, so that the BAR space of the upgraded service board card matches the chassis into which the service board card is inserted. The second preset value is set when it is determined that the service board card inserted into the slot of the chassis is not a daughter card of the chassis and the BAR space of the service board card is greater than the BAR space allocated by the chassis to its corresponding daughter card.

[0080] Optionally, in this embodiment, when it is detected that the payload of the address correction information of the service board card is set to the second preset value, upgrade the service board card according to the size of the BAR space of the obtained service board card, so that the BAR space of the upgraded service board card is the same as the BAR space of the daughter card of the chassis into which the service board card is inserted, so that a service board card that is not of this chassis can be adapted to this chassis, achieving the effect of mixed insertion of daughter cards.

[0081] In one embodiment, S201 may specifically include:

[0082] When it is detected that the payload of the address correction information of the service board card is set to the second preset value, set the original address offset of the service board card to the first preset value. The first preset value is the size of the BAR space of the service board card reset by the chassis when it is determined that the service board card is not the corresponding daughter card of the chassis and the BAR space of the service board card is greater than the BAR space allocated by the chassis to the corresponding daughter card;

[0083] Based on the first preset value, perform an erase operation and a write operation on the flash memory corresponding to the service board card.

[0084] Optionally, in this embodiment, based on the first preset value, performing an erase operation and a write operation on the flash memory corresponding to the service board card may specifically include:

[0085] Erase the mirror file of the base address corresponding to the original address offset on the flash memory;

[0086] After detecting that the erase operation is completed, write the mirror file of the base address corresponding to the obtained first preset value into the flash memory. The flash memory may be a flash memory.

[0087] That is to say, after the chassis sets the BAR space of the slot in which it is plugged to 4M when the inserted board is not the matching service board, the internal address of the FPGA is disordered, which will cause errors in reading registers. Therefore, it is also necessary to set the PAYLOAD to indicate that the FPGA corrects the address based on the size of the set BAR space.

[0088] As described above in conjunction with Figure 1 and Figure 2 the technical solutions of an upgrade method for a service board provided by the embodiments of the present application have been described in detail. Next, in conjunction with Figure 3 and Figure 4 taking chassis 1 (×4), daughter card 1 (×4); chassis 2 (×2), daughter card 2 (×2) as an example, the technical solutions in the embodiments of the present application will be further described.

[0089] The version of daughter card 1 corresponds to chassis 1, and the version of daughter card 2 corresponds to chassis 2; daughter card 1 can be normally plugged into chassis 1, and daughter card 2 can be normally plugged into chassis 2. Since the required service sizes of each chassis vary greatly, the bar spaces allocated to the daughter cards vary greatly. That is to say, the size of the bar space of the daughter card depends on the service of the chassis.

[0090] For example: the bar space of daughter card 1 is 512M, and the bar space of daughter card 2 is 32M. When daughter card 1 is inserted into chassis 2, it cannot be allocated a bar space of 512M. The bar space fixed for daughter card 1 can be set to 4M (for upgrade) to ensure that any daughter card plugged into the chassis can be allocated 4M. After the bar space is set to 4M, the internal address of the FPGA is disordered, which will cause errors in reading registers. Therefore, it is also necessary to set the PAYLOAD to indicate that the FPGA corrects the address.

[0091] Assume that when daughter card 1 (×4) or daughter card 2 (×2) is plugged into chassis 2 (×2), an upgrade method for a service board provided by the embodiments of the present application may be implemented as Figure 3 shown. The upgrade method for the service board includes:

[0092] S301. After chassis 2 detects that a service board is plugged into its slot, it powers on and loads the service board.

[0093] Optionally, in this embodiment, when the chassis powers on the service board, the internal program of the service board detects and returns information on whether the power-on is completed to the chassis. After detecting that the power-on of the service board is completed, it detects whether the service board in the slot has been initialized.

[0094] S302. If the service board has been initialized, scan the service board.

[0095] Optionally, in this embodiment, the service boards in the slots can be scanned in a depth - first manner through the PCIE scanning function. Each service board inserted in a certain slot needs to be scanned. When the PCIE scanning function finishes execution and returns completion, it indicates that the scanning of the service boards has been completed.

[0096] S303. After the scanning of the service board is completed, obtain the starting address of the PCIE device capability set of the service board and the value of the link status register (LINKCTL status register) of the PCIE device of the service board.

[0097] Optionally, in this embodiment, the starting address of the PCIE device capability set of the service board can be obtained through the PCIE device parameters of the service board and the ID of the PCIE device capability set. For example: the starting address of the PCIE device capability set of the service board is obtained through the function pci_find_capability(pstDev, PCI_CAP_ID_EXP), where pstDev represents the PCIE device parameters and PCI_CAP_ID_EXP represents the ID of the PCIE device capability set.

[0098] After obtaining the starting address of the PCIE device capability set, the value of the LINKCTL status register of the PCIE device of the service board can be obtained according to this starting address and the first address offset. Optionally, the value of the LINKCTL status register of the PCIE device of the service board can be read through the function pci_read_config_dword(pstDev, ipos + PCI_EXP_LNKCTL, &u32Val), where ipos represents the starting address of the PCIE device capability set, PCI_EXP_LNKCTL represents the first address offset, and u32Val represents the value of the LINKCTL status register.

[0099] S304. Determine whether the service board is a daughter card of chassis 2 according to the value of the LINKCTL status register. If so, end; if not, and the BAR space of the service board is greater than the BAR space allocated for its corresponding daughter card by chassis 2, then execute S305.

[0100] Optionally, in this embodiment, the PCIE bandwidth of the service board can be determined to be ×2 or ×4 through the value of the LINKCTL register. If it is ×2, it indicates that the service board inserted in chassis 2(×2) is daughter card 2(×2), and this method can directly end; if it is ×4, it indicates that the service board inserted in chassis 2(×2) is daughter card 1(×4). Since the bar space of daughter card 1 is greater than that of daughter card 2, this method still needs to continue to execute S305.

[0101] S305. Reset the size of the base address register BAR space of the service board card to a first preset value.

[0102] Optionally, in this embodiment, the first preset value can be determined based on the total memory of chassis 2, the number of daughter cards that chassis 2 can accommodate, and the size of the mirror file of each sub-block. The first preset value needs to be greater than the size of the mirror file. For example, the size of the base address register BAR space of the service board card can be set to 4M.

[0103] The specific setting process can be implemented by the function pci_resource_end(pstDev,0) = pci_resource_start(pstDev,0) + PSS_SZ_MB(4) – 1, where PSS_SZ_MB(4) represents that the size of the address offset is 4M, pci_resource_end(pstDev,0) represents the end address of bar0 of the PCIE device, and pci_resource_start(pstDev,0) represents the start address of bar0 of the PCIE device.

[0104] A PCIE device may have multiple bars. In the solution of this embodiment of the present application, bar0 is set. Therefore, after setting the end address of the service board card to the start address + the address offset, the size of the BAR space of the service board card is the address offset.

[0105] S306. Set the PAYLOAD of the address correction message of the service board card to a second preset value.

[0106] Optionally, in this embodiment, the payload of the address correction information of the service board card stored in the device control register can be set to the second preset value by modifying the value of the device control register.

[0107] For example: through the function:

[0108] u32Val = (u32Val' & (~PCI_EXP_DEVCTL_PAYLOAD)) | (1 << 5) is used to obtain the value of the device control (DEVCTL) register, where u32Val represents the current value of the DEVCTL register, u32Val' represents the previous value of the DEVCTL register, and ~PCI_EXP_DEVCTL_PAYLOAD represents the fixed value of the DEVCTL register.

[0109] Then through the function:

[0110] The value of the DEVCTL register is modified by pci_write_config_dword(pstDev, ipos + PCI_EXP_DEVCTL, u32Val) to set the PAYLOAD value to a second preset value, for example: set to 256. Among them, PCI_EXP_DEVCTL represents the second address offset.

[0111] S307. After setting the PAYLOAD, when the service board detects that the PAYLOAD is the second preset value, an upgrade operation is performed.

[0112] Optionally, in the above step S307, the schematic flow diagram of the specific method for the service board to perform the upgrade operation is as Figure 4 shown, including the following steps:

[0113] S3071. When it is detected that the payload of the address correction information of the service board is set to the second preset value, the original address offset of the service board is set to the first preset value. Among them, the first preset value is the size of the BAR space of the service board reset when the chassis determines that the service board is not the sub-card corresponding to the chassis and the BAR space of the service board is greater than the BAR space allocated by the chassis to the corresponding sub-card.

[0114] Optionally, in this embodiment, when it is detected that the payload of the address correction information of the service board is 256, the original address offset of the service board is modified and set to an address offset of 4M.

[0115] S3072. Erase the mirror file of the base address corresponding to the original address offset on the flash memory of the service board.

[0116] S3073. Detect whether the erasure of the mirror file of the base address corresponding to the original address offset is completed. If not, continue to detect until it is completed and then execute S3074. If so, execute S3074.

[0117] S3074. After detecting that the original mirror file has been erased, write the mirror file of the base address corresponding to the obtained first preset value into the flash memory.

[0118] Optionally, in this embodiment, write the mirror file of the base address with an address offset of 4M into the flash memory.

[0119] The PCIE device sends a new mirror file corresponding to the address offset to the service board.

[0120] S3075. Detect whether the write operation of the mirror file of the base address with an address offset of 4M is completed. If not, continue to detect until the upgrade is achieved after completion. If so, it indicates that the upgrade is completed.

[0121] It should be noted that in this embodiment, the BAR space of the upgraded service board can match the chassis into which the service board is inserted. That is to say, the BAR space of the upgraded sub-card 1 is the same as the BAR space of the sub-card of chassis 2, so that the sub-card 1 that is not of chassis 2 can be adapted to chassis 2, achieving the effect of sub-card mixed insertion.

[0122] In the above text, in combination with the attached Figures 1-4 , a detailed description of the technical solution of an upgrade method for a service board provided in an embodiment of the present application is given. Next, in combination with the attached Figures 5-8 , a detailed description of the technical solutions of an upgrade device for a service board, a service board, and a system provided in an embodiment of the application is given.

[0123] As Figure 5 shown, an upgrade device for a service board provided in an embodiment of the present application. The upgrade device 50 for the service board may include: a determination module 501 and a setting module 502, where

[0124] The determination module 501 is configured to determine whether the service board inserted into the slot of the chassis is the sub-card corresponding to the chassis;

[0125] The setting module 502 is configured to, when it is determined that the service board inserted into the slot of the chassis is not the sub-card corresponding to the chassis and the base address register (BAR) space of the service board is greater than the BAR space allocated by the chassis to the corresponding sub-card, reset the size of the BAR space of the service board to a first preset value, and set the payload of the address correction information of the service board to a second preset value, so that when the service board detects that the payload is the second preset value, it is upgraded according to the size of the reconfigured BAR space.

[0126] In some embodiments, the setting module 502 may specifically be configured to, after resetting the size of the base address register (BAR) space of the service board to a first preset value, set the payload of the address correction information of the service board to a second preset value.

[0127] Optionally, in this embodiment, by modifying the value of the device control register, the payload of the address correction information of the service board stored in the device control register is set to the second preset value.

[0128] In some embodiments, the determination module 501 may specifically be configured to obtain the value of the connection status register of the service board; and determine whether the service board is the sub-card corresponding to the chassis according to the value of the connection status register.

[0129] Specifically, the determination module 501 compares the value of the connection status register with the PCIE bandwidth of the chassis. When the value of the connection status register is different from the PCIE bandwidth of the chassis, it is determined that the service board is not the sub-card corresponding to the chassis.

[0130] In some embodiments, the determination module 501 is further configured to determine a first preset value according to the size of the total memory of the chassis, the maximum number of sub-cards accommodated by the chassis, and the size of the mirror file of each sub-card, where the first preset value is greater than the size of the mirror file.

[0131] For the content not detailed in the service board upgrade device provided in the embodiments of the present application, reference may be made to the service board upgrade method provided in the above embodiments. The beneficial effects that the service board upgrade device provided in the embodiments of the present application can achieve are the same as those of the service board upgrade method provided in the above embodiments, and will not be elaborated herein.

[0132] Based on the same inventive concept, the embodiments of the present application also provide a service board upgrade device, as Figure 6 shown. The service board upgrade device 60 may include: a chassis 601 and a processor 602, where

[0133] The chassis 601 is provided with at least one slot 11, and each slot 11 is used for plugging in a sub-card;

[0134] The processor 602 is electrically connected to each slot 11 and is configured to determine whether the service board 12 plugged into the slot 11 of the chassis 601 is the sub-card corresponding to the chassis 601. When it is determined that the service board 12 plugged into the slot 11 of the chassis 601 is not the sub-card corresponding to the chassis 601 and the base address register BAR space of the service board 12 is greater than the BAR space allocated by the chassis 601 to the corresponding sub-card, the size of the BAR space of the service board 12 is reset to the first preset value, and the payload of the address correction information of the service board 12 is set to the second preset value, so that when the service board 12 detects that the payload is the second preset value, it is upgraded according to the size of the reconfigured BAR space.

[0135] Optionally, in this embodiment, the processor 602 is specifically configured to set the payload of the address correction information of the service board to the second preset value after resetting the size of the base address register BAR space of the service board to the first preset value.

[0136] Among them, by modifying the value of the device control register, the payload of the address correction information of the service board stored in the device control register can be set to the second preset value.

[0137] In one embodiment, the processor 602 is further specifically configured to obtain the value of the connection status register of the service board; and determine whether the service board is a daughter card corresponding to the chassis according to the value of the connection status register.

[0138] Specifically, the processor 602 compares the value of the connection status register with the PCIE bandwidth of the chassis. When the value of the connection status register is different from the PCIE bandwidth of the chassis, it is determined that the service board is not a daughter card corresponding to the chassis.

[0139] In one embodiment, the processor 602 is further specifically configured to determine a first preset value according to the size of the total memory of the chassis, the maximum number of daughter cards accommodated by the chassis, and the size of the image file of each daughter card, where the first preset value is greater than the size of the image file.

[0140] For the content not described in detail in the upgrade device of the service board provided in the embodiments of the present application, reference may be made to the upgrade method of the service board provided in the above embodiments. The beneficial effects that the upgrade device of the service board provided in the embodiments of the present application can achieve are the same as those of the upgrade method of the service board provided in the above embodiments, and will not be elaborated here.

[0141] Embodiments of the present application further provide a service board, as Figure 7 shown. The service board 12 may include: a memory 701 and a processor 702, where

[0142] The memory 701 is used to store the base address;

[0143] The processor 702 is electrically connected to the memory 701 and is configured to be plugged into a slot in the chassis of the upgrade device of the service board. When it is detected that the payload of the address correction information of the service board is set to a second preset value, the service board is upgraded according to the size of the base address register BAR space of the service board obtained, so that the BAR space of the upgraded service board matches the chassis into which the service board is plugged, where the second preset value is set when the chassis determines that the service board plugged into the slot of the chassis is not a daughter card of the chassis and the BAR space of the service board is greater than the BAR space allocated to the corresponding daughter card of the chassis.

[0144] Optionally, in this embodiment, the processor 702 is specifically configured to set the original address offset of the service board to a first preset value when it is detected that the payload of the address correction information of the service board is set to the second preset value, where the first preset value is the size of the BAR space of the service board reset by the chassis when it determines that the service board is not a daughter card corresponding to the chassis and the BAR space of the service board is greater than the BAR space allocated to the corresponding daughter card; based on the first preset value, an erase operation and a write operation are performed on the flash memory corresponding to the service board.

[0145] Among them, by erasing the mirror file of the base address corresponding to the original address offset on the flash memory; and after detecting that the erasing operation is completed, writing the mirror file of the base address corresponding to the obtained first preset value into the flash memory to implement the upgrade of the service board.

[0146] For the content not detailed in the service board provided in the embodiment of the present application, reference may be made to the service board upgrade method provided in the above embodiment. The beneficial effects that the service board provided in the embodiment of the present application can achieve are the same as those of the service board upgrade method provided in the above embodiment, and will not be elaborated here.

[0147] Based on the same inventive concept, the embodiment of the present application also provides an upgrade system for a service board, as Figure 8 shown. The upgrade system for the service board may include: the upgrade device 60 for the service board in the above embodiment and the service board 12 in the above embodiment.

[0148] It should be understood that for the specific structures of the upgrade device for the service board and the service board and the functions of each component in this embodiment, reference may be made to the descriptions of the relevant contents in the above text. For the sake of brevity of description, they will not be elaborated here.

[0149] In addition, for the content not detailed in the upgrade system for the service board provided in the embodiment of the present application, reference may also be made to the service board upgrade method provided in the above embodiment. The beneficial effects that the upgrade system for the service board provided in the embodiment of the present application can achieve are the same as those of the service board upgrade method provided in the above embodiment, and will not be elaborated here.

[0150] It should also be understood that the "plug-in connection" in the above embodiments may be an electrical connection.

[0151] It should be noted that the processor involved in the above embodiments may be a CPU (Central Processing Unit, central processor), a general-purpose processor, a DSP (Digital Signal Processor, data signal processor), an ASIC (Application Specific Integrated Circuit, application-specific integrated circuit), an FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in combination with the disclosed content of the present application. The processor may also be a combination that realizes computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0152] The memory can be a ROM (Read Only Memory), or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory), or other types of dynamic storage devices that can store information and instructions. It can also be an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory), or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0153] The memory is used to store the application program code for implementing the solution of this application and is controlled by the processor for execution. The processor is used to execute the application program code stored in the memory to implement the content shown in the foregoing method embodiments.

[0154] An embodiment of this application provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When it runs on a computer, it enables the computer to execute the corresponding content in the foregoing method embodiments. Compared with the prior art, when it is determined that the service board card inserted into the slot of the chassis is not a daughter card of the chassis and the base address register (BAR) space of the service board card is larger than the BAR space allocated by the chassis to its corresponding daughter card, by resetting the size of the BAR space of the service board card to a first preset value and setting the payload of the address correction information of the service board card to a second preset value, the service board card is made to perform an upgrade according to the size of the reconfigured BAR space when it detects that the payload is the second preset value. The BAR space of the upgraded service board card is the same as the BAR space of the daughter card of the chassis, that is, it can make the service board card that was originally not compatible with the chassis be upgraded to be compatible with the chassis. The upgraded and compatible service board card can implement the same or similar functions as the daughter card of the service board card, and can achieve the effect of mixed insertion of daughter cards, thereby increasing the expandability and flexibility of the chassis and saving costs.

[0155] It should be understood that although the steps in the flowchart of the accompanying drawings are shown sequentially in the direction of the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction for the execution of these steps, and they may be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times, and their execution order is not necessarily sequential, but may be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.

[0156] The above are only some embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.

Claims

1. A method for upgrading a service board card, characterized in that, it includes: obtaining the value of the connection status register of the service board card; comparing the value of the connection status register with the PCIE bandwidth of the chassis; when the value of the connection status register of the service board card is different from the PCIE bandwidth of the chassis, it is determined that the service board card inserted into the slot of the chassis is not the sub-card corresponding to the chassis, and when the base address register (BAR) space of the service board card is greater than the BAR space allocated by the chassis to the sub-card, reset the size of the BAR space of the service board card to a first preset value, and set the payload of the address correction information of the service board card to a second preset value, so that when the service board card detects that the payload is the second preset value, it performs an upgrade according to the size of the reconfigured BAR space.

2. The method according to claim 1, characterized in that, the setting the payload of the address correction information of the service board card to a second preset value includes: by modifying the value of the device control register, setting the payload of the address correction information of the service board card stored in the device control register to a second preset value.

3. The method according to claim 1 or 2, characterized in that, resetting the size of the base address register (BAR) space of the service board card to a first preset value further includes: determining the first preset value according to the size of the total memory of the chassis, the maximum number of sub-cards accommodated by the chassis, and the size of the image file of each sub-card, wherein the first preset value is greater than the size of the image file.

4. A method for upgrading a service board card, characterized in that, it includes: when it is detected that the payload of the address correction information of the service board card is set to a second preset value, upgrading the service board card according to the size of the base address register (BAR) space of the service board card obtained, so that the BAR space of the upgraded service board card matches the chassis into which the service board card is inserted, wherein the second preset value is set when the chassis determines that the service board card inserted into the slot of the chassis is not the sub-card corresponding to the chassis and the BAR space of the service board card is greater than the BAR space allocated by the chassis to the corresponding sub-card.

5. The method according to claim 4, characterized in that, the upgrading the service board card according to the size of the base address register (BAR) space of the service board card obtained when it is detected that the payload of the address correction information of the service board card is set to a second preset value includes: when it is detected that the payload of the address correction information of the service board card is set to a second preset value, setting the original address offset of the service board card to a first preset value, wherein the first preset value is the size of the BAR space of the service board card re-set when the chassis determines that the service board card is not the sub-card corresponding to the chassis and the BAR space of the service board card is greater than the BAR space allocated by the chassis to the sub-card. Based on the first preset value, perform an erase operation and a write operation on the flash memory corresponding to the service board card.

6. The method according to claim 5, wherein, the performing an erase operation and a write operation on the flash memory corresponding to the service board card based on the first preset value includes: erasing the mirror file of the base address corresponding to the original address offset on the flash memory; after detecting that the erase operation is completed, writing the mirror file of the base address corresponding to the obtained first preset value into the flash memory.

7. An upgrade device for a service board card, wherein, it includes: a chassis and a processor, wherein, the chassis is provided with at least one slot, and each slot is used for plugging in a daughter card; the processor is electrically connected to each slot, and is configured to obtain the value of the connection status register of the service board card, compare the value of the connection status register with the PCIE bandwidth of the chassis, and when the value of the connection status register of the service board card is different from the PCIE bandwidth of the chassis, determine that the service board card plugged into the slot of the chassis is not the daughter card corresponding to the chassis, and when the base address register BAR space of the service board card is greater than the BAR space allocated by the chassis to the daughter card, reset the size of the BAR space of the service board card to a first preset value, and set the payload of the address correction information of the service board card to a second preset value, so that when the service board card detects that the payload is the second preset value, it performs an upgrade according to the size of the reconfigured BAR space.

8. A service board card, wherein, it includes: a memory for storing a base address; a processor, electrically connected to the memory, is configured to be plugged into a slot in the chassis of the upgrade device of the service board card, and is configured to perform an upgrade on the service board card according to the size of the base address register BAR space of the service board card obtained when detecting that the payload of the address correction information of the service board card is set to a second preset value, so that the BAR space of the upgraded service board card matches the chassis into which the service board card is plugged, and the second preset value is set when the chassis determines that the service board card plugged into the slot of the chassis is not the daughter card of the chassis and the BAR space of the service board card is greater than the BAR space allocated by the chassis to the corresponding daughter card when the value of the connection status register of the service board card is different from the PCIE bandwidth of the chassis.

9. A computer-readable storage medium, wherein, the computer-readable storage medium stores a computer program, and the computer program is used to cause a processor to execute the upgrade method for a service board card according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Industry control computer system

    CN101303568A

  • Board card adaptation method, device and equipment and machine readable storage medium

    CN112099597A