JP4961019B2 - How to use global variables for PEI modules in EFI based firmware - Google Patents

How to use global variables for PEI modules in EFI based firmware Download PDF

Info

Publication number
JP4961019B2
JP4961019B2 JP2009519776A JP2009519776A JP4961019B2 JP 4961019 B2 JP4961019 B2 JP 4961019B2 JP 2009519776 A JP2009519776 A JP 2009519776A JP 2009519776 A JP2009519776 A JP 2009519776A JP 4961019 B2 JP4961019 B2 JP 4961019B2
Authority
JP
Japan
Prior art keywords
driver image
processor
section
data
address
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.)
Expired - Fee Related
Application number
JP2009519776A
Other languages
Japanese (ja)
Other versions
JP2009544085A (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.)
Intel Corp
Original Assignee
Intel Corp
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 Intel Corp filed Critical Intel Corp
Publication of JP2009544085A publication Critical patent/JP2009544085A/en
Application granted granted Critical
Publication of JP4961019B2 publication Critical patent/JP4961019B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • 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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Read Only Memory (AREA)

Description

本発明は概してファームウェアに関する。具体的には、本発明は、EFI用プラットフォーム革新フレームワーク(Platform Innovation Framework for Extensible Firmware Interface(EFI))のEFI前初期化(pre―EFI Initialization:PEI)フェーズ中にグローバル変数を利用する方法に関する。   The present invention generally relates to firmware. Specifically, the present invention relates to a method for using the variable for pre-EFI initialization (PEI) phase during EFI pre-initialization (pre-EFI initialization: PEI) phase of the Platform Innovation Framework for Extensible Firmware Interface (EFI). .

EFI用プラットフォーム革新フレームワーク(Platform Innovation Framework for Extensible Firmware Interface(EFI)、以下「フレームワーク」とも呼ぶ)は、Intel(r)Corporation社(米国、カリフォルニア州、サンタクラーラ)によって開発されたもので、一連のロバストなアーキテクチャのインターフェースであり、C言語で実装され、パワーオンからオペレーティングシステムへの制御の移行に至るまで、プラットフォームを初期化するのに必要な処理をすべて実施するように設計されている。フレームワークは主に、2つのフェーズに分けられる。つまり、EFI前初期化(pre―EFI Initialization:PEI)フェーズとドライバ実行環境(Driver Execution Environment:DXE)フェーズとである。PEIフェーズでは、最小限だけプロセッサ、チップセットおよびプラットフォームを構成してメモリ発見(memory discovery)をサポートする。DXEフェーズでは、プラットフォーム、プロセッサおよびチップセットデバイスの初期化を完了させることによってPEIフェーズを進める。   The Platform Innovation Framework for Extensible Firmware Interface (EFI) (hereinafter also referred to as “Framework”) was developed by Intel (r) Corporation (Santa Clara, California, USA). A series of robust architectural interfaces, implemented in C and designed to perform all the processing necessary to initialize the platform, from power on to control transfer to the operating system . The framework is mainly divided into two phases. That is, there are a pre-EFI initialization (PEI) phase and a driver execution environment (DXE) phase. In the PEI phase, a minimum number of processors, chipsets and platforms are configured to support memory discovery. In the DXE phase, the PEI phase is advanced by completing the initialization of the platform, processor and chipset device.

PEIフェーズでは、利用可能なメモリはない。利用可能なメモリはないが、プロセッサキャッシュを一時的に初期化してランダム・アクセス・メモリ(RAM)として機能させることが可能であるので、当該キャッシュにスタックおよびヒープを格納させることができる。このため、PEIフェーズで高級言語でコンパイルされたモジュールを実行することが可能となる。   In the PEI phase, no memory is available. Although there is no memory available, the processor cache can be temporarily initialized to function as random access memory (RAM), so that the stack and heap can be stored in the cache. Therefore, it is possible to execute a module compiled in a high-level language in the PEI phase.

このフレームワークにおいては、PEIフェーズではモジュールが読み出しのみの変数としてグローバル変数を利用する点、つまり、グローバル変数を変更できない点で制約があることが知られている。PEIフェーズではメモリが利用可能でないので、データおよびコードセグメントはすべて、再配置されることなくフラッシュ(Flash)に配置される。   In this framework, it is known that in the PEI phase, there is a restriction in that the module uses a global variable as a read-only variable, that is, the global variable cannot be changed. Since no memory is available in the PEI phase, all data and code segments are placed in flash without being relocated.

フラッシュ内のデータは、他の従来のメモリデバイスに配置されるデータほど、簡単に変更できないことは良く知られている。PEIコードはフラッシュのデータセクションのグローバル変数に対する書込みアクセスを呼び出し得るが、グローバル変数を変更することはできない。このような限界があるため、PEIモジュールはいくつかの不利益をこうむっている。第一に、複数の機能間でモジュールグローバル変数を共有することができない。機能間で共有しなければならない変数はすべて、スタックまたはヒープを通してやり取りしなければならない。このため、コードサイズが大幅に増えてしまい得る。また、PEIコードはフラッシュで実行されるので、圧縮を実行できない場合がある。第二に、ブート性能が下がってしまう。コードが増加すると、復号および実行に必要なプロセッササイクルが増える。さらに、プロセッサキャッシュはこの段階ではイネーブルされておらず、実行効率が遅くなってしまう。特に、この傾向はフラッシュにあるグローバル変数に対して頻繁にアクセスする場合に見られる。第三に、ファームウェア開発者がコードを自由に開発および試験できない。   It is well known that data in flash cannot be changed as easily as data placed in other conventional memory devices. The PEI code can invoke write access to global variables in the data section of the flash, but the global variables cannot be changed. Because of these limitations, the PEI module suffers from several disadvantages. First, module global variables cannot be shared between multiple functions. All variables that must be shared between functions must pass through the stack or heap. For this reason, the code size can increase significantly. In addition, since the PEI code is executed in flash, compression may not be executed. Secondly, the boot performance is reduced. As the code increases, more processor cycles are required for decoding and execution. In addition, the processor cache is not enabled at this stage, which slows execution efficiency. In particular, this trend is seen when accessing global variables in flash frequently. Third, firmware developers cannot freely develop and test code.

このため、EFIベースのファームウェアについてEFI前初期化(PEI)環境でのグローバル変数のサポートを可能とする方法が求められている。また、PEIフェーズ中でのグローバル変数の変更を可能とする方法も求められている。   Therefore, there is a need for a method that enables global variable support in an EFI pre-initialization (PEI) environment for EFI-based firmware. There is also a need for a method that allows global variables to be changed during the PEI phase.

添付図面は、本明細書に組み込まれその一部を成すものとするが、本発明の実施形態を説明するものであって、本発明の説明と組み合わせることによって、本発明の原理が明らかになると共に、当業者は本発明を作成および利用できるようになる。図中では、同様の参照番号は概して同一の素子、機能的に類似している素子、および/または構造的に類似している素子を指すものとする。ある素子が最初に図示されている図面は、対応する参照番号の最上桁の数字で示す。   The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and, in combination with the description of the invention, reveal the principles of the invention. Together, those skilled in the art will be able to make and use the present invention. In the drawings, like reference numbers generally refer to the same, functionally similar, and / or structurally similar elements. The drawing in which an element is initially illustrated is indicated by the most significant digit in the corresponding reference number.

本発明の一実施形態に係るPortable Executable 32(PE32)イメージの一例を示す図である。It is a figure which shows an example of the Portable Executable 32 (PE32) image which concerns on one Embodiment of this invention.

本発明の一実施形態に係る、EFI前初期化(PEI)フェーズ中におけるグローバル変数の読み書きアクセスを可能とするべく、PE32イメージを変更する方法の一例を示すフローチャートである。6 is a flowchart illustrating an example of a method for changing a PE32 image to enable read / write access to global variables during an EFI pre-initialization (PEI) phase, according to an embodiment of the present invention.

