A kind of display card BIOS update method based on the IO access mode
Technical field
The present invention relates to video card research and development fields, particularly a kind of can be simple in computer system, fast and the method for reliably updating display card BIOS (Basic Input Output System, Basic Input or Output System (BIOS)).
Background technology
Display card BIOS comprises traditional VGA (Video Graphics Array, Video Graphics Array) VBE of BIOS and expansion (VESA BIOS EXTENSION, the BIOS of VESA expansion), it has comprised the hardware controls program of video card, also deposit in addition the information such as video card model, specification, production firm, the time of making the product, and when start, video card has been carried out initialization.Display card BIOS plays an important role in computer system, and it affects the performance of video card capabilities.
The same with system bios, display card BIOS is stored in ROM (ROM (read-only memory)) equally.Power-on self-test (POST) is a large ingredient of system bios, its be responsible for powering on rear detection and initial work to computer system all hardware and register, this wherein comprises hints obliquely at being kept at display card BIOS in the video card expansion ROM zone that (Shadow) keeps for display card BIOS in the system hosts.With reference to figure 1, the invention provides the flow process that power-on self-test is hinted obliquely at the video card expansion ROM: enable expansion ROM, and expansion ROM is mapped to zone that is not occupied in system address space; Search reflection (Image) corresponding in expansion ROM and by the internal storage access mode, it copied to main memory reserved area (from 0C0000h to 0DFFFFh); Remove to enable (Disable) expansion ROM; Call the initialization function.After hinting obliquely at the video card expansion ROM, display card BIOS just is present in main memory, is equivalent to " shadow " of video card expansion ROM, and operating system and driver call relevant display card BIOS function by direct access main memory.
Along with the upgrading of the progress of technology and computer software and hardware system, in video card, some incomplete problems can come out, and the research staff need to constantly revise and improve display card BIOS, upgrades display card BIOS thereupon.Yet after completing the video card expansion ROM and hinting obliquely at, because expansion ROM is gone to enable, and initial allocation is operated system recoveries to the memory address space of expansion ROM, so application program can not be by conventional memory access mode access expansion ROM.In addition, traditional flow process of upgrading display card BIOS under DOS seems loaded down with trivial details tediously long, easily makes mistakes, and causes upgrading unsuccessfully, even causes the hardware damage of unrepairable.
Summary of the invention
The objective of the invention is to develop a kind of display card BIOS update method of simple and effective, make the renewal of display card BIOS easily and fast with reliable.
A kind of display card BIOS update method based on the IO access mode of the present invention, it comprises the following steps:
(1) start Microsoft's Window operating system with video card to be updated or third party's video card;
(2) select and locate video card to be updated according to vendor identification number (Vendor ID) and device identification number (Device ID);
(3) whether judgement video card PCI to be updated (Peripheral Component Interconnect, peripheral element extension interface) configuration space command register enables the IO access.If video card pci configuration space command register to be updated does not enable the IO access, enable the IO access;
(4) read old BIOS in video card expansion ROM to be updated by the IO access mode;
(5) by the IO access mode, new BIOS is write video card expansion ROM to be updated;
(6) read BIOS new in video card expansion ROM to be updated and complete verification by the IO access mode;
(7) restart Microsoft's Window operating system.
Video card of the present invention is based on PCI or PCI-E bus protocol, and applied for the IO address space of some.The computer system power-on self-test is initiated the memory access request to the video card expansion ROM, BIOS in the video card expansion ROM is mapped to the computer system main memory, and the memory address space of expansion ROM is recovered, and application program can't be by conventional memory access mode read-write expansion ROM; After entering operating system, the display card BIOS refresh routine is initiated IO read and write access request to expansion ROM according to the IO address space of video card application.In addition, the interface of video card expansion ROM adopts SPI (Serial Peripheral Interface, serial peripheral interface) agreement, and storage medium can be the FLASH(flash memory) or the EEPROM(electricallyerasable ROM (EEROM)).PCI or PCI-E IO request of access that video card is initiated the display card BIOS refresh routine convert SPI command sequence and the final SPI of formation serial signal to, thereby complete the read-write to expansion ROM.
After a kind of display card BIOS update method based on the IO access mode of the present invention is taked the IO access mode to solve video card to enter operating system, though the expansion ROM memory address space is invalid, but still can quickly and reliably complete renewal to display card BIOS, shortened the construction cycle of display card BIOS.In addition, the display card BIOS update method based on Microsoft's Window operating system that the present invention proposes, simple, convenient.
Description of drawings
Fig. 1 computer system power-on self-test of the present invention video card expansion ROM is hinted obliquely at process flow diagram;
Fig. 2 the present invention is based on the process flow diagram of the display card BIOS update method better embodiment of IO access mode.
Embodiment
With reference to Fig. 2, the display card BIOS update method better embodiment that the present invention is based on the IO access mode comprises the following steps:
201: after starting Microsoft's Window operating system, video card is selected and located to the display card BIOS refresh routine at first according to vendor identification number (Vendor ID) and device identification number (Device ID).Be provided with vendor identification number and the device identification number of acquiescence in the display card BIOS refresh routine, if the vendor identification of default setting and video card to be updated number and device identification number are consistent, need not to elect again; Otherwise need the vendor identification number of further input video card to be updated and device identification number to locate video card to be updated.
202: judge whether the pci configuration space command register has enabled the IO access.After entering operating system, conventional expansion ROM internal storage access mode lost efficacy, and the display card BIOS refresh routine is by IO access mode access expansion ROM.Operating system may go to enable (Disable) IO access, effectively whether the IO access enabled position (lowest order) of display card BIOS refresh routine viewing command register (side-play amount is 04h) (being 1), be 1 as IO access enabled position, need not to revise; Otherwise revising this position is 1.
203: back up the old BIOS of video card to be updated.Before preparing to upgrade display card BIOS, display card BIOS to be updated is backed up, in case display card BIOS upgrades unsuccessfully.During the backup display card BIOS, at first obtain the corresponding I address space of video card application to be updated, then read BIOS old in expansion ROM and be saved in file by the IO access mode.
204: read in new BIOS and write video card expansion ROM to be updated from new BIOS file.When writing expansion ROM, at first obtain the corresponding I address space of video card application to be updated, then by the IO access mode, new BIOS is write expansion ROM.
205: read the new BIOS of video card to be updated and complete verification.At first, read the BIOS that has upgraded in expansion ROM and it is saved in file by the IO access mode, again this file and the new BIOS file of video card to be updated are compared, represent that as the comparison result coupling display card BIOS is updated successfully, finish refresh routine, the reboot operation system can use new display card BIOS; Otherwise repeating step 204 and 205 is until be updated successfully.If (as outage) causes treating that display card BIOS upgrades unsuccessfully because unartificial factor, by the startup of third-party display card or integrated graphics card complete operation system; After entering operating system, still complete recovery or renewal to display card BIOS to be updated according to step shown in Figure 2.