CN103207797B - Capsule type custom-made updating method based on unified extensible firmware interface firmware system - Google Patents

Capsule type custom-made updating method based on unified extensible firmware interface firmware system Download PDF

Info

Publication number
CN103207797B
CN103207797B CN 201310083959 CN201310083959A CN103207797B CN 103207797 B CN103207797 B CN 103207797B CN 201310083959 CN201310083959 CN 201310083959 CN 201310083959 A CN201310083959 A CN 201310083959A CN 103207797 B CN103207797 B CN 103207797B
Authority
CN
China
Prior art keywords
firmware
capsule
uefi
updating
module
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
CN 201310083959
Other languages
Chinese (zh)
Other versions
CN103207797A (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.)
Nanjing Tech University
Original Assignee
Nanjing Tech University
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 Nanjing Tech University filed Critical Nanjing Tech University
Priority to CN 201310083959 priority Critical patent/CN103207797B/en
Publication of CN103207797A publication Critical patent/CN103207797A/en
Application granted granted Critical
Publication of CN103207797B publication Critical patent/CN103207797B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention provides a capsule type custom-made updating method based on a universal and extensible firmware interface firmware system. The method is based on a capsule mechanism of a unified extensible firmware interface (UEFI) firmware system and gets rid of that the current mainstream firmware updating technology depends on system management interrupt (SMI) drive. Through analysis of a capsule, a firmware volume (FV) module to be updated is obtained, the FV module is identified, and obtained data are wrote in firmware file system target addresses, therefore updating of the selected FV module is achieved, and a method which needs to update a whole basic input/output system (BIOS) is got rid of. The capsule mechanism solves the problem that updating tools on different hardware platforms and operation systems cannot be unified. The firmware updating method is flexile, high in application value and capable of being applied to the aspects of firmware remote refreshing, automatic firmware recovery and the like.

Description