本発明の一実施形態に係る、EFI前初期化(PEI)フェーズ中におけるグローバル変数の読み書きアクセスを可能とするための、PE32イメージの変更の一例を示すブロック図である。FIG. 6 is a block diagram illustrating an example of a PE32 image change to enable read / write access to global variables during an EFI pre-initialization (PEI) phase, according to one embodiment of the invention.

本発明の一実施形態に係る、第1回目の修正方法の一例を説明するフローチャートである。It is a flowchart explaining an example of the 1st correction method based on one Embodiment of this invention.

本発明の一実施形態に係る、第2回目の修正方法の一例を説明するフローチャートである。It is a flowchart explaining an example of the 2nd correction method based on one Embodiment of this invention.

特定の用途を想定した実施形態例を参照しつつ本明細書において本発明を説明するが、本発明はそのような実施形態例に限定されるわけではないと理解されたい。当業者は、本明細書の教示内容を参考にすることによって、本発明の範囲に含まれるさらなる変形、応用および実施形態、ならびに本発明の実施形態が大きな有用性を持つさらなる技術分野に想到するであろう。   Although the invention is described herein with reference to example embodiments that are intended for particular applications, it should be understood that the invention is not limited to such example embodiments. Those of ordinary skill in the art, upon reference to the teachings herein, will conceive of additional variations, applications and embodiments that fall within the scope of the present invention, as well as additional technical fields where embodiments of the present invention have great utility. Will.

本明細書において本発明の「一実施形態」、「実施形態」または「別の実施形態」と言う場合、当該実施形態に関連して説明されている特定の特徴、構造または特性が本発明の少なくとも1つの実施形態に含まれていることを意味する。このため、「一実施形態によると」または「実施形態によると」という表現が本明細書のさまざまな箇所で用いられているが、必ずしも同じ実施形態に言及するものではない。   When referred to herein as an “one embodiment”, “an embodiment” or “another embodiment” of the present invention, the specific features, structures or characteristics described in connection with that embodiment are Means included in at least one embodiment. Thus, the phrases “according to one embodiment” or “according to an embodiment” are used in various places in this specification, but do not necessarily refer to the same embodiment.

本発明の実施形態は、EFI前初期化(PEI)フェーズにおいてグローバル変数の変更(つまり、読み書きアクセス)を可能とする方法に関する。この目的は、「RAMとしてのキャッシュ(Cache As RAM(CAR))」として知られている利用モデルとして、プロセッサキャッシュの一部を利用することによって実現される。ドライバイメージのデータセクションをフラッシュデバイスからCARの領域に再配置することによって、グローバル変数は、まるでRAMにあるかのように、自由に変更され得る。   Embodiments of the present invention relate to a method that allows global variable changes (ie, read / write access) in an EFI pre-initialization (PEI) phase. This object is realized by using a part of the processor cache as a usage model known as “Cache as RAM (CAR)”. By relocating the data section of the driver image from the flash device to the area of the CAR, the global variables can be freely changed as if they were in RAM.

本発明の実施形態は、EFIベースのファームウェアのEFI前初期化(PEI)フェーズ中にフラッシュデバイスで実装されるものとして説明される。EFIベースのファームウェアのPEIフェーズでは、Portable Executable 32(PE32)イメージ形式が利用される。当業者であれば、本発明がフラッシュデバイス、EFIベースファームウェアまたはPE32イメージ形式に限定されないことが分かるであろう。本発明は、グローバル変数が読み出しのみのアクセスに制限されている別のイメージ形式を要件とする別のソフトウェア/ファームウェア環境に基づく別の不揮発性ストレージデバイスでも実装され得る。   Embodiments of the present invention are described as being implemented in a flash device during the EFI pre-initialization (PEI) phase of EFI-based firmware. In the PEI phase of EFI-based firmware, the Portable Executable 32 (PE32) image format is used. One skilled in the art will appreciate that the present invention is not limited to flash devices, EFI-based firmware, or PE32 image formats. The present invention may also be implemented in other non-volatile storage devices based on different software / firmware environments that require different image formats where global variables are restricted to read-only access.

EFIベースのファームウェアは、標準のPortable Executable 32(PE32)イメージ形式をサポートする。PE32イメージ形式は、コード、データ、および例えば再配置情報等のその他の情報をセクションによって整理している。セクションは、互いに近接して連続して配置されている。イメージがローダによってロードされると、メモリ内でのイメージレイアウトはファイルイメージと略同一となる。例外と言えば、セクション間においてアラインメントが要求されるのでメモリのイメージレイアウトにおいて少しバブルが見られる点が挙げられる。多くの場合、ローダは、好ましいリンキングベースでセクションがロードされていないと、メモリイメージを修正する。   EFI-based firmware supports the standard Portable Executable 32 (PE32) image format. The PE32 image format organizes code, data, and other information, such as relocation information, by section. The sections are arranged in close proximity to each other. When the image is loaded by the loader, the image layout in memory is substantially the same as the file image. An exception is that there is a slight bubble in the memory image layout because alignment is required between sections. In many cases, the loader modifies the memory image if the section is not loaded on the preferred linking base.

図1は、本発明の一実施形態に係るPortable Executable 32(PE32)イメージ100の一例を示す図である。PE32イメージ100は、本明細書では実行可能ドライバモジュール100とも呼ぶが、テキスト(.text)セクション102と、データ(.data)セクション104と、再配置(.reloc)セクション106とを備える。一実施形態によると、テキストセクション102はコードセクション102とも呼ばれ得る。実施形態によると、実行可能ドライバモジュール100は、テキストセクション102と、データセクション104と、再配置セクション106とに限定されない。実施形態によると、実行可能ドライバモジュール100はより多くのセクションをさらに備えるとしてもよく、例えば、rデータセクション、rsrcセクション等をさらに備えるとしてもよい。前述したように、セクション間ではアラインメントが要求されるので、セクション102、104および106は互いに近接して連続して配置される必要がある。   FIG. 1 is a diagram showing an example of a Portable Executable 32 (PE32) image 100 according to an embodiment of the present invention. The PE32 image 100, also referred to herein as an executable driver module 100, comprises a text (.text) section 102, a data (.data) section 104, and a relocation (.reloc) section 106. According to one embodiment, text section 102 may also be referred to as code section 102. According to embodiments, the executable driver module 100 is not limited to the text section 102, the data section 104, and the relocation section 106. According to the embodiment, the executable driver module 100 may further include more sections, for example, an r data section, an rsrc section, and the like. As described above, since alignment is required between sections, sections 102, 104, and 106 need to be arranged in close proximity to each other.

テキストセクション102は、実行可能ドライバモジュール100用の実行可能コードを含む。データセクション104は、テキストセクション102の実行中に利用されるデータを含む。再配置セクション106は、絶対フラッシュアドレスによって更新されるすべてのアドレスデータ項目の情報を提供する。   The text section 102 contains executable code for the executable driver module 100. Data section 104 includes data that is utilized during execution of text section 102. The relocation section 106 provides information on all address data items that are updated with absolute flash addresses.

PE32イメージを正しく起動させるためには、セクション102、104および106を、連続した仮想的または物理的メモリスペースに配置しなければならない。ページング方式がイネーブルされると、セクション102、104および106は連続した仮想的メモリスペースに存在する必要がある。ページング方式が必要ない場合には、セクション102、104および106は連続する物理的メモリに存在する必要がある。EFIファームウェアの場合、ページング方式は常にディセーブルされている。このため、セクション102、104および106は、連続する物理的メモリスペースに配置される。このため、実行可能ドライバモジュール100のセクション102、104および106は、複数の不連続のメモリ範囲に分割されることはない。実行可能モジュールが別のベースにロードされる場合には、実行可能ドライバモジュール100のすべてのセクション(102、104および106)をすべて、新しいベースに再配置しなければならない。コードセクション(「テキストセクションとも呼ぶ)のみをベースに再配置して、データセクションを別の不連続の新しいベースに再配置することは認められない。   In order for the PE32 image to boot properly, sections 102, 104 and 106 must be placed in a contiguous virtual or physical memory space. When the paging scheme is enabled, sections 102, 104 and 106 need to be in a contiguous virtual memory space. If no paging scheme is required, sections 102, 104 and 106 need to reside in contiguous physical memory. In the case of EFI firmware, the paging method is always disabled. Thus, sections 102, 104 and 106 are placed in a contiguous physical memory space. Thus, sections 102, 104, and 106 of executable driver module 100 are not divided into a plurality of discrete memory ranges. If the executable module is loaded into another base, all sections (102, 104 and 106) of the executable driver module 100 must all be relocated to the new base. It is not allowed to relocate only code sections (also called “text sections”) to a base and relocate a data section to another discontinuous new base.

PEIフェーズにおいてグローバル変数を変更できるようにするという目的を達成するためには、実行可能ドライバモジュール100のPE32セクション(102、104および106)を異なるメモリ範囲に分割しなければならない。例えば、テキストセクション102はフラッシュ空間内に保持しなければならない一方、スタティック変数および/またはグローバル変数が格納されているデータセクション104はCARに再配置しなければならない。フラッシュおよびCARそれぞれの空間範囲は、互いに異なるものであると同時に不連続である。   In order to achieve the goal of being able to change global variables in the PEI phase, the PE32 section (102, 104 and 106) of the executable driver module 100 must be divided into different memory ranges. For example, the text section 102 must be kept in flash space, while the data section 104 in which static and / or global variables are stored must be relocated to the CAR. The spatial ranges of the flash and the CAR are different from each other and are discontinuous.

データセクション104をCARに移動させる一方でテキストセクション102および再配置セクション106をフラッシュ内に保持しながら、実行可能ドライバモジュール100を適切に実行するためには、コードがフラッシュに焼き付けられる前に、構築ツールに基づいてテキストセクション102およびデータセクション104にパッチを適用する。これは、コードがフラッシュに入ってしまえば、当該コードはその場で修正または再配置されることなく実行されなければならないからである。このため、本発明では、再配置情報に基づいて特定のフラッシュベースでイメージを修正する第1回目の修正が必要となる。第1回目の修正では、すべてのコードをフラッシュで直接実行させ、データアクセスもすべてフラッシュで行われるので、グローバル変数への書込みアクセスはブロックされる。実行可能ドライバモジュール100内のすべてのグローバル変数に対する書込みアクセスを可能とするためには、第2回目の修正が必要となる。第2回目の修正によると、データセクション104にアクセスするコードすべてとデータセクション104内のフィールドを指し示す関連データすべてとを、CARから読み出してデータセクション104を処理するべく、更新する。これは、コードが実行される前にデータセクション104がフラッシュからCARに複写されるためである。   In order to properly execute the executable driver module 100 while moving the data section 104 to the CAR while keeping the text section 102 and the relocation section 106 in flash, build before the code is burned to flash. Patch the text section 102 and data section 104 based on the tool. This is because once the code enters flash, it must be executed without modification or relocation on the fly. For this reason, in the present invention, the first correction is required in which the image is corrected on a specific flash base based on the rearrangement information. In the first modification, all code is executed directly in flash and all data accesses are also done in flash, so write access to global variables is blocked. In order to allow write access to all global variables in the executable driver module 100, a second modification is required. According to the second modification, all the code accessing the data section 104 and all related data pointing to the fields in the data section 104 are updated to read from the CAR and process the data section 104. This is because the data section 104 is copied from flash to CAR before the code is executed.

図2は、本発明の一実施形態に係る、EFI前初期化(PEI)フェーズ中におけるグローバル変数の読み書きアクセスを可能とするべく、PE32イメージを変更する方法の一例を示すフローチャート200である。本発明は、本明細書でフローチャート200に関連して説明される実施形態に限定されるものではない。本明細書の教示内容を参照すれば、ほかの機能フローチャートも本発明の範囲内に含まれることは、当業者には明らかである。処理はブロック202で開始され、すぐにブロック204に進む。   FIG. 2 is a flowchart 200 illustrating an example method for changing a PE32 image to enable read / write access to global variables during a pre-EFI initialization (PEI) phase, according to one embodiment of the invention. The present invention is not limited to the embodiments described herein with reference to flowchart 200. It will be apparent to those skilled in the art that other functional flowcharts are within the scope of the present invention upon reference to the teachings herein. Processing begins at block 202 and proceeds immediately to block 204.

ブロック204において、実行可能ドライバモジュール100を生成する。実行可能ドライバモジュール100はグローバル変数を含み、当該グローバル変数は、フラッシュデバイスで実行されると、読出しアクセスのみを可能とする。続いて、ブロック206に進む。   In block 204, the executable driver module 100 is generated. Executable driver module 100 includes a global variable that, when executed on a flash device, only allows read access. Subsequently, the process proceeds to block 206.

ブロック206において、実行可能ドライバモジュール100の第1回目の修正を実施する。第1回目の修正は、図4を参照しつつ詳細に後述するが、すべてのアドレスデータ項目をフラッシュ絶対アドレスで修正する。続いて、ブロック208に進む。   At block 206, a first modification of the executable driver module 100 is performed. Although the first correction will be described later in detail with reference to FIG. 4, all address data items are corrected with the flash absolute address. Subsequently, the process proceeds to block 208.

ブロック208において、実行可能ドライバモジュール100の第2回目の修正を実施する。第2回目の修正は、図5を参照しつつ詳細に後述するが、実行可能ドライバモジュール100のデータセクション104を指し示す、第1回目の修正で修正されたすべてのアドレスデータ項目に対して第2の修正を実施する。第2回目の修正は、これらのデータアドレスを、CAR絶対アドレスで更新する。第2回目の修正において、テキストセクション102およびデータセクション104は、データアドレスを反映するべくCAR絶対アドレスで更新され得る。第2回目の修正を完了すると、フラッシュに焼き付ける準備が整った最終的なEFIファームウェアイメージ(最終的な実行可能ドライバモジュール)が得られる。最終的なEFIファームウェアイメージは、CARに対するグローバル変数の読み書きアクセスを可能とするために必要なCAR絶対アドレスを含む。続いて、ブロック210に進む。   At block 208, a second modification of the executable driver module 100 is performed. The second modification, which will be described in detail later with reference to FIG. 5, is a second modification for all address data items modified in the first modification that point to the data section 104 of the executable driver module 100. Implement the correction. The second modification updates these data addresses with CAR absolute addresses. In the second modification, text section 102 and data section 104 may be updated with a CAR absolute address to reflect the data address. Completing the second modification will result in a final EFI firmware image (final executable driver module) ready to be burned to flash. The final EFI firmware image contains the absolute CAR address needed to allow read / write access of global variables to the CAR. Subsequently, the process proceeds to block 210.

ブロック210において、最終的なEFIファームウェアイメージ(最終的な実行可能ドライバモジュール)をフラッシュに焼き付ける。続いて、ブロック212に進む。   At block 210, the final EFI firmware image (final executable driver module) is burned to flash. Subsequently, the process proceeds to block 212.

フラッシュをブートすると、ファームウェアローダはデータセクション104をフラッシュからCARに複写して、実行するべくイメージエントリポイントに制御を移行させる。この結果、データセクション104をCARで格納および処理しつつ、実行可能ドライバモジュール100をフラッシュで通常通り実行することが可能となる。このようにすることによって、PEIフェーズでスタティック変数およびグローバル変数に対して自由にアクセス可能となる。つまり、このような構成とすることによって、グローバル変数はCARで読み書きアクセスを有するようになる。   When the flash boots, the firmware loader copies the data section 104 from the flash to the CAR and transfers control to the image entry point for execution. As a result, the executable driver module 100 can be normally executed in the flash while the data section 104 is stored and processed in the CAR. By doing so, static variables and global variables can be freely accessed in the PEI phase. That is, with this configuration, the global variable has read / write access in the CAR.

図3は、本発明の一実施形態に係る、EFI前初期化(PEI)フェーズ中におけるグローバル変数の読み書きアクセスを可能とするための、PE32イメージ(実行可能ドライバモジュール)100の変更の一例を示すブロック図である。図3では、フラッシュ302、フラッシュ302´、およびCAR304(上述したようにプロセッサキャッシュの一部)を示す。   FIG. 3 shows an example of a change in the PE32 image (executable driver module) 100 to enable read / write access to global variables during the pre-EFI initialization (PEI) phase according to one embodiment of the present invention. It is a block diagram. In FIG. 3, flash 302, flash 302 ', and CAR 304 (part of the processor cache as described above) are shown.

フラッシュ302は、テキストセクション102、データセクション104、および再配置セクション106を有する実行可能ドライバモジュール100を備える。第1回目の修正を、フラッシュ302のテキストセクション102およびデータセクション104において図示する。第1回目の修正においては、再配置セクション106に基づいて、すべてのアドレスデータ項目をフラッシュの絶対アドレスで修正する。第2回目の修正をフラッシュ302´に図示する。第2回目の修正では、データセクション104内のフィールドを指し示す関連データはすべて、CAR絶対アドレスで修正する。   The flash 302 includes an executable driver module 100 having a text section 102, a data section 104, and a relocation section 106. The first modification is illustrated in text section 102 and data section 104 of flash 302. In the first modification, all address data items are modified with the absolute address of the flash based on the relocation section 106. The second modification is illustrated in flash 302 '. In the second modification, all relevant data pointing to the field in the data section 104 is modified with the CAR absolute address.

図4は、本発明の一実施形態に係る、第1回目の修正方法の一例を説明するフローチャート400である。本発明は、本明細書でフローチャート400に関連して説明される実施形態に限定されるものではない。本明細書の教示内容を参照すれば、ほかの機能フローチャートも本発明の範囲内に含まれることは、当業者には明らかである。処理はブロック402で開始され、すぐにブロック404に進む。   FIG. 4 is a flowchart 400 illustrating an example of a first correction method according to an embodiment of the present invention. The present invention is not limited to the embodiments described in connection with flowchart 400 herein. It will be apparent to those skilled in the art that other functional flowcharts are within the scope of the present invention upon reference to the teachings herein. Processing begins at block 402 and proceeds immediately to block 404.

PE32イメージについて、再配置セクション106は、ロード後に修正されるべき実行可能ドライバモジュール100内のポイントをすべて記録している。再配置セクション106は一般的に、相対的な仮想アドレス(RVA)情報を提供する。RVAは、イメージがメモリにロードされるベースアドレスからのオフセットである。RVAによって、第1回目の修正においてパッチが適用されるアドレスはすべて、実行可能ドライバモジュール100内で特定される。パッチ適用対象のアドレスはそれぞれ、ロード用に特定されるフラッシュベースを追加することによって更新される。   For PE32 images, the relocation section 106 records all points in the executable driver module 100 that are to be modified after loading. The relocation section 106 generally provides relative virtual address (RVA) information. RVA is an offset from the base address at which the image is loaded into memory. RVA identifies all addresses to which the patch is applied in the first modification within the executable driver module 100. Each patch application address is updated by adding a flash base specified for loading.

ブロック404において、再配置セクション106内のポイントを解析する。続いてブロック406に進む。   At block 404, the points in the relocation section 106 are analyzed. Subsequently, the process proceeds to block 406.

ブロック406において、ブロック404で特定されたポイントのアドレスデータをフラッシュ絶対アドレスで更新する。続いて決定ブロック408に進む。   In block 406, the address data of the point specified in block 404 is updated with the flash absolute address. Proceed to decision block 408.

決定ブロック408では、再配置セクション106内にほかにも修正する必要があるポイントがあるか否かを決定する。再配置セクション106内にほかにも修正する必要があるポイントがあれば、ブロック404に戻って次のポイントを解析する。   At decision block 408, it is determined whether there are any other points in the relocation section 106 that need to be corrected. If there are other points in the relocation section 106 that need to be corrected, return to block 404 to analyze the next point.

決定ブロック408に戻って、再配置セクション106内には解析すべきポイントがもうないと決定されると、ブロック410に進んで、第1回目の修正が終了する。   Returning to decision block 408, if it is determined that there are no more points in the relocation section 106 to be analyzed, the process proceeds to block 410 and the first correction is terminated.

第1回目の修正は、図3のフラッシュ302にも図示されている。図3のフラッシュ302では、再配置セクション106内のポイントの例と、データセクション104内のデータ位置Bおよびフラッシュの絶対アドレスMaおよびMbと、テキストセクション102内のデータコード位置AおよびCならびにフラッシュの絶対アドレスMcとを図示している。Maは、コード位置Aに対するフラッシュ絶対アドレスである。Mbは、データ位置Bに対するフラッシュ絶対アドレスである。Mcは、コード位置Cに対するフラッシュ絶対アドレスである。   The first correction is also illustrated in flash 302 of FIG. In flash 302 of FIG. 3, examples of points in relocation section 106, data location B in data section 104 and flash absolute addresses Ma and Mb, data code locations A and C in text section 102, and flash An absolute address Mc is illustrated. Ma is the flash absolute address for code position A. Mb is the flash absolute address for data location B. Mc is the flash absolute address for code position C.

例示されているポイントRa、RbおよびRcは、再配置セクション106において強調して図示されている。Raは、コード位置A(テキストセクション102内にあり)を指し示す再配置情報を含む。コード位置Aのアドレスデータは、データセクション104内にあるフラッシュ絶対アドレスMaで更新される。Rbは、データ位置B(データセクション104内にあり)を指し示す再配置情報を含む。データ位置Bのアドレスデータは、データセクション104内にあるフラッシュ絶対アドレスMbで更新される。最後に、Rcは、コード位置C(テキストセクション102内にあり)を指し示す再配置情報を含む。コード位置Cのアドレスデータは、テキストセクション102内にあるフラッシュ絶対アドレスMcで更新される。   The illustrated points Ra, Rb, and Rc are highlighted in the relocation section 106. Ra includes relocation information that points to code position A (in text section 102). The address data at code position A is updated with the flash absolute address Ma in the data section 104. Rb includes relocation information that points to data location B (in data section 104). The address data at the data position B is updated with the flash absolute address Mb in the data section 104. Finally, Rc contains relocation information that points to code position C (within text section 102). The address data at the code position C is updated with the flash absolute address Mc in the text section 102.

フラッシュ302´は、第2回目の修正方法を示している。フラッシュ302´は、例示されているポイントRa、RbおよびRcを強調している再配置セクション106と、データセクション104´と、テキストセクション102´とを示す。データセクション104´は、データ位置BとCAR絶対アドレスMb´およびMa´とを含む。テキストセクション102´は、位置AおよびCとフラッシュ絶対アドレスMcとを含む。ここで、フラッシュ302のテキストセクション102はフラッシュ302´において変更されて(データセクション102´)、Ma´というアドレスの変更を格納していることに留意されたい。   The flash 302 'indicates the second correction method. Flash 302 'shows relocation section 106, data section 104', and text section 102 'highlighting the illustrated points Ra, Rb, and Rc. The data section 104 ′ includes a data position B and CAR absolute addresses Mb ′ and Ma ′. The text section 102 'includes positions A and C and a flash absolute address Mc. Note that the text section 102 of the flash 302 has been modified in the flash 302 '(data section 102') to store the address change Ma '.

例えばフラッシュ302のMbおよびMaのようなアドレスがデータセクション104で見つかると、テキストセクション102内のコードがスタティック変数またはグローバル変数にアクセスしていることが分かる。フラッシュ302´のデータセクション104´はCAR304に複写されるので、これらのアドレス(MbおよびMa)は、フラッシュ302´のデータセクション104´に示すように、CAR絶対アドレス(Mb´およびMa´)を反映するように更新されなければならない。このため、特定されるフラッシュベースとCARベースとの間のギャップを追加することによって、更なるパッチの適用が必要になる。フラッシュ302のデータセクション104またはフラッシュ302´のデータセクション104´の外に位置するほかのアドレス(例えば、テキストセクション102およびテキストセクション102´内のMc)については、フラッシュにとどまるので、さらにパッチを適用する必要はない。つまり、テキストセクション102はフラッシュで実行される。   When addresses such as Mb and Ma of flash 302 are found in data section 104, it can be seen that the code in text section 102 is accessing a static or global variable. Since the data section 104 ′ of the flash 302 ′ is copied to the CAR 304, these addresses (Mb and Ma) are the CAR absolute addresses (Mb ′ and Ma ′) as shown in the data section 104 ′ of the flash 302 ′. Must be updated to reflect. This necessitates further patching by adding a gap between the specified flash base and the CAR base. Other addresses located outside the data section 104 of the flash 302 or the data section 104 'of the flash 302' (eg, the Mc in the text section 102 and the text section 102 ') remain in the flash and are further patched do not have to. That is, the text section 102 is executed in flash.

第1回目の修正で修正されたアドレスを参照すれば、アドレスがデータセクション104内にあるか否かは非常に簡単に判断できる。フラッシュのデータセクション104内のアドレスに対するアクセスはすべて、CAR304のデータセクション104´にリダイレクトされる。フラッシュのデータセクション104のアドレスをリダイレクトしてデータセクション104´を得た後で、データセクション104´はフラッシュ302´からCAR304に複写される。この段階において、実行可能ドライバモジュール100は、CAR領域304で格納および処理されるデータセクション104´に基づいて、通常通りに実行され得る。このようにすることによって、スタティック変数およびグローバル変数のアクセスはすべて再配置後はフラッシュではなくCAR304で実行されるので、ブート性能が格段に改善される。このため、第1回目の修正後にデータセクション104を指し示しているアドレスに対してパッチをさらに適用することによって、イメージレイアウト全体からデータセクションを分離して、ほかの任意の特定アドレスに再配置することができる。データセクション104´をCAR304に配置することによって、実行可能ドライバモジュール100はPEIフェーズにおいてグローバル変数に対する読み書きアクセスを持ち得る。   By referring to the address corrected in the first correction, it can be very easily determined whether or not the address is in the data section 104. All accesses to addresses in the flash data section 104 are redirected to the CAR 304 data section 104 ′. After redirecting the address of the data section 104 of the flash to obtain the data section 104 ′, the data section 104 ′ is copied from the flash 302 ′ to the CAR 304. At this stage, executable driver module 100 may execute normally based on data section 104 ′ stored and processed in CAR area 304. By doing so, booting performance is greatly improved because all accesses of static variables and global variables are performed by the CAR 304 instead of the flash after the rearrangement. Therefore, by further applying a patch to the address pointing to the data section 104 after the first modification, the data section is separated from the entire image layout and relocated to any other specific address. Can do. By placing the data section 104 ′ in the CAR 304, the executable driver module 100 can have read / write access to global variables in the PEI phase.

フラッシュ302´に示すように、先に修正された位置Bのアドレスデータ(Mb)をCAR絶対アドレスMb´で更新して、先に修正された位置Aのアドレスデータ(Ma)をCAR絶対アドレスMa´で更新する。修正された位置Cのアドレスデータ(Mc)はテキストセクション102にあり、テキストセクションはフラッシュに留まるので、修正された位置Cのアドレスデータ(Mc)は更新されない。   As shown in the flash 302 ', the previously corrected address data (Mb) of the position B is updated with the CAR absolute address Mb', and the previously corrected address data (Ma) of the position A is updated to the CAR absolute address Ma. Update with ´. The corrected location C address data (Mc) is in the text section 102 and the text section remains in flash, so the corrected location C address data (Mc) is not updated.

CAR304は、データセクション104´が複写される、プロセッサキャッシュの一部である。前述したように、ファームウェアがフラッシュ空間に焼き付けられると、ファームウェアローダはデータセクション104´をフラッシュからCARに複写する。CAR304にデータセクション104´を移すことによって、PEIのスタティック変数およびグローバル変数は、CAR304を介して読み書きアクセスを持つことができるようになる。   The CAR 304 is the part of the processor cache where the data section 104 'is copied. As described above, when the firmware is burned into the flash space, the firmware loader copies the data section 104 'from the flash to the CAR. By moving the data section 104 ′ to the CAR 304, PEI static and global variables can have read and write access through the CAR 304.

図5は、本発明の一実施形態に係る、第2回目の修正方法の一例を説明するフローチャート500である。本発明は、本明細書でフローチャート500に関連して説明される実施形態に限定されるものではない。本明細書の教示内容を参照すれば、ほかの機能フローチャートも本発明の範囲内に含まれることは、当業者には明らかである。処理はブロック502で開始され、すぐに決定ブロック504に進む。   FIG. 5 is a flowchart 500 illustrating an example of the second correction method according to an embodiment of the present invention. The present invention is not limited to the embodiments described herein with reference to flowchart 500. It will be apparent to those skilled in the art that other functional flowcharts are within the scope of the present invention upon reference to the teachings herein. Processing begins at block 502 and proceeds immediately to decision block 504.

決定ブロック504では、第1回目の修正で修正されたアドレスデータ項目がデータセクション104を指し示しているか否かを決定する。データセクション104を指し示している、第1回目の修正で修正されたアドレスデータ項目がある場合には、ブロック506において当該アドレスデータ項目が選択され、ブロック508に進む。データセクション104を指し示している、第1回目の修正で修正されたアドレスデータ項目がない場合には、ブロック512に進み、処理は終了する。   In decision block 504, it is determined whether the address data item modified in the first modification points to the data section 104. If there is an address data item modified in the first modification pointing to the data section 104, the address data item is selected in block 506 and processing proceeds to block 508. If there is no address data item modified in the first modification pointing to the data section 104, the process proceeds to block 512 and the process ends.

ブロック508において、ブロック506で選択されたアドレスデータ項目をCAR絶対アドレスで更新する。続いて決定ブロック510に進む。   In block 508, the address data item selected in block 506 is updated with the CAR absolute address. Proceed to decision block 510.

決定ブロック510では、データセクション104を指し示している、第1回目の修正で修正されたアドレスデータ項目がほかにもあるか否かを決定する。データセクション104を指し示している、第1回目の修正で修正されたアドレスデータ項目がほかにもある場合には、ブロック506に戻り、修正すべき次のアドレスデータ項目を選択する。   In decision block 510, it is determined whether there are any other address data items that have been modified in the first modification pointing to the data section 104. If there are other address data items that were modified in the first modification pointing to the data section 104, return to block 506 to select the next address data item to be modified.

決定ブロック510に戻って、データセクション104を指し示している、第1回目の修正で修正されたアドレスデータ項目がこれ以上ないと決定された場合には、ブロック512に進んで、処理は終了する。   Returning to decision block 510, if it is determined that there are no more address data items modified in the first modification pointing to the data section 104, the process proceeds to block 512 and the process ends.

本発明の実施形態は、ハードウェア、ソフトウェアまたはそれらの組み合わせを用いて実装されるとしてもよく、1以上のコンピュータシステムまたはその他の処理システムにおいて実装されるとしてもよい。本明細書で説明した技術は、どのようなコンピューティング環境、家庭用電化製品環境、または処理環境に応用されるとしてもよい。当該技術は、プロセッサと、格納媒体(揮発性および不揮発性メモリおよび/またはストレージ素子を含む)と、少なくとも1つの入力デバイスと、1以上の出力デバイスとを備える、携帯可能または固定コンピュータ、携帯情報端末(PDA)、セットトップボックス、携帯電話およびポケットベル(登録商標)、家庭用電化製品(DVD(デジタルビデオディスク)プレーヤー、パーソナルビデオレコーダ、パーソナルビデオプレーヤー、衛星放送受信機、ステレオ受信機、ケーブルテレビ受信機を含む)ならびにその他の電子デバイスといった、プログラム可能な機械で実行されるプログラムにおいて実装されるとしてもよい。プログラムコードは、入力デバイスを用いて入力されたデータに対して適用されて、上述した機能を実行して出力情報を生成する。出力情報は、1以上の出力デバイスに適用されるとしてもよい。当業者であれば、本発明はさまざまなシステム構成によって実施され得ることに想到し得る。そのようなシステム構成は、マルチプロセッサシステム、ミニコンピュータ、メインフレームコンピュータ、独立した家庭用電化製品等である。本発明はまた、タスクまたはその一部を実行するのは通信ネットワークを介してリンクされているリモート処理デバイスである分散コンピューティング環境において実施され得る。   Embodiments of the invention may be implemented using hardware, software, or a combination thereof, and may be implemented in one or more computer systems or other processing systems. The techniques described herein may be applied to any computing environment, consumer electronics environment, or processing environment. The technology relates to portable or fixed computers, portable information, comprising a processor, a storage medium (including volatile and non-volatile memory and / or storage elements), at least one input device, and one or more output devices. Terminal (PDA), set-top box, mobile phone and pager (registered trademark), consumer electronics (DVD (digital video disc) player, personal video recorder, personal video player, satellite receiver, stereo receiver, cable) (Including television receivers) as well as other electronic devices, which may be implemented in a program executed on a programmable machine. The program code is applied to data input using the input device, and executes the above-described function to generate output information. The output information may be applied to one or more output devices. One skilled in the art can appreciate that the present invention can be implemented with various system configurations. Such system configurations are multiprocessor systems, minicomputers, mainframe computers, independent household appliances, and the like. The invention may also be practiced in distributed computing environments where tasks or portions thereof are remote processing devices that are linked through a communications network.

各プログラムは、高級手続きプログラミング言語またはオブジェクト指向プログラミング言語で実装されて、処理システムと通信するとしてもよい。しかし、所望される場合、プログラムはアセンブリ言語または機械言語で実装されるとしてもよい。どの場合であっても、言語はコンパイルまたは解釈され得る。   Each program may be implemented in a high level procedural programming language or an object oriented programming language to communicate with the processing system. However, if desired, the program may be implemented in assembly language or machine language. In any case, the language can be compiled or interpreted.

プログラム命令に基づいて、当該命令でプログラミングされた汎用または特定用途向け処理システムに、本明細書に記載した処理を実行させるとしてもよい。これに代えて、当該処理は、当該処理を実行するハードワイヤードロジックを備える特定のハードウェア素子によって実行されるとしてもよいし、プログラミングされたコンピュータ素子およびカスタムハードウェア素子の任意の組み合わせによって実行されるとしてもよい。本明細書に記載する方法は、処理システムまたはその他の電子デバイスをプログラミングして当該方法を実行させる命令を格納している機械アクセス可能媒体を含むコンピュータプログラム製品として提供されるとしてもよい。本明細書において「機械アクセス可能媒体」という用語は、機械で実行される命令列を格納または符号化することができ、本明細書で記載した方法のうち任意の1つを機械に実行させるものであればどのような媒体をも含むとする。したがって「機械アクセス可能媒体」という用語は、これらに限定されるものではないが、固体メモリ、光学および磁気ディスク、およびデータ信号を符号化する搬送波を含むものとする。また、ソフトウェアとは、ある形態または別の形態によって(例えば、プログラム、手続き、プロセス、アプリケーション、モジュール、ロジック等)、動作を実行するかまたは、結果を生じさせるものと認識することは当該技術分野では普通である。このような表現は、プロセッサに動作を実行させるか、または結果を生成させる処理システムによるソフトウェアの実行を簡単に説明するためのものに過ぎない。   Based on a program instruction, a general-purpose or application-specific processing system programmed with the instruction may execute the processing described in this specification. Alternatively, the process may be performed by a specific hardware element with hardwired logic that performs the process, or by any combination of programmed computer elements and custom hardware elements. It may be. The methods described herein may be provided as a computer program product that includes a machine-accessible medium that stores instructions that cause a processing system or other electronic device to be programmed to perform the method. As used herein, the term “machine-accessible medium” can store or encode a sequence of instructions to be executed on a machine and cause the machine to perform any one of the methods described herein. Any medium can be included. Thus, the term “machine accessible medium” is intended to include, but is not limited to, solid state memory, optical and magnetic disks, and a carrier wave that encodes a data signal. In addition, it is recognized in the art that software is recognized as performing an operation or producing a result in one form or another form (for example, a program, procedure, process, application, module, logic, etc.). Then it is normal. Such a representation is merely intended to briefly describe the execution of software by a processing system that causes a processor to perform an operation or generate a result.

本発明のさまざまな実施形態を上述したが、それらの実施形態は例示を目的としたものであって本発明を限定するものではないと理解されたい。本願特許請求の範囲で定義される本発明の精神および範囲から逸脱することなく、構造および詳細な内容をさまざまに変更し得ることは、当業者には明らかである。このため、本発明の広さおよび範囲は、前述した実施形態例のいずれによっても限定されるべきではなく、本願特許請求の範囲およびその均等物によって定義されるべきである。   While various embodiments of the invention have been described above, it is to be understood that these embodiments are for purposes of illustration and are not intended to limit the invention. It will be apparent to those skilled in the art that various modifications can be made in the structure and details without departing from the spirit and scope of the invention as defined in the claims. Therefore, the breadth and scope of the present invention should not be limited by any of the above-described exemplary embodiments, but should be defined by the appended claims and their equivalents.

Claims (19)

プロセッサを備えるコンピュータが、EFI前初期化(PEI)におけるグローバル変数読み書き動作を可能とする方法であって、
前記プロセッサが、コードセクション、データセクション、および再配置セクションを有するドライバイメージを生成する段階と、
前記プロセッサが、前記ドライバイメージに対して第1回目の修正を実施して、すべてのアドレスデータ項目を不揮発性メモリ絶対アドレスによって修正する段階と、
前記プロセッサが、前記ドライバイメージに対して第2回目の修正を実施して、ランダムアクセスメモリ(RAM)としてのキャッシュ絶対アドレスによって前記データセクションを指し示す、前記第1回目の修正で修正されたすべてのアドレスデータ項目を修正する段階と、
前記プロセッサが、前記修正されたドライバイメージを不揮発性メモリデバイスに焼き付ける段階と
を備え、
前記プロセッサが、前記不揮発性メモリデバイスのブート時に、前記焼き付けられたドライバイメージの前記データセクションをRAMとしてのキャッシュ(CAR)に複写し、前記コードセクションの実行可能コードを実行することによって、スタティック変数およびグローバル変数は前記CARから読み書きアクセスが可能となる
方法。
A computer comprising a processor enables a global variable read / write operation in EFI pre-initialization (PEI),
The processor generates a driver image having a code section, a data section, and a relocation section;
The processor performs a first modification to the driver image to modify all address data items with non-volatile memory absolute addresses;
All the processor, to implement the second round fixing to the driver image, the cache absolute address as a random access memory (RAM), said pointing to data section, were fixed in the first round fixing Modifying the address data item of
The processor comprises burning the modified driver image to a non-volatile memory device;
When the non-volatile memory device boots, the processor copies the data section of the burned driver image to a cache (CAR) as RAM and executes the executable code of the code section to And global variables can be read / written from the CAR.
前記ドライバイメージは、Portable Executable 32(PE32)イメージを含む
請求項1に記載の方法。
The method of claim 1, wherein the driver image comprises a Portable Executable 32 (PE32) image.
前記ドライバイメージは、前記不揮発性メモリで実行される
請求項1または2に記載の方法。
The driver image The method of claim 1 or 2 is executed in the nonvolatile memory.
前記不揮発性メモリは、フラッシュメモリデバイスを含む
請求項1から3のいずれか1項に記載の方法。
The method according to claim 1, wherein the non-volatile memory includes a flash memory device.
前記プロセッサが前記第1回目の修正を実施する段階は、
前記プロセッサが、前記再配置セクション内の各ポイントを解析する段階と、
前記プロセッサが、前記再配置セクション内の各ポイントに対応付けられている各アドレスデータ項目を、前記不揮発性メモリ絶対アドレスで更新する段階と
を有する
請求項1から4のいずれか1項に記載の方法。
The processor performing the first modification comprises:
The processor analyzing each point in the relocation section;
The processor according to any one of claims 1 to 4 , further comprising: updating each address data item associated with each point in the relocation section with the non-volatile memory absolute address. Method.
前記プロセッサが、第2回目の修正を実施する段階は、
前記プロセッサが、前記第1回目の修正において修正された前記アドレスデータ項目が前記データセクションを指し示しているか否か判断する段階と、
前記プロセッサが、前記第1回目の修正において修正された前記アドレスデータ項目が前記データセクションを指し示している場合には、前記修正されたアドレスデータ項目を前記キャッシュ絶対アドレスで更新する段階と
を有する
請求項1から5のいずれか1項に記載の方法。
The processor performs the second correction,
The processor determining whether the address data item modified in the first modification points to the data section;
The processor includes the step of updating the modified address data item with the cache absolute address if the address data item modified in the first modification points to the data section. Item 6. The method according to any one of Items 1 to 5 .
プロセッサを備えるコンピュータが、EFI前フェーズでグローバル変数を利用する方法であって、
前記プロセッサが、コード部分、データ部分および再配置部分を有するドライバイメージの前記再配置部分を用いて、不揮発性メモリベースで前記ドライバイメージのアドレスデータ項目を修正する第1回目の修正、および、ランダムアクセスメモリ(RAM)としてのキャッシュ絶対アドレスによって、前記データ部分を指し示す、前記第1回目の修正で修正されたすべてのアドレスデータ項目を修正する第2回目の修正を実施して前記コード部分にパッチを適用し、前記パッチが適用されたコードを不揮発性メモリに焼き付ける段階と、
前記プロセッサが、ランダムアクセスメモリ(RAM)として利用されているプロセッサキャッシュの領域に前記データ部分を複写する段階と、
前記プロセッサが、前記ドライバイメージを実行するために前記ドライバイメージのイメージエントリポイントに制御を移行する段階と
を備え、
前記グローバル変数は、RAMとして利用されている前記プロセッサキャッシュからアクセスされる
方法。
A computer comprising a processor uses a global variable in the pre-EFI phase,
A first modification in which the processor modifies an address data item of the driver image on a non-volatile memory basis using the relocation portion of the driver image having a code portion, a data portion and a relocation portion; and a random Patch the code portion by performing a second modification that modifies all address data items modified in the first modification, pointing to the data part by an absolute cache address as an access memory (RAM) Applying the patch and burning the patch-applied code in a non-volatile memory;
The processor copying the data portion to an area of a processor cache that is utilized as random access memory (RAM);
The processor transfers control to an image entry point of the driver image to execute the driver image; and
The global variable is accessed from the processor cache used as RAM.
不揮発性メモリは、フラッシュメモリデバイスを含む
請求項に記載の方法。
The method of claim 7 , wherein the non-volatile memory comprises a flash memory device.
EFI前初期化(PEI)フェーズにおけるグローバル変数の利用を可能とする電子デバイスであって、
プロセッサと、
コード部分、データ部分、および再配置部分を有する実行可能ドライバイメージと、
前記実行可能ドライバイメージを格納する不揮発性メモリと、
プロセッサキャッシュと
を備え、
前記コード部分は実行可能コードを含み、前記データ部分は前記実行可能コードによって利用されるデータを含み、前記再配置部分は、前記実行可能ドライバイメージの第1回目の修正時に不揮発性メモリ絶対アドレスによって更新されるアドレスデータ項目すべての情報を含み、
前記プロセッサキャッシュの領域は、ランダムアクセスメモリ(RAM)としてのキャッシュ(CAR)として利用され、
前記実行可能ドライバイメージの前記データ部分は、前記プロセッサが前記実行可能ドライバイメージを実行している間における前記CARでのスタティック変数およびグローバル変数の処理を可能にするべく、前記実行可能ドライバイメージに対して前記第1回目の修正および、前記RAMとしてのキャッシュ絶対アドレスによって、前記データ部分を指し示す、前記第1回目の修正で修正されたすべてのアドレスデータ項目を修正する第2回目の修正を実施した後に、前記CARに複写される
電子デバイス
An electronic device that enables the use of global variables in the EFI pre-initialization (PEI) phase,
A processor;
An executable driver image having a code portion, a data portion, and a relocation portion;
A nonvolatile memory you store the executable driver image,
With processor cache,
The code portion includes executable code, the data portion includes data utilized by the executable code, and the relocation portion is determined by a non-volatile memory absolute address during a first modification of the executable driver image. Contains information on all address data items to be updated,
The processor cache area is used as a random access memory (RAM) cache (CAR),
The data portion of the executable driver image is stored in the executable driver image to allow processing of static and global variables in the CAR while the processor is executing the executable driver image. The first correction and the second correction that corrects all the address data items corrected in the first correction that point to the data portion by the cache absolute address as the RAM were performed. Later copied to the CAR
Electronic devices .
前記実行可能ドライバイメージの前記第1回目の修正および前記第2回目の修正の後、前記実行可能ドライバイメージの実行前に、前記実行可能ドライバイメージを前記不揮発性メモリに焼き付ける
請求項に記載の電子デバイス
After the executable said driver image first round fixing and the second round fixing, before execution of the executable driver image, according to claim 9, baking the executable driver image in the non-volatile memory Electronic devices .
前記不揮発性メモリは、フラッシュメモリデバイスを含む
請求項9または10に記載の電子デバイス
The electronic device according to claim 9 or 10 , wherein the nonvolatile memory includes a flash memory device .
コンピュータに、
コードセクション、データセクション、および再配置セクションを有するドライバイメージ生成する段階と
前記ドライバイメージに対して第1回目の修正実施て、アドレスデータ項目すべて不揮発性メモリ絶対アドレスで修正する段階と
前記ドライバイメージに対して第2回目の修正実施て、前記データセクションを指し示す、前記第1回目の修正で修正されたアドレスデータ項目すべて、ランダムアクセスメモリ(RAM)としてのキャッシュ絶対アドレスで修正する段階と
前記修正されたドライバイメージ不揮発性メモリデバイスに焼き付ける段階と
前記不揮発性メモリデバイスのブート時に、前記焼き付けられたドライバイメージの前記データセクションRAMとしてのキャッシュ(CAR)に複写する段階と
を実行させるためのプログラムであり
前記コードセクションの実行可能コードの実行中においてスタティック変数およびグローバル変数は前記CARから読み書きアクセスが可能となる
プログラム
On the computer,
Generating a driver image with a code section, data section and relocation section,
And performing a first round fixing to the driver image, the step of modifying all address data items in non-volatile memory absolute address,
And performing a second round fixing to the driver image, the point to the data section, all said modified address data items in the first round fixing, the cache absolute address as a random access memory (RAM) A stage to fix,
A step that baking the modified driver image in the non-volatile memory device,
Copying the data section of the burned driver image to a cache (CAR) as RAM upon booting of the non-volatile memory device ;
Is a program for executing
During execution of executable code in the code section, static variables and global variables can be read and written from the CAR.
Program .
前記ドライバイメージは、Portable Executable 32(PE32)イメージを含む
請求項12に記載のプログラム
The program according to claim 12 , wherein the driver image includes a Portable Executable 32 (PE32) image.
前記ドライバイメージは、前記不揮発性メモリで実行される
請求項12または13に記載のプログラム
The program according to claim 12 or 13 , wherein the driver image is executed in the nonvolatile memory.
前記不揮発性メモリは、フラッシュメモリデバイスを含む
請求項12から14のいずれか1項に記載のプログラム
The program according to claim 12 , wherein the nonvolatile memory includes a flash memory device.
第1回目の修正を実施する段階は、
前記再配置セクション内の各ポイントを解析する段階と、
前記再配置セクション内の各ポイントに対応付けられている各アドレスデータ項目を、前記不揮発性メモリ絶対アドレスで更新する段階
を有する
請求項12から15のいずれか1項に記載のプログラム
The stage of the first revision is
Comprising the steps of analyzing each point in the relocation section,
Wherein each address data item associated with each point in the relocation section, the program according to any one of claims 12 to 15 and a step of updating by the non-volatile memory absolute address.
第2回目の修正を実施する段階は、
前記第1回目の修正において修正された前記アドレスデータ項目が前記データセクションを指し示しているか否か判断する段階と、
前記第1回目の修正において修正された前記アドレスデータ項目が前記データセクションを指し示している場合には、前記修正されたアドレスデータ項目を前記キャッシュ絶対アドレスで更新する段階
を有する
請求項12から16のいずれか1項に記載のプログラム
The stage of the second revision is
The method comprising the said address data items fixed in the first round fixing, it is determined whether or not point to the data section,
Wherein when the first round of the address data items that were fixed in fix points to the data section, claims 12 and a step of updating the corrected address data item in the cache absolute address 16 The program according to any one of the above.
コンピュータに、
コード部分、データ部分および再配置部分を有するドライバイメージの前記再配置部分を用いて、不揮発性メモリベースで前記ドライバイメージのアドレスデータ項目を修正する第1回目の修正、および、ランダムアクセスメモリ(RAM)としてのキャッシュ絶対アドレスによって、前記データ部分を指し示す、前記第1回目の修正で修正されたすべてのアドレスデータ項目を修正する第2回目の修正を実施して前記コード部分にパッチを適用し、前記パッチが適用されたコードを不揮発性メモリに焼き付ける段階と、
ランダムアクセスメモリ(RAM)として利用されているプロセッサキャッシュの領域に前記データ部分複写する段階と
前記ドライバイメージを実行するために前記ドライバイメージのイメージエントリポイントに制御移行する段階と
を実行させるためのプログラムであり、
グローバル変数は、RAMとして利用されている前記プロセッサキャッシュからアクセスされる
プログラム
On the computer,
A first modification to modify an address data item of the driver image on a non-volatile memory basis using the relocation portion of the driver image having a code portion, a data portion and a relocation portion; and a random access memory (RAM) ) To apply the patch to the code part by performing a second modification that modifies all address data items modified in the first modification, pointing to the data part by the cache absolute address as Burning the patched code into non-volatile memory;
Copying the data portion to an area of a processor cache being utilized as random access memory (RAM);
The method comprising transferring control to an image entry point of the driver image for execution of the driver image,
Is a program for executing
Global variables are accessed from the processor cache used as RAM.
Program .
不揮発性メモリは、フラッシュメモリデバイスを含む
請求項18に記載のプログラム
The program according to claim 18 , wherein the nonvolatile memory includes a flash memory device.
JP2009519776A 2006-07-18 2006-07-18 How to use global variables for PEI modules in EFI based firmware Expired - Fee Related JP4961019B2 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2006/001746 WO2008014635A1 (en) 2006-07-18 2006-07-18 A method to use global variables for pre-efi initialization modules in efi-based firmware

Publications (2)

Publication Number Publication Date
JP2009544085A JP2009544085A (en) 2009-12-10
JP4961019B2 true JP4961019B2 (en) 2012-06-27

Family

ID=38996845

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009519776A Expired - Fee Related JP4961019B2 (en) 2006-07-18 2006-07-18 How to use global variables for PEI modules in EFI based firmware

Country Status (5)

Country Link
EP (1) EP2047364A4 (en)
JP (1) JP4961019B2 (en)
KR (1) KR101036675B1 (en)
CN (1) CN101484878B (en)
WO (1) WO2008014635A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8463998B1 (en) 2002-12-13 2013-06-11 Open Text S.A. System and method for managing page variations in a page delivery cache
CN101599043B (en) * 2008-06-02 2013-07-17 松下电器产业株式会社 Method and system for tracking correlation information of document
CN105446842B (en) * 2015-12-03 2019-01-04 南京南瑞继保电气有限公司 A kind of ADI DSP code in-service monitoring method
CN105426223B (en) * 2015-12-25 2019-01-04 百度在线网络技术(北京)有限公司 Using loading method and device
CN105630559B (en) * 2015-12-25 2018-12-28 广州视源电子科技股份有限公司 Board card firmware burning method and system
CN107450953B (en) * 2017-08-01 2020-08-04 合肥联宝信息技术有限公司 Method and device for updating BIOS
CN110990072A (en) * 2019-11-08 2020-04-10 杭州智控网络有限公司 Price tag screen multi-drive dynamic loading method

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59125421A (en) * 1983-01-04 1984-07-19 Nec Corp Initialization system of computer applied equipment
EP0429252B1 (en) * 1989-11-17 1998-01-14 Digital Equipment Corporation System and method for storing firmware in relocatable format
US6298440B1 (en) * 1994-04-22 2001-10-02 Microsoft Corporation Method and system for providing multiple entry point code resources
JPH1153249A (en) * 1997-08-07 1999-02-26 Sharp Corp Memory managing method
JP2001195258A (en) * 2000-01-12 2001-07-19 Mitsutoyo Corp Computer built-in system
US20040103272A1 (en) * 2002-11-27 2004-05-27 Zimmer Vincent J. Using a processor cache as RAM during platform initialization
JP2004348677A (en) * 2003-05-26 2004-12-09 Sony Corp Program and information processing method
KR100658918B1 (en) * 2004-03-29 2006-12-15 주식회사 팬택앤큐리텔 Apparatus and method for initialization of system global variables using block input/output command
US7730472B2 (en) * 2004-09-24 2010-06-01 Hewlett-Packard Development Company, L.P. Dynamic linking of modules in a pre-operating system environment

Also Published As

Publication number Publication date
EP2047364A1 (en) 2009-04-15
EP2047364A4 (en) 2009-08-05
CN101484878A (en) 2009-07-15
CN101484878B (en) 2012-11-28
KR20090035521A (en) 2009-04-09
WO2008014635A1 (en) 2008-02-07
KR101036675B1 (en) 2011-05-24
JP2009544085A (en) 2009-12-10

Similar Documents

Publication Publication Date Title
JP4961019B2 (en) How to use global variables for PEI modules in EFI based firmware
US10078498B2 (en) Method, apparatus, system, and non-transitory computer readable medium for extending at least one function of a package file
EP3267308B1 (en) Application loading method and device
US6876996B2 (en) Method and apparatus for using a shared library mechanism to facilitate sharing of metadata
US9891939B2 (en) Application compatibility with library operating systems
US7181610B2 (en) Method and system to encapsulate a driver written for an operating system (OS) runtime environment in an OS independent environment firmware extension
JP2005509194A (en) Method and apparatus for creating and using pre-internalized program files
US20070033322A1 (en) Method for firmware variable storage with eager compression, fail-safe extraction and restart time compression scan
US7721258B2 (en) Integrated development environment with managed platform registry
US20070011674A1 (en) Computer system and method for selectively installing one operating system among a plurality of operating systems
US20070076475A1 (en) System and method for executing binary images
CN101026826B (en) System and method for providing monolithic image for use in a wireless device
WO2007134647A1 (en) Move data facility with user selectable address spaces
US20190243659A1 (en) System and method for boot speed optimization using non-volatile dual in-line memory modules
EP1857926B1 (en) Move data facility with user selectable storage access keys
US10235147B2 (en) Discovery and activation of application extensions
US20100050174A1 (en) Heap organization for a multitasking virtual machine
KR20080039080A (en) Terminal having an interfacing function of the heterogeneity language compile library, api calling method and compile function generating method
EP1826668A1 (en) Fast patch-based method calls
CN113254089B (en) System boot method correction method, device, equipment and storage medium
US20060230190A1 (en) Method and apparatus for executing application in system having NAND flash memory
KR100478463B1 (en) Dynamic Linking Method for Application Program
CN113646744A (en) Widening memory accesses to aligned addresses for unaligned memory operations
US7831965B1 (en) Method and apparatus for facilitating intermediate linking of binary files in a virtual machine
CN112732284B (en) Installation method, installation device, installation equipment and computer readable storage medium

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111028

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111115

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120214

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120306

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120323

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150330

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees