CN114327650B - SetVariable service implementation method, device and medium - Google Patents
SetVariable service implementation method, device and medium Download PDFInfo
- Publication number
- CN114327650B CN114327650B CN202111555063.XA CN202111555063A CN114327650B CN 114327650 B CN114327650 B CN 114327650B CN 202111555063 A CN202111555063 A CN 202111555063A CN 114327650 B CN114327650 B CN 114327650B
- Authority
- CN
- China
- Prior art keywords
- service
- peisetvariable
- setvariable
- space
- peiwritenvramppi
- 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
Links
Landscapes
- Stored Programmes (AREA)
Abstract
Description
技术领域technical field
本发明涉及服务器技术领域,特别是涉及一种SetVariable服务实现方法、装置及介质。The present invention relates to the technical field of servers, in particular to a SetVariable service realization method, device and medium.
背景技术Background technique
非易失性存储空间(Non-Volatile Ram,Nvram)是一段掉电也不丢失数据的存储空间,就基本输入输出系统(Basic Input Output System,BIOS)而言,可以理解为在BIOS只读内存(Read Only Memory,ROM)中挖了一段空间,用来作为掉电也不丢失数据的存储空间。BIOS Setup下的设定是以变量的形式存放在Nvram里,掉电之后Setup设定也不会丢失。Non-volatile storage space (Non-Volatile Ram, Nvram) is a storage space that does not lose data when power is turned off. As far as the Basic Input Output System (BIOS) is concerned, it can be understood as the BIOS read-only memory. (Read Only Memory, ROM) has dug a section of space, which is used as a storage space that does not lose data when power is turned off. The settings under BIOS Setup are stored in Nvram in the form of variables, and the Setup settings will not be lost after power failure.
PEI(Pre-EFI Initialization)是EFI前期初始化阶段,没有可用的内存。在统一可扩展固件接口(Unified Extensible Firmware Interface,UEFI)的Spec中,PEI阶段提供了两个变量相关的服务:GetVariable()和NextVariableName(),它们的功能分别是:根据变量的名字来获取它的设定值,和返回下一个变量名和全局唯一标识符(GloballyUnique Identifier,GUID),但是没有提供设定变量值的功能。PEI (Pre-EFI Initialization) is the EFI pre-initialization stage, and there is no available memory. In the Spec of the Unified Extensible Firmware Interface (UEFI), the PEI stage provides two variable-related services: GetVariable() and NextVariableName(). Their functions are: to obtain it according to the name of the variable set value, and returns the next variable name and globally unique identifier (GloballyUnique Identifier, GUID), but does not provide the function of setting variable values.
而在UEFI的Spec中,SetVariable服务是在驱动执行环境阶段(Driver ExecutionEnvironment,DXE)的RuntimeService中提供的,如果要设定变量值,只能在DXE阶段调用RuntimeService中的SetVariable服务来实现。一些功能比如带外设定选项值,从BMC同步来的一些设定,设定的一些选项功能是在PEI阶段设定CPU或平台控制器中心(PlatformController Hub,PCH)的寄存器来实现的,同时还需要将修改的选项值同步到Setup界面中,这时只能先将选项设定值保留到切换单元(Hand-Off Block,HOB),然后修改PEI阶段功能实现的函数,不从Nvram中获取设定而是改成从HOB获取,最后在DXE阶段再写模块设定到Nvram。这样导致很多功能实现都需要改写,需要花费大量的人力成本。In the UEFI Spec, the SetVariable service is provided in the RuntimeService of the driver execution environment (Driver ExecutionEnvironment, DXE). If you want to set the variable value, you can only call the SetVariable service in the RuntimeService in the DXE stage. Some functions such as out-of-band setting option values, some settings synchronized from the BMC, and some option functions set are realized by setting the registers of the CPU or Platform Controller Hub (PCH) in the PEI stage, and at the same time It is also necessary to synchronize the modified option value to the Setup interface. At this time, the option setting value can only be saved to the switching unit (Hand-Off Block, HOB), and then the function implemented by the PEI stage is modified instead of being obtained from Nvram. The settings are changed to get from HOB, and finally write the module settings to Nvram in the DXE stage. As a result, many functions need to be rewritten, which requires a lot of labor costs.
因此,如何解决PEI阶段没有SetVariable服务的问题,是本领域技术人员亟待解决的技术问题。Therefore, how to solve the problem that there is no SetVariable service in the PEI stage is a technical problem to be solved urgently by those skilled in the art.
发明内容Contents of the invention
有鉴于此,本发明的目的在于提供一种SetVariable服务实现方法、装置及介质,可以实现PEI阶段SetVariable服务,加强了BIOS代码的易用性和强壮性,加强了平台代码的兼容性和可移植性。其具体方案如下:In view of this, the purpose of the present invention is to provide a SetVariable service implementation method, device and medium, which can realize the SetVariable service in the PEI stage, strengthen the ease of use and robustness of the BIOS code, and strengthen the compatibility and portability of the platform code sex. The specific plan is as follows:
一种SetVariable服务实现方法,包括:A SetVariable service implementation method, including:
划分出一段CAR空间,以供PEI阶段待实现的PeiSetVariable功能使用;Divide a section of CAR space for the PeiSetVariable function to be implemented in the PEI stage;
在所述CAR空间上进行SPI Flash的读写操作;Carry out the read and write operation of SPI Flash on described CAR space;
安装一个PeiWriteNvramPPI,提供PeiSetVariable()服务;Install a PeiWriteNvramPPI to provide PeiSetVariable() service;
通过所述PeiWriteNvramPPI完成PEI阶段PeiSetVariable()服务。The PeiSetVariable() service of the PEI stage is completed through the PeiWriteNvramPPI.
优选地,在本发明实施例提供的上述SetVariable服务实现方法中,所述划分出一段CAR空间,包括:Preferably, in the above-mentioned SetVariable service implementation method provided by the embodiment of the present invention, the division of a section of CAR space includes:
使用存储空间时,调用OemAllocatePool()分配一段CAR空间,以及调用OemFreePool()将所述CAR空间释放掉,实现PEI阶段的申请存储空间和释放存储空间功能。When using the storage space, call OemAllocatePool() to allocate a section of CAR space, and call OemFreePool() to release the CAR space, so as to realize the functions of applying for storage space and releasing storage space in the PEI stage.
优选地,在本发明实施例提供的上述SetVariable服务实现方法中,所述进行SPIFlash的读写操作,包括:Preferably, in the above-mentioned SetVariable service implementation method provided by the embodiment of the present invention, the reading and writing operations of SPIFlash include:
初始化SPI controller,访问到Nvram区域,以读写到Nvram特定的位置空间。Initialize the SPI controller and access the Nvram area to read and write to the specific location space of Nvram.
优选地,在本发明实施例提供的上述SetVariable服务实现方法中,在所述安装一个PeiWriteNvramPPI的同时,还包括:Preferably, in the above-mentioned SetVariable service implementation method provided by the embodiment of the present invention, while installing a PeiWriteNvramPPI, it also includes:
传入参数;所述参数包括设定的变量名称,GUID,属性,数据长度以及设定的数据。Pass in parameters; the parameters include the set variable name, GUID, attribute, data length and set data.
优选地,在本发明实施例提供的上述SetVariable服务实现方法中,所述提供PeiSetVariable()服务,包括:Preferably, in the above-mentioned SetVariable service implementation method provided by the embodiment of the present invention, the provision of the PeiSetVariable() service includes:
提供ReadNvram和WriteNvram的服务。Provide ReadNvram and WriteNvram services.
优选地,在本发明实施例提供的上述SetVariable服务实现方法中,所述提供ReadNvram和WriteNvram的服务,包括:Preferably, in the above-mentioned SetVariable service implementation method provided by the embodiment of the present invention, the services of providing ReadNvram and WriteNvram include:
调用OemReadNvram()读出Nvram区域的所有数据;Call OemReadNvram() to read all the data in the Nvram area;
通过变量名称和GUID确定是否是修改已有变量设定;Determine whether to modify the existing variable settings through the variable name and GUID;
若是,则调用OemWriteNvram()将变量数据修改;If so, call OemWriteNvram() to modify the variable data;
若否,则调用OemWriteNvram()新增一个变量。If not, call OemWriteNvram() to add a new variable.
优选地,在本发明实施例提供的上述SetVariable服务实现方法中,所述通过所述PeiWriteNvramPPI完成PEI阶段PeiSetVariable()服务,包括:Preferably, in the above-mentioned SetVariable service implementation method provided by the embodiment of the present invention, the completion of the PEI stage PeiSetVariable() service through the PeiWriteNvramPPI includes:
在PEI阶段设定变量值时,通过locate PeiWriteNvramPPI使用PeiSetVariable()服务。When setting variable values in the PEI phase, use the PeiSetVariable() service through locate PeiWriteNvramPPI.
本发明实施例还提供了一种SetVariable服务实现装置,包括:The embodiment of the present invention also provides a SetVariable service implementation device, including:
空间划分模块,用于划分出一段CAR空间,以供PEI阶段待实现的PeiSetVariable功能使用;The space division module is used to divide a section of CAR space for use by the PeiSetVariable function to be implemented in the PEI stage;
读写模块,用于在所述CAR空间上进行SPI Flash的读写操作;Read-write module, for carrying out the read-write operation of SPI Flash on described CAR space;
PPI安装模块,用于安装一个PeiWriteNvramPPI,提供PeiSetVariable()服务;The PPI installation module is used to install a PeiWriteNvramPPI and provide PeiSetVariable() service;
服务使用模块,用于通过所述PeiWriteNvramPPI完成PEI阶段PeiSetVariable()服务。The service usage module is used to complete the PeiSetVariable() service in the PEI phase through the PeiWriteNvramPPI.
本发明实施例还提供了一种SetVariable服务实现装置,包括处理器和存储器,其中,所述处理器执行所述存储器中存储的计算机程序时实现如本发明实施例提供的上述SetVariable服务实现方法。The embodiment of the present invention also provides a device for realizing SetVariable service, including a processor and a memory, wherein, when the processor executes the computer program stored in the memory, it realizes the method for realizing the SetVariable service as provided in the embodiment of the present invention.
本发明实施例还提供了一种计算机可读存储介质,用于存储计算机程序,其中,所述计算机程序被处理器执行时实现如本发明实施例提供的上述SetVariable服务实现方法。An embodiment of the present invention also provides a computer-readable storage medium for storing a computer program, wherein when the computer program is executed by a processor, the method for implementing the SetVariable service as provided in the embodiment of the present invention is implemented.
从上述技术方案可以看出,本发明所提供的一种SetVariable服务实现方法,包括:划分出一段CAR空间,以供PEI阶段待实现的PeiSetVariable功能使用;在CAR空间上进行SPI Flash的读写操作;安装一个PeiWriteNvramPPI,提供PeiSetVariable()服务;通过PeiWriteNvramPPI完成PEI阶段PeiSetVariable()服务。As can be seen from the above-mentioned technical scheme, a kind of SetVariable service implementation method provided by the present invention includes: dividing a section of CAR space for the use of the PeiSetVariable function to be realized in the PEI stage; performing SPI Flash read and write operations on the CAR space ; Install a PeiWriteNvramPPI to provide PeiSetVariable() service; complete the PeiSetVariable() service in the PEI stage through PeiWriteNvramPPI.
本发明提供的上述SetVariable服务实现方法,可应用于PEI阶段,使得固件工程师在开发设计带外同步等功能时能很方便的同步到Setup界面,无需改写原有的功能实现方案,无需再开发新的DXE模块,加强了BIOS代码的易用性和强壮性,加强了平台代码的兼容性和可移植性,节省了开发人员的宝贵时间,降低了维护人员维护版本的难度,提高了服务器的易用性,增强了产品的品质,提高了客户的满意度。The above-mentioned SetVariable service implementation method provided by the present invention can be applied to the PEI stage, so that firmware engineers can easily synchronize to the Setup interface when developing and designing functions such as out-of-band synchronization, without rewriting the original function implementation scheme and developing new ones. The DXE module enhances the ease of use and robustness of BIOS codes, enhances the compatibility and portability of platform codes, saves valuable time for developers, reduces the difficulty of maintaining versions for maintenance personnel, and improves the ease of use of servers. Usability, enhanced product quality, improved customer satisfaction.
此外,本发明还针对SetVariable服务实现方法提供了相应的装置及计算机可读存储介质,进一步使得上述方法更具有实用性,该装置及计算机可读存储介质具有相应的优点。In addition, the present invention also provides a corresponding device and computer-readable storage medium for the SetVariable service implementation method, which further makes the above method more practical, and the device and computer-readable storage medium have corresponding advantages.
附图说明Description of drawings
为了更清楚地说明本发明实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the following will briefly introduce the drawings that need to be used in the descriptions of the embodiments or related technologies. Obviously, the drawings in the following description are only For the embodiments of the invention, those skilled in the art can also obtain other drawings according to the provided drawings without creative work.
图1为本发明实施例提供的SetVariable服务实现方法的流程图;Fig. 1 is the flowchart of the SetVariable service realization method that the embodiment of the present invention provides;
图2为本发明实施例提供的SetVariable服务实现装置的结构示意图。FIG. 2 is a schematic structural diagram of an apparatus for implementing a SetVariable service provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
本发明提供一种SetVariable服务实现方法,如图1所示,包括以下步骤:The present invention provides a SetVariable service implementation method, as shown in Figure 1, comprising the following steps:
S101、划分出一段CAR空间,以供PEI阶段待实现的PeiSetVariable功能使用;S101. Divide a section of CAR space for use by the PeiSetVariable function to be implemented in the PEI stage;
需要说明的是,CAR(Cache As Ram)是以CPU的Cache作为随机存储内存(RandomAccess Memory,RAM)使用。It should be noted that the CAR (Cache As Ram) uses the Cache of the CPU as random access memory (Random Access Memory, RAM).
S102、在CAR空间上进行SPI Flash的读写操作;S102, read and write operations of SPI Flash on the CAR space;
需要说明的是,SPI(Serial Peripheral Interface)是串行外围接口。It should be noted that SPI (Serial Peripheral Interface) is a serial peripheral interface.
S103、安装一个PeiWriteNvramPPI,提供PeiSetVariable()服务;S103. Install a PeiWriteNvramPPI to provide PeiSetVariable() service;
S104、通过PeiWriteNvramPPI完成PEI阶段PeiSetVariable()服务。S104. Complete the PeiSetVariable() service in the PEI phase through PeiWriteNvramPPI.
在本发明实施例提供的上述SetVariable服务实现方法中,可应用于PEI阶段,使得固件工程师在开发设计带外同步等功能时能很方便的同步到Setup界面,无需改写原有的功能实现方案,无需再开发新的DXE模块,加强了BIOS代码的易用性和强壮性,加强了平台代码的兼容性和可移植性,节省了开发人员的宝贵时间,降低了维护人员维护版本的难度,提高了服务器的易用性,增强了产品的品质,提高了客户的满意度。In the above-mentioned SetVariable service implementation method provided by the embodiment of the present invention, it can be applied to the PEI stage, so that firmware engineers can easily synchronize to the Setup interface when developing and designing functions such as out-of-band synchronization, without rewriting the original function implementation scheme. There is no need to develop new DXE modules, which enhances the ease of use and robustness of BIOS codes, enhances the compatibility and portability of platform codes, saves valuable time for developers, reduces the difficulty of maintaining versions for maintainers, and improves Improve the ease of use of the server, enhance the quality of the product, and improve customer satisfaction.
在具体实施时,在本发明实施例提供的上述SetVariable服务实现方法中,步骤S101划分出一段CAR空间,具体可以包括:使用存储空间时,调用OemAllocatePool()分配一段CAR空间,以及调用OemFreePool()将CAR空间释放掉,实现PEI阶段的申请存储空间和释放存储空间功能。During specific implementation, in the above-mentioned SetVariable service implementation method provided by the embodiment of the present invention, step S101 divides a section of CAR space, which may specifically include: when using storage space, call OemAllocatePool() to allocate a section of CAR space, and call OemFreePool() Release the CAR space to realize the functions of applying for storage space and releasing storage space in the PEI stage.
具体地,步骤S101可以实现PEI阶段的OemAllocatePool()和OemFreePool()功能,在需要使用存储空间时就调用OemAllocatePool()分配一段CAR空间,用完之后调用OemFreePool()再将空间释放掉。Specifically, step S101 can realize the functions of OemAllocatePool() and OemFreePool() in the PEI stage, call OemAllocatePool() to allocate a section of CAR space when the storage space is needed, and call OemFreePool() to release the space after use.
在具体实施时,在本发明实施例提供的上述SetVariable服务实现方法中,步骤S102进行SPI Flash的读写操作,具体可以包括:初始化SPI controller,访问到Nvram区域,以读写到Nvram特定的位置空间。During specific implementation, in the above-mentioned SetVariable service realization method that the embodiment of the present invention provides, step S102 carries out the reading and writing operation of SPI Flash, specifically can comprise: initializing SPI controller, access to Nvram area, to read and write to the specific position of Nvram space.
具体地,步骤S102可以实现SPI Flash的读写操作,并将程序重定向到RAM上执行。首先需要初始化SPI controller,然后找到Nvram区域,实现PEI阶段的OemReadNvram()和OemWriteNvram()功能,可以读写到Nvram特定的位置空间。Specifically, step S102 can implement the read and write operations of the SPI Flash, and redirect the program to the RAM for execution. First, you need to initialize the SPI controller, and then find the Nvram area to implement the OemReadNvram() and OemWriteNvram() functions in the PEI stage, which can read and write to the specific location space of Nvram.
在具体实施时,在本发明实施例提供的上述SetVariable服务实现方法中,步骤S103在安装一个PeiWriteNvramPPI的同时,还可以包括:传入参数;参数包括设定的变量名称,GUID,属性,数据长度以及设定的数据。在传入参数之后,还包括将程序重定向到RAM上执行。During specific implementation, in the above-mentioned SetVariable service implementation method provided by the embodiment of the present invention, step S103 can also include: while installing a PeiWriteNvramPPI: incoming parameters; parameters include the variable name of setting, GUID, attribute, data length and set data. After passing in the parameters, it also includes redirecting the program to RAM for execution.
在具体实施时,在本发明实施例提供的上述SetVariable服务实现方法中,步骤S103提供PeiSetVariable()服务,具体可以包括:提供ReadNvram和WriteNvram的服务。提供ReadNvram和WriteNvram的服务,包括:调用OemReadNvram()读出Nvram区域的所有数据;通过变量名称和GUID确定是否是修改已有变量设定;若是,则调用OemWriteNvram()将变量数据修改;若否,则调用OemWriteNvram()新增一个变量。During specific implementation, in the method for implementing the SetVariable service provided by the embodiment of the present invention, step S103 provides the PeiSetVariable() service, which may specifically include: providing ReadNvram and WriteNvram services. Provide ReadNvram and WriteNvram services, including: call OemReadNvram() to read all data in the Nvram area; determine whether to modify the existing variable settings through the variable name and GUID; if so, call OemWriteNvram() to modify the variable data; if not , call OemWriteNvram() to add a new variable.
具体地,步骤S103首先通过调用OemReadNvram()读出Nvram区域的所有数据,通过变量名称和GUID确定是修改已有变量还是新增变量设定,再调用OemWriteNvram()功能将变量数据修改或者新增一个变量。Specifically, step S103 first reads all the data in the Nvram area by calling OemReadNvram(), determines whether to modify existing variables or add new variable settings through the variable name and GUID, and then calls the OemWriteNvram() function to modify or add new variable data a variable.
在具体实施时,在本发明实施例提供的上述SetVariable服务实现方法中,步骤S104通过PeiWriteNvramPPI完成PEI阶段PeiSetVariable()服务,具体可以包括:在PEI阶段需要设定变量值时,通过locate PeiWriteNvramPPI使用PeiSetVariable()服务。During specific implementation, in the method for implementing the above-mentioned SetVariable service provided by the embodiment of the present invention, step S104 completes the PeiSetVariable() service in the PEI stage through PeiWriteNvramPPI, which specifically may include: when the variable value needs to be set in the PEI stage, use PeiSetVariable through locate PeiWriteNvramPPI ()Serve.
基于同一发明构思,本发明实施例还提供了一种SetVariable服务实现装置,由于该装置解决问题的原理与前述一种SetVariable服务实现方法相似,因此该装置的实施可以参见SetVariable服务实现方法的实施,重复之处不再赘述。Based on the same inventive concept, the embodiment of the present invention also provides a SetVariable service implementation device. Since the problem-solving principle of the device is similar to the aforementioned SetVariable service implementation method, the implementation of the device can refer to the implementation of the SetVariable service implementation method. Repeated points will not be repeated.
在具体实施时,本发明实施例提供的SetVariable服务实现装置,如图2所示,具体包括:During specific implementation, the SetVariable service implementation device provided by the embodiment of the present invention, as shown in Figure 2, specifically includes:
空间划分模块11,用于划分出一段CAR空间,以供PEI阶段待实现的PeiSetVariable功能使用;The space division module 11 is used to divide a section of CAR space for use by the PeiSetVariable function to be implemented in the PEI stage;
读写模块12,用于在CAR空间上进行SPI Flash的读写操作;Read-write module 12, for carrying out the read-write operation of SPI Flash on CAR space;
PPI安装模块13,用于安装一个PeiWriteNvramPPI,提供PeiSetVariable()服务;PPI installation module 13, for installing a PeiWriteNvramPPI, provides PeiSetVariable () service;
服务使用模块14,用于通过PeiWriteNvramPPI完成PEI阶段PeiSetVariable()服务。The service using module 14 is used to complete the PeiSetVariable() service in the PEI stage through PeiWriteNvramPPI.
在本发明实施例提供的上述SetVariable服务实现装置中,可应用于PEI阶段,通过上述四个模块的相互作用,使得固件工程师在开发设计带外同步等功能时能很方便的同步到Setup界面,无需改写原有的功能实现方案,无需再开发新的DXE模块,加强了BIOS代码的易用性和强壮性,加强了平台代码的兼容性和可移植性,节省了开发人员的宝贵时间,降低了维护人员维护版本的难度,提高了服务器的易用性,增强了产品的品质,提高了客户的满意度。In the above-mentioned SetVariable service implementation device provided by the embodiment of the present invention, it can be applied to the PEI stage. Through the interaction of the above four modules, the firmware engineer can easily synchronize to the Setup interface when developing and designing functions such as out-of-band synchronization. No need to rewrite the original function implementation scheme, no need to develop new DXE modules, enhance the ease of use and robustness of the BIOS code, strengthen the compatibility and portability of the platform code, save the valuable time of developers, reduce It reduces the difficulty for maintenance personnel to maintain the version, improves the usability of the server, enhances the quality of the product, and improves customer satisfaction.
关于上述各个模块更加具体的工作过程可以参考前述实施例公开的相应内容,在此不再进行赘述。For the more specific working process of each of the above modules, reference may be made to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.
相应地,本发明实施例还公开了一种SetVariable服务实现装置,包括处理器和存储器;其中,处理器执行存储器中存储的计算机程序时实现前述实施例公开的SetVariable服务实现方法。Correspondingly, the embodiment of the present invention also discloses a SetVariable service implementation device, including a processor and a memory; wherein, when the processor executes the computer program stored in the memory, the SetVariable service implementation method disclosed in the foregoing embodiments is implemented.
关于上述方法更加具体的过程可以参考前述实施例中公开的相应内容,在此不再进行赘述。For a more specific process of the above method, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details are not repeated here.
进一步地,本发明还公开了一种计算机可读存储介质,用于存储计算机程序;计算机程序被处理器执行时实现前述公开的SetVariable服务实现方法。Further, the present invention also discloses a computer-readable storage medium for storing a computer program; when the computer program is executed by a processor, the aforementioned SetVariable service implementation method disclosed above is realized.
关于上述方法更加具体的过程可以参考前述实施例中公开的相应内容,在此不再进行赘述。For a more specific process of the above method, reference may be made to the corresponding content disclosed in the foregoing embodiments, and details are not repeated here.
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其它实施例的不同之处,各个实施例之间相同或相似部分互相参见即可。对于实施例公开的装置、存储介质而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same or similar parts of each embodiment can be referred to each other. As for the devices and storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and for relevant details, please refer to the description of the methods.
专业人员还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Professionals can further realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software or a combination of the two. In order to clearly illustrate the possible For interchangeability, in the above description, the composition and steps of each example have been generally described according to their functions. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
结合本文中所公开的实施例描述的方法或算法的步骤可以直接用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。The steps of the methods or algorithms described in connection with the embodiments disclosed herein may be directly implemented by hardware, software modules executed by a processor, or a combination of both. Software modules can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other Any other known storage medium.
综上,本发明实施例提供的一种SetVariable服务实现方法,包括:划分出一段CAR空间,以供PEI阶段待实现的PeiSetVariable功能使用;在CAR空间上进行SPI Flash的读写操作;安装一个PeiWriteNvramPPI,提供PeiSetVariable()服务;通过PeiWriteNvramPPI完成PEI阶段PeiSetVariable()服务。上述SetVariable服务实现方法可应用于PEI阶段,使得固件工程师在开发设计带外同步等功能时能很方便的同步到Setup界面,无需改写原有的功能实现方案,无需再开发新的DXE模块,加强了BIOS代码的易用性和强壮性,加强了平台代码的兼容性和可移植性,节省了开发人员的宝贵时间,降低了维护人员维护版本的难度,提高了服务器的易用性,增强了产品的品质,提高了客户的满意度。此外,本发明还针对SetVariable服务实现方法提供了相应的装置及计算机可读存储介质,进一步使得上述方法更具有实用性,该装置及计算机可读存储介质具有相应的优点。In summary, a SetVariable service implementation method provided by the embodiment of the present invention includes: dividing a section of CAR space for use by the PeiSetVariable function to be implemented in the PEI stage; performing SPI Flash read and write operations on the CAR space; installing a PeiWriteNvramPPI , provide the PeiSetVariable() service; complete the PeiSetVariable() service in the PEI phase through PeiWriteNvramPPI. The above SetVariable service implementation method can be applied to the PEI stage, so that firmware engineers can easily synchronize to the Setup interface when developing and designing functions such as out-of-band synchronization, without rewriting the original function implementation scheme, and without developing new DXE modules. It improves the ease of use and robustness of the BIOS code, enhances the compatibility and portability of the platform code, saves the valuable time of the developer, reduces the difficulty of maintaining the version for the maintainer, improves the usability of the server, and enhances the Product quality improves customer satisfaction. In addition, the present invention also provides a corresponding device and computer-readable storage medium for the SetVariable service implementation method, which further makes the above method more practical, and the device and computer-readable storage medium have corresponding advantages.
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。Finally, it should also be noted that in this text, relational terms such as first and second etc. are only used to distinguish one entity or operation from another, and do not necessarily require or imply that these entities or operations, any such actual relationship or order exists. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.
以上对本发明所提供的SetVariable服务实现方法、装置及介质进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The method, device and medium for realizing the SetVariable service provided by the present invention have been introduced in detail above. The principles and implementation modes of the present invention have been explained by using specific examples in this paper. The descriptions of the above embodiments are only used to help understand the present invention. method and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation and application scope. Invention Limitations.
Claims (6)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111555063.XA CN114327650B (en) | 2021-12-17 | 2021-12-17 | SetVariable service implementation method, device and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111555063.XA CN114327650B (en) | 2021-12-17 | 2021-12-17 | SetVariable service implementation method, device and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114327650A CN114327650A (en) | 2022-04-12 |
CN114327650B true CN114327650B (en) | 2023-08-18 |
Family
ID=81053519
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111555063.XA Active CN114327650B (en) | 2021-12-17 | 2021-12-17 | SetVariable service implementation method, device and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114327650B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113010217A (en) * | 2021-03-18 | 2021-06-22 | 山东英信计算机技术有限公司 | BIOS parameter setting method and device, electronic equipment and storage medium |
CN113282434A (en) * | 2021-07-19 | 2021-08-20 | 苏州浪潮智能科技有限公司 | Memory repair method based on post-package repair technology and related components |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9477848B2 (en) * | 2013-03-15 | 2016-10-25 | Insyde Software Corp. | System and method for managing and diagnosing a computing device equipped with unified extensible firmware interface (UEFI)-compliant firmware |
US11922172B2 (en) * | 2020-08-06 | 2024-03-05 | Intel Corporation | Configurable reduced memory startup |
-
2021
- 2021-12-17 CN CN202111555063.XA patent/CN114327650B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113010217A (en) * | 2021-03-18 | 2021-06-22 | 山东英信计算机技术有限公司 | BIOS parameter setting method and device, electronic equipment and storage medium |
CN113282434A (en) * | 2021-07-19 | 2021-08-20 | 苏州浪潮智能科技有限公司 | Memory repair method based on post-package repair technology and related components |
Also Published As
Publication number | Publication date |
---|---|
CN114327650A (en) | 2022-04-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4199923B2 (en) | Mobile device application installation method | |
CN109840096B (en) | Operating system installation method and device | |
CN100530108C (en) | Method and system for calling function | |
CN106406919A (en) | Terminal device pre-loaded application management method and terminal device | |
TW200525422A (en) | Method of using feature flags to determine compatibility between bios revisions and installed hardware during flash update | |
CN109002330A (en) | A kind of method, device and equipment identifying UEFI OS startup item | |
CN115756746A (en) | Method and system for manufacturing operating system mirror image based on libvirt | |
JP7454011B2 (en) | Firmware publishing method for multiple binary images and electronic devices | |
CN100489777C (en) | Intelligent platform management interface firmware architecture and establishing method thereof | |
CN115664953A (en) | Resource allocation method and related device for external equipment | |
CN119690413A (en) | Construction method, storage medium, calling method and system of third-party program library | |
US20170322792A1 (en) | Updating of operating system images | |
CN112235132A (en) | Method, device, medium and server for dynamically configuring service | |
CN114780173B (en) | Method for loading plug-in application, computing device and storage medium | |
CN115357355A (en) | Method, device and equipment for software cross-system migration and readable storage medium | |
CN114327650B (en) | SetVariable service implementation method, device and medium | |
CN108776608A (en) | A kind of switching method, device, equipment and the storage medium of LOGO pictures | |
CN110333870B (en) | Simulink model variable distribution processing method, device and equipment | |
CN102216901B (en) | Component extension method and device | |
CN116204199B (en) | Command line-based project management method, system, equipment and storage medium | |
US20050216717A1 (en) | Clientless external storage device | |
CN114816475B (en) | Method, device, equipment and medium for updating embedded operating system | |
CN113645046B (en) | A network card driver installation method, main server and medium | |
CN111949301A (en) | Application program hot updating method and device, computer readable storage medium and computer equipment | |
CN116560739A (en) | Boot sign customization method, device, equipment and storage medium |
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 | ||
CP03 | Change of name, title or address |
Address after: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province Patentee after: Suzhou Yuannao Intelligent Technology Co.,Ltd. Country or region after: China Address before: Building 9, No.1, guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Wuzhong District, Suzhou City, Jiangsu Province Patentee before: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd. Country or region before: China |