Capsule-type customization update method based on general Extensible Firmware Interface fixer system
Technical field
The invention belongs to the software upgrading technical field of computer software engineering technology, specifically refer to the capsule-type customization update method based on general Extensible Firmware Interface fixer system.
Background technology
Along with the related service application of the Internet-baseds such as cloud computing is goed deep into, in the fields such as card Securities, finance, telecommunications, the client firmware customization becomes new application focus.Embedded products such as the network equipment and self-assistant information service terminal, need to make equipment have unique function rather than as multi-purpose computer, carry out work.Therefore the system development business seeks just day by day by increasing more characteristic, so that product has differentiation and obtain competitive edge, and fixer system is the ideal place that strengthens this specific character.As user interface, guide fast and increase special function etc.But the problem that the singularity of these industries is brought thereupon is that the firmware renewal is more frequent, yet current firmware renewal technology refreshes for whole Basic Input or Output System (BIOS) (BIOS).And in actual application, only need to be in BIOS, certain part drives, application module upgrades or add and just can meet the demands, traditional firmware update mode inefficiency that seems in this case.
Current update mechanism needs CPU to support SMM (System Management Mode) System Management Mode.Entering the SMM pattern is to be caused by look-at-me SMI, and SMI by processor SMI# pin signal effectively or receive the message of advanced programmable controller APIC bus.It is maskable external interrupt and be independent of other interruption and abnormality processing not.When processor is checked through SMI, waits for after all instruction execution and memory access complete the current processor context is deposited in SMRAM and then cuts SMM pattern execution SMI handling procedure.Adopt the support that SMI drives in BIOS that places one's entire reliance upon of the method for refreshing of this technology, so the success ratio that refreshes of the reliability effect firmware of SMI driver.
The prior art feature introduction the present invention relates to:
UEFI: be used for software interface between defining operation system and system firmware, the interface of being responsible for Power-On Self-Test, attended operation system and attended operation system and hardware being provided.The UEFI framework has the advantages such as support of the programming of C language, modular design, graphic interface, file system.The UEFI technology has incorporated the various features of embedded OS, the Development of device driver model (EFI Driver Model) that oneself is arranged as UEFI, reduced on the one hand the burden that hardware vendor's development equipment drives, on the other hand, for different hardware devices provides extendible interface.In addition, UEFI has own shell (UEFI Shell), and the developer can develop application program miscellaneous.The UEFI standard is divided into before os starting: safeguard protection stage (SEC), context initialization phase (PEI), driving execution environment stage (DXE) and guiding device choice phase (BDS) four-stage; the system of describing in detail from powering up, processor initialization, hardware initialization, judgement start that path, system strategy are set, user's configuration interface, to the detailed process that enters operating system.
Capsule: the skimble-scamble problem of interface while carrying out data transmission in order to solve different operating system and fixer system, UEFI has defined a kind of data structure of variable-length.By it, allow, in operating system, data are passed to the UEFI firmware, realize as functions such as modification BIOS parameters.The UEFI standard calls Capsule to the data structure of this type of variable-length.
Firmware binaries file after UEFI firmware file system (Firmware File System): UEFI compiling is called FD (Firmware Device) file, and it is comprised of a series of firmware volume FV (Firmware Volume).FV mainly contains two types: system FV, and its purpose is mainly deposited firmware code, as hardware driving, application program; Non-volatile memories FV, be mainly used in storage system variable, configuration file, daily record etc.The appearance of firmware file system make can be in limited firmware stores space memory module driving file more effectively.
EDK II: be up-to-date BIOS development platform framework.
Flash: the storer of preserving UEFI firmware file system.
Tradition firmware renewal technology exists hardware platform, refresh tool and between different platform, can't unify, can not customize renewal to specifying firmware driving, firmware application programs; The conventional brush new mechanism depends critically upon system management interrupt SMI(System Management Interrupt in BIOS) support that drives, so the success ratio that refreshes of the reliability effect firmware of SMI driver.
Summary of the invention
Technical matters to be solved by this invention is to overcome the deficiencies in the prior art, proposes the capsule-type customization update method based on general Extensible Firmware Interface fixer system; The Capsule standard that described method utilizes UEFI to provide, identify firmware volume FV module in firmware layer, the data of obtaining write to the method for firmware file aims of systems address, and do not need whole Flash is upgraded.This technology can solve traditional firmware to hardware, operating system Dependence Problem, realizes the renewal of appointed function module, and practicality is stronger.
In order to solve the problems of the technologies described above, the technical solution adopted in the present invention is:
Based on the capsule-type customization update method of general Extensible Firmware Interface fixer system, described capsule Capsule formula customization update method is divided into two parts: refresh routine in refresh routine, UEFI fixer system under operating system; Described method comprises the steps:
Steps A, utilize Extensible Firmware Interface Development Framework EDK II compiling standard, and the firmware volume FV module that needs are upgraded compiles, and firmware volume FV is packaged into to capsule Capsule;
Step B, under operating system, refresh routine finds the position of firmware volume FV in Capsule by capsule Capsule header structure body, according to the current free memory situation of system, judge whether to carry out piecemeal to Capsule, if need piecemeal be divided into less data cell capsule SubCapsule, and it is each capsule SubCapsule storage allocation space, unit;
Step C, under operating system, refresh routine arranges computing machine and enters the S3 sleep state, wakes up by the real-time clock setting, enters the UEFI fixer system, utilize the characteristics that in the computing machine sleep state, internal storage data is not lost, the unit capsule SubCapsule in UEFI fixer system access memory;
Step D, the UEFI fixer system was identified and merge cells capsule SubCapsule in the context initialization PEI stage, obtain complete capsule Capsule, the relevant informations such as the location address of Capsule in internal memory after merging and size are write to handing-over piece HOB (Hand-off Block) chained list;
Step e, the UEFI fixer system is driving the execution environment DXE stage, utilizes handing-over piece HOB chained list to resolve Capsule, extracts the FV module be kept at wherein, the verification by FV and judge whether FV is legal, and read wherein driving or application program;
Step F, call the driving that drives the execution environment DXE stage in UEFI and distribute loading Dispatch to serve, and judges the dependence between driving, and finds and execution UEFI firmware renewal driving according to correct order;
Step G, the UEFI firmware upgrades to drive and reads firmware image location of content figure Flash map, obtain firmware volume FV to be updated positional information in firmware binaries file FD, last UEFI firmware upgrades to drive firmware volume FV module to be updated in internal memory is write in firmware binaries file FD.
In described steps A, described Extensible Firmware Interface Development Framework EDK II compiling standard, be the FD file by the firmware binaries file after this standard compiling, described FD file including firmware volume FV, and described FV is the elementary cell of storage code and data; The position of each FV in the firmware binaries file is described by firmware image location of content figure Flash Map.
In described step C, described handing-over piece HOB chained list is one group of data block, and this data block is for being delivered to the execution environment DXE stage that drives by data from the initialization preparation layer PEI stage.
The invention has the beneficial effects as follows: the present invention proposes the capsule-type customization update method based on general Extensible Firmware Interface fixer system, described method is based on the capsule Capsule mechanism of general Extensible Firmware Interface UEFI fixer system, break away from current main flow firmware renewal technology and relied on system management interrupt SMI driving, by Capsule is resolved, obtain firmware volume FV module to be updated, and the FV module is identified, the data of obtaining are write to firmware file aims of systems address, thereby realize selected FV is upgraded, broken away from and needed the method that whole BIOS is upgraded in the past.Capsule mechanism has solved the problem that more new tool can't be unified on different hardware platforms, operating system.This firmware update, have more dirigibility, using value is high.Can be applicable to the aspects such as firmware remote reflash, the automatic recovery of firmware.
The accompanying drawing explanation
Fig. 1 is renewal process flow diagram of the present invention.
Fig. 2 is renewal frame diagram of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the customization of the capsule-type based on the general Extensible Firmware Interface fixer system update method that the present invention is proposed is elaborated:
The present invention is based on the capsule-type customization update method of general Extensible Firmware Interface fixer system, Fig. 1 is the renewal process flow diagram of described method, and by EDK II compiling standard, the FV module that needs are upgraded compiles, and FV is packaged into to Capsule.In UEFI fixer system start-up course, Capsule is resolved, and obtain start address and the size of FV in Flash, thereby reach the designing requirement that selected FV is upgraded.Concrete steps are as follows:
Step (1): according to EDK II compiling standard, the FV module that needs are upgraded compiles, and FV is packaged into to Capsule.
Step (2): under operating system, refresh routine finds the position of firmware volume FV in Capsule by Capsule header structure body member, according to the current free memory situation of system, judge whether needs are carried out to piecemeal to Capsule, if need to would be divided into less data cell SubCapsule, and be each data cell SubCapsule storage allocation space.
Step (3): computing machine is set and enters the S3 sleep state, utilize in sleep state the characteristics that internal storage data is not lost, wake rear PC up and enter the UEFI fixer system.
Step (4): utilize in sleep state the characteristics that internal storage data is not lost, wake rear PC up and enter the UEFI fixer system, and at the PEI subsequently, merge the SubCapsule piece in the stage, make it be restored to a complete Capsule, the location address the Capsule after merging in internal memory and size write handing-over piece HOB (Hand-off Block) chained list.
Step (5): the UEFI fixer system enters into the DXE stage.The parameters such as the address by the Capsule from obtaining the HOB chained list in internal memory, size remove to process Capsule, and the FV be kept at is wherein therefrom separated.Call the power function of UEFI FV is further resolved, effect and CheckSum by verification FV judge whether FV is legal, and reading and saving driving, application program therein.
Step (6): call DXE service Dispatch in UEFI, this driving is added in doubly linked list, and the dependence between driving by judgement, the UEFI firmware that meets service requirement is upgraded to drive and add in the driving chained list of UEFI system, by the traversal chained list, calculate entry address the operation of driving.
Step (7): the UEFI firmware upgrades to drive and reads firmware image location of content figure Flash map, obtain the FV to be updated relevant information such as position in Flash, and call the Device ID that FLASH chip supported protocol removes to attempt reading Flash, obtain corresponding Flash read-write and drive, finally call UEFI firmware renewal driving FV module to be updated in internal memory is write to Flash.
Data transmission based on the Capsule standard has following advantage: transmission mode between different operating system and fixer system is unified; Data read in fixer system and complete, and prevent unwarranted operational access under operating system, improve security; In data in the Capsule bag, being not limited to the variable informations such as systematic parameter, can be also the executive routine in the UEFI fixer system, it is compared more flexible with other transmission modes.
Fig. 2 has provided the process schematic diagram of this update method from operating system to the UEFI fixer system, as shown in the figure: under operating system more new tool Capsule is carried out to piecemeal, be each unit capsule SubCapsule storage allocation; Under operating system, refresh routine arranges computing machine and enters the S3 sleep state, and by real-time clock waking-up, computing machine enters the UEFI fixer system; In the PEI stage of UEFI fixer system, identify and merge cells capsule SubCapsule, obtain complete capsule Capsule; The UEFI fixer system enters the DXE stage, and resolve Capsule and extract the firmware volume FV module be kept at wherein, and driving, the application program of reading and saving in firmware volume; Load and move the UEFI firmware read and upgrade driving, firmware volume FV module to be updated in internal memory is write to firmware binaries file FD.
The present invention can, effectively to specifying the FV module to upgrade, utilize Capsule mechanism to solve the problem that more new tool can't be unified on different hardware platforms, operating system.This firmware update, have more dirigibility, using value is high.Can be applicable to the aspects such as firmware remote reflash, the automatic recovery of firmware.

