US20070076475A1 - System and method for executing binary images - Google Patents

System and method for executing binary images Download PDF

Info

Publication number
US20070076475A1
US20070076475A1 US11/539,849 US53984906A US2007076475A1 US 20070076475 A1 US20070076475 A1 US 20070076475A1 US 53984906 A US53984906 A US 53984906A US 2007076475 A1 US2007076475 A1 US 2007076475A1
Authority
US
United States
Prior art keywords
computer
memory
instructions
executable instructions
computer system
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.)
Abandoned
Application number
US11/539,849
Inventor
Michael Malueg
Larry Morris
Bor-Ming Hsieh
Yadhu Gopalan
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.)
Microsoft Technology Licensing LLC
Original Assignee
Microsoft 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 Microsoft Corp filed Critical Microsoft Corp
Priority to US11/539,849 priority Critical patent/US20070076475A1/en
Publication of US20070076475A1 publication Critical patent/US20070076475A1/en
Assigned to MICROSOFT TECHNOLOGY LICENSING, LLC reassignment MICROSOFT TECHNOLOGY LICENSING, LLC ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: MICROSOFT CORPORATION
Abandoned legal-status Critical Current

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/44568Immediately runnable code
    • G06F9/44573Execute-in-place [XIP]

Definitions

  • Execute in place (XIP) images are fixed position images and are built to execute on a CPU or processor from a specific location in a computer memory device. The location must be accessible in a linear format so that the CPU can fetch and execute individual instructions; thus, DRAM and NOR flash memory are commonly used memory storage devices that are used for XIP image execution.
  • Block addressable devices such as disk storage systems are generally not usable for execute in place images because memory in such devices must be read one block at a time and is not addressable at the individual instruction level.
  • Contemporary computer systems combine various types of memory and storage subsystems such flash memory, ROM, RAM, and disk storage.
  • Read access times can vary greatly among various storage devices and often influences the combination of the various storage subsystems to maximize cost and performance.
  • the following list of devices have read access times that are listed in order starting with the shortest read access time to the longest read access times): SDRAM, flash memory (NAND and NOR are not differentiated, it depends on read mode), and then disk drives.
  • flash memory NAND and NOR are not differentiated, it depends on read mode
  • disk drives For non-volatile memory types, erase and write times, or the ability to update data, also varies greatly among device types.
  • the following device types are listed in order starting with the shortest write times: NAND flash memory, NOR flash memory, and then disk drives.
  • SDRAM has the fastest erase and write times.
  • NAND flash memory typically does not support executing code in place from the flash memory part and thus typically requires a linear non-volatile memory solution such as NOR flash memory or ROM for boot-time initialization.
  • NAND vendors offers hybrid designs like NAND flash memory with a small NOR boot block or logic designs that enable a CPU to read from a particular good NAND block at reset time to address this issue.
  • NOR flash memory provides non-volatile storage. Typically there is no BIOS or boot loader present, this means that code execution will need to start from the NOR flash memory at CPU reset, thus prohibiting compression of the entire image to save space and perhaps allow for a smaller NOR part.
  • Non-writeable ROM most likely production masked ROM, provides non-volatile storage.
  • the topology is very similar to NOR flash memory with the same design trade offs.
  • the main benefit of ROM designs over NOR flash memory is typically related to the cost advantage, depending on volumes, of replacing the NOR flash memory with a ROM part.
  • a downside is effectively the lack of a real software upgrade path for field devices other than physical replacement of the ROM part.
  • a single NAND flash memory device provides non-volatile storage. Because NAND is a block device and does not support a linear interface, the CPU cannot directly execute code stored in NAND flash memory. As a result, for this configuration to work, conventionally a non-volatile linear storage area is required—many hybrid NAND flash memory parts contain a small linear NOR region called a boot block.
  • NAND flash memory is a block-accessed storage device, very much like a conventional electro-mechanical disk drive with a serial interface. For this reason, NAND flash memory is generally not suitable for XIP solutions because the CPU requires program memory to be linear. Instead, NAND flash memory images are typically moved to DRAM during execution either at boot time or by OS paging. This ties the cost of NAND flash memory-based devices more closely to the fluctuating DRAM market prices.
  • the typically shorter erase and write access times for NAND flash memory over conventional linear flash memory is an advantage. Read access times for both NAND flash memory and conventional linear flash memory are comparable.
  • the erase cycle is typically an order of magnitude greater than linear flash memory, thereby extending the lifespan of the NAND flash memory part. This cost-per-byte benefit and the larger storage sizes offset the added complexity involved in the NAND solution and any additional expense in DRAM.
  • the standard ATA or IDE hard disk drive can also be a good choice for image storage.
  • disk drives are non-linear, block-accessed devices. This means that a CPU cannot directly execute (XIP) code from disk. Instead, the XIP code must first be copied to linear memory (DRAM), where the CPU can execute it. Read and write access times are significantly longer than that of solid-state devices, but the storage capacity of disk drives is much larger.
  • the invention provides a file system that determines where a particular operating system (OS) component is stored on a medium and loads the component into RAM for execution, providing the ability to demand page specific components at will from storage media, freeing up working RAM on memory constrained devices.
  • OS operating system
  • the invention provides a Binary File System (BinFS), a generic “block driver-agnostic” component that loads the OS from a block based permanent storage medium.
  • BinFS Binary File System
  • the invention thus allows the OS to load code that was previously Executed In Place (XIP) from a block oriented device. The OS image remains “fixed up” as it was previously, but can advantageously be obtained using the file system of the invention.
  • FIG. 1 is a diagram depicting a computer system wherein aspects of the invention may be incorporated;
  • FIG. 2 is a layout of an XIP program that may be used in conjunction with the invention
  • FIG. 3 is an illustration of XIP files being stored in a non-linear, block-addressable storage device in accordance with the invention
  • FIG. 4 is a block diagram of a system incorporating a binary file system in accordance with aspects of the invention.
  • FIG. 5 is a diagram depicting an XIP header and other identifying information for use with the invention.
  • FIG. 6 is a flow chart of an operation incorporating aspects of the invention.
  • FIG. 1 illustrates functional components of a computer 100 , such as a handheld computer, wherein aspects of the invention can be incorporated.
  • the computer 100 represents many processing systems, such as desktop computers, notebook system, portable wireless communication handsets, palmtops, personal digit assistants (PDAs), pocket personal computers (PCs), portable gaming systems, multimedia systems, the combination of any of the above example devices and/or systems, and other similar computer devices.
  • Computer 100 includes a processor 102 , RAM 104 , Non-linear memory device 110 , a power supply 110 , display 112 and input/output interfaces 114 .
  • RAM 104 is a volatile memory. Resident on the RAM is file system RAM 106 and execution area RAM 108 .
  • Non-linear memory device 110 exemplifies non-linear memory devices for computer 100 .
  • Non-linear memory device 110 can be any memory device where the CPU cannot fetch individual addresses; rather the memory device must be read in blocks.
  • the non-linear memory is implemented in NAND flash memory although any type of non-linear memory device can be used such as a disk drive system.
  • the computer 100 has a power supply 110 that is may implemented through rechargeable batteries.
  • the power supply 110 may further include an external power that overrides or recharges the built-in batteries, such as an AC adapter or powered docking cradle.
  • the display 112 can take many forms such as a screen, touch screen, LEDs, etc.
  • the input/output interfaces 114 can also take many forms depending on the computer 100 such as a keyboard, IR port, serial port, and so forth.
  • the computer 100 can include more than one of any of the aforementioned elements. Other elements such as touch pads, vibrating devices, wireless communication components and so forth are not shown, but could easily be a part of the exemplary computer 100 .
  • FIG. 2 shows an exemplary implementation of a binary image 200 stored in memory 110 .
  • the image 200 is logically partitioned into a plurality of separate independent regions 202 - 214 .
  • Each of the regions 202 - 214 can be logically viewed as a plurality of independent binary images that form a set of binary image 200 that may interact together such as applications, DLLs, drivers, etc.
  • each region is shown as being contiguous, it is possible that the actual logical and/or physical address locations for each region may be at various arbitrary areas in a non-linear memory 110 that are not necessarily contiguous.
  • Each of the regions 202 - 214 can also vary in size depending on the contents intended for a particular region.
  • Each of the regions 202 - 214 are intended to store executable binary programs (hereinafter referred to as application programs), the contents of which are represented by A-G.
  • application programs executable binary programs
  • A-G executable binary programs
  • an application program is assigned to one specific region.
  • related applications and related miscellaneous items are usually placed in a single binary region to make updates easier.
  • An application program is generally restricted to a specific region to reduce the size of files needed to be downloaded when updating an application program.
  • the binary image 200 is generally created by an image fix-up tool that takes relative addressed instructions that are created by a compiler, or similar tool that generates computer code that is executable by a CPU, and creates absolute addressed instructions that will reside and run from a particular memory location i.e. so that they can be fetched by a CPU for execution.
  • the image fix up tool will create address links to other stand alone code such as DLL's etc. So that when the image fix-up tool is finished, the entire binary image 200 for performing a particular set of operations is completed and ready for execution in place (XIP).
  • FIG. 3 illustrates an aspect of the invention wherein one or more binary images 200 are stored on a non-linear memory device 110 (e.g., block addressable storage device such as a disk storage device).
  • the one or more binary images 200 for a part of an XIP memory image 304 ′ that forms a virtual memory 404 that can be executed by processor 102 .
  • the non-linear storage device 110 can be partitioned and continue to function as a normal non-linear storage device.
  • a disk storage device 110 is partitioned into a XIP space 304 and a FAT space 302 .
  • the virtual memory space 304 ′ into which the XIP memory 304 maps may also comprise a conventional R/W area 306 that may contain variables that are read to and written by processor 102 . That is, XIP area 304 ′ or virtual memory is non-writable. Thus, there is a portion 306 of virtual memory space that is readable and writeable and can contain an object store, code, a ram disk, etc. Interestingly, a ram disk itself may be used by the invention as the underlying non-linear memory device 110 .
  • FIG. 4 further illustrates aspects of the invention.
  • the underlying non-linear memory device 110 is addressed using a conventional block driver 416 that accesses the XIP partition 304 or the FAT partition 302 and retrieves blocks of memory, e.g., a disk sector.
  • the XIP partition 304 contains one or more binary images, e.g., Bin 1 200 a , Bin 2 200 b , Bin n 200 n .
  • XIP space 304 maps to the XIP area 304 ′ in virtual memory 404 .
  • the XIP space 304 is mapped into XIP area 304 ′ by Binary File System 410 .
  • Binary File System 104 retrieves blocks of memory representing portions of binary images 200 a - 200 n from non-linear memory 110 and loads them into physical memory 104 as needed.
  • file system driver 414 access files from the FAT partition of memory device 110 .
  • Loader 412 then fixes up the absolute memory addresses as necessary. That is loader 412 consolidates exe files, DLL files, and so on and generates a binary image in the conventional manner which can then be loaded into virtual memory 404 .
  • Computer systems such as hand held computers generally create executable components in one of two different forms at build time: position independent, also called relocatable, forms; or fixed position, also called execute in place as described above (XIP), forms.
  • position independent also called relocatable, forms
  • XIP execute in place as described above
  • loader 412 fixes relocatable code to run at an available virtual memory RAM address dynamically chosen by the loader.
  • the benefit is an efficient use of system RAM without requiring the system to explicitly specify the RAM layout.
  • the downside is slightly longer load times as the OS loader handles the relocation.
  • the virtual memory is written to a portion of the non-linear memory such as a disk drive file in pages.
  • virtual memory may be stored in the FAT portion 302 of non-linear storage device 110 .
  • the pages are then loaded on demand from the virtual memory 404 into physical memory 104 .
  • a relatively small physical address space can be made to appear significantly larger by swapping pages between virtual memory and physical memory.
  • the page does not have to be swapped to virtual memory stored in the FAT portion 302 of non-linear memory device 110 .
  • the physical memory containing the portion of binary 200 a - 200 n can merely be over-written without swapping out the contents of physical memory. This is so because that binary 200 a - 200 n can simply be retrieved from the XIP space 304 as needed.
  • FIG. 5 shows a binary file 500 that is stored on a medium and illustrates an embodiment of a binary file having characteristics helpful in loading binary file 500 from a block storage device.
  • the binary file 500 includes an XIP entry header 502 , registry information 504 ; and a digital signature 506 .
  • the XIP entry header 502 contains information about the size of the binary code contained within section 504 and the start address for the region. In other implementations it is possible to include other information in the XIP entry header, such as the version of the software, a public key and so forth.
  • the digital signature 506 of the XIP file provides unique security information about the file 500 . This digital signature is checked against a security key. This guarantees that the software is legitimate prior to the software being installed in physical memory 104 . Having private keys ensures that only certain owners of a particular region can build and update contents of a binary 200 . Security also ensures that the binary file does not become replaced with corrupted unauthorized files, which could cause catastrophic failure for the computer 100 .
  • FIG. 6 is a flow chart illustrating a process 600 for creating and loading XIP binary files in accordance with an aspect of the invention.
  • XIP binary files are created.
  • the ROM Image Builder tool, Romimage.exe is a build tool for WINDOWS CE that runs in the final phase of the build process.
  • Romimage.exe performs the following functions:
  • the boot loader is the first bit of code to run on a device after hardware reset or startup with the possible exception of BIOS/POST code.
  • the boot loader is responsible for locating, loading, and executing the OS image.
  • the loader typically resides in CPU-accessible linear memory, although there are instances where the loader resides on a block-accessed device such as a disk drive or NAND flash memory, for example, the BIOS boot loader which relies on the PC BIOS bootstrap process to load it into RAM and execute it.
  • the boot loader When searching for a valid OS image to load, the boot loader will typically look in local storage first. Verifying that an image is valid can involve checking the signature of the stored image—such as hashing the important contents of the image and then generating a digital certificate, which is compared against the image—or can be based on a simpler validation like a checksum.
  • the binary file system in accordance with the present invention is also loaded into memory.
  • the binary file system then scans the XIP partition 304 for XIP binary files.
  • the files are scanned by scanning the binary file header and other information as described in connection with FIG. 5 .
  • the virtual memory space is reserved by requesting memory locations and spaces required to run each XIP binary file.
  • various applications needed to run the system are loaded into memory such as drivers and so on.
  • the scanned binary files are then tracked and paged into virtual memory as needed as indicated by block 620 .
  • Physical memory is managed using the rest of the virtual memory as in a typical virtual memory system.
  • the various techniques described herein may be implemented with hardware or software or, where appropriate, with a combination of both.
  • the methods and apparatus of the present invention may take the form of program code (i.e., instructions) embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other machine-readable storage medium, wherein, when the program code is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention.
  • the computer will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device.
  • One or more programs are preferably implemented in a high level procedural or object oriented programming language to communicate with a computer system.
  • the program(s) can be implemented in assembly or machine language, if desired.
  • the language may be a compiled or interpreted language, and combined with hardware implementations.
  • the methods and apparatus of the present invention may also be embodied in the form of program code that is transmitted over some transmission medium, such as over electrical wiring or cabling, through fiber optics, or via any other form of transmission, wherein, when the program code is received and loaded into and executed by a machine, such as an EPROM, a gate array, a programmable logic device (PLD), a client computer, a video recorder or the like, the machine becomes an apparatus for practicing the invention.
  • a machine such as an EPROM, a gate array, a programmable logic device (PLD), a client computer, a video recorder or the like
  • PLD programmable logic device
  • client computer a client computer
  • video recorder or the like
  • the program code When implemented on a general-purpose processor, the program code combines with the processor to provide a unique apparatus that operates to perform the indexing functionality of the present invention.

