CN110187922B - Method, device, equipment and storage medium for setting and verifying BIOS (basic input output System) parameters - Google Patents

Method, device, equipment and storage medium for setting and verifying BIOS (basic input output System) parameters Download PDF

Info

Publication number
CN110187922B
CN110187922B CN201910334206.0A CN201910334206A CN110187922B CN 110187922 B CN110187922 B CN 110187922B CN 201910334206 A CN201910334206 A CN 201910334206A CN 110187922 B CN110187922 B CN 110187922B
Authority
CN
China
Prior art keywords
bios
configuration
value
setting
reading
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
CN201910334206.0A
Other languages
Chinese (zh)
Other versions
CN110187922A (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201910334206.0A priority Critical patent/CN110187922B/en
Publication of CN110187922A publication Critical patent/CN110187922A/en
Application granted granted Critical
Publication of CN110187922B publication Critical patent/CN110187922B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a method, a device, equipment and a storage medium for setting and verifying BIOS parameters, which comprises the following steps: setting BIOS configuration parameter logic; restarting the BIOS, and reading the configuration parameters of the BIOS by the BIOS; writing the configuration parameters read by the BIOS into the BMC, and setting the value of an effective bit; reading the value of the valid bit; if the value of the valid bit is valid, the parameter setting is successful and the configuration parameter information of the BIOS is read, otherwise, the set BIOS parameter is invalid, the method is suitable for all server BIOS with established safety mechanisms, and the BIOS is fully prevented from being damaged and attacked by the outside.

Description

Method, device, equipment and storage medium for setting and verifying BIOS (basic input output System) parameters
Technical Field
The invention relates to the technical field of server testing, in particular to a method, a device, equipment and a storage medium for setting and verifying BIOS parameters.
Background
Servers, also known as servers, are devices that provide computing services. Since the server needs to respond to and process the service request, the server generally has the capability of supporting and securing the service. The server is constructed to include a processor, a hard disk, a memory, a system bus, etc., similar to a general-purpose computer architecture, but requires high processing power, stability, reliability, security, scalability, manageability, etc., due to the need to provide highly reliable services.
With the rapid development of the server industry, more and more clients in various fields adopt servers with stronger computing power to run their core applications. In order to meet the requirements of customers with high parallelization and high performance, the quality, reliability and stability of products are generally emphasized while high-performance servers are promoted. A variety of tests are performed for a variety of configurations of servers,
the BIOS stores the most important basic input and output programs of the computer, system setting information, power-on self-test program and system boot bootstrap program, and its main function is to provide the lowest layer and most direct hardware setting and control for the computer. The BIOS setup program is stored in the BIOS chip and can be set only at power-on. BIOS it plays a very important role in computer systems. The performance of a mainboard is superior or not, and the performance of the mainboard depends on whether the BIOS management function on the mainboard is advanced or not to a great extent, so the BIOS test is always an important link of the server test. In an era with a particularly developed network, the security of the server BIOS is easily attacked, and in order to ensure the security of the server BIOS, a method for setting and verifying BIOS parameters needs to be designed.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for setting and verifying BIOS parameters, and aims to solve the problems that the safety of a server BIOS is easy to attack, and a traditional BIOS parameter verification method needs a tester to repeatedly and frequently test a certain option for multiple periods by means of a test tool, so that the time and the labor are consumed.
The technical scheme of the invention is as follows:
in a first aspect, a technical solution of the present invention provides a method for setting and verifying BIOS parameters, including the following steps:
setting BIOS configuration parameter logic;
restarting the BIOS, and reading the configuration parameters of the BIOS by the BIOS;
writing the configuration parameters read by the BIOS into the BMC, and setting the value of an effective bit;
reading the value of the valid bit;
if the value of the valid bit is valid, the parameter setting is successful and the configuration parameter information of the BIOS is read, otherwise, the set BIOS parameter is invalid.
Further, the setting the configuration parameters set in the BIOS configuration parameter logic includes:
setting Turbo, HT, VT, EIST and Numa values;
and setting the flag bit as an effective value.
Further, the setting BIOS configuration parameter logic includes:
reading a parameter Configuration value;
if the Configuration value is the first valid value, reading the Turbo, HT, VT, EIST, numa values, setting the BIOS corresponding option and making it valid, and simultaneously writing the Configuration and all option values to zero and clearing.
Further, reading the parameter Configuration value further includes:
if the Configuration value is the second effective value, the BIOS restores the default value set by the PRD, and meanwhile, the Configuration value is cleared to be the third threshold value;
if the Configuration value is invalid, the BIOS continues to operate according to the Configuration of the BIOS.
Further, the method further comprises:
and the BMC receives the set Configuration parameters, and if the Configuration is set to be a third threshold value, the BMC initiatively clears all the set parameters.
In a second aspect, the present invention further provides a device for setting and verifying BIOS parameters, including a configuration parameter setting module, a restart module, a BIOS configuration reading module, a configuration parameter reading module, a write-in module, and a determining module;
the configuration parameter setting module is used for setting BIOS configuration parameter logic; the configuration parameters comprise Turbo, HT, VT, EIST, numa values and valid values of flag bits;
the restarting module is used for restarting the BIOS;
the BIOS configuration reading module is used for reading the configuration parameters of the BIOS;
the writing module writes the configuration parameters of the BIOS read by the BIOS configuration reading module into the BMC;
the judging module is used for reading the value of the valid bit and judging whether the value of the valid bit is valid or not;
and the configuration parameter reading module is used for reading the configuration parameter information of the BIOS if the value of the valid bit is valid.
Further, the configuration parameter setting module includes: a Configuration value reading unit, a parameter value reading setting unit, a Configuration value reading unit for reading a parameter Configuration value;
a determination unit further configured to determine a Configuration value;
and the parameter value reading and setting unit is used for reading Turbo, HT, VT, EIST and Numa values if the Configuration value output by the judging unit is a first effective value, setting corresponding options of BIOS (basic input output system) and enabling the options to be effective, and writing zero and clearing the Configuration and all option values.
Further, the device also comprises a BIOS default value recovery setting module;
a BIOS default value recovery setting module, configured to, if the determination unit outputs that the Configuration value is the second valid value, recover the default value set by the PRD by the BIOS, and meanwhile clear the Configuration value as the third threshold;
in a third aspect, the present invention also provides an electronic device, including: a memory and a processor, the memory and processor communicatively coupled;
a memory for storing a computer program;
a processor for executing said computer program to carry out the steps of a method of setting and verifying BIOS parameters as described in the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium, where a computer program is stored, where the computer program is executed by a processor to implement the steps of the method for setting and verifying BIOS parameters according to the first aspect.
According to the technical scheme, the invention has the following advantages: the method is a method for setting verification test parameters of the safety of BIOS parameters by the IPMI aiming at a server. The method is suitable for all servers BIOS with established security mechanisms, and fully ensures that the BIOS is not damaged and attacked by the outside.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Therefore, compared with the prior art, the invention has prominent substantive features and remarkable progress, and the beneficial effects of the implementation are also obvious.
Drawings
In order to more clearly illustrate the embodiments or prior art solutions of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a schematic flow chart diagram of a method of setting and verifying BIOS parameters in accordance with one embodiment of the present invention.
FIG. 2 is a schematic block diagram of an apparatus for setting and verifying BIOS parameters, in accordance with one embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The following explains key terms appearing in the present invention.
As shown in fig. 1, the technical solution of the present invention provides a method for setting and verifying BIOS parameters, including the following steps:
s1: setting BIOS configuration parameter logic;
it should be noted that, the BIOS configuration parameters in this embodiment are set by IPMI setting, and those skilled in the art know that IPMI (Intelligent Platform Management Interface) is a new generation of general Interface standard for enabling hardware Management to be "Intelligent". The IPMI may be used by a user to monitor physical characteristics of the server, such as temperature, voltage, fan operating conditions, power supply, and chassis intrusion. The IPMI is most advantageous in that it is independent of the CPU BIOS and OS, so that the user can monitor the server by powering on the power supply regardless of the power-on or power-off state. IPMI is a standard of specification, in which the most important physical component is BMC (Baseboard Management Controller), an embedded Management microcontroller, which is equivalent to the "brain" managed by the whole platform, through which IPMI can monitor data of various sensors and log various events. It is further noted that: IPMI set BIOS configuration command as follows Table 1
TABLE 1
Figure BDA0002038638340000061
Figure BDA0002038638340000071
Setting BIOS parameter logic:
setting Turbo/HT/VT/EIST/Numa/\ 8230to accurate value according to requirement; (0 x80/0x 81)
The valid flag is then set to valid.
If the Default needs to be restored, setting a Restore Default Value (0 x 82);
the Configuration value is read, and if the value is the first valid value, wherein the first valid value is 0x81, the following Turbo/HT/VT/EIST/Numa/\ 8230; value is read, and the corresponding options of BIOS are set and enabled to be effective. The Configuration value and all option values are also cleared to zero if the second valid value, here 0x82, the bios restores the default value set by the PRD, while the Configuration value is cleared to the third threshold value, here 0x00. And if the Configuration value is invalid, continuing to operate according to the Configuration of the BIOS. The BIOS only needs to set the Configuration parameter to 0x00, the BMC will automatically clear other parameters, the Configuration of the command can support the setting of 0x00 under the security mechanism, and other values can not support under the security mechanism.
S2: restarting the BIOS, and reading the configuration parameters of the BIOS by the BIOS; in this step, after each BIOS is started, the valid flag bit is cleared; then reading the configuration parameters (Turbo/HT/VT/EIST/Numa/\ 8230;);
s3: writing the configuration parameters read by the BIOS into the BMC, and setting the value of an effective bit;
write to BMC via command set BIOS configuration value (BIOS). While the valid bit is set.
S4: reading the value of the valid bit;
the valid flag bit is read by Get BIOS configuration value (user).
S5: if the value of the valid bit is valid, the BIOS parameter is successfully set and the configuration parameter information of the BIOS is read, otherwise, the BIOS parameter is invalid.
It should be noted here that the clear parameter value needs to be set to 0x00. And comparing the read configuration parameter information with the set information, judging whether the information is changed or not, and further ensuring the safety of the configuration parameter information.
Write BIOS configuration (user) and Read BIOS configuration (BIOS) are used for a user to set parameters of the BIOS and validate it.
set BIOS configuration value (BIOS) and Get BIOS configuration value (user) are used for the BIOS to pass the current settings to the user. List of parameters as in table 2
TABLE 2
Figure BDA0002038638340000081
Figure BDA0002038638340000091
Figure BDA0002038638340000101
The method is suitable for all server BIOS with established safety mechanism, and fully ensures that the BIOS is not damaged and attacked by the outside.
Example two
As shown in fig. 2, a device for setting and verifying BIOS parameters in the technical solution of the present invention further includes a configuration parameter setting module 11, a restart module 12, a BIOS configuration reading module 13, a configuration parameter reading module 16, a write-in module 14, and a determining module 15;
a configuration parameter setting module 11, configured to set BIOS configuration parameter logic; the configuration parameters comprise Turbo, HT, VT, EIST, numa values and valid values of flag bits;
a restart module 12 for restarting the BIOS;
a BIOS configuration reading module 13, configured to read a configuration parameter of the BIOS;
a write-in module 14, which writes the configuration parameters of the BIOS read by the BIOS configuration read module into the BMC;
a judging module 15, configured to read a value of the valid bit and judge whether the value of the valid bit is valid;
the configuration parameter reading module 16 is configured to read the configuration parameter information of the BIOS if the value of the valid bit is valid.
The configuration parameter setting module 16 includes: configuration value reading unit, parameter value reading setting unit, parameter value setting unit, and program,
A Configuration value reading unit for reading a parameter Configuration value;
a judging unit, further used for judging the Configuration value;
and the parameter value reading and setting unit is used for reading Turbo, HT, VT, EIST and Numa values, setting options corresponding to the BIOS to be effective and writing the Configuration and all option values into zero to clear if the Configuration value output by the judging unit is the first effective value.
The system also comprises a BIOS default value recovery setting module;
the BIOS default value recovery setting module is used for recovering the default value set by the PRD and clearing the Configuration value as a third threshold value if the Configuration value output by the judging unit is the second effective value;
EXAMPLE III
The present invention also provides an electronic device, comprising: a memory and a processor, the memory and processor communicatively coupled;
a memory for storing a computer program;
the processor, configured to execute the computer program to implement the steps of the method for setting and verifying the BIOS parameter, specifically includes:
setting BIOS configuration parameter logic;
restarting the BIOS, and reading the configuration parameters of the BIOS by the BIOS;
writing the configuration parameters read by the BIOS into the BMC, and setting the value of an effective bit;
reading the value of the valid bit;
if the value of the valid bit is valid, the BIOS parameter is successfully set and the configuration parameter information of the BIOS is read, otherwise, the BIOS parameter is invalid.
Example four
The present invention provides a computer readable storage medium having stored thereon a computer program for execution by a processor to perform the steps of a method of setting and verifying BIOS parameters as described in the first embodiment.
Although the present invention has been described in detail in connection with the preferred embodiments with reference to the accompanying drawings, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. A method for setting and verifying BIOS parameters is characterized by comprising the following steps: setting BIOS configuration parameter logic; reading a parameter Configuration value; if the Configuration value is the first effective value, reading Turbo, HT, VT, EIST and Numa values, setting options corresponding to the BIOS and enabling the BIOS to take effect, and simultaneously writing the Configuration and all option values into zero and clearing;
restarting the BIOS, and reading the configuration parameters of the BIOS by the BIOS;
writing the configuration parameters read by the BIOS into the BMC, and setting the value of an effective bit;
reading the value of the valid bit;
if the value of the valid bit is valid, the parameter setting is successful and the configuration parameter information of the BIOS is read, otherwise, the set BIOS parameter is invalid.
2. The method of claim 1, wherein setting the configuration parameters set in the BIOS configuration parameter logic comprises:
setting Turbo, HT, VT, EIST and Numa values;
and setting the flag bit as an effective value.
3. The method of claim 2, wherein reading the parameter Configuration value further comprises:
if the Configuration value is the second effective value, the BIOS restores the default value set by the PRD, and meanwhile, the Configuration value is cleared to be the third threshold value;
if the Configuration value is invalid, the BIOS continues to operate according to the Configuration of the BIOS.
4. The method of claim 3, further comprising:
and the BMC receives the set Configuration parameters, and if the Configuration is set to be a third threshold value, the BMC initiatively clears all the set parameters.
5. A device for setting and verifying BIOS parameters is characterized by comprising a configuration parameter setting module, a restarting module, a BIOS configuration reading module, a configuration parameter reading module, a writing module and a judging module;
the configuration parameter setting module is used for setting BIOS configuration parameter logic; the configuration parameters comprise Turbo, HT, VT, EIST, numa values and valid values of flag bits;
the restarting module is used for restarting the BIOS;
the BIOS configuration reading module is used for reading the configuration parameters of the BIOS;
the write-in module writes the configuration parameters of the BIOS read by the BIOS configuration read module into the BMC; the judging module is used for reading the value of the valid bit and judging whether the value of the valid bit is valid or not;
the configuration parameter reading module is used for reading the configuration parameter information of the BIOS if the value of the valid bit is valid;
the configuration parameter setting module comprises: configuration value reading unit, parameter value reading setting unit, parameter value setting unit, and program,
A Configuration value reading unit for reading a parameter Configuration value; a judging unit, further used for judging the Configuration value;
and the parameter value reading and setting unit is used for reading Turbo, HT, VT, EIST and Numa values if the Configuration value output by the judging unit is a first effective value, setting corresponding options of BIOS (basic input output system) and enabling the options to be effective, and writing zero and clearing the Configuration and all option values.
6. The apparatus of claim 5, further comprising a BIOS default restore settings module;
and the BIOS default value recovery setting module is used for recovering the default value set by the PRD and clearing the Configuration value as a third threshold value if the determination unit outputs that the Configuration value is the second effective value.
7. An electronic device, comprising: a memory and a processor, the memory and processor communicatively coupled;
a memory for storing a computer program;
a processor for executing said computer program to carry out the steps of a method of setting and verifying BIOS parameters as claimed in any one of claims 1 to 4.
8. A computer-readable storage medium, having stored thereon a computer program for execution by a processor to perform the steps of a method of setting and verifying BIOS parameters as claimed in any one of claims 1 to 4.
CN201910334206.0A 2019-04-24 2019-04-24 Method, device, equipment and storage medium for setting and verifying BIOS (basic input output System) parameters Active CN110187922B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910334206.0A CN110187922B (en) 2019-04-24 2019-04-24 Method, device, equipment and storage medium for setting and verifying BIOS (basic input output System) parameters

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910334206.0A CN110187922B (en) 2019-04-24 2019-04-24 Method, device, equipment and storage medium for setting and verifying BIOS (basic input output System) parameters

Publications (2)

Publication Number Publication Date
CN110187922A CN110187922A (en) 2019-08-30
CN110187922B true CN110187922B (en) 2023-01-10

Family

ID=67715044

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910334206.0A Active CN110187922B (en) 2019-04-24 2019-04-24 Method, device, equipment and storage medium for setting and verifying BIOS (basic input output System) parameters

Country Status (1)

Country Link
CN (1) CN110187922B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113010217B (en) * 2021-03-18 2023-04-07 山东英信计算机技术有限公司 BIOS parameter setting method and device, electronic equipment and storage medium
CN114528029B (en) * 2022-02-11 2023-08-08 苏州浪潮智能科技有限公司 Method, system, equipment and storage medium for realizing BIOS option setting
CN115080132A (en) * 2022-06-28 2022-09-20 西安易朴通讯技术有限公司 Information processing method, information processing apparatus, server, and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096612A (en) * 2009-12-14 2011-06-15 北大方正集团有限公司 Embedded type equipment parameter storing method and device
CN102736908A (en) * 2011-04-14 2012-10-17 研祥智能科技股份有限公司 System, device and method for remotely setting CMOS (Complementary Metal-Oxide-Semiconductor Transistor) parameters
CN104601373A (en) * 2015-01-05 2015-05-06 浪潮电子信息产业股份有限公司 Method for setting and synchronizing Basic Input/Output System (BIOS) configuration parameters through out-of-band mode

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096612A (en) * 2009-12-14 2011-06-15 北大方正集团有限公司 Embedded type equipment parameter storing method and device
CN102736908A (en) * 2011-04-14 2012-10-17 研祥智能科技股份有限公司 System, device and method for remotely setting CMOS (Complementary Metal-Oxide-Semiconductor Transistor) parameters
CN104601373A (en) * 2015-01-05 2015-05-06 浪潮电子信息产业股份有限公司 Method for setting and synchronizing Basic Input/Output System (BIOS) configuration parameters through out-of-band mode

Also Published As

Publication number Publication date
CN110187922A (en) 2019-08-30

Similar Documents

Publication Publication Date Title
US10719400B2 (en) System and method for self-healing basic input/output system boot image and secure recovery
JP6530774B2 (en) Hardware failure recovery system
US10353779B2 (en) Systems and methods for detection of firmware image corruption and initiation of recovery
CN110187922B (en) Method, device, equipment and storage medium for setting and verifying BIOS (basic input output System) parameters
US10866623B2 (en) Information handling system and method to detect and recover from no power/no post failures
US10114952B2 (en) System, apparatus and method for performing secure memory training and management in a trusted environment
US10146657B2 (en) Initialization trace of a computing device
CN110162435B (en) Method, system, terminal and storage medium for starting and testing PXE of server
JP2020126576A (en) Method and system for updating recovery of bios
CN107111595B (en) Method, device and system for detecting early boot errors
US20190004818A1 (en) Method of UEFI Shell for Supporting Power Saving Mode and Computer System thereof
US11321077B1 (en) Live updating of firmware behavior
CN107783844A (en) A kind of computer program operation exception detection method, device and medium
JP6028657B2 (en) Verification program, verification method, and verification apparatus
US8914680B2 (en) Resolution of system hang due to filesystem corruption
US10684896B2 (en) Method for processing asynchronous event by checking device and checking device
CN111198832A (en) Processing method and electronic equipment
US11226862B1 (en) System and method for baseboard management controller boot first resiliency
CN106547583B (en) Operating system installation method and device
CN111694587A (en) Server PNOR firmware upgrading method, device, equipment and storage medium
TWI554876B (en) Method for processing node replacement and server system using the same
US11977638B2 (en) Low-impact firmware update
CN110908725A (en) Application program starting method and device, electronic equipment and readable medium
CN114385379B (en) Method, system, terminal and storage medium for detecting on-board information refreshing
US20060230196A1 (en) Monitoring system and method using system management interrupt

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
GR01 Patent grant
GR01 Patent grant