Claims (3)

1. based on the capsule-type customization update method of general Extensible Firmware Interface fixer system, it is characterized in that, this capsule-type customization update method comprises two parts: step of updating in step of updating, UEFI fixer system under operating system; Detailed process is as follows:
Step of updating under operating system, concrete steps are as follows:
Steps A, utilize Extensible Firmware Interface Development Framework EDK II compiling standard, and the firmware volume FV module that needs are upgraded compiles, and firmware volume FV is packaged into to capsule Capsule;
Step B, by capsule Capsule header structure body, find the position of firmware volume FV in Capsule, according to the current free memory situation of system, judge whether to carry out piecemeal to Capsule, if need piecemeal be divided into less data cell capsule SubCapsule, and it is each capsule SubCapsule storage allocation space, unit;
Step C, arrange computing machine and enter the S3 sleep state, wakes up by the real-time clock setting, enters the UEFI fixer system, the unit capsule SubCapsule in UEFI fixer system access memory;
Step of updating in the UEFI fixer system, its concrete steps are as follows:
Step D, in the context initialization PEI stage, identification merge cells capsule SubCapsule, obtain complete capsule Capsule, and the location address the Capsule after merging in internal memory and size write handing-over piece HOB chained list;
Step e, drive the execution environment DXE stage, utilizes handing-over piece HOB chained list, resolves Capsule, extracts the FV module be kept at wherein, the verification by FV and judge whether FV is legal, and read wherein driving or application program;
Step F, call the driving that drives the execution environment DXE stage in UEFI and distribute loading Dispatch to serve, and judges the dependence between driving, and finds and execution UEFI firmware renewal driving according to correct order;
Step G, UEFI firmware upgrade to drive and read firmware image location of content figure Flash map, obtain the positional information of firmware volume FV to be updated in firmware binaries file FD, and firmware volume FV module to be updated in internal memory is write in firmware binaries file FD.
2. the capsule-type based on general Extensible Firmware Interface fixer system according to claim 1 customizes update method, it is characterized in that, in steps A, described Extensible Firmware Interface Development Framework EDK II compiling standard, by the firmware binaries file after this standard compiling, it is the FD file, described FD file including firmware volume FV, described FV is the elementary cell of storage code and data; The position of each FV in the firmware binaries file described by firmware image location of content figure Flash Map.
3. the capsule-type based on general Extensible Firmware Interface fixer system according to claim 1 customizes update method, it is characterized in that, in step C, described handing-over piece HOB chained list is one group of data block, and this data block is for being delivered to the execution environment DXE stage that drives by data from the initialization preparation layer PEI stage.
CN 201310083959 2013-03-15 2013-03-15 Capsule type custom-made updating method based on unified extensible firmware interface firmware system Active CN103207797B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201310083959 CN103207797B (en) 2013-03-15 2013-03-15 Capsule type custom-made updating method based on unified extensible firmware interface firmware system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201310083959 CN103207797B (en) 2013-03-15 2013-03-15 Capsule type custom-made updating method based on unified extensible firmware interface firmware system

