CN101661393A - Methods for loading and updating central processing unit microcode in basic input/output system - Google Patents

Methods for loading and updating central processing unit microcode in basic input/output system Download PDF

Info

Publication number
CN101661393A
CN101661393A CN200810146314A CN200810146314A CN101661393A CN 101661393 A CN101661393 A CN 101661393A CN 200810146314 A CN200810146314 A CN 200810146314A CN 200810146314 A CN200810146314 A CN 200810146314A CN 101661393 A CN101661393 A CN 101661393A
Authority
CN
China
Prior art keywords
processing unit
central processing
mentioned
bios
microcode
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.)
Pending
Application number
CN200810146314A
Other languages
Chinese (zh)
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.)
Asustek Computer Inc
Original Assignee
Asustek Computer Inc
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 Asustek Computer Inc filed Critical Asustek Computer Inc
Priority to CN200810146314A priority Critical patent/CN101661393A/en
Publication of CN101661393A publication Critical patent/CN101661393A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention relates to a method for loading a central processing unit microcode in a basic input/output system and a method for updating the processing unit microcode in the basic input/output system. The method for loading the processing unit microcode in the basic input/output system comprises the following steps: informing the basic input/output system of the address and size of the central processing unit microcode through a system management interruption instruction; and writing the central processing unit microcode in the address into a given block in the basic input/output system through a write interruption instruction.

Description

