CN103150188B - The compatible video card fast initializing method of the x86 of non-x 86 instruction set computer - Google Patents

The compatible video card fast initializing method of the x86 of non-x 86 instruction set computer Download PDF

Info

Publication number
CN103150188B
CN103150188B CN201310087046.7A CN201310087046A CN103150188B CN 103150188 B CN103150188 B CN 103150188B CN 201310087046 A CN201310087046 A CN 201310087046A CN 103150188 B CN103150188 B CN 103150188B
Authority
CN
China
Prior art keywords
video card
initialize
configuration
instruction
write operation
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.)
Active
Application number
CN201310087046.7A
Other languages
Chinese (zh)
Other versions
CN103150188A (en
Inventor
董攀
吴庆波
戴华东
张卫华
王伟
颜跃进
孔金珠
刘晓建
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National University of Defense Technology
Original Assignee
National University of Defense Technology
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by National University of Defense Technology filed Critical National University of Defense Technology
Priority to CN201310087046.7A priority Critical patent/CN103150188B/en
Publication of CN103150188A publication Critical patent/CN103150188A/en
Application granted granted Critical
Publication of CN103150188B publication Critical patent/CN103150188B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention discloses the compatible video card fast initializing method of x86 of a kind of non-x 86 instruction set computer, and implementation step is as follows: initialize of 1) dispatching from the factory: feature code, working order attribute and the configuration operation sequence that performs in the process of VBE initialize to obtain in simulation are write in the nonvolatile memory of video card respectively; 2) user's initialize: after system power-up, the feature code of video card is compared with the video card PCI configuration information read in bus, if both coincide, read also order and perform in nonvolatile memory the write operation instruction of the configuration operation sequence prestored, then obtain the working order attribute of video card and working order attribute is given high-level driving program and initiates the initialize that screen display operation completes video card. The present invention has that period of reservation of number is short, user's initialize is fast, compatible good, the video card of video card supports the advantage that complexity is low, Consumer's Experience good, healthy and strong property is high.

Description

The compatible video card fast initializing method of the x86 of non-x 86 instruction set computer
Technical field
The present invention relates to non-x 86 instruction set computer basic platform field, it is specifically related to video card fast initializing method when one realizes compatible universal video card (the compatible video card of x86) on non-x 86 instruction set computer platform.
Background technology
Man-machine interaction is most important in the meaning of modern computer, computer power up startup after top priority be exactly display translation, and whether healthy to user report system. The display translation of computer system is generally completed by display control unit equipment, and due to historical reasons, display control unit is often referred to as video card. Video card is after power, it is necessary to by CPU, it is carried out initial configuration, just can enter the conversion of normal display data and signal output state, and the information that now just has on indicating meter exports. Therefore the initialize speed of video card is the important factor affecting computer booting display speed.
Similar with the situation of multi-purpose computer CPU, the technology of high-performance video card acp chip is the monopolization of minority producer. These manufacturers are in order to protect the know-how of video card, and general underground handbook, initialize code, only provide the scale-of-two do not increased income to drive program specific operation system and hardware platform (being generally x86 platform). In this context, in order to the general initialization method problem being provided on x86 instruction set computer, these manufacturers combine be proposed VBE(VESABIOSExtensions) specification, provide unified instruction interface and the operating sequence of initialize video card on x86 computer, manufacturer is cured to the operating sequence specific to video card in the random read-only storage (ROM) of each video card in machine instruction mode again, just can be completed the initialize of video card in firmware by VBE interface interchange.
As the industry standard of x86 computer platform, VBE is for the adjustment of such as monitor resolution, color depth, it provides the display control unit access rule of standard, and software also obtains validity and the detail file of the various configurations of video card by VBE service if desired. The important foundation of VBE service is video card ROM, almost after each VBE service trigger, all can jump to the performed code being solidificated in ROM, to obtain the functional realiey specific to hardware. VBE can only as the standard of x86 computer, this is because: the instruction that (1) VBE specifies in ROM is directly performed by CPU, therefore can only be x86 machine code; (2) VBE employs on x86 platform I/O port operational order (in PCIE specification, this kind of instruction being called LegacyIO) in a large number that just have.
On non-x 86 computer platform, also there is no the unified standard of industry at present, it is possible to unified pattern and step initialize with drive video card equipment. OpenFirmware organizes and once makes a sets of plan, it may also be useful to the byte code of class Forth language realizes video card firmware, and to realize the platform-neutral of firmware code, but this kind of scheme could not be promoted at present, and major part manufacturer does not support. In this context, the video card initialization method simulated based on instruction is widely used. Instruction analogy method is the virtual machine performing x86 instruction based on software creation, mainly completes the simulation of three parts for the demand of video card, that is: internal memory spatial mappings, interrupt mechanism and instruction performs. Internal memory spatial mappings module complete video card with x86 platform needs during VBE mode initialisation ROM running space, IO address space and video card internal memory space mapping; Interrupt the break in service that mechanism simulation x86 platform BIOS provides; Instruction performs the target platform binary command that the x86 binary command in every bar ROM then converts to semantic equivalence. Many projects of increasing income all achieve the simulation execution technology towards the compatible video card of x86, wherein represents as typical taking x86emu project. X86emu develops based on C language, has good platform transplantation, can run preferably on the non-x such as ARM, PowerPC, MIPS, SPARC 86 instruction set computer, it is achieved the function of initializing of video card.
As shown in Figure 1, for non-x 86 computer platform (such as SPARCT2 treater platform), after system power-up, the instruction analogy method of prior art is by OBP(OpenBootProm) complete the initialize to equipment, its initialize primary process is:
1) OBP detects the PCI configuration information of video card in the process of scanning PCIE bus, thus obtains the location, base, configuration space of video card, location, I/O space base and location, base, internal memory space.
2) according to the configuration spatial description of video card, video card is regarded as LegacyIO video card by OBP, and configure video card on device PCI tree by way of the VGA control register of bridge equipment, I/O port (port) operational order that CPU is launched can directly arrive video card.
3) the standard display initialize process performing in VBE specification based on simulator to define, the basic step of this process is as follows:
A. performing vgabios code, after reading by the binary code in video card firmware, simulation performs;
B. simulation performs set-videomode operation, arranges the operating mode of video card, such as color depth and resolving power;
C. simulation performs get-videomode-info operation, obtains the working order attribute information of video card, such as display buffer regional address etc.;
D. simulation performs set-palete operation, arranges the palette that video card display needs.
4) information such as the video card resolving power of acquisition, color depth, display buffer regional address are given high-level supervisory control desk and are driven program or graphical window driving program by last OBP, can initiate screen display operation by senior driving program.
Instruction analogy method solves the general video card initialization problem on non-x 86 platform, it is possible to compatible common high-performance video card on the market. But instruction analogy method have also been introduced initialize speed and drags slow problem, its severity has direct relation with the single-threaded execution speed of platform CPU. For the CPU that some single-threaded ability is powerful not, such as on embedded processing device or SPARCT2 treater, the simulation initialize time of video card reaches the magnitude of tens of seconds, and this just means that computer has the long duration to show without any state after powering up.
In sum, on current non-x 86 computer platform, general use instruction simulation technique completes the initialize to general video card, this kind of technology can meet the compatible requirement to most high-performance video card, thus reduces the design complicacy of basic software, and software when avoiding video card to change is reopened and sent out. Owing to instruction simulation needs more cost to carry out instruction analysis and conversion, the consuming time longer of video card initialization can be caused, add " blind wait " time of user, user is difficult to judge whether computer is normal boot-strap in long-time, brings bigger negative impact to Consumer's Experience and machine service efficiency.
Summary of the invention
The compatible video card fast initializing method of x86 that the technical problem to be solved in the present invention is to provide that a kind of period of reservation of number is short, user's initialize is fast, compatible good, the video card of video card supports complexity is low, Consumer's Experience good, healthy and strong property is high non-x 86 instruction set computer.
In order to solve the problems of the technologies described above, the technical solution used in the present invention is:
The compatible video card fast initializing method of the x86 of non-x 86 instruction set computer, implementation step is as follows:
1) dispatch from the factory initialize: the PCI bus of initialize video card after system power-up, obtain the feature code with video card PCI configuration information; Perform VBE initialize by the simulation of instruction simulator, perform in simulation the process of VBE initialize monitor and record the I/O register to video card and internal memory write operation instruction also preservation be configuration operation sequence; Obtain the working order attribute of video card; Described feature code, configuration operation sequence, working order attribute are write respectively in the nonvolatile memory of video card;
2) user's initialize: the PCI bus of initialize video card after system power-up, feature code is read from the nonvolatile memory of video card, being compared with the video card PCI configuration information read in bus by this feature code, if both misfit, redirect performs step 1) and is dispatched from the factory by video card initialize; If both coincide, read also order and perform in described nonvolatile memory the write operation instruction of the configuration operation sequence prestored, read in described nonvolatile memory the working order attribute prestored, described working order attribute is given high-level supervisory control desk drives program or graphical window to drive program, drives program or graphical window to drive program initiation screen display operation to complete the initialize of video card by supervisory control desk;
Described step 1) carry out the dispatching from the factory detailed step of initialize is as follows:
1.1) after system power-up, the process of scanning PCIE bus detects the PCI configured head of video card, read video card attribute and address space information that PCI configured head obtains video card;
1.2) the feature code of video card is extracted according to the attribute information of video card, bus information and slot Information;
1.3) confirming that video card is LegacyIO video card, the I/O port operational order that the VGA register of configuration video card institute's approach bridge controller on device PCI tree makes CPU launch can directly arrive video card;
1.4) in instruction simulator, add the monitor component of the write operation instruction relating to video card configuration space, I/O space and internal memory space for monitoring;
1.5) simulate execution vgabios code successively by instruction simulator, simulation performs set-vediomode operation, simulation execution get-vediomode-info operation, intercepted and captured the write operation instruction relating to video card configuration space, I/O space and internal memory space simultaneously by described monitor component, it is recorded in configuration operation sequence by intercepting and capturing all write operation instruction sequences obtained;
1.6) the working order attribute returning parameter acquiring video card of get-vediomode-info operation is performed in the described simulation of storage zone mark;
1.7) set-palete operation is performed by the simulation of instruction simulator, monitored by described monitor component simultaneously and intercept and capture the write operation instruction relating to video card configuration space, I/O space and internal memory space, all write operation instruction sequences that intercepting and capturing obtain are recorded to team's tail of configuration operation sequence;
1.8) current whole configuration operation sequence is generated check code, and check code is added the team's tail being recorded to configuration operation sequence;
1.9) specific region in the nonvolatile memory of video card is wiped, then described feature code, configuration operation sequence, working order attribute are sequentially written in from the start address of the specific region the nonvolatile memory of described video card.
Described step 1.5) detailed execution step as follows:
1.5.1) performing vgabios code by the simulation of instruction simulator, after time delay waits the time of presetting, redirect performs next step;
1.5.2) performing set-vediomode operation by the simulation of instruction simulator, after time delay waits the time of presetting, redirect performs next step;
1.5.3) get-vediomode-info operation is performed by the simulation of instruction simulator, and the write operation instruction relating to video card configuration space, I/O space and internal memory space is intercepted and captured by described monitor component, it is recorded to intercepting and capturing all write operation instruction sequences obtained in configuration operation sequence.
Described step 1.5.3) in as follows by intercepting and capturing the detailed step that all write operation instruction sequences of obtaining are recorded in configuration operation sequence: be recorded in configuration operation sequence by intercepting and capturing all write operation instruction sequences obtained, if intercept and capture the write operation instruction existing in all write operation instructions obtained and repeating continuously simultaneously, then between continuous print write operation instruction, add delay according to the number of times repeated continuously, and the delay that the number of times repeated continuously adds more at most is more big.
Described step 2) carry out user's initialize detailed step as follows:
2.1) after system power-up, the process of scanning PCIE bus detects the PCI configured head of video card, read video card attribute and address space information that PCI configured head obtains video card; Confirming that video card is LegacyIO video card, the I/O port operational order that the VGA register of configuration video card institute's approach bridge controller on device PCI tree makes CPU launch can directly arrive video card;
2.2) from the nonvolatile memory of video card, feature code is read, the video card attribute information read in this feature code and bus, bus information and slot Information are contrasted, if misfitted, redirect performs step 1) and is dispatched from the factory by video card initialize, otherwise redirect performs next step;
2.3) the configuration operation sequence prestored is read in described nonvolatile memory, the check code of configuration operation sequence team tail is utilized configuration operation sequence to be verified, if verifying unsuccessful, redirect performs step 1) and is dispatched from the factory by video card initialize, otherwise redirect performs next step;
2.4) order performs the write operation instruction of record in described configuration operation sequence;
2.5) the working order attribute prestored is read in described nonvolatile memory; Described working order attribute is given high-level supervisory control desk drives program or graphical window to drive program, drives program or graphical window to drive program initiation screen display operation to complete the fast initialization of video card by supervisory control desk.
The present invention has following advantage:
1, the present invention dispatch from the factory in advance initialize time by instruction simulator simulation perform VBE initialize, the write operation instruction performing in simulation monitor in the process of VBE initialize and record the I/O register to video card and internal memory also preservation be configuration operation sequence, the write operation instruction of the configuration operation sequence then directly read when user's initialize and prestore in order execution nonvolatile memory, make use of the VBE specification that video card follows and carry out video card initialization, therefore, it is possible to compatible most commercially available video card, there is the advantage that video card is compatible good.
2, the expense that execution mechanism is only simulated in instruction by the present invention is included into the initialize stage of dispatching from the factory, final user can not perception, initialize of dispatching from the factory is in general consuming time for minute level, depends primarily on the read or write speed of nonvolatile memory, for current FLASH memory type, generally at 1��2 minute; By the pre-treatment of initialize of dispatching from the factory, in the present invention, the time of user's initialize directly depends on the execution speed of computer CPU, most CPU can complete video card initialization, output display over the display within 1 second, highly shortened the time of user's " blind wait ".
3, the present invention is when carrying out user's initialize, feature code is read from the nonvolatile memory of video card, this feature code is compared with the video card PCI configuration information read in bus, if both misfit, video card is dispatched from the factory initialize by redirect, damage for the accident of data of nonvolatile storage, the change of video card, the change of card slot can automatically identify, and automatically go back to initialize mode of dispatching from the factory to avoid fault.
Accompanying drawing explanation
Fig. 1 is the workflow schematic diagram that prior art performs video card initialization.
Fig. 2 is the overall basic workflow schematic diagram of the embodiment of the present invention.
Fig. 3 is the workflow schematic diagram of initialize of dispatching from the factory in the embodiment of the present invention.
Fig. 4 is the workflow schematic diagram of user's initialize in the embodiment of the present invention.
Embodiment
In the present embodiment, non-x 86 instruction set computer specifically refers to SPARCT2 treater platform (using PCIE bus), general video card has selected common AMD company series video card, it is inserted in the PCIE bus slot of SPARCT2 treater platform, after system power-up, complete the initialize to equipment particularly video card by OBP.
As shown in Figure 2, the implementation step of the compatible video card fast initializing method of the x86 of the present embodiment non-x 86 instruction set computer is as follows:
1) dispatch from the factory initialize: the PCI bus of initialize video card after system power-up, obtain the feature code with video card PCI configuration information; Perform VBE initialize by the simulation of instruction simulator, perform in simulation the process of VBE initialize monitor and record the I/O register to video card and internal memory write operation instruction also preservation be configuration operation sequence; Obtain the working order attribute of video card; Feature code, configuration operation sequence, working order attribute are write respectively in the nonvolatile memory of video card;
2) user's initialize: the PCI bus of initialize video card after system power-up, feature code is read from the nonvolatile memory of video card, being compared with the video card PCI configuration information read in bus by this feature code, if both misfit, redirect performs step 1) and is dispatched from the factory by video card initialize; If both coincide, read also order and perform in nonvolatile memory the write operation instruction of the configuration operation sequence prestored, the working order attribute prestored in reading non-volatile storage, working order attribute is given high-level supervisory control desk and drives program (or graphical window driving program), drive program (or graphical window driving program) to initiate the initialize that screen display operation completes video card by supervisory control desk.
The implementation step of the present embodiment comprises dispatch from the factory initialize and user's initialize two, and initialize of dispatching from the factory is the first time initial work done when computer dispatches from the factory, and user's initialize is the initialize process to video card of every time starting shooting after computer dispatches from the factory. The present embodiment dispatches from the factory initialize time use instruction simulator be x86emu; The nonvolatile memory of video card specifically refers to the NVROM of video card. The present embodiment by dispatch from the factory initialize time by process record consuming time to NVROM(based non-volatile random access storer) in, when user's initialize by read record and reduce unnecessary operation with the time of saving. Above-mentioned initialize of dispatching from the factory, user's initialize are what OBP completed.
The present embodiment dispatch from the factory in advance initialize time by instruction simulator simulation perform VBE initialize, the write operation instruction performing in simulation monitor in the process of VBE initialize and record the I/O register to video card and internal memory also preservation be configuration operation sequence, it is directly read also order and perform in nonvolatile memory the write operation instruction of the configuration operation sequence prestored in user's initialize, therefore without the need to again carrying out instruction and the conversion process of address space 86 platforms from x86 platform to non-x during user's initialize, the compatibility that VBE standard is brought can be utilized, reduce the complicacy that video card is supported, the initialize of video card can be completed again fast, greatly reduce the blind waiting time of user, it is applicable to all kinds of non-x 86 instruction set computer platform, there is video card and support that complexity is low, when video card is started shooting, initialize is fast rapid, Consumer's Experience is good, advantage applied widely.
The initialize of dispatching from the factory of the present embodiment step 1) is the first time initial work done when computer dispatches from the factory, and bearing of task is the effective configuration step details collecting specific video card, and this initialize is less demanding to the time.
Step 1) carry out the dispatching from the factory detailed step of initialize is as follows:
1.1) after system power-up, the process of scanning PCIE bus detects the PCI configured head of video card, read video card attribute and address space information that PCI configured head obtains video card;
1.2) the feature code (card-code) of video card is extracted according to the attribute information of video card, bus information and slot Information;
1.3) confirming that video card is LegacyIO video card, the I/O port operational order that the VGA register of configuration video card institute's approach bridge controller on device PCI tree makes CPU launch can directly arrive video card;
1.4) in instruction simulator (x86emu), add the monitor component of the write operation instruction relating to video card configuration space, I/O space and internal memory space for monitoring;
1.5) simulate execution vgabios code successively by instruction simulator (x86emu), simulation performs set-vediomode operation, simulation execution get-vediomode-info operation, intercepted and captured the write operation instruction relating to video card configuration space, I/O space and internal memory space simultaneously by monitor component, it is recorded in configuration operation sequence by intercepting and capturing all write operation instruction sequences obtained;
1.6) the working order attribute (videomode-info) returning parameter acquiring video card of get-vediomode-info operation is performed in storage zone mark simulation;
1.7) set-palete operation is performed by the simulation of instruction simulator, monitored by monitor component simultaneously and intercept and capture the write operation instruction relating to video card configuration space, I/O space and internal memory space, all write operation instruction sequences that intercepting and capturing obtain are recorded to team's tail of configuration operation sequence;
1.8) current whole configuration operation sequence is generated check code, and check code is added the team's tail being recorded to configuration operation sequence;
1.9) specific region (video-acc-area) in the nonvolatile memory (NVROM) of video card is wiped, then feature code (card-code), configuration operation sequence (command-queue), working order attribute (videomode-info) are sequentially written in from the start address of the specific region the nonvolatile memory of video card.
In the present embodiment, step 1.2) in the form of generating feature code (card-code) as follows: { busnum (32bit), pidvid (32bit), spidsvid (32bit), bar0 (32bit), bar1 (32bit), bar2 (32bit), bar3 (32bit), bar4 (32bit), bar5 (32bit) }. Wherein busnum refers to that video card is positioned in which bar pci bus of system, specifies the slot Information belonging to video card; Pidvid and spidsvid takes from front 4 bytes and the 44 to 47 byte of video card PCI configured head respectively, it is manufacturer and the type information of video card, bar0-bar5 takes from 6 BAR register of video card PCI configured head, indicates the map information of the various resources on video card in system address space.
In the present embodiment, step 1.5) detailed execution step as follows:
1.5.1) performing vgabios code by the simulation of instruction simulator, after time delay waits the time of presetting, redirect performs next step;
1.5.2) performing set-vediomode operation by the simulation of instruction simulator, after time delay waits the time of presetting, redirect performs next step;
1.5.3) get-vediomode-info operation is performed by the simulation of instruction simulator, and the write operation instruction relating to video card configuration space, I/O space and internal memory space is intercepted and captured by monitor component, it is recorded to intercepting and capturing all write operation instruction sequences obtained in configuration operation sequence.
Owing to the instruction execution speed of CPU generally writes speed higher than IO bus, and the write of IO bus is generally not cacheable, it is thus desirable to use certain time delay to reach CPU write operation and the speeds match of IO bus write, otherwise bus fault or exception may be caused, therefore the present embodiment step 1.5.1) the time delay wait default time after simulation performs vgabios code, step 1.5.2) wait, in the simulation execution rear time delay of set-vediomode operation, the time of presetting, CPU write operation and the speeds match of IO bus write can be realized, can prevent speed from not mating bus fault or the exception of initiation. simulate the time delay wait default time after the time delay wait default time after execution vgabios code, simulation execution set-vediomode operation different according to concrete platform, it is necessary to measure when concrete debugging.
In the present embodiment, step 1.5.3) in as follows by intercepting and capturing the detailed step that all write operation instruction sequences of obtaining are recorded in configuration operation sequence: be recorded in configuration operation sequence by intercepting and capturing all write operation instruction sequences obtained, if intercept and capture the write operation instruction existing in all write operation instructions obtained and repeating continuously simultaneously, then between continuous print write operation instruction, add delay according to the number of times repeated continuously, and the delay that the number of times repeated continuously adds more at most is more big. User's initialization step 1.5) execution may be failed, except aforementioned CPU and the IO unmatched reason of total linear velocity, another major reason is " exploratory write ". After so-called " exploratory write " operation refers to that some register write by software, by reading specific identification mark to confirm whether video card is transformed into state needed for certain, " exploratory write " operates in hardware initialization process very common, generally the continuous print to certain register, completely identical write operation can be judged as exploratory write operation, some rule can certainly be set, such as judge whether whether have reading operation and judgement operation between the identical write operation of continuous print, confirm further. " exploratory write " operation is correlated with video card and particular hardware platform, and software generally at a laggard row state confirmation of fixed response time, can carry out repeatedly after writing register when unsuccessful, and therefore souning out the time delay after writing is an important factor. The present invention solves delay problem by two kinds of means, and one is add a fixed response time between any twice register write of user's initialize, and two is allow the time delay between exploratory writing with the non-linear increase of multiplicity. Based on this kind of factor, at user's initialization step 4 in the present embodiment) in can add the detection repeating continuously instruction, if intercepting and capturing the write operation instruction existing in all write operation instructions obtained and repeating continuously, then between continuous print write operation instruction, add delay according to the number of times repeated continuously, and the delay that the number of times repeated continuously adds more at most is more big. If the delay between write operation (containing three times), then can be increased gradually by the number of times of repetition write operation more than three times, such as, in non-linear increasing, it is possible to make the success ratio of expection big. This operation can also at the initialization step 1.7 that dispatches from the factory) after carry out, to reduce user's initialize time, do not repeat them here.
As shown in Figure 3, the step of initialize of dispatching from the factory in the present embodiment is completed by OBP, and OBP carry out the dispatching from the factory detailed step of initialize is as follows:
1-1) after system power-up, first OBP proceeds as follows according to its video card initialization primary process: the PCI configured head detecting video card in the process of scanning PCIE bus, reads video card attribute and address space information that PCI configured head obtains video card;
1-2) attribute information of video card, bus information and slot Information are extracted feature code a: card-code by OBP;
1-3) confirming that video card is LegacyIO video card, the I/O port operational order that the VGA register of configuration video card institute's approach bridge controller on device PCI tree makes CPU launch can directly arrive video card;
1-4) in instruction simulator (x86emu), add a monitor component, the operational order configuring space, I/O space and internal memory space about video card performed in monitoring simulator;
1-5) (A. performs vgabios code to A.B.C tri-steps of OBP simulation execution VBE simplification initialize process, and after reading by the binary code in video card firmware, simulation performs; B. simulation performs set-videomode operation, arranges the operating mode of video card, such as color depth and resolving power; C. simulation performs get-videomode-info operation, obtains the working order attribute information of video card, such as display buffer regional address; ), period monitor component by intercept and capture all write operation instruction sequences be recorded in configuration operation sequence command-queue;
1-6) the parameter storage zone that returns as get-videomode-info is recorded as videomode-info by OBP;
1-7) OBP simulation performs set-palete operation, period monitor component all write operation instruction sequences intercepted and captured are recorded to team's tail of command-queue;
1-8) check code of current whole command-queue queue is added the team's tail being recorded to command-queue by OBP;
1-9) the self-defined specific region video-acc-area of NVROM is wiped by OBP, and card-code, command-queue, videomode-info is sequentially written in from the start address of video-acc-area;
1-10) now OBP has loaded the driving completing video card, according to original flow performing other initialize and the operation of os starting, the initialization step that dispatches from the factory completes.
The present embodiment step 2) user's initialize be that every time start is to the initialize process of video card after computer dispatches from the factory, task is the effective configuration step performing specific video card, and this initialize is that Consumer's Experience is correlated with, and the requirement of rapidity is higher.
Step 2) carry out user's initialize detailed step as follows:
2.1) after system power-up, the process of scanning PCIE bus detects the PCI configured head of video card, read video card attribute and address space information that PCI configured head obtains video card; Confirming that video card is LegacyIO video card, the I/O port operational order that the VGA register of configuration video card institute's approach bridge controller on device PCI tree makes CPU launch can directly arrive video card;
2.2) from the specific region (video-acc-area) of the nonvolatile memory (NVROM) of video card, feature code (card-code) is read, the attribute information of the video card read on this feature code (card-code) and bus, bus information and slot Information are contrasted, if misfitted, redirect performs step 1) and is dispatched from the factory by video card initialize, otherwise redirect performs next step;
2.3) the configuration operation sequence (command-queue) prestored in reading non-volatile storage (NVROM), the check code of configuration operation sequence (command-queue) team tail is utilized configuration operation sequence to be verified, if verifying unsuccessful, redirect performs step 1) and is dispatched from the factory by video card initialize, otherwise redirect performs next step;
2.4) order performs the write operation instruction of record in configuration operation sequence (command-queue);
2.5) the working order attribute (videomode-info) prestored in reading non-volatile storage (NVROM); Give high-level supervisory control desk by working order attribute information such as () video card resolving power, color depth, display buffer regional address and drive program (or graphical window driving program), drive program (or graphical window driving program) to initiate the fast initialization that screen display operation completes video card by supervisory control desk.
In the present embodiment, the step 1.8 of initialize of dispatching from the factory) current whole configuration operation sequence is generated check code, and check code is added the team's tail being recorded to configuration operation sequence; The step 2.3 of user's initialize) in utilize the check code of configuration operation sequence (command-queue) team tail configuration operation sequence to be verified, if verifying unsuccessful, redirect performs step 1) and is dispatched from the factory by video card initialize, therefore the verification process to command-queue is added by check code, to prevent the initialize failure makeing mistakes because of data storage and causing. With reason, it is also possible to further working order attribute (videomode-info) and even feature code (card-code) are verified by check code, to prevent the initialize failure makeing mistakes because of data storage and causing, do not repeat them here.
After the initialization step that dispatches from the factory completes, general video card can be given user and use. In use, start can carry out user's initialize fast to user, and as shown in Figure 4, in the present embodiment, the step of user's initialize is completed by OBP, and the concrete execution step that OBP carries out user's initialize is as follows:
2-1) first OBP proceeds as follows according to its video card initialization primary process: the PCI configured head detecting video card in the process of scanning PCIE bus, reads video card attribute and address space information that PCI configured head obtains video card; Confirming that video card is LegacyIO video card, the I/O port operational order that the VGA register of configuration video card institute's approach bridge controller on device PCI tree makes CPU launch can directly arrive video card;
2-2) OBP reads the card-code structure of video-acc-area in NVROM, contrast the PCI configuration information (attribute information of video card, bus information and slot Information) at the video card read bus before, if coincide, then continue step below, otherwise rotate back into initialize mode of dispatching from the factory;
2-3) OBP reads the command-queue of video-acc-area in NVROM, and queue is verified by the check code utilizing group tail, if verification succeeds, then continues step below, otherwise rotates back into initialize mode of dispatching from the factory;
2-4) OBP order performs the register write operational order of record in command-queue;
2-5) OBP reads the videomode-info structure of video-acc-area in NVROM, the information such as the video card resolving power of acquisition, color depth, display buffer regional address are given high-level supervisory control desk and drives program or graphical window driving program, screen display operation can be initiated by senior driving program.
The present embodiment uses the time length of prior art analog system initialize video card to be about 20 seconds; After the present embodiment applied by SPARCT2 treater platform, dispatch from the factory time of initialize be about 80 seconds, time of user's initialize be less than 1 second, therefore user's initialize time can shorten to 1 second from original 20 seconds, highly shortened the waiting time that user carries out user's initialize after start every time. Need illustrate time, the present embodiment is only illustrated with SPARCT2 treater platform, but the aforesaid method of the present embodiment equally also can realize for other non-x 86 instruction set computer beyond SPARCT2 treater platform.
The above is only the preferred embodiment of the present invention, and protection scope of the present invention is also not only confined to above-described embodiment, and all technical schemes belonged under thinking of the present invention all belong to protection scope of the present invention. It is noted that for those skilled in the art, some improvements and modifications without departing from the principles of the present invention, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (4)