Publications (2)

Publication Number Publication Date
CN103207797A CN103207797A (en) 2013-07-17
CN103207797B true CN103207797B (en) 2013-11-27

Family

ID=48755028

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201310083959 Active CN103207797B (en) 2013-03-15 2013-03-15 Capsule type custom-made updating method based on unified extensible firmware interface firmware system

Country Status (1)

Country Link
CN (1) CN103207797B (en)

Families Citing this family (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572164A (en) * 2014-03-21 2015-04-29 中电科技(北京)有限公司 UEFI (Unified Extensible Firmware Interface) firmware implementation method based on Feiteng portable computer
CN104572165B (en) * 2014-03-21 2017-10-27 中电科技(北京)有限公司 A kind of UEFI firmware implementation methods based on FT server
CN104572166A (en) * 2014-03-21 2015-04-29 中电科技(北京)有限公司 UEFI (Unified Extensible Firmware Interface) firmware implementation method based on Feiteng desk computer
CN104572061A (en) * 2014-03-21 2015-04-29 中电科技(北京)有限公司 UEFI (Unified Extensible Firmware Interface) firmware implementation method based on Loongson server
CN104573529B (en) * 2015-01-28 2018-04-17 加弘科技咨询(上海)有限公司 A kind of division of BIOS/firmware, update method and system
CN104915280A (en) * 2015-06-03 2015-09-16 浪潮集团有限公司 Method for obtaining computer hardware information on the basis of UEFI (Unified Extensible Firmware Interface) driving mode
CN106909351B (en) * 2015-12-22 2021-04-20 中电科技(北京)有限公司 UEFI (unified extensible firmware interface) firmware-based EXT (extensible firmware interface) file system implementation method
CN106201608A (en) * 2016-07-01 2016-12-07 南京百敖软件有限公司 Computer UEFI firmware update
US10452404B2 (en) * 2016-07-28 2019-10-22 Microsoft Technology Licensing, Llc. Optimized UEFI reboot process
CN108536453A (en) * 2017-03-03 2018-09-14 台湾聚引移动有限公司 The method of the unified Extensible Firmware Interface firmware of update
CN107423068A (en) * 2017-07-31 2017-12-01 山东超越数控电子有限公司 The method that a variety of file system are realized in UEFI BIOS
CN107463408A (en) * 2017-08-11 2017-12-12 郑州云海信息技术有限公司 The method and device of clearing password is prevented during a kind of upgrading BIOS
CN107463412A (en) * 2017-08-17 2017-12-12 郑州云海信息技术有限公司 A kind of method and device of upgrading BIOS
CN108399076A (en) * 2018-03-02 2018-08-14 山东超越数控电子股份有限公司 A kind of firmware update and device based on UEFI
CN108845834A (en) * 2018-06-01 2018-11-20 上海兆芯集成电路有限公司 Computer installation
CN108958749A (en) * 2018-06-29 2018-12-07 郑州云海信息技术有限公司 Realize the method, device and equipment that the BIOS data of packing forms are write with a brush dipped in Chinese ink
CN109472131A (en) * 2018-11-09 2019-03-15 济南浪潮高新科技投资发展有限公司 A kind of capsule-type UEFI firmware remote-control method based on BMC with safety certification
CN109992517B (en) * 2019-04-03 2023-12-26 昆仑太科(北京)技术股份有限公司 UEFI-based firmware module debugging method and system
CN110363011B (en) * 2019-07-19 2024-05-07 腾讯科技(深圳)有限公司 Method and apparatus for verifying security of UEFI-based BIOS
US20230305833A1 (en) * 2020-08-21 2023-09-28 Intel Corporation Methods and apparatus to perform an enhanced s3 protocol to update firmware with a boot script update
CN112231477B (en) * 2020-10-20 2023-09-22 淮阴工学院 Text classification method based on improved capsule network
CN117529705A (en) * 2021-12-09 2024-02-06 英特尔公司 Firmware apparatus, device, method, and computer program
CN114611109B (en) * 2022-01-06 2023-07-07 四川大学 UEFI firmware security audit method based on single classification
CN114911488B (en) * 2022-04-27 2024-04-09 北京计算机技术及应用研究所 UEFI firmware LOGO replacement and recovery method based on domestic processor platform
CN115328629A (en) * 2022-08-11 2022-11-11 江苏卓易信息科技股份有限公司 Method for performing real-time embedded management by expanding UEFI (unified extensible firmware interface) firmware on bare metal

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541606A (en) * 2011-12-31 2012-07-04 曙光信息产业股份有限公司 Method and device for remote management of BIOS (basic input/output system) configuration based on UEFI (unified extensible firmware interface
CN102567550A (en) * 2011-12-31 2012-07-11 曙光信息产业股份有限公司 Method and device for collecting data of emergency event in operating system (OS)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7660977B2 (en) * 2006-06-08 2010-02-09 Intel Corporation System and method to control microcode updates after booting an operating system in a computing platform

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541606A (en) * 2011-12-31 2012-07-04 曙光信息产业股份有限公司 Method and device for remote management of BIOS (basic input/output system) configuration based on UEFI (unified extensible firmware interface
CN102567550A (en) * 2011-12-31 2012-07-11 曙光信息产业股份有限公司 Method and device for collecting data of emergency event in operating system (OS)

Also Published As

Publication number Publication date
CN103207797A (en) 2013-07-17

Similar Documents

Publication Publication Date Title
CN103207797B (en) Capsule type custom-made updating method based on unified extensible firmware interface firmware system
CN102236621B (en) Computer interface information configuration system and method
JP6272991B2 (en) Selective power management for pre-boot firmware updates
US9411601B2 (en) Flexible bootstrap code architecture
CN102200916B (en) Electronic equipment, configurable member and method for storing configuration information of configurable member
EP3274788B1 (en) Technologies for improved hybrid sleep power management
CN109478135A (en) The UEFI of optimization reboots process
CN109885343A (en) A kind of controller low-power consumption starting method, apparatus, computer equipment and storage medium
CN1648863A (en) Portable software application method
CN105930186B (en) The method for loading software of multi -CPU and software loading apparatus based on multi -CPU
CN104572161B (en) A kind of UEFI firmware implementation methods based on Godson portable computer
CN101431441A (en) Method for on-line updating FPGA system embedded with CPU
CN104572164A (en) UEFI (Unified Extensible Firmware Interface) firmware implementation method based on Feiteng portable computer
CN104156234A (en) Multi-core processor starting and bootloader big-little endian mode adapting method device
CN101573687A (en) Reconfiguring a secure system
CN101901159B (en) Method and system for loading Linux operating system on multi-core CPU
CN110413432A (en) A kind of information processing method, electronic equipment and storage medium
CN108874458A (en) A kind of the firmware starting method and multicore SoC device of multicore SoC
CN106201608A (en) Computer UEFI firmware update
CN102253844B (en) Method and device for starting processor
US10162616B2 (en) System for binary translation version protection
CN109507991B (en) Double-shaft servo control platform debugging system and method
CN108255735A (en) Associated environment test method, electronic device and computer readable storage medium
CN110515671A (en) Initial method, apparatus for initializing, terminal device and readable storage medium storing program for executing
CN103729219A (en) Method and system for framing UEFI BIOS (unified extensible firmware interface basic input/output system)

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant