WO2020155591A1 - 一种bios和bmc下电策略实时同步的方法、装置、终端及存储介质 - Google Patents

一种bios和bmc下电策略实时同步的方法、装置、终端及存储介质 Download PDF

Info

Publication number
WO2020155591A1
WO2020155591A1 PCT/CN2019/098501 CN2019098501W WO2020155591A1 WO 2020155591 A1 WO2020155591 A1 WO 2020155591A1 CN 2019098501 W CN2019098501 W CN 2019098501W WO 2020155591 A1 WO2020155591 A1 WO 2020155591A1
Authority
WO
WIPO (PCT)
Prior art keywords
power
bmc
setting value
bios
strategy
Prior art date
Application number
PCT/CN2019/098501
Other languages
English (en)
French (fr)
Inventor
钱慧娟
Original Assignee
郑州云海信息技术有限公司
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 郑州云海信息技术有限公司 filed Critical 郑州云海信息技术有限公司
Publication of WO2020155591A1 publication Critical patent/WO2020155591A1/zh

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

Definitions

  • the invention relates to the technical field of servers, in particular to a method, device, terminal and storage medium for real-time synchronization of BIOS and BMC power-off strategies.
  • the default power-off policy can be set in the BIOS and BMC of the server product.
  • the BIOS can be set through the option "Restore AC Power Loss”
  • the BMC Web can be set through the option "Power Policy Options”.
  • the existing solution is based on the settings under the BIOS, and the BMC synchronizes the settings under the BIOS. However, when the settings under BIOS are modified, the settings of BMC cannot be synchronized to take effect immediately. You can only modify the settings under BMC after the BMC obtains the BIOS settings at the next restart. BMC and BIOS power-off policy settings There is a delay in synchronization. This will cause a certain amount of trouble to the customer. The BIOS settings are modified, but the previous settings are still seen under the BMC Web, and they will worry about the unsuccessful settings and poor customer experience.
  • BIOS and BMC power-off policies which can synchronize the system power-off policy settings under BIOS and BMC in real time, and solves the problem that BIOS and BMC settings cannot be synchronized in real time, which causes customer trouble.
  • the present invention provides a method, device, terminal and storage medium for real-time synchronization of BIOS and BMC power-off strategies, adding verification points in the complicated opaque process during the upgrade process to solve the above technical problems.
  • an embodiment of the present application provides a method for real-time synchronization of BIOS and BMC power-off policies.
  • the method includes:
  • the acquiring the current power-off strategy of the BMC, and setting the Bit0 value of the PCH register according to the power-off strategy and saving the set value includes:
  • the setting value of the BIOS setup option is obtained, and it is determined whether the setting value is consistent with the setting value of Bit0 of the PCH register.
  • the Bit0 setting value is refreshed to the setting value of the BIOS setup option, including:
  • the current BMC power-off strategy is obtained, and the current BMC power-off strategy is determined to be compared with the modified one. Whether the settings in the BIOS Setup are consistent, if they are inconsistent, notify the BMC to modify the power-off policy, including:
  • an embodiment of the present application provides a device for real-time synchronization of BIOS and BMC power-off policies, and the device includes:
  • An acquiring unit the acquiring unit is used to acquire the current power-off strategy of the BMC, set Bit0 of the PCH register according to the power-off strategy and save the set value;
  • Initialization unit the initialization unit is used to obtain the setting value of the BIOS setup option, determine whether the setting value is consistent with the setting value of Bit0 of the PCH register, if not, refresh the setting value of Bit0 of the PCH register to the BIOS setup option The setting value;
  • the synchronization unit is used to obtain the current power-off strategy of the BMC when the setting value in the BIOS Setup is modified, and determine whether the current power-off strategy of the BMC is consistent with the setting value in the modified BIOS Setup, If they are inconsistent, notify the BMC to modify the power-off strategy.
  • the acquiring unit is specifically configured to:
  • the initialization unit is specifically configured to:
  • the synchronization unit is specifically configured to:
  • a terminal including:
  • the memory is used to store computer programs
  • the processor is used to call and run the computer program from the memory, so that the above method is executed on the terminal.
  • a computer storage medium stores instructions that, when run on a computer, cause the computer to execute the methods described in the above aspects.
  • a computer program product containing instructions which when run on a computer, causes the computer to execute the methods described in the above aspects.
  • the method, device, terminal and storage medium for real-time synchronization of BIOS and BMC power-off policies provided by the present invention can obtain BMC settings through BIOS and refresh to the menu, and the method that BIOS settings take effect immediately after the power-off policy is saved, guarantees BIOS and BMC The real-time nature of the synchronization of the end system power-off strategy will not give customers the illusion that the settings are not effective, improve product usability, enhance product performance, and improve customer satisfaction.
  • Fig. 1 is a schematic flowchart of a method according to an embodiment of the present application.
  • Fig. 2 is a schematic block diagram of a device according to an embodiment of the present application.
  • Fig. 3 is a schematic structural diagram of a terminal provided by an embodiment of the present invention.
  • BMC Baseboard Management Controller, baseboard management controller
  • BIOS Basic Input Output System, basic input and output system
  • CMC Chassis Management Controller, chassis management controller.
  • FIG. 1 is a schematic flowchart of a method according to an embodiment of the present application.
  • the execution subject of FIG. 1 may be a real-time synchronization device for the BIOS and BMC power-off policies.
  • the method 100 includes:
  • Step 110 Obtain the current BMC power-off strategy, set Bit0 of the PCH register according to the power-off strategy, and save the set value;
  • Step 120 Obtain the set value of the BIOS setup option, determine whether the set value is consistent with the set value of Bit0 of the PCH register, if not, refresh the set value of Bit0 of the PCH register to the set value of the BIOS setup option;
  • Step 130 When the setting value in the BIOS Setup is modified, obtain the current BMC power-off policy, determine whether the current BMC power-off policy is consistent with the modified BIOS Setup value, and notify the BMC to modify if they are inconsistent Power-off strategy.
  • the acquiring the current BMC power-off strategy, setting the Bit0 value of the PCH register according to the power-off strategy and saving the set value includes:
  • the setting value of the BIOS setup option is obtained, and it is determined whether the setting value is consistent with the setting value of Bit0 of the PCH register, and if not, the setting value of Bit0 of the PCH register is refreshed.
  • the setting value of the BIOS setup option including:
  • the current BMC power-off policy is obtained, and the current BMC power-off policy is determined and the settings in the modified BIOS Setup are determined Whether the values are consistent, if they are inconsistent, notify the BMC to modify the power-off strategy, including:
  • the following uses the principle of real-time synchronization of the BIOS and BMC power-off policies of the present invention, combined with the process of real-time synchronization of the BIOS and BMC power-off policies in the embodiments, to synchronize the BIOS and BMC power-off policies provided by the present invention in real time. The method is described further.
  • the method for real-time synchronization of BIOS and BMC power-off policies includes the following steps:
  • the BIOS When the setting value of the AC Power Loss option in the BIOS setup is modified, the BIOS first sends the Get Chassis Status Command IPMI command to obtain the current Power Restore Policy from the BMC, and determine the BMC power-off policy and the modified BIOS Setup Whether the setting values of the Restore AC Power Loss option are consistent, if they are inconsistent, send the CHASSIS SET POWER RESTORE POLICY Command IPMI command to notify the BMC to modify the power-off policy.
  • the device 200 includes:
  • the obtaining unit 210 is configured to obtain the current power-off strategy of the BMC, set Bit0 of the PCH register according to the power-off strategy and save the set value;
  • the initialization unit 220 is used to obtain the setting value of the BIOS setup option, determine whether the setting value is consistent with the setting value of Bit0 of the PCH register, and if not, refresh the setting value of Bit0 of the PCH register to the BIOS The setting value of the setup option;
  • the synchronization unit 230 is configured to obtain the current power-off strategy of the BMC when the setting value in the BIOS Setup is modified, and determine whether the current power-off strategy of the BMC is compared with the setting value in the modified BIOS Setup If they are inconsistent, notify the BMC to modify the power-off strategy.
  • the acquiring unit 210 is specifically configured to:
  • the initialization unit 220 is specifically configured to:
  • the synchronization unit 230 is specifically configured to:
  • FIG. 3 is a schematic structural diagram of a terminal device 300 according to an embodiment of the present invention.
  • the terminal device 300 may be used to execute a method for real-time synchronization of BIOS and BMC power-off policies provided in an embodiment of the present application.
  • the terminal device 300 may include: a processor 310, a memory 320, and a communication unit 330. These components communicate through one or more buses.
  • a processor 310 a memory 320
  • a communication unit 330 These components communicate through one or more buses.
  • Those skilled in the art can understand that the structure of the server shown in the figure does not constitute a limitation to the application. It can be a bus-shaped structure or a star-shaped structure, or It may include more or fewer components than shown, or combine certain components, or different component arrangements.
  • the memory 320 can be used to store the execution instructions of the processor 310.
  • the memory 320 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electronic Erasable Programmable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Disk or Optical Disk .
  • SRAM static random access memory
  • EEPROM electronic Erasable Programmable Read Only Memory
  • EPROM Erasable Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Disk Disk
  • Disk Disk
  • Optical Disk Optical Disk
  • the processor 310 is the control center of the storage terminal. It uses various interfaces and lines to connect the various parts of the entire electronic terminal. By running or executing software programs and/or modules stored in the memory 320, and calling data stored in the memory, To perform various functions of the electronic terminal and/or process data.
  • the processor may be composed of an integrated circuit (Integrated Circuit, IC for short), for example, may be composed of a single packaged IC, or may be composed of multiple packaged ICs with the same function or different functions.
  • the processor 310 may only include a central processing unit (Central Processing Unit, CPU for short).
  • the CPU may be a single computing core, or may include multiple computing cores.
  • the communication unit 330 is configured to establish a communication channel, so that the storage terminal can communicate with other terminals. Receive user data sent by other terminals or send user data to other terminals.
  • the present application also provides a computer storage medium, wherein the computer storage medium may store a program, and the program may include some or all of the steps in the embodiments provided in the present application when the program is executed.
  • the storage medium can be a magnetic disk, an optical disc, a read-only memory (English: read-only memory, abbreviated as: ROM) or a random access memory (English: random access memory, abbreviated as: RAM), etc.
  • the method, device, terminal, and storage medium for real-time synchronization of BIOS and BMC power-off policies can obtain BMC settings through BIOS and refresh them to the menu.
  • the BIOS settings take effect immediately after the power-off policy is saved, ensuring that BIOS and The real-time nature of the synchronization of the power-off strategy of the BMC end system will not give customers the illusion that the settings are not effective, improve the usability of the product, enhance the performance of the product, and improve customer satisfaction.
  • the technology that can be achieved in this embodiment The effect can be referred to the above description, and will not be repeated here.
  • the technology in the embodiments of the present application can be implemented by means of software plus a necessary general hardware platform.
  • the technical solutions in the embodiments of the present application essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a storage medium such as a U disk or mobile Hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes, including several instructions to make a computer terminal (It can be a personal computer, a server, or a second terminal, a network terminal, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present invention.
  • a computer terminal It can be a personal computer, a server, or a second terminal, a network terminal, etc.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.

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

一种BIOS和BMC下电策略实时同步的方法,包括:获取BMC当前的下电策略,根据下电策略设定PCH寄存器的Bit0并保存设定值(110);获取BIOS setup选项的设定值,判断设定值与PCH寄存器的Bit0的设定值是否一致,若不一致则将PCH寄存器的Bit0设定值刷新到BIOS setup选项的设定值(120);当BIOS Setup中的设定值进行修改时,判断PCH寄存器的Bit0的设定值与修改后的BIOS Setup中的设定值是否一致,若不一致则通知BMC修改下电策略(130)。本方法能够通过BIOS获取BMC设定并刷新到菜单,BIOS设置下电策略保存后即时生效,保证BIOS和BMC端系统下电策略同步的实时性,不会给客户造成设定没有生效的错觉,提高了产品的可用性,增强了产品的性能,提升了客户的满意度。

Description

一种BIOS和BMC下电策略实时同步的方法、装置、终端及存储介质
本申请要求于2019年1月31日提交中国专利局、申请号为201910099922.5、发明名称为“一种BIOS和BMC下电策略实时同步的方法、装置、终端及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及服务器技术领域,具体涉及一种BIOS和BMC下电策略实时同步的方法、装置、终端及存储介质。
背景技术
随着互联网技术的快速发展和移动终端设备的日新月异,IT、互联网等领域的企业对服务器的需求也在逐渐加大。服务器在非正常关机掉电后,再加电时启动模式有三种:(1)自动启动(Power On)即非正常关机掉电后再加电时自动启动;(2)不自动启动(Power Off)即非正常关机掉电后再加电时不自动启动;(3)保持关机时的状态(Last state)即非正常关机掉电后再加电时保持关机时的状态,如果非正常关机掉电时系统是开机的状态,则再加电时系统将自动启动;如果非正常关机掉电时系统是关机的状态,则再加电时系统将不会自动启动。
服务器产品上BIOS和BMC中都可以设定默认的下电策略,BIOS可以通过选项"Restore AC Power Loss"设定,BMC Web可通过“Power Policy Options”选项设定。现有方案是以BIOS下的设定为主,BMC去同步BIOS下的设定。但是当BIOS下的设定修改之后,BMC的设定无法马上同步生效,只能等下次重启时BMC获取到BIOS的设定之后才能修改到BMC下的设定,BMC与BIOS下电策略设定同步有延时。这样会给客户造成一定的困扰,修改了BIOS设定,但是到BMC Web下看到的还是之前的设定,会担心设定不成功,客户体验差。
因此,亟需一种BIOS和BMC下电策略实时同步的方法,能够实时同 步BIOS和BMC下的系统下电策略的设定,解决了BIOS与BMC设定不能实时同步,造成客户困扰的问题。
发明内容
针对现有技术的不足,本发明提供一种BIOS和BMC下电策略实时同步的方法、装置、终端及存储介质,在升级过程中间复杂的不透明的过程添加验证点,以解决上述技术问题。
第一方面,本申请实施例提供一种BIOS和BMC下电策略实时同步的方法,所述方法包括:
获取BMC当前的下电策略,根据下电策略设定PCH寄存器的Bit0并保存设定值;
获取BIOS setup选项的设定值,判断设定值与PCH寄存器的Bit0的设定值是否一致,若不一致则将PCH寄存器的Bit0设定值刷新到BIOS setup选项的设定值;
当BIOS Setup中的设定值进行修改时,获取BMC当前的下电策略,判断BMC当前的下电策略与修改后的BIOS Setup中的设定值是否一致,若不一致则通知BMC修改下电策略。
结合第一方面,在第一方面的第一种实施方式中,所述获取BMC当前的下电策略,根据下电策略设定PCH寄存器的Bit0值并保存设定值,包括:
获取BMC当前的下电策略,
若BMC的下电策略为Power Off,则将PCH寄存器的Bit0设定为0;
若BMC的下电策略为Last State则将PCH寄存器的Bit0设定为1;
若BMC的下电策略为Power On,则将PCH寄存器的Bit0设定为2;
保存当前PCH寄存器的Bit0设定值。
结合第一方面,在第一方面的第二种实施方式中,所述获取BIOS setup选项的设定值,判断设定值与PCH寄存器的Bit0的设定值是否一致,若不一致则将PCH寄存器的Bit0设定值刷新到BIOS setup选项的设定值,包括:
获取BIOS setup中Restore AC Power Loss选项的设定值;
判断BIOS setup中Restore AC Power Loss选项的设定值与PCH寄存器的Bit0的设定值是否一致;
若不一致,则将PCH寄存器的Bit0的设定值刷新到BIOS setup中Restore AC Power Loss选项的设定值。
结合第一方面,在第一方面的第三种实施方式中,所述当BIOS Setup中的设定值进行修改时,获取BMC当前的下电策略,判断BMC当前的下电策略与修改后的BIOS Setup中的设定值是否一致,若不一致则通知BMC修改下电策略,包括:
当BIOS setup中AC Power Loss选项的设定值进行修改时,获取BMC当前的下电策略,判断BMC当前的下电策略与修改后的BIOS Setup中的设定值是否一致;
若不一致则通知BMC修改下电策略。
第二方面,本申请实施例提供一种BIOS和BMC下电策略实时同步装置,所述装置包括:
获取单元,所述获取单元用于获取BMC当前的下电策略,根据下电策略设定PCH寄存器的Bit0并保存设定值;
初始化单元,所述初始化单元用于获取BIOS setup选项的设定值,判断设定值与PCH寄存器的Bit0的设定值是否一致,若不一致则将PCH寄存器的Bit0设定值刷新到BIOS setup选项的设定值;
同步单元,所述同步单元用于当BIOS Setup中的设定值进行修改时,获取BMC当前的下电策略,判断BMC当前的下电策略与修改后的BIOS Setup中的设定值是否一致,若不一致则通知BMC修改下电策略。
结合第二方面,在第二方面的第一种实施方式中,所述获取单元具体用于:
获取BMC当前的下电策略,
若BMC的下电策略为Power Off,则将PCH寄存器的Bit0设定为0;
若BMC的下电策略为Last State则将PCH寄存器的Bit0设定为1;
若BMC的下电策略为Power On,则将PCH寄存器的Bit0设定为2;
保存当前PCH寄存器的Bit0设定值。
结合第二方面,在第二方面的第二种实施方式中,所述初始化单元具体用于:
获取BIOS setup中Restore AC Power Loss选项的设定值;
判断BIOS setup中Restore AC Power Loss选项的设定值与PCH寄存器的Bit0的设定值是否一致;
若不一致,则将PCH寄存器的Bit0的设定值刷新到BIOS setup中Restore AC Power Loss选项的设定值。
结合第二方面,在第二方面的第三种实施方式中,所述同步单元具体用于:
当BIOS setup中AC Power Loss选项的设定值进行修改时,获取BMC当前的下电策略,判断BMC当前的下电策略与修改后的BIOS Setup中的设定值是否一致;
若不一致则通知BMC修改下电策略。
第三方面,提供一种终端,包括:
处理器、存储器,其中,
该存储器用于存储计算机程序,
该处理器用于从存储器中调用并运行该计算机程序,使得在终端执行上述方法。
第四方面,提供了一种计算机存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述各方面所述的方法。
第五方面,提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述各方面所述的方法。
本发明的有益效果在于:
本发明提供的BIOS和BMC下电策略实时同步的方法、装置、终端及存储介质,能够通过BIOS获取BMC设定并刷新到菜单,BIOS设置下电策略保存后即时生效的方法,保证BIOS和BMC端系统下电策略同步的实时性,不会给客户造成设定没有生效的错觉,提高了产品的可用性,增强 了产品的性能,提升了客户的满意度。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一个实施例的方法的示意性流程图。
图2是本申请一个实施例的装置的示意性框图。
图3为本发明实施例提供的一种终端的结构示意图。
具体实施方式
为了使本技术领域的人员更好地理解本发明中的技术方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。
术语解释:
BMC:Baseboard Management Controller,基板管理控制器;
BIOS:Basic Input Output System,基本输入输出系统;
CMC:Chassis Management Controller,机箱管理控制器。
图1是本申请一个实施例的方法的示意性流程图。其中,图1执行主体可以为一种BIOS和BMC下电策略实时同步装置。
如图1所示,该方法100包括:
步骤110,获取BMC当前的下电策略,根据下电策略设定PCH寄存器的Bit0并保存设定值;
步骤120,获取BIOS setup选项的设定值,判断设定值与PCH寄存器的Bit0的设定值是否一致,若不一致则将PCH寄存器的Bit0设定值刷新到BIOS setup选项的设定值;
步骤130,当BIOS Setup中的设定值进行修改时,获取BMC当前的下电策略,判断BMC当前的下电策略与修改后的BIOS Setup中的设定值是否一致,若不一致则通知BMC修改下电策略。
可选地,作为本申请一个实施例,所述获取BMC当前的下电策略,根据下电策略设定PCH寄存器的Bit0值并保存设定值,包括:
获取BMC当前的下电策略,
若BMC的下电策略为Power Off,则将PCH寄存器的Bit0设定为0;
若BMC的下电策略为Last State则将PCH寄存器的Bit0设定为1;
若BMC的下电策略为Power On,则将PCH寄存器的Bit0设定为2;
保存当前PCH寄存器的Bit0设定值。
可选地,作为本申请一个实施例,所述获取BIOS setup选项的设定值,判断设定值与PCH寄存器的Bit0的设定值是否一致,若不一致则将PCH寄存器的Bit0设定值刷新到BIOS setup选项的设定值,包括:
获取BIOS setup中Restore AC Power Loss选项的设定值;
判断BIOS setup中Restore AC Power Loss选项的设定值与PCH寄存器的Bit0的设定值是否一致;
若不一致,则将PCH寄存器的Bit0的设定值刷新到BIOS setup中Restore AC Power Loss选项的设定值。
可选地,作为本申请一个实施例,所述当BIOS Setup中的设定值进行修改时,获取BMC当前的下电策略,判断BMC当前的下电策略与修改后的BIOS Setup中的设定值是否一致,若不一致则通知BMC修改下电策略,包括:
当BIOS setup中AC Power Loss选项的设定值进行修改时,获取BMC当前的下电策略,判断BMC当前的下电策略与修改后的BIOS Setup中的设定值是否一致;
若不一致则通知BMC修改下电策略。
为了便于对本发明的理解,下面以本发明BIOS和BMC下电策略实时同步的原理,结合实施例中对BIOS和BMC下电策略实时同步的过程,对本发明提供的BIOS和BMC下电策略实时同步方法做进一步的描述。
具体的,BIOS和BMC下电策略实时同步方法包括如下步骤:
S1、发送获取机箱状态(Get Chassis Status Command)IPMI命令,从BMC获取当前的下电策略(Power Restore Policy)
S2、设定PCH寄存器Bit0设定值,若BMC的下电策略为Power Off,则将PCH寄存器的Bit0设定为0,若BMC的下电策略为Last State则将PCH寄存器的Bit0设定为1,若BMC的下电策略为Power On,则将PCH寄存器的Bit0设定为2;同时用一个Pcd State After G3Vaule保存当前PCH寄存器的Bit0设定值。
S3、使用Get Variable获取BIOS setup中Restore AC Power Loss选项的设定值,将BIOS setup中Restore AC Power Loss选项的设定值跟Pcd State After G3Vaule保存的当前PCH寄存器的Bit0设定值比较,判断是否一致,若不一致,则调用Sync State After G3With Bmc函数将Pcd State After G3Vaule的保存的当前PCH寄存器的Bit0设定值刷新到BIOS菜单中Restore AC Power Loss选项的设定值;
S4、当BIOS setup中AC Power Loss选项的设定值进行修改时,BIOS首先发送Get Chassis Status Command的IPMI命令从BMC获取当前的Power Restore Policy,判断BMC的下电策略与修改后的BIOS Setup中Restore AC Power Loss选项的设定值是否一致,若不一致则发送CHASSIS SET POWER RESTORE POLICY Command的IPMI命令通知BMC修改下电策略。
如图2示,该装置200包括:
获取单元210,所述获取单元210用于获取BMC当前的下电策略,根据下电策略设定PCH寄存器的Bit0并保存设定值;
初始化单元220,所述初始化单元220用于获取BIOS setup选项的设定值,判断设定值与PCH寄存器的Bit0的设定值是否一致,若不一致则将PCH寄存器的Bit0设定值刷新到BIOS setup选项的设定值;
同步单元230,所述同步单元230用于当BIOS Setup中的设定值进行修改时,获取BMC当前的下电策略,判断BMC当前的下电策略与修改后的BIOS Setup中的设定值是否一致,若不一致则通知BMC修改下电策略。
可选地,作为本申请一个实施例,所述获取单元210具体用于:
获取BMC当前的下电策略,
若BMC的下电策略为Power Off,则将PCH寄存器的Bit0设定为0;
若BMC的下电策略为Last State则将PCH寄存器的Bit0设定为1;
若BMC的下电策略为Power On,则将PCH寄存器的Bit0设定为2;
保存当前PCH寄存器的Bit0设定值。
可选地,作为本申请一个实施例,所述初始化单元220具体用于:
获取BIOS setup中Restore AC Power Loss选项的设定值;
判断BIOS setup中Restore AC Power Loss选项的设定值与PCH寄存器的Bit0的设定值是否一致;
若不一致,则将PCH寄存器的Bit0的设定值刷新到BIOS setup中Restore AC Power Loss选项的设定值。
可选地,作为本申请一个实施例,所述同步单元230具体用于:
当BIOS setup中AC Power Loss选项的设定值进行修改时,获取BMC当前的下电策略,判断BMC当前的下电策略与修改后的BIOS Setup中的设定值是否一致;
若不一致则通知BMC修改下电策略。
图3为本发明实施例提供的一种终端装置300的结构示意图,该终端装置300可以用于执行本申请实施例提供的一种BIOS和BMC下电策略实时同步的方法。
其中,该终端装置300可以包括:处理器310、存储器320及通信单元330。这些组件通过一条或多条总线进行通信,本领域技术人员可以理解,图中示出的服务器的结构并不构成对本申请的限定,它既可以是总线形结构,也可以是星型结构,还可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
其中,该存储器320可以用于存储处理器310的执行指令,存储器320可以由任何类型的易失性或非易失性存储终端或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读 存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。当存储器320中的执行指令由处理器310执行时,使得终端300能够执行以下上述方法实施例中的部分或全部步骤。
处理器310为存储终端的控制中心,利用各种接口和线路连接整个电子终端的各个部分,通过运行或执行存储在存储器320内的软件程序和/或模块,以及调用存储在存储器内的数据,以执行电子终端的各种功能和/或处理数据。所述处理器可以由集成电路(Integrated Circuit,简称IC)组成,例如可以由单颗封装的IC所组成,也可以由连接多颗相同功能或不同功能的封装IC而组成。举例来说,处理器310可以仅包括中央处理器(Central Processing Unit,简称CPU)。在本申请实施方式中,CPU可以是单运算核心,也可以包括多运算核心。
通信单元330,用于建立通信信道,从而使所述存储终端可以与其它终端进行通信。接收其他终端发送的用户数据或者向其他终端发送用户数据。
本申请还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时可包括本申请提供的各实施例中的部分或全部步骤。所述的存储介质可为磁碟、光盘、只读存储记忆体(英文:read-only memory,简称:ROM)或随机存储记忆体(英文:random access memory,简称:RAM)等。
因此,本申请提供的BIOS和BMC下电策略实时同步方法、装置、终端及存储介质,能够通过BIOS获取BMC设定并刷新到菜单,BIOS设置下电策略保存后即时生效的方法,保证BIOS和BMC端系统下电策略同步的实时性,不会给客户造成设定没有生效的错觉,提高了产品的可用性,增强了产品的性能,提升了客户的满意度,本实施例所能达到的技术效果可以参见上文中的描述,此处不再赘述。
本领域的技术人员可以清楚地了解到本申请实施例中的技术可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本申请实施例中的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中如U盘、移动硬 盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质,包括若干指令用以使得一台计算机终端(可以是个人计算机,服务器,或者第二终端、网络终端等)执行本发明各个实施例所述方法的全部或部分步骤。
本说明书中各个实施例之间相同相似的部分互相参见即可。尤其,对于终端实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例中的说明即可。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
尽管通过参考附图并结合优选实施例的方式对本发明进行了详细描述,但本发明并不限于此。在不脱离本发明的精神和实质的前提下,本领域普通技术人员可以对本发明的实施例进行各种等效的修改或替换,而这些修改或替换都应在本发明的涵盖范围内/任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。

Claims (10)

  1. 一种BIOS和BMC下电策略实时同步的方法,其特征在于,所述方法包括:
    获取BMC当前的下电策略,根据下电策略设定PCH寄存器的Bit0并保存设定值;
    获取BIOS setup选项的设定值,判断设定值与PCH寄存器的Bit0的设定值是否一致,若不一致则将PCH寄存器的Bit0设定值刷新到BIOS setup选项的设定值;
    当BIOS Setup中的设定值进行修改时,获取BMC当前的下电策略,判断BMC当前的下电策略与修改后的BIOS Setup中的设定值是否一致,若不一致则通知BMC修改下电策略。
  2. 如权利要求1所述的BIOS和BMC下电策略实时同步的方法,其特征在于,所述获取BMC当前的下电策略,根据下电策略设定PCH寄存器的Bit0值并保存设定值,包括:
    获取BMC当前的下电策略,
    若BMC的下电策略为Power Off,则将PCH寄存器的Bit0设定为0;
    若BMC的下电策略为Last State则将PCH寄存器的Bit0设定为1;
    若BMC的下电策略为Power On,则将PCH寄存器的Bit0设定为2;
    保存当前PCH寄存器的Bit0设定值。
  3. 如权利要求1所述的BIOS和BMC下电策略实时同步的方法,其特征在于,所述获取BIOS setup选项的设定值,判断设定值与PCH寄存器的Bit0的设定值是否一致,若不一致则将PCH寄存器的Bit0设定值刷新到BIOS setup选项的设定值,包括:
    获取BIOS setup中Restore AC Power Loss选项的设定值;
    判断BIOS setup中Restore AC Power Loss选项的设定值与PCH寄存器的Bit0的设定值是否一致;
    若不一致,则将PCH寄存器的Bit0的设定值刷新到BIOS setup中Restore AC Power Loss选项的设定值。
  4. 如权利要求1所述的BIOS和BMC下电策略实时同步的方法,其 特征在于,当BIOS Setup中的设定值进行修改时,获取BMC当前的下电策略,判断BMC当前的下电策略与修改后的BIOS Setup中的设定值是否一致,若不一致则通知BMC修改下电策略,包括:
    当BIOS setup中AC Power Loss选项的设定值进行修改时,获取BMC当前的下电策略,判断BMC当前的下电策略与修改后的BIOS Setup中的设定值是否一致;
    若不一致则通知BMC修改下电策略。
  5. 一种BIOS和BMC下电策略实时同步的装置,其特征在于,所述装置包括:
    获取单元,所述获取单元用于获取BMC当前的下电策略,根据下电策略设定PCH寄存器的Bit0并保存设定值;
    初始化单元,所述初始化单元用于获取BIOS setup选项的设定值,判断设定值与PCH寄存器的Bit0的设定值是否一致,若不一致则将PCH寄存器的Bit0设定值刷新到BIOS setup选项的设定值;
    同步单元,所述同步单元用于当BIOS Setup中的设定值进行修改时,获取BMC当前的下电策略,判断BMC当前的下电策略与修改后的BIOS Setup中的设定值是否一致,若不一致则通知BMC修改下电策略。
  6. 如权利要求5所述的BIOS和BMC下电策略实时同步的装置,其特征在于,所述获取单元具体用于:
    获取BMC当前的下电策略,
    若BMC的下电策略为Power Off,则将PCH寄存器的Bit0设定为0;
    若BMC的下电策略为Last State则将PCH寄存器的Bit0设定为1;
    若BMC的下电策略为Power On,则将PCH寄存器的Bit0设定为2;
    保存当前PCH寄存器的Bit0设定值。
  7. 如权利要求5所述的BIOS和BMC下电策略实时同步的装置,其特征在于,所述初始化单元具体用于:
    获取BIOS setup中Restore AC Power Loss选项的设定值;
    判断BIOS setup中Restore AC Power Loss选项的设定值与PCH寄存器的Bit0的设定值是否一致;
    若不一致,则将PCH寄存器的Bit0的设定值刷新到BIOS setup中Restore AC Power Loss选项的设定值。
  8. 如权利要求5所述的BIOS和BMC下电策略实时同步的装置,其特征在于,所述同步单元具体用于:
    当BIOS setup中AC Power Loss选项的设定值进行修改时,获取BMC当前的下电策略,判断BMC当前的下电策略与修改后的BIOS Setup中的设定值是否一致;
    若不一致则通知BMC修改下电策略。
  9. 一种终端,其特征在于,包括:
    处理器;
    用于存储处理器的执行指令的存储器;
    其中,所述处理器被配置为执行权利要求1-4任一项所述的方法。
  10. 一种存储有计算机程序的计算机可读存储介质,其特征在于,该程序被处理器执行时实现如权利要求1-4中任一项所述的方法。
PCT/CN2019/098501 2019-01-31 2019-07-31 一种bios和bmc下电策略实时同步的方法、装置、终端及存储介质 WO2020155591A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910099922.5A CN109857471A (zh) 2019-01-31 2019-01-31 一种bios和bmc下电策略实时同步的方法、装置、终端及存储介质
CN201910099922.5 2019-01-31

Publications (1)

Publication Number Publication Date
WO2020155591A1 true WO2020155591A1 (zh) 2020-08-06

Family

ID=66897119

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/098501 WO2020155591A1 (zh) 2019-01-31 2019-07-31 一种bios和bmc下电策略实时同步的方法、装置、终端及存储介质

Country Status (2)

Country Link
CN (1) CN109857471A (zh)
WO (1) WO2020155591A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109857471A (zh) * 2019-01-31 2019-06-07 郑州云海信息技术有限公司 一种bios和bmc下电策略实时同步的方法、装置、终端及存储介质
CN111475007A (zh) * 2020-04-08 2020-07-31 苏州浪潮智能科技有限公司 一种服务器下电方法、装置及其相关设备
CN112199244B (zh) * 2020-10-16 2022-08-02 苏州浪潮智能科技有限公司 一种服务器掉电检测的方法、系统、设备及介质
CN113064643B (zh) * 2021-03-16 2023-03-17 山东英信计算机技术有限公司 一种即时生效的修改bios设定值的方法、系统及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7600110B2 (en) * 2006-07-11 2009-10-06 Giga-Byte Technology Co., Ltd. Method for simulating an intelligent platform management interface using BIOS
CN104601373A (zh) * 2015-01-05 2015-05-06 浪潮电子信息产业股份有限公司 一种通过带外方式设置和同步bios配置参数的方法
CN107168906A (zh) * 2017-05-12 2017-09-15 郑州云海信息技术有限公司 一种bios设置bmcsol波特率立即生效的方法
CN108170454A (zh) * 2018-01-22 2018-06-15 郑州云海信息技术有限公司 一种应用于bios和基板管理控制器的数据交互方法
CN109857471A (zh) * 2019-01-31 2019-06-07 郑州云海信息技术有限公司 一种bios和bmc下电策略实时同步的方法、装置、终端及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7600110B2 (en) * 2006-07-11 2009-10-06 Giga-Byte Technology Co., Ltd. Method for simulating an intelligent platform management interface using BIOS
CN104601373A (zh) * 2015-01-05 2015-05-06 浪潮电子信息产业股份有限公司 一种通过带外方式设置和同步bios配置参数的方法
CN107168906A (zh) * 2017-05-12 2017-09-15 郑州云海信息技术有限公司 一种bios设置bmcsol波特率立即生效的方法
CN108170454A (zh) * 2018-01-22 2018-06-15 郑州云海信息技术有限公司 一种应用于bios和基板管理控制器的数据交互方法
CN109857471A (zh) * 2019-01-31 2019-06-07 郑州云海信息技术有限公司 一种bios和bmc下电策略实时同步的方法、装置、终端及存储介质

Also Published As

Publication number Publication date
CN109857471A (zh) 2019-06-07

Similar Documents

Publication Publication Date Title
WO2020155591A1 (zh) 一种bios和bmc下电策略实时同步的方法、装置、终端及存储介质
US9465697B2 (en) Provision of backup functionalities in cloud computing systems
TW522297B (en) Automatic over-clock method for CPU
CN106775946B (zh) 一种虚拟机快速创建方法
US10019602B2 (en) System and method for improved security for a processor in a portable computing device (PCD)
WO2017185954A1 (zh) 一种实现usb设备管理的方法、主机和系统
CN114879829B (zh) 功耗管理方法、装置、电子设备、图形处理器及存储介质
CN109857466B (zh) Bios配置方法、装置、服务器及计算机可读存储介质
US20210365361A1 (en) Method and apparatus for designing dual-mirror shared conf partition file
CN110569158A (zh) 测试ssd随机场景下异常掉电的方法、装置及计算机设备
WO2021244020A1 (zh) 资源加密及展示方法及系统
CN109634675A (zh) 一种bios的冗余方法、冗余系统及相关装置
CN109117406B (zh) 一种pcie热拔插测试方法、装置、终端及存储介质
CN107943259B (zh) 基于VxWorks系统的掉电复位方法和装置
US11368320B2 (en) Mining machine and method for limiting computing power
JP3732764B2 (ja) Os立上げ方法およびos立上げシステム
US10089322B2 (en) Portable electronic device, method for sharing file between multiple operating systems, recording medium and computer program product
WO2017096889A1 (zh) 系统升降级的方法和装置
CN113590033A (zh) 一种超融合系统的信息同步方法及装置
JP2018538632A (ja) ノードの再起動後にデータを処理する方法及びデバイス
US8891515B2 (en) Method for node communication
JP2004213122A (ja) クライアント/サーバによる制御システムの安定稼働方法及びそのプログラム
CN107704399A (zh) 一种存储数据的方法和装置
WO2019119438A1 (zh) 一种操作系统屏幕锁定的方法、装置及电子设备
CN113868679B (zh) 一种集群的加密方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19913837

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19913837

Country of ref document: EP

Kind code of ref document: A1