The method of the Basic Input or Output System (BIOS) of upgrading FLASH device
Technical field
The present invention relates to method for upgrading software, refer to the method for the Basic Input or Output System (BIOS) (BIOS) of FLASH device in a kind of upgrading products especially.
Background technology
The programming mode of FLASH device is divided into two big classes: (OBP On-BoardProgramming) and from plate (Off-Board) programmes in the plate programming.Be meant after programming device is soldered on the printed circuit board (PCB) in plate programming it is programmed.Be meant before programming device is installed to printed circuit board (PCB) from plate programming it is programmed.
Utilize ICT (ICT:In-Circuit Test in plate programming method commonly used, on-line testing) online programming (ICP that carries out, In-Circuit Programming), systems programming (the ISP that utilizes CPU to carry out, In-System Programming) and utilize JTAG (Joint Test Action Group, JTAG often refers to boundary scan technique) carry out in plate programming etc.
The online programming that utilizes ICT to carry out is meant by ICT equipment and is connected on the printed circuit board (PCB), provides necessary isolation and programming signal to drive and realizes programming.But the ICT apparatus expensive also can't safeguarded on-the-spot the use.
Systems programming is meant the programming that realizes programming device with programmed algorithm of wiping of carrying out programming device by the CPU in the system.As shown in Figure 1, by address wire and the control line that CPU controls the FLASH device, realize the bios program upgrading.
The shortcoming of this kind method is as follows:
1, require that cpu chip is arranged on the circuit board, and can operate as normal;
2, to cause the loss that to retrieve in order preventing to upgrade to fail, to need, when the upgrading failure, more original program is write back again program backup portion to be upgraded; Need the program of the read-write FLASH chip of write specialized, the FLASH model is different, and program also needs to change;
If fail in 3 escalation processs, will cause system normally to start.
Along with the development of JTAG technology, support that the device of JTAG standard is more and more, though FLASH device itself is not supported the JTAG standard, all support the JTAG standard the chip (as CPU, bridge sheet, logic chip etc.) that interconnects with FLASH.So utilize the JTAG technology to realize that the programming at plate of bios program in the FLASH device become a kind of important means.As shown in Figure 2, for utilizing computing machine and loaded cable to realize the synoptic diagram of bios program upgrading in the FLASH.Upgrading software system and the needed data file of upgrading have been installed on the computing machine, can pass through multiple hardwares interface shapes such as parallel port, PCI (PeripheralComponent Interconnection local bus) interface, network interface and be connected with circuit board, loading control of intermediate demand is transferred to boundary scan interface (jtag interface) on the circuit board with these interfaces.Control address wire, data line and the control line of FLASH device by the JTAG chain of CPU and realize the bios program upgrading.
Said method shortcoming as follows:
1, needs terminal computer, special loading control and loaded cable;
2, can't realize the remote upgrade of BIOS.
Summary of the invention
The invention provides a kind of BIOS upgrade method of FLASH device, can be effectively the bios program of FLASH device in the product be carried out online or remote upgrade.
The inventive method comprises: embed a test bus controller (TBC) on the master control borad of product, be connected with CPU (central processing unit); Boundary scanning device on the business board is connected into boundary scan chain, the FLASH device on the business board is connected with boundary scan chain; Described boundary scan chain is connected on the border scanning system bus by the addressable scanning port (ASP) that is arranged on the business board;
Call the Basic Input or Output System (BIOS) ROMPaq by CPU (central processing unit), driving test bus controller produces the boundary scan signal flow, passes through border scanning system bus and addressable scanning port, the boundary scan chain that control is connected with the FLASH device is loaded into the Basic Input or Output System (BIOS) ROMPaq in the FLSAH device.
Boundary scan chain on the described business board can be one or more; Each FLASH device can be connected with identical or different boundary scan chain.
Described Basic Input or Output System (BIOS) ROMPaq comprises programming information file and upgrade data file; Described programming information file comprises the link information of boundary scan chain information, FLASH device information, FLASH device and boundary scan chain and the time sequence information of operation FLASH; After CPU (central processing unit) receives the upgrading order that the user sends, according to designated parameters in the order, programming information file and upgrade data file are construed to boundary scan data, send into the border scanning system bus by driving described test bus controller generation boundary scan signal flow.
Described upgrading order can be by sending or send by the Internet Long-distance Control with the direct-connected control desk of master control borad.
Described programming information file and upgrade data file can download to the storer of product from other storage medium in the process of upgrading.
Described programming information file and upgrade data file can be stored in Compact Flash (CF) card, flash memory or other storage medium of product in advance.
Described border scanning system bus is made up of five boundary scan signal wires, is respectively: test pattern is selected incoming line, test clock incoming line, test data incoming line, test data output line and test logic reset line.
Described test bus controller can all turn-off the signal that transmits in the scan signal line of border.
According to said method of the present invention, if master control borad is provided with the backup plate, and master control borad is provided with the FLASH device that need carry out the Basic Input or Output System (BIOS) upgrading, then the FLASH device on the master control borad is connected with boundary scan chain on this plate, be connected on the border scanning system bus by the addressable scanning port, and make slave board have identical setting; By turn-offing the border scanning system bus on master control borad and one of them plate of slave board, realize the Basic Input or Output System (BIOS) program upgrade of the FLASH device on another plate.
The inventive method has following advantage:
1, BIOS upgrading order can issue at the scene, also can long-rangely issue, and can realize online upgrading or the remote upgrade of BIOS in the product so easily.Upgrading and maintenance cost have been reduced.
2, the present invention can realize the bios program upgrading of all FLASH devices in the product, and the BIOS upgrading of master control borad can adopt the mode of masterslave switchover to realize.
3, the present invention only needs the master control borad operate as normal to get final product, and each business board only need power on and can upgrade, and restrictive condition is considerably less.
4, the present invention is not influenced upgrading again by unexpected termination in escalation process, and reliability is than higher.
Description of drawings
Fig. 1 is the synoptic diagram that the signal wire that utilizes CPU on the circuit board directly to control FLASH is realized the BIOS upgrading;
Fig. 2 realizes bios program upgrading synoptic diagram for utilizing computing machine and loaded cable;
Fig. 3 realizes the frame diagram of BIOS upgrading for the present invention;
Fig. 4 is the annexation synoptic diagram of the boundary scan chain in FLASH device and the chip in the embodiment of the invention;
Fig. 5 is a software control flow chart in the inventive method.
Embodiment
General electronic product all has master control borad and business board, as shown in Figure 3, a TBC (Test BusController, test controller) is embedded on the master control borad, described TBC for example: the LVT8980 of the SCANSTA101 of NS company, TI company etc.; ASP (Addressable scan port, addressable scanning port) chip is placed on each business board, described ASP for example: the LVT8996 of the SCANSTA111 of NS company, TI company etc.; JTAG device on each business board all connects into one or more of JTAG chains, and is connected with ASP on every block of plate.The pin of the FLASH device on the business board is connected with boundary scan cell in JTAG chain wherein; TBC communicates by letter with each ASP by the JTAG system bus on the backboard.Concrete grammar is: during the TBC transmitting order to lower levels, carry the address of the ASP that needs gating, the ASP on the matching addresses is by gating, and beams back a respond packet, and the address of oneself is returned.The ASP that matching addresses does not go up does not send out respond packet.An ASP can be connected with one or more JTAG chain, and ASP is by selecting different JTAG chains, and the corresponding FLASH device of control realizes that bios program loads.
The JTAG system bus is made up of five JTAG signal wires, comprise TMS (Test Mode Selectinput, test pattern selection incoming line), TCK (Test ClocK input, the test clock incoming line), TDI (Test Data Input, the test data incoming line), TDO (Test Data Output, the test data output line) and TRST (Test Logic Reset, test logic reset line).
Referring to Fig. 4, be the annexation synoptic diagram of the boundary scan chain of a FLASH device and a JTAG chip.Support among the figure that each boundary scan cell connects into a JTAG chain in the chip of JTAG standard, and the JTAG chain is connected with the pin of FLASH, five JTAG signal wires are controlled this JTAG chain by test access port (TAP), thereby by the pin of JTAG chain control FLASH, realize read-write operation indirectly to the FLASH device.A FLASH device is connected with a JTAG chain, if on a business board a plurality of FLASH devices are arranged, then this a plurality of FLASH devices can be connected with a JTAG chain simultaneously, also can be respectively and different JTAG chain connections.
If master control borad is provided with the backup plate, the CPU in then also embedding a TBC and back up plate on the backup plate is connected.If master control borad is provided with the FLASH device that needs upgrading, then respectively the FLASH device on the active/standby plate is connected with boundary scan chain on this plate, be connected on the JTAG system bus by ASP; By turn-offing the JTAG system bus on the active/standby plate respectively, realize the bios program upgrading of the FLASH device on the active/standby plate.Concrete grammar is: make the TBC on the backup plate be broken into high resistant to whole the closing of the signal of core bus side, by the JTAG chain that is connected with the FLASH device on the TBC gating backup plate on the control of the CPU on the master control borad master control borad, realize the bios program upgrading of FLASH device on the backup plate; Otherwise, make the TBC on the master control borad be broken into high resistant to whole the closing of the signal of core bus side, by the JTAG chain that is connected with the FLASH device on the TBC gating master control borad on the CPU control backup plate on the backup plate, realize the bios program upgrading of FLASH device on the master control borad.
The BIOS ROMPaq, can be in the process of upgrading by any way, as FTP (FileTransfer Protocol, file transfer protocol (FTP)) etc. download to the storer of product from other storage medium, be kept at CF (Compact Flash Card, the Compact Flash (CF) card) card of product in advance or FLASH goes up or other storage medium in.
The BIOS ROMPaq comprises programming information file and the needed data file of upgrading, and wherein the programming information literature kit contains the link information of JTAG chain information, FLASH device information, JTAG chain and FLASH, the time sequence information of operation FLASH etc.After the BIOS upgrading order that CPU reception user in the master control borad sends, start an administration module, as shown in Figure 5, administration module receives and resolve command, if upgrading order, then at first compile the programming information file, extract scan chain information, the link information of FLASH and JTAG link and FLASH time sequential routine, put out the JTAG data in order according to correlation parameter and upgrade data running paper in the upgrading order then, drive TBC chip output JTAG signal at last and flow on the JTAG system bus, realize being attached thereto the bios program upgrading of the FLASH device that connects by the corresponding JTAG chain of gating.
The upgrading order can adopt the mode of order line to issue by the control desk scene that is connected with master control borad, also can start the BIOS upgrading by long-range CPU that is handed down on the master control borad such as Internets.
The above; only for the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, and anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claims.