Abstract

A system that determines where a particular XIP component is stored on a medium and loads the component into RAM for execution, providing the ability to demand page specific components at will from storage media, frees up working RAM on memory constrained devices. A Binary File System uses a generic block driver component that loads the XIP code from a block based storage medium. Features of the file system include the ability to load pre-“fixed up” components from a block based device.. The invention thus allows an operating system to load code that was previously Executed In Place (XIP) from a block-oriented device.

Description

    CROSS REFERENCE TO RELATED APPLICATION
  • This application is a Continuation of U.S. patent application Ser. No. 11/305,917, filed Dec. 19, 2005 (MSFT-4955), which is a Continuation of U.S. patent application Ser. No. 10/277,580, filed Oct. 21, 2002 (MSFT-1519). The invention relates generally to executing binary images and more particularly to systems and methods for executing binary images from non-linear storage systems.
  • TECHNICAL FIELD Background of the Invention
  • Execute in place (XIP) images are fixed position images and are built to execute on a CPU or processor from a specific location in a computer memory device. The location must be accessible in a linear format so that the CPU can fetch and execute individual instructions; thus, DRAM and NOR flash memory are commonly used memory storage devices that are used for XIP image execution. Block addressable devices such as disk storage systems are generally not usable for execute in place images because memory in such devices must be read one block at a time and is not addressable at the individual instruction level.
  • Contemporary computer systems combine various types of memory and storage subsystems such flash memory, ROM, RAM, and disk storage. Read access times can vary greatly among various storage devices and often influences the combination of the various storage subsystems to maximize cost and performance. For example, the following list of devices have read access times that are listed in order starting with the shortest read access time to the longest read access times): SDRAM, flash memory (NAND and NOR are not differentiated, it depends on read mode), and then disk drives. For non-volatile memory types, erase and write times, or the ability to update data, also varies greatly among device types. For example, the following device types are listed in order starting with the shortest write times: NAND flash memory, NOR flash memory, and then disk drives. SDRAM has the fastest erase and write times.
  • NAND flash memory typically does not support executing code in place from the flash memory part and thus typically requires a linear non-volatile memory solution such as NOR flash memory or ROM for boot-time initialization. NAND vendors offers hybrid designs like NAND flash memory with a small NOR boot block or logic designs that enable a CPU to read from a particular good NAND block at reset time to address this issue.
  • NOR flash memory provides non-volatile storage. Typically there is no BIOS or boot loader present, this means that code execution will need to start from the NOR flash memory at CPU reset, thus prohibiting compression of the entire image to save space and perhaps allow for a smaller NOR part.
  • Non-writeable ROM, most likely production masked ROM, provides non-volatile storage. The topology is very similar to NOR flash memory with the same design trade offs. The main benefit of ROM designs over NOR flash memory is typically related to the cost advantage, depending on volumes, of replacing the NOR flash memory with a ROM part. A downside is effectively the lack of a real software upgrade path for field devices other than physical replacement of the ROM part.
  • A single NAND flash memory device provides non-volatile storage. Because NAND is a block device and does not support a linear interface, the CPU cannot directly execute code stored in NAND flash memory. As a result, for this configuration to work, conventionally a non-volatile linear storage area is required—many hybrid NAND flash memory parts contain a small linear NOR region called a boot block.
  • NAND flash memory is a block-accessed storage device, very much like a conventional electro-mechanical disk drive with a serial interface. For this reason, NAND flash memory is generally not suitable for XIP solutions because the CPU requires program memory to be linear. Instead, NAND flash memory images are typically moved to DRAM during execution either at boot time or by OS paging. This ties the cost of NAND flash memory-based devices more closely to the fluctuating DRAM market prices.
  • The typically shorter erase and write access times for NAND flash memory over conventional linear flash memory is an advantage. Read access times for both NAND flash memory and conventional linear flash memory are comparable. In addition, the erase cycle is typically an order of magnitude greater than linear flash memory, thereby extending the lifespan of the NAND flash memory part. This cost-per-byte benefit and the larger storage sizes offset the added complexity involved in the NAND solution and any additional expense in DRAM.
  • The standard ATA or IDE hard disk drive can also be a good choice for image storage. Like NAND flash memory, disk drives are non-linear, block-accessed devices. This means that a CPU cannot directly execute (XIP) code from disk. Instead, the XIP code must first be copied to linear memory (DRAM), where the CPU can execute it. Read and write access times are significantly longer than that of solid-state devices, but the storage capacity of disk drives is much larger.
  • SUMMARY OF INVENTION
  • As a result of today's memory-intensive applications, services and media objects, devices have less and less working RAM available and correspondingly need more and more RAM to operate at the same performance level. In response, the invention provides a file system that determines where a particular operating system (OS) component is stored on a medium and loads the component into RAM for execution, providing the ability to demand page specific components at will from storage media, freeing up working RAM on memory constrained devices. In one embodiment, the invention provides a Binary File System (BinFS), a generic “block driver-agnostic” component that loads the OS from a block based permanent storage medium. Features of the BinFS component include the ability to load pre-“fixed up” components from a block based device.. The invention thus allows the OS to load code that was previously Executed In Place (XIP) from a block oriented device. The OS image remains “fixed up” as it was previously, but can advantageously be obtained using the file system of the invention.
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • The foregoing summary, as well as the following detailed description of preferred embodiments, is better understood when read in conjunction with the appended drawings. For the purpose of illustrating the invention, there is shown in the drawings exemplary constructions of the invention; however, the invention is not limited to the specific methods and instrumentalities disclosed. In the drawings:
  • FIG. 1 is a diagram depicting a computer system wherein aspects of the invention may be incorporated;
  • FIG. 2 is a layout of an XIP program that may be used in conjunction with the invention;
  • FIG. 3 is an illustration of XIP files being stored in a non-linear, block-addressable storage device in accordance with the invention;
  • FIG. 4 is a block diagram of a system incorporating a binary file system in accordance with aspects of the invention;
  • FIG. 5 is a diagram depicting an XIP header and other identifying information for use with the invention; and
  • FIG. 6 is a flow chart of an operation incorporating aspects of the invention.
  • DETAILED DESCRIPTION OF THE INVENTION
  • Overview
  • The following discussion is directed to executing fixed-up binary images from non-linear memory. The subject matter is described with specificity to meet statutory requirements. However, the description itself is not intended to limit the scope of this patent. Rather, the inventors have contemplated that the claimed subject matter might also be embodied in other ways, to include different elements or combinations of elements similar to the ones described in this document, in conjunction with other present or future technologies.
  • Exemplary Computer System
  • FIG. 1 illustrates functional components of a computer 100, such as a handheld computer, wherein aspects of the invention can be incorporated. The computer 100 represents many processing systems, such as desktop computers, notebook system, portable wireless communication handsets, palmtops, personal digit assistants (PDAs), pocket personal computers (PCs), portable gaming systems, multimedia systems, the combination of any of the above example devices and/or systems, and other similar computer devices. Computer 100 includes a processor 102, RAM 104, Non-linear memory device 110, a power supply 110, display 112 and input/output interfaces 114. RAM 104 is a volatile memory. Resident on the RAM is file system RAM 106 and execution area RAM 108. Non-linear memory device 110 exemplifies non-linear memory devices for computer 100. Non-linear memory device 110 can be any memory device where the CPU cannot fetch individual addresses; rather the memory device must be read in blocks. In most instances the non-linear memory is implemented in NAND flash memory although any type of non-linear memory device can be used such as a disk drive system.
  • The computer 100 has a power supply 110 that is may implemented through rechargeable batteries. The power supply 110 may further include an external power that overrides or recharges the built-in batteries, such as an AC adapter or powered docking cradle. The display 112 can take many forms such as a screen, touch screen, LEDs, etc. The input/output interfaces 114 can also take many forms depending on the computer 100 such as a keyboard, IR port, serial port, and so forth. The computer 100 can include more than one of any of the aforementioned elements. Other elements such as touch pads, vibrating devices, wireless communication components and so forth are not shown, but could easily be a part of the exemplary computer 100.
  • Exemplary Binary Memory Images
  • FIG. 2 shows an exemplary implementation of a binary image 200 stored in memory 110. The image 200 is logically partitioned into a plurality of separate independent regions 202-214. Each of the regions 202-214 can be logically viewed as a plurality of independent binary images that form a set of binary image 200 that may interact together such as applications, DLLs, drivers, etc. Although each region is shown as being contiguous, it is possible that the actual logical and/or physical address locations for each region may be at various arbitrary areas in a non-linear memory 110 that are not necessarily contiguous. Each of the regions 202-214 can also vary in size depending on the contents intended for a particular region.
  • Each of the regions 202-214 are intended to store executable binary programs (hereinafter referred to as application programs), the contents of which are represented by A-G. In one implementation, an application program is assigned to one specific region. Usually related applications and related miscellaneous items are usually placed in a single binary region to make updates easier. An application program is generally restricted to a specific region to reduce the size of files needed to be downloaded when updating an application program.
  • The binary image 200 is generally created by an image fix-up tool that takes relative addressed instructions that are created by a compiler, or similar tool that generates computer code that is executable by a CPU, and creates absolute addressed instructions that will reside and run from a particular memory location i.e. so that they can be fetched by a CPU for execution. The image fix up tool will create address links to other stand alone code such as DLL's etc. So that when the image fix-up tool is finished, the entire binary image 200 for performing a particular set of operations is completed and ready for execution in place (XIP).
  • Storage on Block Addressable Memory Device
  • FIG. 3 illustrates an aspect of the invention wherein one or more binary images 200 are stored on a non-linear memory device 110 (e.g., block addressable storage device such as a disk storage device). The one or more binary images 200 for a part of an XIP memory image 304′ that forms a virtual memory 404 that can be executed by processor 102. Notably, the non-linear storage device 110 can be partitioned and continue to function as a normal non-linear storage device. For example, as illustrated in FIG. 3, a disk storage device 110 is partitioned into a XIP space 304 and a FAT space 302.
  • The virtual memory space 304′ into which the XIP memory 304 maps may also comprise a conventional R/W area 306 that may contain variables that are read to and written by processor 102. That is, XIP area 304′ or virtual memory is non-writable. Thus, there is a portion 306 of virtual memory space that is readable and writeable and can contain an object store, code, a ram disk, etc. Interestingly, a ram disk itself may be used by the invention as the underlying non-linear memory device 110.
  • System Operation
  • FIG. 4 further illustrates aspects of the invention. As shown in FIG. 4, the underlying non-linear memory device 110 is addressed using a conventional block driver 416 that accesses the XIP partition 304 or the FAT partition 302 and retrieves blocks of memory, e.g., a disk sector. The XIP partition 304 contains one or more binary images, e.g., Bin 1 200 a, Bin 2 200 b, Bin n 200 n. Optimally, XIP space 304 maps to the XIP area 304′ in virtual memory 404. The XIP space 304 is mapped into XIP area 304′ by Binary File System 410. Binary File System 104 retrieves blocks of memory representing portions of binary images 200 a-200 n from non-linear memory 110 and loads them into physical memory 104 as needed.
  • The aspects of the invention described may coexist with a conventional system for loading binaries wherein the binaries are bound at load time. In such a system, file system driver 414 access files from the FAT partition of memory device 110. Loader 412 then fixes up the absolute memory addresses as necessary. That is loader 412 consolidates exe files, DLL files, and so on and generates a binary image in the conventional manner which can then be loaded into virtual memory 404.
  • Computer systems such as hand held computers generally create executable components in one of two different forms at build time: position independent, also called relocatable, forms; or fixed position, also called execute in place as described above (XIP), forms. At run time loader 412 fixes relocatable code to run at an available virtual memory RAM address dynamically chosen by the loader. The benefit is an efficient use of system RAM without requiring the system to explicitly specify the RAM layout. The downside is slightly longer load times as the OS loader handles the relocation. In addition, there is less flexibility in determining where the code executes from because code can only be relocated to RAM.
  • Typically, the virtual memory is written to a portion of the non-linear memory such as a disk drive file in pages. For example, virtual memory may be stored in the FAT portion 302 of non-linear storage device 110. The pages are then loaded on demand from the virtual memory 404 into physical memory 104. In this way, a relatively small physical address space can be made to appear significantly larger by swapping pages between virtual memory and physical memory. According to an aspect of the present invention, when physical memory contains a binary file stored in the XIP space 304, the page does not have to be swapped to virtual memory stored in the FAT portion 302 of non-linear memory device 110. Rather, the physical memory containing the portion of binary 200 a-200 n can merely be over-written without swapping out the contents of physical memory. This is so because that binary 200 a-200 n can simply be retrieved from the XIP space 304 as needed.
  • FIG. 5 shows a binary file 500 that is stored on a medium and illustrates an embodiment of a binary file having characteristics helpful in loading binary file 500 from a block storage device. In one implementation, the binary file 500 includes an XIP entry header 502, registry information 504; and a digital signature 506.
  • The XIP entry header 502 contains information about the size of the binary code contained within section 504 and the start address for the region. In other implementations it is possible to include other information in the XIP entry header, such as the version of the software, a public key and so forth.
  • The digital signature 506 of the XIP file provides unique security information about the file 500. This digital signature is checked against a security key. This guarantees that the software is legitimate prior to the software being installed in physical memory 104. Having private keys ensures that only certain owners of a particular region can build and update contents of a binary 200. Security also ensures that the binary file does not become replaced with corrupted unauthorized files, which could cause catastrophic failure for the computer 100.
  • FIG. 6 is a flow chart illustrating a process 600 for creating and loading XIP binary files in accordance with an aspect of the invention. Initially at block 601, XIP binary files are created. For example, the ROM Image Builder tool, Romimage.exe, is a build tool for WINDOWS CE that runs in the final phase of the build process. Romimage.exe performs the following functions:
      • Collects all the requisite components that make up the final image including drivers, executables, and data files.
      • Performs fix-ups on any executable code in a space efficient manner, thus detailing where code will execute from by default.
  • Other binary file image building tools could also be used. After the XIP binary files are created they can be loaded onto the XIP partition 304.
  • Thereafter, the system can start up. Typically, the boot loader is the first bit of code to run on a device after hardware reset or startup with the possible exception of BIOS/POST code. The boot loader is responsible for locating, loading, and executing the OS image. The loader typically resides in CPU-accessible linear memory, although there are instances where the loader resides on a block-accessed device such as a disk drive or NAND flash memory, for example, the BIOS boot loader which relies on the PC BIOS bootstrap process to load it into RAM and execute it.
  • When searching for a valid OS image to load, the boot loader will typically look in local storage first. Verifying that an image is valid can involve checking the signature of the stored image—such as hashing the important contents of the image and then generating a digital certificate, which is compared against the image—or can be based on a simpler validation like a checksum.
  • The binary file system in accordance with the present invention is also loaded into memory. At block 604, the binary file system then scans the XIP partition 304 for XIP binary files. The files are scanned by scanning the binary file header and other information as described in connection with FIG. 5. After all of the binary files are found, the virtual memory space is reserved by requesting memory locations and spaces required to run each XIP binary file.
  • At block 608 various applications needed to run the system are loaded into memory such as drivers and so on. The scanned binary files are then tracked and paged into virtual memory as needed as indicated by block 620. Physical memory is managed using the rest of the virtual memory as in a typical virtual memory system.
  • The various techniques described herein may be implemented with hardware or software or, where appropriate, with a combination of both. Thus, the methods and apparatus of the present invention, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other machine-readable storage medium, wherein, when the program code is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention. In the case of program code execution on programmable computers, the computer will generally include a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. One or more programs are preferably implemented in a high level procedural or object oriented programming language to communicate with a computer system. However, the program(s) can be implemented in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language, and combined with hardware implementations.
  • The methods and apparatus of the present invention may also be embodied in the form of program code that is transmitted over some transmission medium, such as over electrical wiring or cabling, through fiber optics, or via any other form of transmission, wherein, when the program code is received and loaded into and executed by a machine, such as an EPROM, a gate array, a programmable logic device (PLD), a client computer, a video recorder or the like, the machine becomes an apparatus for practicing the invention. When implemented on a general-purpose processor, the program code combines with the processor to provide a unique apparatus that operates to perform the indexing functionality of the present invention.
  • While the present invention has been described in connection with the preferred embodiments of the various figures, it is to be understood that other similar embodiments may be used or modifications and additions may be made to the described embodiment for performing the same function of the present invention without deviating there from. For example, while exemplary embodiments of the invention are described in the context of digital devices such as personal computers and PDAs, one skilled in the art will recognize that the present invention is not limited to such digital devices, as described in the present application may apply to any number of existing or emerging computing devices or environments, such as a gaming console, handheld computer, portable computer, etc. whether wired or wireless, and may be applied to any number of such computing devices connected via a communications network, and interacting across the network. Furthermore, it should be emphasized that a variety of computer platforms, including handheld device operating systems and other application specific operating systems are contemplated, especially as the number of wireless networked devices continues to proliferate. Therefore, the present invention should not be limited to any single embodiment, but rather construed in breadth and scope in accordance with the appended claims.

Claims (13)

1. A computer system, comprising:
a non-linearly addressable memory device comprising fixed-up, execute in place computer-executable instructions;
a physical memory device; and
a file system for copying the computer-executable instructions into the physical memory wherein the file system is capable of overwriting the computer-executable instructions in the physical memory without needing to swap them out between the physical memory and the non-linearly addressable memory and is capable of retrieving any computer-executable instructions from the non-linearly addressable memory as needed, wherein the computer-executable instructions are binary images, wherein the binary images comprise code based instructions.
2. The computer system according to claim 1, wherein at least one of the binary images is logically partitioned into a plurality of separate independent regions, wherein the regions can be logically viewed as a plurality of independent binary images that may interact together.
3. The computer system according to claim 2, wherein the actual logical and physical address location of each region is at various arbitrary areas in the non-linearly addressable memory.
4. The computer system according to claim 2, wherein the regions vary in size depending on the contents intended for a particular region.
5. The computer system according to claim 1, wherein the computer-executable instructions are fixed-up by an image fix-up tool, which takes relative addressed instructions created by a compiler or a similar tool and creates absolute addressed instructions.
6. The computer system according to claim 1, wherein the physical memory includes DRAM, NOR flash memory, and RAM.
7. The computer system according to claim 6, wherein the DRAM and NOR flash provide non-volatile storage and RAM provides volatile storage.
8. The computer system according to claim 1, wherein a RAM disk is used in place of the non-linearly addressable memory.
9. The computer system according to claim 1, wherein the non-linearly addressable memory includes NAND flash memory and a disk storage system, including a standard ATA and IDE hard disk drive.
10. A method for managing memory, comprising:
storing on a non-linearly addressable memory device, a software component comprising a set of computer-executable instructions, wherein the computer-executable instructions are fixed to be executed from a predefined memory location; and
loading the set of computer-executable instructions into a linearly addressable memory device using a file system when at least one of the computer-executable instructions is fetched by a processor.
11. The method according to claim 10, wherein storing includes creating the instructions, including creating absolute addressed instructions based on relative addressed instructions.
12. The method according to claim 11, wherein creating the absolute addressed instructions from relative addressed instructions is performed by an image fix-up tool.
13. The method according to claim 12, wherein the image fix-up tool creates address links among the instructions.
US11/539,849 2002-10-21 2006-10-09 System and method for executing binary images Abandoned US20070076475A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US11/539,849 US20070076475A1 (en) 2002-10-21 2006-10-09 System and method for executing binary images

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
US10/277,580 US6988163B2 (en) 2002-10-21 2002-10-21 Executing binary images from non-linear storage systems
US11/305,917 US7120730B2 (en) 2002-10-21 2005-12-19 System and method for executing binary images
US11/539,849 US20070076475A1 (en) 2002-10-21 2006-10-09 System and method for executing binary images

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
US11/305,917 Continuation US7120730B2 (en) 2002-10-21 2005-12-19 System and method for executing binary images

