Flash memory differs from many other types of non-volatile memory in that it has a limited and predictable lifetime. While a hard disk may experience random location failures over its life, a flash memory may have a limit of tens of thousands of write cycles for each memory location. To accommodate such a limited life, a memory controller may incorporate a technique for wear-leveling, that is, invoking a mapping function to point data destined for a logical address to a movable physical location. When a given physical address reaches a threshold number of writes, the mapping function will remap the logical address to a different physical location.
The wear-leveling function is normally carried out by a full-function memory controller, or in some cases, an advanced flash memory with built-in wear-leveling circuitry. However, in a cost sensitive implementation, reliance on either of these options may be cost prohibitive. While software memory controllers or interface drivers may provide a wear-leveling solution for a fully operational electronic device, the issue of wear-leveling during a boot cycle may still need to be addressed separately because of the critical nature of the boot process and the need to protect flash memory during this early phase of electronic device operation before such controllers or drivers are in place.
Wear-leveling during a boot process may be performed by a specialized BIOS that can manage flash memory in the absence of a specialized controller or driver, as may be the case in an extremely cost-sensitive environment. In one embodiment, the BIOS may defer boot-related writes to the flash until a full-functioned memory controller is active. In another embodiment, the BIOS may flag memory locations that are written to so that a full function memory controller can evaluate and wear level those locations as necessary. In yet another embodiment, the BIOS may perform flash memory services similar to those of the full-functioned memory controller, so that as the full-functioned memory controller becomes active a seamless transition may be performed. Another embodiment may dedicate a portion of the flash memory solely to boot process support so that the dedicated portion of memory does not exceed write limits through usage caused by other programs.
Flash memory services may include both wear leveling service and bad block management. Wear leveling services may include memory monitoring a number of write cycles for each memory location and memory mapping to distribute write operations across the physical flash memory so that no single or group of memory locations exceeds specified write limits will be for another. Bad block management notes memory locations that either are nonfunctional or have exceeded specified write limits.
Although the following text sets forth a detailed description of numerous different embodiments, it should be understood that the legal scope of the description is defined by the words of the claims set forth at the end of this disclosure. The detailed description is to be construed as exemplary only and does not describe every possible embodiment since describing every possible embodiment would be impractical, if not impossible. Numerous alternative embodiments could be implemented, using either current technology or technology developed after the filing date of this patent, which would still fall within the scope of the claims.
It should also be understood that, unless a term is expressly defined in this patent using the sentence “As used herein, the term ‘——————’ is hereby defined to mean . . . ” or a similar sentence, there is no intent to limit the meaning of that term, either expressly or by implication, beyond its plain or ordinary meaning, and such term should not be interpreted to be limited in scope based on any statement made in any section of this patent (other than the language of the claims). To the extent that any term recited in the claims at the end of this patent is referred to in this patent in a manner consistent with a single meaning, that is done for sake of clarity only so as to not confuse the reader, and it is not intended that such claim term by limited, by implication or otherwise, to that single meaning. Finally, unless a claim element is defined by reciting the word “means” and a function without the recital of any structure, it is not intended that the scope of any claim element be interpreted based on the application of 35 U.S.C. §112, sixth paragraph.
Much of the inventive functionality and many of the inventive principles are best implemented with or in software programs or instructions and integrated circuits (ICs) such as application specific ICs. It is expected that one of ordinary skill, notwithstanding possibly significant effort and many design choices motivated by, for example, available time, current technology, and economic considerations, when guided by the concepts and principles disclosed herein will be readily capable of generating such software instructions and programs and ICs with minimal experimentation. Therefore, in the interest of brevity and minimization of any risk of obscuring the principles and concepts in accordance to the present invention, further discussion of such software and ICs, if any, will be limited to the essentials with respect to the principles and concepts of the preferred embodiments.
With reference to
A series of system busses may couple various system components including a high speed system bus 123 between the processor 120, the memory/graphics interface 121 and the I/O interface 122, a front-side bus 124 between the memory/graphics interface 121 and the system memory 130, and an advanced graphics processing (AGP) bus 125 between the memory/graphics interface 121 and the graphics processor 190. The system bus 123 may be any of several types of bus structures including, by way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus and Enhanced ISA (EISA) bus. As system architectures evolve, other bus architectures and chip sets may be used but often generally follow this pattern. For example, companies such as Intel and AMD support the Intel Hub Architecture (IHA) and the Hypertransport architecture, respectively.
The computer 110 typically includes a variety of computer readable media. Computer readable media can be any available media that can be accessed by computer 110 and includes both volatile and nonvolatile media, removable and non-removable media. By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by computer 110. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared and other wireless media. Combinations of the any of the above should also be included within the scope of computer readable media.
The system memory 130 includes computer storage media in the form of volatile and/or nonvolatile memory such as read only memory (ROM) 131 and random access memory (RAM) 132. The system ROM 131 may contain permanent system data 143, such as identifying and manufacturing information. In some embodiments, a basic input/output system (BIOS) may also be stored in system ROM 131. RAM 132 typically contains data and/or program modules that are immediately accessible to and/or presently being operated on by processor 120. By way of example, and not limitation,
The I/O interface 122 may couple the system bus 123 with a number of other busses 126, 127 and 128 that couple a variety of internal and external devices to the computer 110. A serial peripheral interface (SPI) bus 126 may connect to a basic input/output system (BIOS) memory 133 containing the basic routines that help to transfer information between elements within computer 110, such as during start-up.
In some embodiments, a security module 129 may be incorporated to manage metering, billing, and enforcement of policies, such as ensuring certain programs are running. The security module 129 is discussed more below, especially with respect to
A super input/output chip 160 may be used to connect to a number of ‘legacy’ peripherals, such as floppy disk 152, keyboard/mouse 162, and printer 196, as examples. The super I/O chip 122 may be connected to the I/O interface 121 with a low pin count (LPC) bus, in some embodiments. The super I/O chip 121 is widely available in the commercial marketplace.
In one embodiment, bus 128 may be a Peripheral Component Interconnect (PCI) bus, or a variation thereof, may be used to connect higher speed peripherals to the I/O interface 122. A PCI bus may also be known as a Mezzanine bus. Variations of the PCI bus include the Peripheral Component Interconnect-Express (PCI-E) and the Peripheral Component Interconnect-Extended (PCI-X) busses, the former having a serial interface and the latter being a backward compatible parallel interface. In other embodiments, bus 128 may be an advanced technology attachment (ATA) bus, in the form of a serial ATA bus (SATA) or parallel ATA (PATA).
The computer 110 may also include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only,
The drives and their associated computer storage media discussed above and illustrated in
The computer 110 may operate in a networked environment using logical connections to one or more remote computers, such as a remote computer 180 via a network interface controller (NIC) 170. The remote computer 180 may be a personal computer, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to the computer 110. The logical connection between the NIC 170 and the remote computer 180 depicted in
In some embodiments, the network interface may use a modem (not depicted) when a broadband connection is not available or is not used. It will be appreciated that the network connection shown is exemplary and other means of establishing a communications link between the computers may be used.
The processor 202 may execute computer-readable instructions stored in the BIOS 204, the flash memory 206, or downloaded from another source into the RAM 208.
The BIOS 204 may include normal functions 212, such as input and output routines used for both initial startup and by an operating system to accomplish low level tasks in a conventional manner. The BIOS 204 may also include capabilities not normally associated with BIOS functions. For example, the BIOS 204 may perform management functions for the flash memory 206, such as wear-leveling, bad block management, or both, during a boot process in the absence of a full-featured memory controller, such as interface 150 of
The flash memory 206 may be divided into pages of memory, for example, a first page 218, and one or more additional pages represented by page n 220. A reserved area 222 may be a dedicated page, or simply a dedicated range of memory reserved for use by the BIOS 204, as discussed in more detail below. The flash memory 206 may store computer-executable instructions for implementing programs, drivers, utilities, etc, such as an operating system 224 and a software memory controller 226.
In operation, an electronic device, such as computer 110, that relies on flash memory 206 for a portion of system non-volatile memory, may use wear-leveling to distribute write operations among available working physical memory locations in a flash memory or similar structure.
The write monitor 214 portion of the BIOS 204 may be a module that monitors write activity and coordinates adjustment of mapping table entries maintained by the address translation function 216, based on previous write activity to physical locations of the flash memory.
In one alternate embodiment, the write monitor 214 may simply postpone boot-phase writes until after the full-featured memory controller is active. One example of such an embodiment may have the BIOS redirect write operations targeting the flash memory 206 to the RAM 208 prior to the wear-leveling service being active. When flash memory services are available, for example, through a software memory controller 226, the data stored in the RAM 208 may be written to the flash 206 under the managed environment. In a related embodiment, the BIOS may perform memory mapping for the flash memory 206 but defer writes during the boot-cycle until after a wear-leveling service of the memory controller 226 is active. In this case, the BIOS may duplicate the operation of the flash memory management functions of the memory controller 226 so that a seamless transfer of activity can be performed between the two services. For example, the memory mapping functions may be duplicated and each may share a common area of memory for maintaining the memory map and bad block table or tables.
In another embodiment, the BIOS may simply direct boot-related write activity to the reserved area 222 of the flash memory 206. The reserved area 222 may be excluded from wear-leveling performed by either initial BIOS services or by flash memory services provided by the memory controller 226, when available. Such a strategy may depend on two assumption related to booting a computer. The first is that boot-related write activity may be limited in scope, so that only a small portion of memory needs to be reserved, so that the cost of the reserved memory is not prohibitive. The second relies on the number of boot-related writes to be less than the lifetime of the memory being reserved. For example, it may be reasonable to assume that a computer may be booted less than 100,000 times over its life, which is well less than the durability specification for most current technology flash memories.
In another embodiment, the write monitor 214 may monitor data written to a page of memory via a system memory interrupt, such as Interrupt 13 supported by some BIOS versions, and sets a flag associated with the page of memory, e.g. page 1218. The flag may be used by the full-featured memory controller 226, when active, to perform wear leveling on that page. For example, a wear-leveling table that tracks a number of writes to each memory location may be updated to reflect writes that occurred before the memory controller 226 was active.
In one embodiment, the write monitor 214 and the bad block management and address translation function 214 may be implemented in an option read-only memory associated with the execution of the BIOS 204.
At block 302, the electronic device may be activated, either from a power-off state or as part of a warm boot/restart. A basic input/output system (BIOS) 204 program may be activated as part of starting the electronic device, the BIOS providing low level support for peripherals and access to memory.
At block 304, the BIOS may determine whether it is operating with a flash memory 206. It may be that the BIOS is also stored in a flash memory, but the determination is not necessarily tied to the BIOS being run from a flash memory. Rather, the determination may be that subsequent memory access activity, such as access to a boot loader and ultimately the operating system 224, is made to flash memory as opposed to, for example, a hard disk drive. If, at block 304, operation is from a flash memory 206, execution may follow the ‘yes’ branch from block 304 to block 306.
At block 306, the BIOS 204 may determine if a full function memory controller, such as one providing support for Interrupt 13, wear-leveling, address mapping, and bad block management, etc. is available. If not, the ‘no’ branch from block 306 may be taken to block 308.
At block 308, the BIOS may provide flash memory services until a full service memory controller, such as memory controller 226 is available. A discussion of providing the flash memory services associated with block 308 are found below with respect to
After conclusion of flash memory services being provided by the BIOS 204, execution as part of the normal startup routine may continue at block 310. Due to the nature of a typical boot process, some of the activities of block 310 may occur concurrently with other BIOS supported boot operations.
If, at block 304, no flash memory is in use, execution may continue at block 310.
If, at block 306, a full functioned memory controller is available to support flash memory operation, execution may continue at block 310.
At block 404, an address translation table may be maintained. The address translation table accepts requests for access to a logical address in the memory being maintained. The logical address may be mapped to a physical memory location in the memory device. As physical memory locations become overused from a write durability perspective, the logical-to-physical mapping may be changed to allow use of a less-used portion of physical memory.
At block 406, a determination of such usage may be made with respect to a current write request. If a requested memory location has exceeded the current activity criteria, the ‘yes’ branch may be taken to block 408.
At block 408, the address translation table may be updated to move the association with a current logical address to a different physical address and execution continued at block 402.
If at block 406, a write to a physical memory location will not exceed the write criteria, execution may follow the ‘no’ branch back to block 402. It should be noted that most flash memory wear occurs during the erase portion of a write cycle, because in many cases a higher voltage is used to erase data than to write and read it. Address translation for read operations may be appropriate in some embodiments, but this discussion is limited to write operations, for ease of illustration.
At block 504, a determination as to whether a software memory controller 226 supporting wear-leveling functions is available. If so, the ‘yes’ branch from block 504 may be taken to block 506.
At block 506, the boot-data stored in RAM 208 may be transferred to the flash memory 206 using the full-functioned controller, thereby applying wear-leveling and other services to the data written.
If, at block 504, the full-functioned memory controller is not yet available, the ‘no’ branch from block 504 may be taken to block 508. At block 508, a time delay or other software trigger may be set and operation continued at block 502. After the delay period or activation of the software trigger, execution may continue at block 504 as described above.
At block 604 the BIOS may set a flag associated with the memory write. For example, a variable in RAM 208 may be written with a value corresponding to each boot-related memory write.
At block 606 a software memory controller 226 supporting flash memory wear-leveling may be activated.
At block 608, the software memory controller 226 may read the data stored in RAM related to boot-related write activity and update wear-leveling information associated with the page or pages of the flash memory 206. At block 608 the software memory controller 226 may update the wear tables associated with write activity to account for writes performed before the controller was active. Alternatively, the software memory controller 206 may move data to a new location if the controller 206 determines that a threshold limit for writes has been exceeded. The threshold limit may be an absolute limit derived from component durability specifications or may be a comparison to write activity at other locations.
Although the foregoing text sets forth a detailed description of numerous different embodiments of the invention, it should be understood that the scope of the invention is defined by the words of the claims set forth at the end of this patent. The detailed description is to be construed as exemplary only and does not describe every possibly embodiment of the invention because describing every possible embodiment would be impractical, if not impossible. Numerous alternative embodiments could be implemented, using either current technology or technology developed after the filing date of this patent, which would still fall within the scope of the claims defining the invention.
Thus, many modifications and variations may be made in the techniques and structures described and illustrated herein without departing from the spirit and scope of the present invention. Accordingly, it should be understood that the methods and apparatus described herein are illustrative only and are not limiting upon the scope of the invention.
Number | Name | Date | Kind |
---|---|---|---|
5535357 | Moran et al. | Jul 1996 | A |
6018806 | Cortopassi et al. | Jan 2000 | A |
6192488 | Li | Feb 2001 | B1 |
6308265 | Miller | Oct 2001 | B1 |
7110437 | Oates et al. | Sep 2006 | B2 |
7162549 | Mambakkam et al. | Jan 2007 | B2 |
7186147 | Chou et al. | Mar 2007 | B1 |
20050044348 | O'Connell | Feb 2005 | A1 |
20050204091 | Kilbuck et al. | Sep 2005 | A1 |
20060004971 | Kim et al. | Jan 2006 | A1 |
20060031710 | Jo | Feb 2006 | A1 |
20060075284 | Skan et al. | Apr 2006 | A1 |
20060109725 | Yoon et al. | May 2006 | A1 |
20060239075 | Williams et al. | Oct 2006 | A1 |
20060291304 | Rothman et al. | Dec 2006 | A1 |
20070050536 | Kolokowsky | Mar 2007 | A1 |
20070300008 | Rogers et al. | Dec 2007 | A1 |
20080082736 | Chow et al. | Apr 2008 | A1 |
20090100215 | Nochimowski | Apr 2009 | A1 |
20090106484 | Yeh et al. | Apr 2009 | A1 |
Number | Date | Country | |
---|---|---|---|
20090249052 A1 | Oct 2009 | US |