WO2008014635A1

A method to use global variables for pre-efi initialization modules in efi-based firmware

Abstract

A method for enabling global variable read/write operations in a pre-EFI Initialization (PEI). The method includes the generation of a driver image. The driver image includes at least a code (i.e., text) section, a data section, and a relocation section. A first round fixing on the driver image is performed to fix all address data items with absolute non-volatile memory addresses. A second round fixing on the driver image is performed to fix all address data items fixed in the first round fixing that point to the data section with absolute Cache-As-RAM (Cache-As-Random Access Memory) addresses. The fixed driver image is burned into a non-volatile memory device. Upon booting the non-volatile memory device, the data section of the burned driver image is copied to a Cache-As-RAM (CAR), wherein execution of executable code in the text section enables static and global variables to have read/write access from the CAR.

WO2008014635A1, drawing sheet 1
Sheet 1 of 5

Term

No projected expiry on record.

  1. Priority and filed
  2. Published
  3. Today

26 claims: 5 independent, 21 dependent

  1. 1
    What Is Claimed Is:1. A method for enabling global variable read/write operations in a pre-EFI Initialization (PEI) comprising: generating a driver image, the driver image comprising a code section, a data section, and a relocation section;performing a first round fixing on the driver image to fix all address data items with absolute non-volatile memory addresses;performing a second round fixing on the driver image to fix all address data items fixed in the first round fixing that point to the data section with absolute Cache-As-RAM (Cache-As-Random Access Memory) addresses;and burning the fixed driver image into a non-volatile memory device, wherein upon booting the non-volatile memory device, the data section of the burned driver image is copied to a Cache-As-RAM (CAR), wherein execution of executable code in the code section enables static and global variables to have read/write access from the CAR.
  2. 7
    A method for using global variables in a pre-EFI phase comprising:separating a data portion from a code portion and a relocation portion of a driver image;copying the data portion to a region of a processor cache used as RAM (Random Access Memory);and transferring control to an image entry point of the driver image for execution of the driver image, wherein the global variables are accessed from the processor cache used as RAM.
  3. 12
    A mechanism for enabling the use of global variables during a pre-EFI Initialization (PEI) phase comprising:an executable driver image including a code portion, a data portion, and a relocation portion, the code portion comprising executable code, the data portion comprising data to be used by the executable code, and the relocation portion comprising information for all address data items to be updated with an absolute nonvolatile memory address during a first round fixing of the executable driver image;a non-volatile memory to store and execute the executable driver image;and a processor cache, wherein a region of the processor cache to be used as Cache-As-RAM (Random Access Memory) (CAR), the data portion of the executable driver image to be copied to the CAR after the first round fixing and a second round fixing of the executable driver image to enable static and global variables to operate in the CAR during execution of the executable driver image.
  4. 16
    An article comprising:a storage medium having a plurality of machine accessible instructions, wherein when the instructions are executed by a processor, the instructions provide for generating a driver image, the driver image comprising a code section, a data section, and a relocation section;performing a first round fixing on the driver image to fix all address data items with absolute non-volatile memory addresses;performing a second round fixing on the driver image to fix all address data items fixed in the first round fixing that point to the data section with absolute Cache-As-RAM (Cache-As-Random Access Memory) addresses;and burning the fixed driver image into a non-volatile memory device, wherein upon booting the non-volatile memory device, the data section of the burned driver image is copied to a Cache-As-RAM (CAR), wherein during execution of executable code in the code section enables static and global variables to have read/write access from the CAR.
  5. 22
    An article comprising:a storage medium having a plurality of machine accessible instructions, wherein when the instructions are executed by a processor, the instructions provide for separating a data portion from a code portion and a relocation portion of a driver image;copying the data portion to a region of a processor cache used as RAM (Random Access Memory);and transferring control to an image entry point of the driver image for execution of the driver image, wherein the global variables are accessed from the processor cache used as RAM.