CN111158731A - CPLD-based network card firmware upgrading device and method - Google Patents
CPLD-based network card firmware upgrading device and method Download PDFInfo
- Publication number
- CN111158731A CN111158731A CN201911239518.XA CN201911239518A CN111158731A CN 111158731 A CN111158731 A CN 111158731A CN 201911239518 A CN201911239518 A CN 201911239518A CN 111158731 A CN111158731 A CN 111158731A
- Authority
- CN
- China
- Prior art keywords
- cpld
- firmware
- network card
- data frame
- ethernet
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
- 238000000034 method Methods 0.000 title claims abstract description 36
- 230000008569 process Effects 0.000 claims description 13
- 230000004044 response Effects 0.000 claims description 6
- 238000009432 framing Methods 0.000 claims description 5
- 230000003993 interaction Effects 0.000 claims description 4
- 238000012545 processing Methods 0.000 claims description 4
- 230000002452 interceptive effect Effects 0.000 claims description 3
- 238000012795 verification Methods 0.000 claims description 3
- 238000011161 development Methods 0.000 abstract description 7
- 238000012423 maintenance Methods 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000009191 jumping Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003139 buffering effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 230000017525 heat dissipation Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/654—Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Abstract
The embodiment of the invention discloses a device and a method for upgrading network card firmware based on a CPLD, wherein the device comprises a network card and an operation interface, the network card also comprises a CPLD, a storage unit and an NIC network control chip; the operation interface is connected with the Ethernet interface and used for sending a firmware upgrading signal to the network card and sending the firmware upgrading signal to the CPLD through the PHY chip, the CPLD analyzes the firmware upgrading signal, when the firmware upgrading signal is a command frame, the state jumps to debug and resets the NIC network control chip, the CPLD continuously receives and analyzes a data frame sent by the operation interface and writes the data frame into the storage unit, and the NIC network control chip loads the firmware from the storage Flash after the server is powered on. The invention realizes firmware upgrade in an Ethernet mode through the CPLD, provides great convenience for firmware upgrade in development and maintenance stages, does not need unpacking operation, and does not need to provide a server environment for loading an OS (operating system) and a driver.
Description
Technical Field
The invention relates to the technical field of firmware upgrading, in particular to a device and a method for upgrading network card firmware based on a CPLD.
Background
In recent years, with the rapid development of internet technology, cloud services and cloud computing have been vigorously developed. A network card is a piece of computer hardware designed to allow a computer to communicate over a computer network. The PCIe network card is a network component working at a data link layer, is an interface for connecting a computer and a transmission medium in a local area network, and not only can implement physical connection and electrical signal matching with the transmission medium of the local area network, but also relates to functions of frame sending and receiving, frame encapsulation and decapsulation, medium access control, data encoding and decoding, and data caching, and the like. The server network card is generally used for connection between a server and a network device such as a switch.
The PCIe Network card is used as one of PCIe external cards, and the main processor unit is an NIC (Network interface controller). The firmware of the NIC is stored in Flash. Limited by the working environment of the PCIe network card, the problem of inconvenient firmware upgrade exists in two links of development and maintenance, and the current methods mainly include the following methods:
(1) a temporary burn socket method. Namely, a burn-in seat is reserved in advance for the PCIe network card in the development stage, and the Flash is fixed on the PCIe network card through the burn-in seat. If the firmware is required to be upgraded, the Flash is taken down and put back after being upgraded by the burner. The method has two disadvantages, one is that the burning seat has a certain structural height, which easily causes the problems of structural interference and heat dissipation; secondly, if the burning seat is only reserved in the development stage, the same situation is removed after mass production, which causes inconvenience in the maintenance stage.
(2) A factory off-line burning method. Namely, the network card firmware is burnt in Flash in advance through a burner, and then the network card firmware is produced on line and attached to a PCIe network card PCB. In this way, if the firmware needs to be upgraded, the firmware can be removed again unless the upgrading is realized through the (3), and the condition of few upgrades can be dealt with.
(3) PCIe In-Band (In-Band) upgrade method. I.e., upgrade the firmware under the OS system by means of PCIe In-Band (In-Band). The method firstly needs development and maintenance personnel to provide reliable server peripheral equipment and carry an OS and a drive system, has harsh environmental requirements and low upgrading efficiency, and is not beneficial to batch maintenance.
The schemes (1) and (2) actually require server unpacking operation, are inconvenient to maintain and introduce unnecessary operation risks; (3) the solution requires a server environment hosting an OS and drivers. The existing network card firmware upgrading operation is complex.
Disclosure of Invention
The embodiment of the invention provides a CPLD-based network card firmware upgrading device and method, which are used for solving the problem of complex firmware upgrading operation in the prior art.
In order to solve the technical problem, the embodiment of the invention discloses the following technical scheme:
the invention provides a CPLD-based network card firmware upgrading device, which comprises a network card, an operation interface, a CPLD, a storage unit and an NIC network control chip, wherein the network card comprises a plurality of Ethernet interfaces and PHY chips; the operation interface is connected with the Ethernet interface and used for sending a firmware upgrading signal to the network card and sending the firmware upgrading signal to the CPLD through the PHY chip, the CPLD analyzes the firmware upgrading signal, when the firmware upgrading signal is a command frame, the state jumps to debug and resets the NIC network control chip, the CPLD continuously receives and analyzes a data frame sent by the operation interface and writes the data frame into the storage unit, and the NIC network control chip loads the firmware from the storage Flash after the server is powered on.
Further, the network card further comprises a PCIE golden finger connected with the server mainboard, and the BMC acquires the state of the network card and the firmware information of the network card through the SMBUS.
Further, the CPLD comprises
The Ethernet interface control unit is used for acquiring the firmware upgrading signal, restoring clock information and extracting an Ethernet packet;
the framing and unframing unit is used for separating a data frame and a command frame in the Ethernet packet and identifying the command frame and the data frame of firmware upgrading operation; when the command frame is identified, the response operation interface completes interaction; when the data frame is identified, transmitting the data frame to a data caching unit;
the data cache unit is used for caching data, processing the data into a format required by firmware and writing the data into the storage unit through the SPI;
the reset control unit controls the NIC network control chip to be in a reset state when receiving the command frame and controls the NIC network control chip to be kept in the reset state in the process of receiving the data frame;
and the state machine is used for controlling the whole interactive process of the operation interface and the CPLD.
Further, the CPLD also includes a status register and a version register; the status register is used for recording the current running state of the CPLD, and the version register is used for recording the current firmware version information of the network card.
Further, the CPLD also comprises an LED control unit which indicates that the current mode is debug mode through continuous flashing of a Link LED of the Ethernet.
The second aspect of the present invention provides a network card firmware upgrading method based on CPLD, based on the device, the method includes the following steps:
sending an Ethernet command frame through an operation interface, and establishing connection with a network card;
after the network card identifies the Ethernet command frame, the CPLD jumps to a debug mode, resets an NIC network control chip and feeds back the current mode state to an operation interface;
after receiving the feedback signal, the operation interface sends the firmware to the network card in the form of an Ethernet data frame, and the CPLD analyzes the data frame, caches and writes the data frame into the storage unit;
and after the server is restarted, the NIC network control chip loads the firmware from the storage Flash, runs the process of the processor and finishes the upgrading of the network card firmware.
Further, the method further comprises:
and the data frame is stored into a required format, after being written into the storage unit, the data frame is subjected to version verification, the response frame is fed back to inform the operation interface that the writing is finished, and the firmware version information is stored.
The effect provided in the summary of the invention is only the effect of the embodiment, not all the effects of the invention, and one of the above technical solutions has the following advantages or beneficial effects:
1. the firmware upgrade in the Ethernet mode is realized through the CPLD, great convenience is provided for the firmware upgrade in the development and maintenance stages, the unpacking operation is not needed, and a server environment for loading an OS (operating system) and a driver is not needed.
2. The CPLD analyzes a firmware upgrading signal sent by the web operation interface, recognizes a command frame and a data frame, and when recognizing the command frame again, the network card is in a debug mode, simultaneously receives a firmware data frame sent by the web operation interface, writes the firmware into a flash, and finishes the firmware upgrading of the network card after restarting. The whole operation is automatically completed, the case does not need to be disassembled, the complex environment is not required to be built, and the working efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of the construction of the apparatus of the present invention;
FIG. 2 is a block diagram of a CPLD functional implementation;
FIG. 3 is a schematic flow diagram of the method of the present invention.
Detailed Description
In order to clearly explain the technical features of the present invention, the following detailed description of the present invention is provided with reference to the accompanying drawings. The following disclosure provides many different embodiments, or examples, for implementing different features of the invention. To simplify the disclosure of the present invention, the components and arrangements of specific examples are described below. Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed. It should be noted that the components illustrated in the figures are not necessarily drawn to scale. Descriptions of well-known components and processing techniques and procedures are omitted so as to not unnecessarily limit the invention.
As shown in fig. 1, the device for upgrading the firmware of the network card based on the CPLD of the present invention includes the network card and the web operation interface. The network card comprises a plurality of Ethernet interfaces (Ethernet A, Ethernet B and the like), a PHY chip, a CPLD, a storage unit flash, an NIC network control chip and PCIE golden fingers. The web operation interface is connected with the Ethernet interface and used for sending a firmware upgrading signal to the network card and sending the firmware upgrading signal to the CPLD through the PHY chip, the CPLD analyzes the firmware upgrading signal, when the firmware upgrading signal is a command frame, the state jumps to debug and resets the NIC network control chip, and the CPLD continues to receive and analyze a data frame sent by the operation interface and writes the data frame into the storage unit. And after the server is restarted, the NIC network control chip loads the firmware from the storage Flash, runs the process of the processor and finishes the firmware upgrade. The PCIE golden finger is used for being connected with a PCIE slot of the server mainboard, and the BMC acquires the state of the network card and the firmware information of the network card through the SMBUS.
As shown in fig. 2, the CPLD includes an ethernet interface control unit, a framing and unframing unit, a data buffering unit, an SPI interface control unit, a state machine, an LED control unit, a reset control unit, a state register, a version register, and an I2C interface control unit.
The ethernet interface control unit is used for receiving the ethernet data stream (i.e. firmware upgrade signal) sent by the PHY chip, restoring the clock information of the ethernet data stream, and extracting the ethernet packet. The framing and de-framing unit is used for separating a data frame and a command frame in the Ethernet packet and identifying the command frame and the data frame of firmware upgrading operation; when the command frame is identified, the response operation interface completes interaction; when the data frame is identified, the data frame is transmitted to the data buffer unit. The command frame and the data frame of the upgrading firmware operation sent by the web operation interface have special command definitions, so that the command frames and the data frames are convenient to identify. The data cache unit is used for caching data, processing the data into a format required by firmware, and writing the data into the storage unit through the SPI interface. The required format is a.bin file. When receiving the command frame, the Reset control unit controls the NIC network control chip to be in a Reset state through the Reset pin, and controls the NIC network control chip to be kept in the Reset state in the data frame receiving process; the state machine is used for controlling the operation interface and the whole interactive process of the CPLD, performing logic function control and operation step jumping in the whole process, and jumping the state to a debug mode after recognizing the command frame.
The status register is used for recording the current running state of the CPLD, and the version register is used for recording the current firmware version information of the network card. The status register and the version register are in information interaction with external elements through an I2C interface control unit. The LED control unit indicates that the Ethernet is in debug mode currently through the continuous flashing of the Link LED of the Ethernet.
Under the normal power-on condition, the Ethernet data stream is not processed in the CPLD, but is directly transmitted to the NIC end from the PHY chip; meanwhile, the Link LED of the Ethernet port is also directly controlled by the NIC; the SPI interface of the CPLD maintains high configuration and does not influence the normal loading of the NIC. And the NIC network control chip loads firmware from the storage Flash and runs a processor process.
As shown in fig. 3, the method for upgrading the network card firmware based on the CPLD of the present invention includes the following steps:
s1, sending Ethernet command frame through the operation interface, establishing connection with the network card;
s2, after the network card identifies the Ethernet command frame, the CPLD jumps to a debug mode, resets the NIC network control chip and feeds back the current mode state to the operation interface;
s3, after receiving the feedback signal, the operation interface sends the firmware to the network card in the form of Ethernet data frame, and the CPLD analyzes the data frame, caches and writes in the memory cell;
and S4, after the server is restarted, the NIC network control chip loads the firmware from the storage Flash, runs the processor process and finishes the upgrade of the network card firmware.
And after the data frame is stored into a required format and is written into the storage unit, version verification is carried out, a response frame is fed back to inform an operation interface that the writing is finished, and the firmware version information is stored.
The implementation process of the above steps S1-S4 is based on the network card firmware upgrading device in the above embodiment.
The foregoing is only a preferred embodiment of the present invention, and it will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the principle of the invention, and such modifications and improvements are also considered to be within the scope of the invention.
Claims (7)
1. A network card firmware upgrading device based on CPLD comprises a network card, wherein the network card comprises a plurality of Ethernet interfaces and PHY chips, and is characterized by also comprising an operation interface, a CPLD, a storage unit and an NIC network control chip; the operation interface is connected with the Ethernet interface and used for sending a firmware upgrading signal to the network card and sending the firmware upgrading signal to the CPLD through the PHY chip, the CPLD analyzes the firmware upgrading signal, when the firmware upgrading signal is a command frame, the state jumps to debug and resets the NIC network control chip, the CPLD continuously receives and analyzes a data frame sent by the operation interface and writes the data frame into the storage unit, and the NIC network control chip loads the firmware from the storage Flash after the server is powered on.
2. The CPLD-based network card firmware upgrading device according to claim 1, characterized in that the network card further comprises PCIE golden fingers connected with a server motherboard, and the BMC acquires the state of the network card and the network card firmware information through SMBUS.
3. The CPLD-based network card firmware upgrade device according to claim 1, wherein the CPLD comprises
The Ethernet interface control unit is used for acquiring the firmware upgrading signal, restoring clock information and extracting an Ethernet packet;
the framing and unframing unit is used for separating a data frame and a command frame in the Ethernet packet and identifying the command frame and the data frame of firmware upgrading operation; when the command frame is identified, the response operation interface completes interaction; when the data frame is identified, transmitting the data frame to a data caching unit;
the data cache unit is used for caching data, processing the data into a format required by firmware and writing the data into the storage unit through the SPI;
the reset control unit controls the NIC network control chip to be in a reset state when receiving the command frame and controls the NIC network control chip to be kept in the reset state in the process of receiving the data frame;
and the state machine is used for controlling the whole interactive process of the operation interface and the CPLD.
4. The device for upgrading the firmware of the network card based on the CPLD of claim 3, wherein the CPLD further comprises a status register and a version register; the status register is used for recording the current running state of the CPLD, and the version register is used for recording the current firmware version information of the network card.
5. The device of claim 3, wherein the CPLD further comprises an LED control unit for indicating that the current debug mode is set by continuous flashing of the Link LED of the Ethernet.
6. A CPLD-based network card firmware upgrading method based on the device of any one of claims 1 to 5, characterized in that the method comprises the following steps:
sending an Ethernet command frame through an operation interface, and establishing connection with a network card;
after the network card identifies the Ethernet command frame, the CPLD jumps to a debug mode, resets an NIC network control chip and feeds back the current mode state to an operation interface;
after receiving the feedback signal, the operation interface sends the firmware to the network card in the form of an Ethernet data frame, and the CPLD analyzes the data frame, caches and writes the data frame into the storage unit;
and after the server is restarted, the NIC network control chip loads the firmware from the storage Flash, runs the process of the processor and finishes the upgrading of the network card firmware.
7. The CPLD-based network card firmware upgrade method according to claim 6, characterized in that the method further comprises:
and the data frame is stored into a required format, after being written into the storage unit, the data frame is subjected to version verification, the response frame is fed back to inform the operation interface that the writing is finished, and the firmware version information is stored.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911239518.XA CN111158731A (en) | 2019-12-06 | 2019-12-06 | CPLD-based network card firmware upgrading device and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911239518.XA CN111158731A (en) | 2019-12-06 | 2019-12-06 | CPLD-based network card firmware upgrading device and method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111158731A true CN111158731A (en) | 2020-05-15 |
Family
ID=70556513
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911239518.XA Withdrawn CN111158731A (en) | 2019-12-06 | 2019-12-06 | CPLD-based network card firmware upgrading device and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111158731A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112218289A (en) * | 2020-09-18 | 2021-01-12 | 中煤科工集团重庆研究院有限公司 | Wireless upgrading system and method for positioning card |
CN113411212A (en) * | 2021-06-16 | 2021-09-17 | 英业达科技有限公司 | BIOS control system of intelligent network card and BIOS control method of intelligent network card |
CN113688093A (en) * | 2021-08-24 | 2021-11-23 | 中电科申泰信息科技有限公司 | Intelligent network card based on Ethernet controller |
-
2019
- 2019-12-06 CN CN201911239518.XA patent/CN111158731A/en not_active Withdrawn
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112218289A (en) * | 2020-09-18 | 2021-01-12 | 中煤科工集团重庆研究院有限公司 | Wireless upgrading system and method for positioning card |
CN112218289B (en) * | 2020-09-18 | 2022-11-08 | 中煤科工集团重庆研究院有限公司 | Wireless upgrading system and method for positioning card |
CN113411212A (en) * | 2021-06-16 | 2021-09-17 | 英业达科技有限公司 | BIOS control system of intelligent network card and BIOS control method of intelligent network card |
CN113411212B (en) * | 2021-06-16 | 2023-02-03 | 英业达科技有限公司 | BIOS control system of intelligent network card and BIOS control method of intelligent network card |
CN113688093A (en) * | 2021-08-24 | 2021-11-23 | 中电科申泰信息科技有限公司 | Intelligent network card based on Ethernet controller |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107423169B (en) | Method and system for testing high speed peripheral device interconnection equipment | |
CN105354070B (en) | A method of passing through I2C updating apparatus firmware | |
CN111158731A (en) | CPLD-based network card firmware upgrading device and method | |
US9934187B2 (en) | Hot-pluggable computing system | |
CN102081568B (en) | Multi-motherboard server system | |
CN107066746B (en) | Method for realizing PCA9555 function through CPLD based on I2C interface | |
CN114116378A (en) | Method, system, terminal and storage medium for acquiring PCIe device temperature | |
CN108062234B (en) | System and method for realizing server host to access BMC FLASH through mailbox protocol | |
CN103412836A (en) | Hot plug processing method, device and system | |
CN115981971A (en) | Lighting method of server hard disk and server | |
US11308002B2 (en) | Systems and methods for detecting expected user intervention across multiple blades during a keyboard, video, and mouse (KVM) session | |
CN111124985A (en) | Read-only control method and device for mobile terminal | |
WO2014000299A1 (en) | Serial port redirection processing method, device, and system | |
CN210721440U (en) | PCIE card abnormity recovery device, PCIE card and PCIE expansion system | |
CN115718529A (en) | Reinforced computer mainboard system based on loongson CPU COME module | |
CN211375594U (en) | Interface extension mechanism based on SW421 treater | |
US20200387468A1 (en) | Information Processing System And Computer-Readable Recording Medium Storing Program | |
CN114004184A (en) | Improved DC-SCM device | |
CN115905072A (en) | Computer system, control method based on PCIe device and related device | |
CN102243601B (en) | Debugging system and relevant method for detecting and controlling state of computer host | |
CN114253561B (en) | System and method for automatically burning firmware | |
CN111294985A (en) | Portable miner lamp communication system based on 4G, communication method and construction method | |
CN117472289B (en) | Storage configuration adjustment method, device, system, equipment and medium of server | |
WO2023160699A1 (en) | Single-board management system, method and apparatus, and device | |
CN219533773U (en) | Firmware burning circuit and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20200515 |
|
WW01 | Invention patent application withdrawn after publication |