CN108334351A - A kind of method and device of modification boot sequence - Google Patents
A kind of method and device of modification boot sequence Download PDFInfo
- Publication number
- CN108334351A CN108334351A CN201710772558.5A CN201710772558A CN108334351A CN 108334351 A CN108334351 A CN 108334351A CN 201710772558 A CN201710772558 A CN 201710772558A CN 108334351 A CN108334351 A CN 108334351A
- Authority
- CN
- China
- Prior art keywords
- smm
- smi
- trigger value
- boot sequence
- shell
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
Abstract
The invention discloses the method and devices that boot sequence is changed under a kind of BIOS setup masked states:Including:Judge whether SMI is loaded into SMM mode;If so, detecting the trigger value of the triggering port of the SMI, the trigger value is that the pre- registration SMM that first passes through drives acquisition;By the trigger value, the triggering port of the SMI is triggered, into SMM mode;The Shell is set to the first startup item, so as to as boot sequence next time.According to the method for the present invention and device, when system errors are debugged, the triggering port by triggering SMI enters SMM mode, and the startup item of Shell is placed first, realizes the boot sequence that system is changed under the masked state of the interfaces BIOS setup.
Description
Technical field
The present invention relates to field of computer technology, start more particularly to modification under a kind of BIOS setup masked states suitable
The method and device of sequence.
Background technology
In computer systems, including operating system and BIOS (basic input output system), guiding is provided for computer
Sequence.During system BOOT (Build-Own-Operate-Transfer is built, and-possessing-runs-transfers), usually we
It may require that the boot sequence of modification system, conventional method enter BIOS setup (basic input output system setting) interface,
System boot sequence is directly changed.
In general, it requires direct BOOT to software systems after system boot, data processing is carried out under software systems, is
The safety and stability of system, can shield the interfaces BIOS setup, to prevent user from being repaiied to the default configuration of BIOS
Change.For the immediate system in system boot, in the case of the systems mounting discs such as no external USB flash disk, CD, Hdd (hard drives
Device) startup highest priority, be next Pxe (Pre-boot Execution Environment) and Shell (order perform script).
During system development or operation, when there is Debug (mistake debugging), the generally mistake of boot sequence
Accidentally, it modifies since the boot sequence of system default cannot be introduced into the interfaces BIOS setup.
In summary as can be seen that how under BIOS setup masked states change boot sequence be have at present it is to be solved
The problem of.
Invention content
The object of the present invention is to provide under a kind of BIOS setup masked states change boot sequence method and device, with
It solves the problems, such as that boot sequence can not be changed under BIOS setup masked states in the prior art.
In order to solve the above technical problems, the present invention provides the side for changing boot sequence under a kind of BIOS setup masked states
Method, including:Judge whether SMI (System-Management-Interrupt system management interrupts) is loaded into SMM
(System-Management-Mode System Management Mode) pattern;If so, the trigger value of the triggering port of the SMI is detected,
The trigger value is that the pre- registration SMM that first passes through drives acquisition;By the trigger value, the triggering port of the SMI is triggered, into
Enter SMM mode;The Shell is set to the first startup item, so as to as boot sequence next time.
Preferably, it is described judge whether SMI is loaded into SMM mode after, further include:If SMI is not loaded into SMM
Pattern after being loaded into SMM mode by the Entry Point functions comprising EFI_SMM_BASE_PROTOCOL, executes follow-up
The operation of the trigger value of the triggering port of the detection SMI.
Preferably, the registration SMM drivings specifically include:According to the terminal number and load information of SMI, pass through EFI_
SMM_SW_DISPATCH_PROTOCOL forms SMM corresponding with the SMI and drives log-on message.
Preferably, the trigger value is corresponding with SMM drivings.
Preferably, described the Shell is set to the first startup item to specifically include:The boot sequence for searching Shell, passes through
Boot Order (boot sequence), by the Shell recursion to the first startup item.
The present invention also provides under a kind of BIOS setup masked states change boot sequence and device, including:
Judgment module:For judging whether SMI is loaded into SMM mode;
Detection module:Trigger value for the triggering port for detecting the triggering SMI, the trigger value are pre- to first pass through note
Volume SMM drivings obtain;
Trigger module:Trigger value for the triggering port for triggering the SMI, into SMM mode;
Change and sets module:The Shell is set to the first startup item, so as to as boot sequence next time.
Preferably, after judgment module further include load-on module, when not being loaded into SMM mode for SMI, by comprising
After the Entry Point functions of EFI_SMM_BASE_PROTOCOL are loaded into SMM mode, execute described in the follow-up detection
The operation of the trigger value of the triggering port of SMI.
Preferably, further include registration module:For registering SMM activation bits, believed according to the terminal number of SMI and load
Breath forms SMM corresponding with the SMI by EFI_SMM_SW_DISPATCH_PROTOCOL and drives log-on message.
Preferably, the trigger value is corresponding with SMM drivings.
Preferably, described change sets module, the boot sequence for searching Shell, will be described by BootOrder
Shell recursion is to the first startup item.
The method and device that boot sequence is changed under a kind of BIOS setup masked states provided by the present invention, in BIOS
Under the masked state of the interfaces setup, when system errors are debugged, the triggering port of SMI is triggered, into SMM mode;By Shell
It is set to the first startup item, the boot sequence when system starts next time is the boot sequence of Shell.
According to the above method and device, the triggering port by triggering SMI enters SMM mode, and the startup item of Shell is put
First is set, the boot sequence for changing system under the masked state of the interfaces BIOS setup is realized.
Description of the drawings
It, below will be to embodiment or existing for the clearer technical solution for illustrating the embodiment of the present invention or the prior art
Attached drawing is briefly described needed in technology description, it should be apparent that, the accompanying drawings in the following description is only this hair
Some bright embodiments for those of ordinary skill in the art without creative efforts, can be with root
Other attached drawings are obtained according to these attached drawings.
Fig. 1 is specific real for the first of the method for modification boot sequence under BIOS setup masked states provided by the present invention
Apply the flow chart of example;
Fig. 2 is that second of the method for modification boot sequence under BIOS setup masked states provided by the present invention is specific real
Apply the flow chart of example;
Fig. 3 is the knot of the device of modification boot sequence under a kind of BIOS setup masked states provided in an embodiment of the present invention
Structure block diagram.
Specific implementation mode
Core of the invention is to provide the method and device that boot sequence is changed under a kind of BIOS setup masked states,
Under BIOS setup masked states, the triggering port by triggering SMI enters SMM mode, and the startup item of Shell is placed first
Position.
In order to enable those skilled in the art to better understand the solution of the present invention, with reference to the accompanying drawings and detailed description
The present invention is described in further detail.Obviously, described embodiments are only a part of the embodiments of the present invention, rather than
Whole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise
Lower obtained every other embodiment, shall fall within the protection scope of the present invention.
Referring to FIG. 1, Fig. 1 is the of the method for modification boot sequence under BIOS setup masked states provided by the present invention
A kind of flow chart of specific embodiment.Specifically include following steps:
Step S101:Judge whether SMI is loaded into SMM mode;
Step S102:If so, detecting the trigger value of the triggering port of the SMI, the trigger value is pre- to first pass through registration
SMM drivings obtain;
Step S103:By the trigger value, the triggering port of the SMI is triggered, into SMM mode;
Step S104:The Shell is set to the first startup item, so as to as boot sequence next time.
In the preset implementation, under the masked state of the interfaces BIOS setup, when system errors are debugged, SMI is triggered
Triggering port, into SMM mode;Shell is set to the first startup item, the boot sequence when system starts next time is
The boot sequence of Shell solves the problems, such as that boot sequence can not be changed under BIOS setup masked states in the prior art.
Referring to FIG. 2, Fig. 2 is the of the method for modification boot sequence under BIOS setup masked states provided by the present invention
The flow chart of two kinds of specific embodiments.
In this embodiment, the method for selecting traversal will search the boot sequence of Shell, by Boot Order,
By the Shell recursion to the first startup item.Specifically include following steps:
Step S201:Judge whether SMI is loaded into SMM mode;If it is not, then entering step S202;If so, entering step
Rapid S203;
It is described judge SMI whether be loaded into SMM mode specific procedure it is as follows:
Step S202:It is loaded into SMM moulds by the Entry Point functions comprising EFI_SMM_BASE_PROTOCOL
After formula, S203 is entered step;
Step S203:The trigger value of the triggering port of the SMI is detected, the trigger value is that the pre- registration SMM that first passes through drives
Dynamic acquisition;
The trigger value can be any value being not used by.
The registration SMM drivings can pass through EFI_SMM_SW_ according to the terminal number and load information of SMI
DISPATCH_PROTOCOL forms SMM corresponding with the SMI and drives log-on message.It is as follows to implement program:
Step S204:By the trigger value, the triggering port of the SMI is triggered, into SMM mode;
The trigger value for detecting the triggering port of the SMI, triggers the triggering port of the SMI, into the specific of SMM mode
Realize that program is as follows:
SwContext.Sw Smi Input Value=0x50;// wherein 0x50 is the value for the triggering port for triggering SMI,
It can be any value being not used by
Smi port 0xb2 are written into the value of Sw Smi Input Value 0x50, when system detectio to 0xb2 is written
0x50, triggers the triggering port of the SMI, and system enters SMM mode.
Step S205:The mode of traversal is selected to search the boot sequence of Shell;
It is as follows to implement program:
When the boot sequence for finding Shell, stop inquiry.
Step S206:By Boot Order, by the Shell recursion to the first startup item, so as to as opening next time
Dynamic sequence.
The boot sequence of the Shell is placed to the mode of the first startup item position can also select other modes, and
The realization of the present invention is not influenced.
It is as follows to implement program:
The startup item of Shell is placed into the first startup item position in the way of recursion, exits SMM mode, system is under
When one-shot, started according to the boot sequence of Shell.
It in this embodiment, can be by including EFI_SMM_BASE_ when SMI does not enter into SMM mode
The Entry Point functions of PROTOCOL are loaded into SMM mode.The mode of traversal is selected to search in this specific embodiment
Shell boot sequences, by Boot Order, by the Shell recursion to the first startup item;It is above-mentioned that Shell is set to first
The method of startup item is not easy mistake occur when degree is run, and has advanced optimized opening for modification system provided by the present invention
The method of dynamic sequence.
Below to the device of modification boot sequence under a kind of BIOS setup masked states provided in an embodiment of the present invention into
Row is introduced, and the device that boot sequence is changed under BIOS setup masked states and above-described BIOS setup screens is described below
Reference can be corresponded by covering modification boot sequence method under state.
Referring to FIG. 3, Fig. 3 is to change boot sequence under a kind of BIOS setup masked states provided in an embodiment of the present invention
Device structure diagram;Specific device may include:
Judgment module 100:For judging whether SMI is loaded into SMM mode;
Detection module 200:Trigger value for the triggering port for detecting the triggering SMI, the trigger value are logical in advance
Cross what registration SMM drivings obtained;
Trigger module 300:Trigger value for the triggering port for triggering the SMI, into SMM mode;
Change and sets module 400:The Shell is set to the first startup item, so as to as boot sequence next time.
In present apparatus specific implementation, it may further include:
Load-on module 500, when not being loaded into SMM mode for SMI, by including EFI_SMM_BASE_
After the Entry Point functions of PROTOCOL are loaded into SMM mode, the triggering port of the follow-up detection SMI is executed
Trigger value operation.
Registration module 600:For registering SMM activation bits, according to the terminal number and load information of SMI, pass through EFI_
SMM_SW_DISPATCH_PROTOCOL forms SMM corresponding with the SMI and drives log-on message.
The device of boot sequence is changed under the BIOS setup masked states of the present embodiment for realizing BIOS above-mentioned
The method that boot sequence is changed under setup masked states, therefore the device of boot sequence is changed under BIOS setup masked states
In the visible BIOS setup masked states hereinbefore of specific implementation mode under modification boot sequence method embodiment portion
Point, for example, judgment module 100, detection module 200, trigger module 300 change and set module 400, it is respectively used to realize above-mentioned BIOS
Step S101, S102, S103 and S104 in the method for boot sequence are changed under setup masked states, so, specific embodiment party
Formula is referred to the description of corresponding various pieces embodiment, and details are not described herein.
Each embodiment is described by the way of progressive in this specification, the highlights of each of the examples are with it is other
The difference of embodiment, just to refer each other for same or similar part between each embodiment.For being filled disclosed in embodiment
For setting, since it is corresponded to the methods disclosed in the examples, so description is fairly simple, related place is referring to method part
Explanation.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure
And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and
The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These
Function is implemented in hardware or software actually, depends on the specific application and design constraint of technical solution.Profession
Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered
Think beyond the scope of this invention.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor
The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit
Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology
In any other form of storage medium well known in field.
Above to changing the method and dress of boot sequence under a kind of BIOS setup masked states provided by the present invention
It sets and is described in detail.Principle and implementation of the present invention are described for specific case used herein, above
The explanation of embodiment is merely used to help understand the method and its core concept of the present invention.It should be pointed out that for the art
Those of ordinary skill for, without departing from the principle of the present invention, can also to the present invention carry out it is several improvement and repair
Decorations, these improvement and modification are also fallen within the protection scope of the claims of the present invention.
Claims (10)
1. a kind of method for changing boot sequence under BIOS setup masked states, which is characterized in that including:
Judge whether SMI is loaded into SMM mode;
If so, detecting the trigger value of the triggering port of the SMI, the trigger value is that the pre- registration SMM that first passes through drives acquisition;
By the trigger value, the triggering port of the SMI is triggered, into SMM mode;
The Shell is set to the first startup item, so as to as boot sequence next time.
2. the method as described in claim 1, which is characterized in that it is described judge whether SMI is loaded into SMM mode after, also
Including:If SMI is not loaded into SMM mode, pass through the Entry Point functions comprising EFI_SMM_BASE_PROTOCOL
After being loaded into SMM mode, the operation of the trigger value of the triggering port of the follow-up detection SMI is executed.
3. the method as described in claim 1, which is characterized in that the registration SMM drivings specifically include:According to the terminal of SMI
Number and load information, pass through EFI_SMM_SW_DI SPATCH_PROTOCOL and form SMM drivings corresponding with the SMI and note
Volume information.
4. method as claimed in claim 3, which is characterized in that the trigger value is corresponding with SMM drivings.
5. as described in any one of Claims 1-4, which is characterized in that described the Shell is set to the first startup item to include:
The boot sequence for searching Shell, by Boot Order by the Shell recursion to the first startup item.
6. changing the device of boot sequence under a kind of BIOS setup masked states, which is characterized in that including:
Judgment module:For judging whether SMI is loaded into SMM mode;
Detection module:Trigger value for the triggering port for detecting the triggering SMI, the trigger value are pre- to first pass through registration
SMM drivings obtain;
Trigger module:Trigger value for the triggering port for triggering the SMI, into SMM mode;
Change and sets module:The Shell is set to the first startup item, so as to as boot sequence next time.
7. device as claimed in claim 6, which is characterized in that further include load-on module, for not being loaded into SMI
When SMM mode, after being loaded into SMM mode by the Entry Point functions comprising EFI_SMM_BASE_PROTOCOL, hold
The operation of the trigger value of the triggering port of the follow-up detection SMI of row.
8. device as claimed in claim 6, which is characterized in that further include registration module:For registering SMM activation bits, root
According to the terminal number and load information of SMI, formed by EFI_SMM_SW_DISPATCH_PROTOCOL corresponding with the SMI
SMM drives log-on message.
9. device as claimed in claim 8, which is characterized in that the trigger value is corresponding with SMM drivings.
10. such as claim 6 to 9 any one of them device, which is characterized in that described change sets module, for searching Shell's
Boot sequence, by Boot Order by the Shell recursion to the first startup item.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710772558.5A CN108334351A (en) | 2017-08-31 | 2017-08-31 | A kind of method and device of modification boot sequence |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710772558.5A CN108334351A (en) | 2017-08-31 | 2017-08-31 | A kind of method and device of modification boot sequence |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108334351A true CN108334351A (en) | 2018-07-27 |
Family
ID=62922364
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710772558.5A Pending CN108334351A (en) | 2017-08-31 | 2017-08-31 | A kind of method and device of modification boot sequence |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108334351A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110727263A (en) * | 2019-10-31 | 2020-01-24 | 南方电网调峰调频发电有限公司 | Method for overhauling abnormal equipment action sequence and monitoring signal jitter state |
CN111966417A (en) * | 2020-08-25 | 2020-11-20 | 深圳市亿道数码技术有限公司 | Method and system for controlling starting of slave PXE through designated key |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1524206A (en) * | 2001-05-10 | 2004-08-25 | �Ƚ�װ�ù�˾ | External locking mechanism for personal computer memory locations |
CN101826020A (en) * | 2009-03-06 | 2010-09-08 | 英业达股份有限公司 | Reading method for boot sequence of computer boot equipment |
CN102880477A (en) * | 2011-07-14 | 2013-01-16 | 联想(北京)有限公司 | Method for realizing computer start and computer |
CN103748552A (en) * | 2011-08-30 | 2014-04-23 | 惠普发展公司,有限责任合伙企业 | Virtual high privilege mode for a system management request |
-
2017
- 2017-08-31 CN CN201710772558.5A patent/CN108334351A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1524206A (en) * | 2001-05-10 | 2004-08-25 | �Ƚ�װ�ù�˾ | External locking mechanism for personal computer memory locations |
CN101826020A (en) * | 2009-03-06 | 2010-09-08 | 英业达股份有限公司 | Reading method for boot sequence of computer boot equipment |
CN102880477A (en) * | 2011-07-14 | 2013-01-16 | 联想(北京)有限公司 | Method for realizing computer start and computer |
CN103748552A (en) * | 2011-08-30 | 2014-04-23 | 惠普发展公司,有限责任合伙企业 | Virtual high privilege mode for a system management request |
Non-Patent Citations (2)
Title |
---|
匿名: "SMI端口", 《RDZHIJIA.COM网站》 * |
匿名: "SMM详解", 《CSDN博客》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110727263A (en) * | 2019-10-31 | 2020-01-24 | 南方电网调峰调频发电有限公司 | Method for overhauling abnormal equipment action sequence and monitoring signal jitter state |
CN111966417A (en) * | 2020-08-25 | 2020-11-20 | 深圳市亿道数码技术有限公司 | Method and system for controlling starting of slave PXE through designated key |
CN111966417B (en) * | 2020-08-25 | 2023-08-18 | 深圳市亿道数码技术有限公司 | Method and system for controlling start-up from PXE through designated key |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102236621B (en) | Computer interface information configuration system and method | |
JP4572259B1 (en) | Information device, program, and illegal program code execution prevention method | |
US20160188345A1 (en) | Method of a UEFI firmware and Computer System thereof | |
US11194586B2 (en) | Secure boot override in a computing device equipped with unified-extensible firmware interface (UEFI)-compliant firmware | |
TWI612439B (en) | Computing device, method and machine readable storage media for detecting unauthorized memory access | |
US7454547B1 (en) | Data exchange between a runtime environment and a computer firmware in a multi-processor computing system | |
EP3242214B1 (en) | Method and device for protecting information of mcu chip | |
WO2016074127A1 (en) | Computer device and memory starting method for computer device | |
CN110096314B (en) | Interface initialization method, device, equipment and computer readable storage medium | |
EP3048550B1 (en) | Measurement method, electronic device and measurement system | |
WO2017049893A1 (en) | Application program testing method, testing apparatus, and mobile terminal | |
JP2008009721A (en) | Evaluation system and evaluation method thereof | |
TW201248392A (en) | System and method for recovering data of a NVRAM | |
US10592393B1 (en) | Firmware debug trace capture | |
CN107844362B (en) | System, method, virtual machine and readable storage medium for virtualizing TPM (trusted platform Module) equipment | |
US10491736B2 (en) | Computer system and method thereof for bluetooth data sharing between UEFI firmware and OS | |
CN108334351A (en) | A kind of method and device of modification boot sequence | |
CN112231198B (en) | Malicious process debugging method and device, electronic equipment and medium | |
CN106126206A (en) | A kind of information processing method and electronic equipment | |
WO2016173172A1 (en) | Method and apparatus for detecting heap memory operation | |
EP2869189A1 (en) | Boot up of a multiprocessor computer | |
CN109918338B (en) | Safety chip operating system testing device | |
US8145819B2 (en) | Method and system for stealing interrupt vectors | |
US8250353B2 (en) | Firmware exclusive access of a peripheral storage device | |
Lineberry | Malicious code injection via/dev/mem |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180727 |
|
RJ01 | Rejection of invention patent application after publication |