Publications (1)

Publication Number Publication Date
US20070076475A1 true US20070076475A1 (en) 2007-04-05

Family

ID=32093326

Family Applications (3)

Application Number Title Priority Date Filing Date
US10/277,580 Expired - Lifetime US6988163B2 (en) 2002-10-21 2002-10-21 Executing binary images from non-linear storage systems
US11/305,917 Expired - Lifetime US7120730B2 (en) 2002-10-21 2005-12-19 System and method for executing binary images
US11/539,849 Abandoned US20070076475A1 (en) 2002-10-21 2006-10-09 System and method for executing binary images

Family Applications Before (2)

Application Number Title Priority Date Filing Date
US10/277,580 Expired - Lifetime US6988163B2 (en) 2002-10-21 2002-10-21 Executing binary images from non-linear storage systems
US11/305,917 Expired - Lifetime US7120730B2 (en) 2002-10-21 2005-12-19 System and method for executing binary images

Country Status (1)

Country Link
US (3) US6988163B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070226548A1 (en) * 2006-03-23 2007-09-27 Ming-Shiang Lai System for booting from a non-xip memory utilizing a boot engine that does not have ecc capabilities during booting
US20090235125A1 (en) * 2006-03-23 2009-09-17 Ming-Shiang Lai System for booting from a non-xip memory utilizing a boot engine that does not have ecc capabilities during booting
US9092404B2 (en) 2013-01-09 2015-07-28 Dell Products, Lp System and method to remotely recover from a system halt during system initialization
US9197596B2 (en) 2012-12-18 2015-11-24 Dell Products, Lp System and method to use common addresses on a management controller without conflict