Be written into and upgrade the method for Basic Input or Output System (BIOS) central processing unit microcode
Technical field
The invention relates to a kind of Basic Input or Output System (BIOS), and particularly relevant for a kind of updating BIOS or be written into the method for central processing unit microcode.
Background technology
Present Basic Input or Output System (BIOS) (basic input/output system, BIOS, be designated hereinafter simply as BIOS) for the various hardware on the mainboard of arranging in pairs or groups, thereby comprise the program code of a plurality of sections, for example: the program code of central processing unit microcode (CPU microcode), peripheral device or trade mark (logo) picture or the like.But usually mainboard in use for some time, can develop better firmware or the like factor because of hardware update or manufacturer usually, makes the program code that has part in the BIOS need to upgrade.
When the user will upgrade BIOS,, carry out a common program (utility) again with downloading image file earlier with complete bios program code.And this common program is erased earlier and is originally stored the internal memory of BIOS, and the image file that the user is downloaded writes in the internal memory that stores BIOS again.
Above-mentioned way is concealed with risk and is, if the program code in the BIOS after upgrading when hardware on the actual mainboard can not cooperate, will cause computer to start shooting.For instance, when if central processing unit microcode in the BIOS and the central processing unit in the mainboard are not inconsistent (when just the central processing unit microcode is not supported central processing unit in the mainboard), in the process of start, because central processing unit can't be written into correct program code, to make the start flow process interrupt, and demonstration can't be written into the central processing unit microcode.
Summary of the invention
The invention provides the method that a kind of Basic Input or Output System (BIOS) is written into the central processing unit microcode,, make BIOS can be written into correct central processing unit microcode by the system management interrupt instruction.
The invention provides a kind of method of upgrading the central processing unit microcode in the Basic Input or Output System (BIOS), in the time of can't correctly being written in order to solve the central processing unit microcode, be written into correct central processing unit microcode.
The present invention proposes the method that a kind of Basic Input or Output System (BIOS) is written into the central processing unit microcode, at first, receives system management interrupt instruction, and this system management interrupt instruction comprises the address and size of a central processing unit microcode.Then, carry out one and write interrupt instruction, and according to the address and size of the central processing unit microcode in the system management interrupt instruction, the central processing unit microcode is write a particular block in the Basic Input or Output System (BIOS).
The present invention proposes a kind of method of upgrading the central processing unit microcode in the Basic Input or Output System (BIOS), at first, receives system management interrupt instruction, and this system management interrupt instruction comprises the address and size of a central processing unit microcode.Then, whether the capacity of judging a particular block is more than or equal to the size of central processing unit microcode.When the capacity of particular block during, carry out one and write interrupt instruction, and, the central processing unit microcode is write particular block according to the address and size of central processing unit microcode more than or equal to central processing unit microcode big or small.
The present invention is because of adopting by system management interrupt instruction, make BIOS learn the address and size of central processing unit microcode, to allow BIOS deposit a particular block in, solve wrong central processing unit microcode simultaneously and cause computer can't correctly be written into the problem of central processing unit microcode being written into central processing unit microcode correct in this address.
For above-mentioned feature and advantage of the present invention can be become apparent, preferred embodiment cited below particularly, and cooperate appended graphicly, be described in detail below.
Description of drawings
Figure 1 shows that the BIOS of the embodiment of the invention is written into the flow chart of steps of the method for central processing unit microcode.
Figure 2 shows that the flow chart of steps of the method for the central processing unit microcode among the renewal BIOS of another embodiment of the present invention.
Figure 3 shows that the flow chart of steps of the startup computer system of another embodiment of the present invention.
Embodiment
In known technology, if when the central processing unit microcode of BIOS taking place not being inconsistent with the central processing unit on the mainboard, computer system can't be started shooting to operating system smoothly, and demonstration error messages and stopping.And the present invention proposes the method that the central processing unit microcode was linked up and be written into to BIOS and common program (utility), can make BIOS be written into correct central processing unit microcode.
Figure 1 shows that the BIOS of the embodiment of the invention is written into the flow chart of steps of the method for central processing unit microcode.Please refer to Fig. 1, at first, BIOS receives a system management interrupt (System ManagementInterrupt, SMI) instruction (step S110).This system management interrupt instruction is sent by a common program, and this system management interrupt instruction includes the address and size of a central processing unit microcode.Address pointed stores correct central processing unit microcode in this system management interrupt instruction.
Next, BIOS will receive system management interrupt instruction, and the system break instruction is learnt and need be written into correct central processing unit microcode this moment thus, writes interrupt instruction (step S120) and carry out one.And this writes the instruction that writes that interrupt instruction can be special interruption 16 (special INT 16) instruction in the present computer technology or other kind.
Then, in writing interrupt instruction, BIOS is according to the address and size of central processing unit microcode indicated in the system management interrupt instruction, will obtain the particular block (step S130) that central processing unit microcode in the indicated address writes BIOS in the system management interrupt instruction from the internal memory that common program is repaid.In the present embodiment, bios program code originally can be stored in the non-volatility memorizer (non-volatile memory) on the mainboard, and particular block can be to be arranged in the part block that originally stores the non-volatility memorizer of BIOS, or the non-volatility memorizer of other address in the mainboard.
In addition, the present invention also can be applicable to upgrade separately the central processing unit microcode among the BIOS, need not refresh whole BIOS, below reintroduces another embodiment of the present invention.Figure 2 shows that the flow chart of steps of the method for the central processing unit microcode among the renewal BIOS of another embodiment of the present invention.Please refer to Fig. 2, at first, BIOS receives system management interrupt instruction (step S210).This system management interrupt instruction is upgraded the central processing unit microcode in order to indication BIOS, and its content includes the address and size of a central processing unit microcode.Address pointed stores correct central processing unit microcode in this system management interrupt instruction.
Next, after BIOS receives the system management interrupt instruction, BIOS will judge whether the space of a particular block is enough to indicated central processing unit microcode (step S220) in the instruction of stocking system management interrupt.In the present embodiment, particular block is the block that desire stores the central processing unit microcode.In step S220, if the insufficient space of judging particular block is to store the central processing unit microcode, then BIOS will delete the partial data (step S230) in the particular block, and proceed step S240.
In the present embodiment, because this particular block may store other program code, thereby cause the remaining space of particular block to be not enough to store the central processing unit microcode.And above-mentioned steps S230 shows a prompting message, and informing the insufficient space of the present particular block of user, and the prompting user selects to delete unnecessary program code.In addition, above-mentioned steps S230 also can be by the program code of BIOS judgement with present hardware independent, and deletes unnecessary program code voluntarily.
Otherwise if in step S220, the space that BIOS judges particular block is enough to store the central processing unit microcode, then proceeds step S240.In step S240, because BIOS has received system management interrupt instruction, and the system break instruction learns and need be written into correct central processing unit microcode this moment that BIOS will carry out one and write interrupt instruction thus.And in writing interrupt instruction, BIOS writes the central processing unit microcode in the address particular block (step S250) of BIOS according to the address and size of central processing unit microcode indicated in the system management interrupt instruction.In the present embodiment, step S240 and 250 is similar to step S120 and the S130 among Fig. 1 embodiment, so repeat no more.
By the foregoing description as can be known, the present invention is by the system management interrupt instruction and write interrupt instruction, make and stored correct central processing unit microcode in the particular block of BIOS, therefore, computer system is in start process, BIOS can be written into correct central processing unit microcode by particular block, and makes computer to start shooting normally, and enters normal running.In order to make this area tool know that usually the knowledgeable can implement the present invention by the instruction of embodiment, below reintroduce another embodiment of the present invention, illustrate and use start flow process of the present invention.
Present embodiment before the explanation present embodiment, is made several hypothesis in advance for convenience of description.At first, suppose that present embodiment is applied to the startup of computer system or is restarted by dormancy (sleep) state.Then, suppose computer, by the flow process of common program control startup in the process that starts or restart.At last, suppose that the program code storage of BIOS is in a non-volatility memorizer.
Figure 3 shows that the flow chart of steps of the startup computer system of another embodiment of the present invention.Please refer to Fig. 3, at first, after computer system starts, BIOS scanning stores the program code (step S310) of each section in the non-volatility memorizer, with the original central processing unit microcode of learning that non-volatility memorizer is stored, and judge that whether the original central processing unit microcode in non-volatility memorizer conforms to (step S315) with central processing unit on the mainboard, judges just whether original central processing unit microcode supports the central processing unit of mainboard.When script central processing unit microcode conforms to the central processing unit of mainboard, computer system will enter general start-up routine (step S320).
Otherwise, when the central processing unit of script central processing unit microcode and mainboard inconsistent (just original central processing unit microcode can't be supported the central processing unit of mainboard), whether common program will inquire that the peripheral equipment by computer system reads out correct central processing unit microcode (step S325).In the present embodiment, above-mentioned peripheral equipment can be hard disk (hard disc), USB (universal serial bus) device, floppy drive (floppy) or CD-ROM drive (optical disk drive) or the like.In addition, in above-mentioned steps S325, the central processing unit microcode that common program does not necessarily know correct is in the address of which peripheral device and physical holding of the stock, thereby this moment, computer system can show a prompting message, imported the address at correct central processing unit microcode place with the prompting user.In addition, present embodiment also can store correct central processing unit microcode in advance in peripheral device, and the path of in common program, presetting this correct central processing unit microcode, to allow common program can in above-mentioned steps S325, read correct central processing unit microcode.
After step S325, common program is stored to a random access memory (Random-Access Memory, RAM) (step S330) with the central processing unit microcode that is read out.Next, common program will send a system management interrupt and instruct to BIOS (step S340), and BIOS upgrades the central processing unit microcode with indication.And the system management interrupt that common program sent instruction includes the address (just among the above-mentioned steps S330, common program stores the address of central processing unit microcode to random access memory) of central processing unit microcode and the size of central processing unit microcode.
After BIOS receives this system management interrupt instruction, BIOS will judge whether the space of a particular block is enough to indicated central processing unit microcode (step S350) in the instruction of stocking system management interrupt.In the present embodiment, particular block is the block that desire stores the central processing unit microcode.And in step S350, if the insufficient space of judging particular block is to store the central processing unit microcode, then BIOS will delete the partial data (step S355) in the particular block, and proceed step S360.In the present embodiment, because this particular block may store other program code, thereby cause the remaining space of particular block to be not enough to store the central processing unit microcode.And above-mentioned steps S355 shows a prompting message by computer system, and informing the insufficient space of the present particular block of user, and the prompting user selects to delete unnecessary program code.In addition, above-mentioned steps S355 also can be by the program code of BIOS judgement with present hardware independent, and deletes unnecessary program code voluntarily.
Otherwise if in step S350, the space that BIOS judges particular block is enough to store the central processing unit microcode, then proceeds step S360.In step S360, because BIOS this moment has received the system management interrupt instruction, and learn that by system break instruction present need are written into correct central processing unit microcode, therefore, BIOS carries out one and writes interrupt instruction, and this writes the instruction that writes that interrupt instruction can be special interruption 16 (special INT 16) instruction in the present computer technology or other kind.
Then, in writing interrupt instruction, BIOS will write the central processing unit microcode in this address the particular block (step S365) of BIOS according to the address and size of central processing unit microcode indicated in the system management interrupt instruction.In the present embodiment, bios program code originally can be stored in the non-volatility memorizer on the mainboard, and particular block can be to be arranged in the part block that stores the non-volatility memorizer of BIOS originally.In present BIOS technology, the non-volatility memorizer that stores BIOS can be cut into a plurality of blocks, and, have the form of description (descriptor table) among the BIOS, in order to the position of each block in the record non-volatility memorizer.And the particular block of present embodiment can be a protection block of planning in describing form in advance, and writes down its position in describing form.
At last, writing the central processing unit microcode to particular block, BIOS will judge the central processing unit microcode of this moment in the particular block whether conform to central processing unit on the mainboard (step S370), if judge central processing unit microcode in the particular block when central processing unit on the mainboard conforms to, the central processing unit microcode of particular block will be written into central processing unit (step S375), and proceed general boot program (step S380).Otherwise, if judge in the particular block the central processing unit microcode still with mainboard on central processing unit when not conforming to, computer system will show an error messages (step S385).
Because in the above-described embodiments, stored correct central processing unit microcode in the particular block, therefore, when computer system is started shooting again or is started by dormant state, then can be by being written into correct central processing unit microcode in the particular block to central processing unit, to solve the problem that original central processing unit microcode and central processing unit on the mainboard can't conform to.
In above-mentioned three embodiment, though being written into the central processing unit microcode as an example,, this area tool knows that usually the knowledgeable should know that the present invention also can be applicable to be written into or upgrade the program code of other kind among the BIOS.
In sum, the present invention is because of adopting by system management interrupt instruction, make BIOS learn the address and size of central processing unit microcode, to allow BIOS deposit a particular block in, solve the problem that wrong central processing unit microcode causes computer to expect simultaneously with being written into central processing unit microcode correct in this address.
Though the present invention discloses as above with preferred embodiment; right its is not in order to limit the present invention; have in the technical field under any and know the knowledgeable usually; without departing from the spirit and scope of the present invention; when can doing a little change and retouching, so protection scope of the present invention is as the criterion when looking claims person of defining.

Claims (8)

1. a Basic Input or Output System (BIOS) is written into the method for central processing unit microcode, it is characterized in that, comprising:
The instruction of receiving system management interrupt, the instruction of said system management interrupt comprise the address and size of above-mentioned central processing unit microcode;
Execution writes interrupt instruction; And
According to the address of above-mentioned central processing unit microcode and size, above-mentioned central processing unit microcode is write particular block in the above-mentioned Basic Input or Output System (BIOS).
2. Basic Input or Output System (BIOS) according to claim 1 is written into the method for central processing unit microcode, it is characterized in that, above-mentionedly also comprises before writing interrupt instruction carrying out:
Whether the capacity of judging above-mentioned particular block is more than or equal to the size of above-mentioned central processing unit microcode; When being judged as not, the data in the above-mentioned particular block of deletion are carried out the above-mentioned interrupt instruction that writes again; When being judged as when being, then directly carry out the above-mentioned interrupt instruction that writes.
3. Basic Input or Output System (BIOS) according to claim 1 is written into the method for central processing unit microcode, it is characterized in that, wherein before the step that receives the instruction of said system management interrupt, also comprises:
Read out above-mentioned central processing unit microcode by peripheral equipment; And
Above-mentioned central processing unit microcode is write random access memory;
Wherein, the instruction of said system management interrupt comprises that above-mentioned central processing unit microcode is positioned at the address of above-mentioned random access memory.
4. Basic Input or Output System (BIOS) according to claim 3 is written into the method for central processing unit microcode, be applied to computer system, wherein above-mentioned Basic Input or Output System (BIOS) is stored in non-volatility memorizer, it is characterized in that, wherein read out above-mentioned central processing unit microcode and also comprise before by above-mentioned peripheral equipment:
Scan the block of the original central processing unit microcode of storage in the above-mentioned non-volatility memorizer;
Judge whether the interior central processing unit of above-mentioned original central processing unit microcode and above-mentioned computer system conforms to; If when being judged as not, then the display reminding message is imported above-mentioned central processing unit microcode in the address of above-mentioned peripheral equipment with prompting.
5. Basic Input or Output System (BIOS) according to claim 1 is written into the method for central processing unit microcode; it is characterized in that; wherein above-mentioned Basic Input or Output System (BIOS) is stored in non-volatility memorizer, and above-mentioned particular block is the protection block in the above-mentioned non-volatility memorizer.
6. Basic Input or Output System (BIOS) according to claim 5 is written into the method for central processing unit microcode, it is characterized in that, wherein above-mentioned Basic Input or Output System (BIOS) has the description form, in order to define the address of above-mentioned protection block.
7. Basic Input or Output System (BIOS) according to claim 1 is written into the method for central processing unit microcode, it is characterized in that, the wherein above-mentioned interrupt instruction that writes is special interruption 16 instructions.
8. Basic Input or Output System (BIOS) according to claim 1 is written into the method for central processing unit microcode, is applied to computer system, it is characterized in that, wherein after above-mentioned central processing unit microcode writes the step of particular block, also comprises:
Judge whether the above-mentioned central processing unit microcode in the above-mentioned particular block is consistent with the central processing unit in the above-mentioned computer system; When being judged as not, then show error messages; When being judged as when being, then be written into the above-mentioned central processing unit of above-mentioned central processing unit microcode to the above-mentioned computer system in the above-mentioned particular block.
CN200810146314A 2008-08-25 2008-08-25 Methods for loading and updating central processing unit microcode in basic input/output system Pending CN101661393A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200810146314A CN101661393A (en) 2008-08-25 2008-08-25 Methods for loading and updating central processing unit microcode in basic input/output system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200810146314A CN101661393A (en) 2008-08-25 2008-08-25 Methods for loading and updating central processing unit microcode in basic input/output system

Publications (1)

Publication Number Publication Date
CN101661393A true CN101661393A (en) 2010-03-03

Family

ID=41789442

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200810146314A Pending CN101661393A (en) 2008-08-25 2008-08-25 Methods for loading and updating central processing unit microcode in basic input/output system

Country Status (1)

Country Link
CN (1) CN101661393A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104102498A (en) * 2013-04-01 2014-10-15 中兴通讯股份有限公司 Mobile terminal and booting method thereof

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104102498A (en) * 2013-04-01 2014-10-15 中兴通讯股份有限公司 Mobile terminal and booting method thereof
CN104102498B (en) * 2013-04-01 2018-06-22 南京中兴软件有限责任公司 A kind of mobile terminal and its starting-up method

Similar Documents

Publication Publication Date Title
US7484220B2 (en) Method, software and apparatus for using application state history information when re-launching applications
US20110004871A1 (en) Embedded electronic device and firmware updating method thereof
KR101555210B1 (en) Apparatus and method for downloadin contents using movinand in portable terminal
JP2010195111A (en) Onboard computer system
CN102141921A (en) Method for upgrading system of terminal equipment and terminal equipment
CN112506745B (en) Memory temperature reading method and device and computer readable storage medium
US20110265072A1 (en) Dynamic Installation of Files for Running Programs
CN102662714A (en) Linux operation system and startup method thereof
CN114661368B (en) Chip and starting method thereof
CN110851154A (en) Computer-implemented method, system, and medium for updating read-only memory code
TWI515557B (en) Computer system and control method
CN113641378B (en) Optical module program upgrading method, device, equipment and readable storage medium
CN111475194A (en) Software upgrading method for new energy automobile controller
CN111026417A (en) Embedded equipment upgrading method and embedded equipment
CN116679962A (en) Method, device, equipment and medium for updating firmware of basic input/output system
CN101661393A (en) Methods for loading and updating central processing unit microcode in basic input/output system
CN110058973B (en) Test system and test method for data storage device
JP2005234872A (en) Computer, computer start method, bios program and information storage medium
JP6192089B2 (en) Information processing apparatus, control method and control program for information processing apparatus
CN115993985A (en) Bootloader updating method, bootloader updating device, bootloader updating equipment and Bootloader updating medium
US20100049962A1 (en) Method for loading and updating central processing unit microcode into basic input/output system
CN116088945A (en) System firmware starting method, device, equipment and computer storage medium
JP2001034822A (en) Controller for automatic vending machine
CN114296764A (en) System upgrading method and device, storage medium and electronic equipment
JP6775651B1 (en) Information processing equipment, control methods, and programs

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20100303