1. the compatible video card fast initializing method of the x86 of non-x 86 instruction set computer, it is characterised in that implementation step is as follows:
1) dispatch from the factory initialize: the PCI bus of initialize video card after system power-up, obtain the feature code with video card PCI configuration information; Perform VBE initialize by the simulation of instruction simulator, perform in simulation the process of VBE initialize monitor and record the I/O register to video card and internal memory write operation instruction also preservation be configuration operation sequence; Obtain the working order attribute of video card; Described feature code, configuration operation sequence, working order attribute are write respectively in the nonvolatile memory of video card;
2) user's initialize: the PCI bus of initialize video card after system power-up, feature code is read from the nonvolatile memory of video card, being contrasted by the video card PCI configuration information read in this feature code and bus, if both misfit, redirect performs step 1) and is dispatched from the factory by video card initialize; If both coincide, read also order and perform in described nonvolatile memory the write operation instruction of the configuration operation sequence prestored, read in described nonvolatile memory the working order attribute prestored, described working order attribute is given high-level supervisory control desk drives program or graphical window to drive program, drives program or graphical window to drive program initiation screen display operation to complete the initialize of video card by supervisory control desk;
Described step 1) carry out the dispatching from the factory detailed step of initialize is as follows:
1.1) after system power-up, the process of scanning PCIE bus detects the PCI configured head of video card, read video card attribute and address space information that PCI configured head obtains video card;
1.2) the feature code of video card is extracted according to the attribute information of video card, bus information and slot Information;
1.3) confirm that video card is LegacyIO video card, configuration video card on device PCI tree CPU is launched by way of the VGA register of bridge controller I/O port operational order can directly arrive video card;
1.4) in instruction simulator, add the monitor component of the write operation instruction relating to video card configuration space, I/O space and internal memory space for monitoring;
1.5) execution vgabios code is simulated successively by instruction simulator, simulation performs set-vediomode operation, simulation is performed get-vediomode-info operation and is intercepted and captured the write operation instruction relating to video card configuration space, I/O space and internal memory space by described monitor component, is recorded in configuration operation sequence by intercepting and capturing all write operation instruction sequences obtained;
1.6) the working order attribute returning parameter acquiring video card of get-vediomode-info operation is performed in the described simulation of storage zone mark;
1.7) set-palete operation is performed by the simulation of instruction simulator, monitored by described monitor component simultaneously and intercept and capture the write operation instruction relating to video card configuration space, I/O space and internal memory space, all write operation instruction sequences that intercepting and capturing obtain are recorded to team's tail of configuration operation sequence;
1.8) current whole configuration operation sequence is generated check code, and check code is added the team's tail being recorded to configuration operation sequence;
1.9) specific region in the nonvolatile memory of video card is wiped, then described feature code, configuration operation sequence, working order attribute are sequentially written in from the start address of the specific region the nonvolatile memory of described video card.
2. the compatible video card fast initializing method of the x86 of non-x 86 instruction set computer according to claim 1, it is characterised in that, described step 1.5) detailed execution step as follows:
1.5.1) performing vgabios code by the simulation of instruction simulator, after time delay waits the time of presetting, redirect performs next step;
1.5.2) performing set-vediomode operation by the simulation of instruction simulator, after time delay waits the time of presetting, redirect performs next step;
1.5.3) get-vediomode-info operation is performed by the simulation of instruction simulator, and the write operation instruction relating to video card configuration space, I/O space and internal memory space is intercepted and captured by described monitor component, it is recorded to intercepting and capturing all write operation instruction sequences obtained in configuration operation sequence.
3. the compatible video card fast initializing method of the x86 of non-x 86 instruction set computer according to claim 2, it is characterized in that, described step 1.5.3) in as follows by intercepting and capturing the detailed step that all write operation instruction sequences of obtaining are recorded in configuration operation sequence: be recorded in configuration operation sequence by intercepting and capturing all write operation instruction sequences obtained, if intercept and capture the write operation instruction existing in all write operation instructions obtained and repeating continuously simultaneously, then between continuous print write operation instruction, add delay according to the number of times repeated continuously, and the delay that the number of times repeated continuously adds more at most is more big.
4. the compatible video card fast initializing method of the x86 of non-x 86 instruction set computer according to claim 1 or 2 or 3, it is characterised in that, described step 2) carry out user's initialize detailed step as follows:
2.1) after system power-up, the process of scanning PCIE bus detects the PCI configured head of video card, read video card attribute and address space information that PCI configured head obtains video card; Confirming that video card is LegacyIO video card, the I/O port operational order that the VGA register of configuration video card institute's approach bridge controller on device PCI tree makes CPU launch can directly arrive video card;
2.2) from the nonvolatile memory of video card, feature code is read, the attribute information of the video card read in this feature code and bus, bus information and slot Information are contrasted, if misfitted, redirect performs step 1) and is dispatched from the factory by video card initialize, otherwise redirect performs next step;
2.3) the configuration operation sequence prestored is read in described nonvolatile memory, the check code of configuration operation sequence team tail is utilized configuration operation sequence to be verified, if verifying unsuccessful, redirect performs step 1) and is dispatched from the factory by video card initialize, otherwise redirect performs next step;
2.4) order performs the write operation instruction of record in described configuration operation sequence;
2.5) the working order attribute prestored is read in described nonvolatile memory; Described working order attribute is given high-level supervisory control desk drives program or graphical window to drive program, drives program or graphical window to drive program initiation screen display operation to complete the fast initialization of video card by supervisory control desk.
CN201310087046.7A 2013-03-19 2013-03-19 The compatible video card fast initializing method of the x86 of non-x 86 instruction set computer Active CN103150188B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310087046.7A CN103150188B (en) 2013-03-19 2013-03-19 The compatible video card fast initializing method of the x86 of non-x 86 instruction set computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310087046.7A CN103150188B (en) 2013-03-19 2013-03-19 The compatible video card fast initializing method of the x86 of non-x 86 instruction set computer