Families Citing this family (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7055145B2 (en) * 2002-10-30 2006-05-30 Intel Corporation Dynamic management of execute in place applications
SG117428A1 (en) * 2002-11-07 2005-12-29 Mrd Technologies Pte Ltd Method and apparatus for loading boot code
US20040117787A1 (en) * 2002-12-12 2004-06-17 Sowa Kurt E. Reorganized storing of applications to improve execution
KR100494499B1 (en) * 2002-12-12 2005-06-10 주식회사 안철수연구소 Data retouching method for executing file on real time and virus elimination method using the data retouching method thereof
GB2404748B (en) * 2003-08-01 2006-10-04 Symbian Ltd Computing device and method
US8069192B2 (en) * 2004-03-22 2011-11-29 Microsoft Corporation Computing device with relatively limited storage space and operating / file system thereof
US7647358B2 (en) * 2004-03-22 2010-01-12 Microsoft Corporation Computing device with relatively limited storage space and operating/file system thereof
GB2413653B (en) * 2004-04-29 2007-11-28 Symbian Software Ltd Installation of software on removable media
US20050268077A1 (en) * 2004-05-11 2005-12-01 Peter Kuan Memory system for an electronic device and the method for controlling the same
US8010734B2 (en) * 2004-06-04 2011-08-30 Broadcom Corporation Method and system for reading instructions from NAND flash memory and writing them into SRAM for execution by a processing device
KR100617698B1 (en) * 2004-06-07 2006-08-28 삼성전자주식회사 Binary file creating apparatus and method for storing functional data, and a computer readable storage medium storing the method
US20140240526A1 (en) * 2004-12-13 2014-08-28 Kuo-Ching Chiang Method For Sharing By Wireless Non-Volatile Memory
US7366891B2 (en) * 2004-12-30 2008-04-29 Intel Corporation Methods and apparatus to provide dual-mode drivers in processor systems
US7243856B2 (en) * 2005-03-24 2007-07-17 Sandisk Il Ltd.. Loading internal applications on a smartcard
KR100640389B1 (en) * 2005-04-06 2006-10-30 삼성전자주식회사 Method for executing application in an apparatus having nand flash memory and the apparatus
US8117608B1 (en) * 2005-09-03 2012-02-14 Ringcube Technologies, Inc. System and method of providing mobility to personal computers
WO2007049850A1 (en) * 2005-10-27 2007-05-03 Mgine Co., Ltd. A mass storage device having both xip function and storage function
US7562180B2 (en) * 2006-03-28 2009-07-14 Nokia Corporation Method and device for reduced read latency of non-volatile memory
US8738887B2 (en) * 2008-04-24 2014-05-27 Advanced Micro Devices, Inc. Dynamic fix-up of global variables during system BIOS execution
US8156320B2 (en) * 2008-08-27 2012-04-10 Wireless Silicon Group, Llc Method and apparatus for fast booting a portable computing device allowing for immediate operation
US8281169B2 (en) 2008-08-27 2012-10-02 Wireless Silicon Group, Inc. Method and system for power management for a handheld mobile electronic device executing-in-place an application kernel from execute-in-place non-volatile memory (XIP NVM)
US8621169B2 (en) * 2009-12-10 2013-12-31 Blackberry Limited Method for address space layout randomization in execute-in-place code
US8560807B2 (en) 2011-12-14 2013-10-15 International Business Machines Corporation Accessing a logic device through a serial interface
CN102799451B (en) * 2012-06-29 2015-11-11 深圳市安普尔科技有限公司 WINCE system mirror image construction method and system, WINCE system mirror image
JP6213040B2 (en) * 2013-08-19 2017-10-18 富士通株式会社 Semiconductor memory device and method for controlling semiconductor memory device
US9928168B2 (en) 2016-01-11 2018-03-27 Qualcomm Incorporated Non-volatile random access system memory with DRAM program caching

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5241508A (en) * 1991-04-03 1993-08-31 Peripheral Land, Inc. Nonvolatile ramdisk memory
US5592669A (en) * 1990-12-31 1997-01-07 Intel Corporation File structure for a non-volatile block-erasable semiconductor flash memory
US5754817A (en) * 1994-09-29 1998-05-19 Intel Corporation Execution in place of a file stored non-contiguously in a non-volatile memory
US5822784A (en) * 1993-03-19 1998-10-13 Intel Corporation Mechanism supporting execute in place read only memory applications located on removable computer cards
US6003135A (en) * 1997-06-04 1999-12-14 Spyrus, Inc. Modular security device
US20020034105A1 (en) * 2000-05-03 2002-03-21 Harish Kulkarni Systems and methods for incrementally updating an image in flash memory
US20030028708A1 (en) * 2001-08-06 2003-02-06 Dov Moran Novel flash memory arrangement
US6519593B1 (en) * 1998-12-15 2003-02-11 Yossi Matias Efficient bundle sorting
US20040044708A1 (en) * 2002-08-27 2004-03-04 Linke Scott L. Executable file system for an embedded computer

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5581788A (en) * 1992-12-14 1996-12-03 At&T Global Information Solutions Company System for testing the functionality of video cord and monitor by using program to enable user to view list of modes and select compatible mode
US5596669A (en) * 1995-04-21 1997-01-21 Dsm N.V. Radiation curable coating composition and coated optical fiber
US6601167B1 (en) * 2000-01-14 2003-07-29 Advanced Micro Devices, Inc. Computer system initialization with boot program stored in sequential access memory, controlled by a boot loader to control and execute the boot program
US7533214B2 (en) * 2002-02-27 2009-05-12 Microsoft Corporation Open architecture flash driver

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5592669A (en) * 1990-12-31 1997-01-07 Intel Corporation File structure for a non-volatile block-erasable semiconductor flash memory
US5241508A (en) * 1991-04-03 1993-08-31 Peripheral Land, Inc. Nonvolatile ramdisk memory
US5822784A (en) * 1993-03-19 1998-10-13 Intel Corporation Mechanism supporting execute in place read only memory applications located on removable computer cards
US5754817A (en) * 1994-09-29 1998-05-19 Intel Corporation Execution in place of a file stored non-contiguously in a non-volatile memory
US6003135A (en) * 1997-06-04 1999-12-14 Spyrus, Inc. Modular security device
US6519593B1 (en) * 1998-12-15 2003-02-11 Yossi Matias Efficient bundle sorting
US20020034105A1 (en) * 2000-05-03 2002-03-21 Harish Kulkarni Systems and methods for incrementally updating an image in flash memory
US20030028708A1 (en) * 2001-08-06 2003-02-06 Dov Moran Novel flash memory arrangement
US20040044708A1 (en) * 2002-08-27 2004-03-04 Linke Scott L. Executable file system for an embedded computer

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070226548A1 (en) * 2006-03-23 2007-09-27 Ming-Shiang Lai System for booting from a non-xip memory utilizing a boot engine that does not have ecc capabilities during booting
US7555678B2 (en) * 2006-03-23 2009-06-30 Mediatek Inc. System for booting from a non-XIP memory utilizing a boot engine that does not have ECC capabilities during booting
US20090235125A1 (en) * 2006-03-23 2009-09-17 Ming-Shiang Lai System for booting from a non-xip memory utilizing a boot engine that does not have ecc capabilities during booting
US8065563B2 (en) 2006-03-23 2011-11-22 Mediatek Inc. System for booting from a non-XIP memory utilizing a boot engine that does not have ECC capabilities during booting
US9197596B2 (en) 2012-12-18 2015-11-24 Dell Products, Lp System and method to use common addresses on a management controller without conflict
US9491139B2 (en) 2012-12-18 2016-11-08 Dell Products, Lp System and method to use common addresses on different interfaces in a management controller without conflict
US9092404B2 (en) 2013-01-09 2015-07-28 Dell Products, Lp System and method to remotely recover from a system halt during system initialization

Also Published As

Publication number Publication date
US7120730B2 (en) 2006-10-10
US6988163B2 (en) 2006-01-17
US20040078509A1 (en) 2004-04-22
US20060101194A1 (en) 2006-05-11

Similar Documents

Publication Publication Date Title
US7120730B2 (en) System and method for executing binary images
EP1634170B1 (en) Method for firmware variable storage with eager compression, fail-safe extraction and restart time compression scan
US7730326B2 (en) Method and system for updating firmware stored in non-volatile memory
US7136994B2 (en) Recovery images in an operational firmware environment
US7017004B1 (en) System and method for updating contents of a flash ROM
JP4608580B2 (en) Method and computer system for executing software modules
US7313684B2 (en) Method and apparatus for booting a computer system
US8539213B2 (en) Manageability extension mechanism for system firmware
US7305544B2 (en) Interleaved boot block to support multiple processor architectures and method of use
US7512777B2 (en) Method and system for maintaining system management BIOS
NZ520786A (en) Method of booting a computer system using a memory image of the post boot content of the system RAM memory
JP2002525701A (en) Method and apparatus for standardizing the use of non-volatile storage in BIOS-ROM
US7069445B2 (en) System and method for migration of a version of a bootable program
JP2015526827A (en) Layout and execution of software applications using BPRAM
US20080059785A1 (en) Method and apparatus for shutting down a computer system
JP2006079628A (en) System and method of storing user data in partition file or using partition file containing user data
US7082523B2 (en) Bridging memory access across pre-boot and runtime phases
CN1886729A (en) Method and device for starting a computer system
US7234039B1 (en) Method, system, and apparatus for determining the physical memory address of an allocated and locked memory buffer
KR20170037017A (en) Memory Upgrade System And Method
US20060230190A1 (en) Method and apparatus for executing application in system having NAND flash memory
JP2008502988A (en) Computer system boot method and apparatus
CN1894883A (en) System for selectively enabling operating modes of a device
JP2004157751A (en) System, program, and method for protecting data
KR20070041515A (en) Method and apparatus for booting a computer system

Legal Events

Date Code Title Description
STCB Information on status: application discontinuation

Free format text: ABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTION

AS Assignment

Owner name: MICROSOFT TECHNOLOGY LICENSING, LLC, WASHINGTON

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:MICROSOFT CORPORATION;REEL/FRAME:034766/0001

Effective date: 20141014