Publications (2)

Publication Number Publication Date
CN103150188A CN103150188A (en) 2013-06-12
CN103150188B true CN103150188B (en) 2016-06-01

Family

ID=48548289

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310087046.7A Active CN103150188B (en) 2013-03-19 2013-03-19 The compatible video card fast initializing method of the x86 of non-x 86 instruction set computer

Country Status (1)

Country Link
CN (1) CN103150188B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106909348A (en) * 2015-12-22 2017-06-30 中电科技(北京)有限公司 A kind of video card initialization method under domestic processor platform based on UEFI firmwares
CN105912337A (en) * 2016-04-13 2016-08-31 浪潮集团有限公司 Method for implementing graphics card initialization applied in domestic non-X86 platform
CN106155689B (en) * 2016-07-02 2019-04-12 广东中兴新支点技术有限公司 The method shown under a linux operating system based on 86 platform of non-x
CN107656885A (en) * 2016-07-26 2018-02-02 深圳市祈飞科技有限公司 A kind of collocation method of the adaptive display interfaces of UEFI BIOS
CN107220065A (en) * 2017-06-28 2017-09-29 山东超越数控电子有限公司 A kind of Domestic Platform BIOS video driver methods based on X86 simulators
CN108776595B (en) * 2018-06-11 2021-06-29 郑州云海信息技术有限公司 Method, device, equipment and medium for identifying display card of GPU (graphics processing Unit) server
CN108874544A (en) * 2018-06-11 2018-11-23 郑州云海信息技术有限公司 A kind of method and system of GPU server I/O resource allocation
CN109144578B (en) * 2018-06-28 2021-09-03 中国船舶重工集团公司第七0九研究所 Display card resource allocation method and device based on Loongson computer
CN112015476B (en) * 2019-05-31 2023-11-07 龙芯中科技术股份有限公司 Display card driving method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101907994A (en) * 2009-06-08 2010-12-08 鸿富锦精密工业(深圳)有限公司 Method for loading display card BIOS
CN102541607A (en) * 2011-12-31 2012-07-04 曙光信息产业股份有限公司 BIOS collocation method and device based on UEFI framework

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101907994A (en) * 2009-06-08 2010-12-08 鸿富锦精密工业(深圳)有限公司 Method for loading display card BIOS
CN102541607A (en) * 2011-12-31 2012-07-04 曙光信息产业股份有限公司 BIOS collocation method and device based on UEFI framework

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种基于虚拟机的驱动程序加固技术;吴庆波等;《计算机工程与科学》;20101130;第32卷(第11期);第124-127页 *
基于PMON的龙芯BIOS初始化及VGA BIOS模拟器;李雷等;《计算机工程》;20090131;第35卷(第1期);第204-206页 *

Also Published As

Publication number Publication date
CN103150188A (en) 2013-06-12

Similar Documents

Publication Publication Date Title
CN103150188B (en) The compatible video card fast initializing method of the x86 of non-x 86 instruction set computer
CN102637144B (en) System fault processing method and device
CN101377749B (en) Method, programmable logic device, system and apparatus for checking memory data
CN106547653B (en) Computer system fault state detection method, device and system
CN101634960A (en) Method for revising BIOS parameter and regenerating checksum
CN101599035A (en) USB port proving installation and method
CN112068852B (en) Method, system, equipment and medium for installing open-source software based on domestic server
US9710289B2 (en) Rapid configuration of software
CN105718346A (en) Computer mainboard PCIe slot function test method based on UEFI
CN105760191A (en) Embedded system equipment programming mass production method
CN103593281A (en) Test system and test method
CN113157347A (en) Automatic probe deployment method, electronic device and storage medium
CN111444119B (en) Firework platform nonvolatile memory registration method based on kernel parameters
CN101446913B (en) Method and device for detecting equipment faults
CN104699615A (en) System failure processing method and device
CN107832176A (en) Hard disk pressure automatic test approach and system under a kind of Windows
US20070294430A1 (en) Generating a device address persistent across different instantiations of an electronic device
CN105094880A (en) USB driving method, computer and compound equipment
CN112216340A (en) Hard disk test method and device, storage medium and electronic equipment
CN102999422A (en) Efficient embedded system debugging method
CN105426304A (en) Control method and device of restart test
US20070101034A1 (en) Monitor method for computer system
CN107077406B (en) Method and apparatus for SATA receiver equalization margin determination/setting
CN110096888B (en) Method and system for accelerating verification and analyzing SMM potential safety hazard
CN114780208A (en) Method, system, device and storage medium for verifying backup validity of multi-platform virtual machine

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant