Abstract:
A method for boot media loader that includes detecting bootable media independent of any media partitioning. When bootable media is detected, data is read from a predetermined location of the bootable media. Next, the file system type is determined from the read data. The boot loader code is loaded for the corresponding file system type from basic input and output system (BIOS) code, and execution control is transferred to the boot loader code.

Description:
This application claims the benefit of U.S. Provisional Application No. 60/470,165, filed on May 12, 2003. 
    
    
     FIELD OF THE INVENTION 
     The present invention generally relates to boot systems and, more particularly, to a method and apparatus for providing a media boot loader. 
     BACKGROUND OF THE INVENTION 
     Electronic devices, for example, personal computers (PC&#39;s), laptop computers, MP3 Players, tablet computers and other suitable devices and combinations thereof utilize Basic Input Output System (BIOS) software to perform a boot operation. The BIOS software is typically maintained on a read-only memory (ROM) chip of the electronic device (often referred to as ROM BIOS). Because random-access memory (RAM) is faster than ROM, many electronic devices employ a technique known as ‘shadowing,’ in which the BIOS is copied from ROM to RAM each time the device is booted. 
     An industry standard was created so that electronic devices that include processors would typically look in the same place in memory to find the start of the BIOS software. In particular, the BIOS software is typically located in a special reserved memory area near the end of system memory (e.g., beginning at address FFFF0h). Since there are only 16 bytes left from there to the end of conventional memory, this address will typically contain a “jump” instruction which indicates to the processor where the actual BIOS code is located. From this location, processors get their first instructions and begin to execute the BIOS code. The BIOS code typically begins the system boot sequence by performing a power-on self test (POST) and initializing and configuring the device hardware. 
     After performing the POST operation and initializing certain hardware, the BIOS begins searching for media to boot from. Most modern BIOS software contains a setting that controls if the device should first try to boot from the floppy disk or first try the hard disk. Having identified the target boot drive, the BIOS looks for boot information to start the operating system boot process. If it is searching a partitioned media (e.g., hard disk), the BIOS will look for a master boot record (MBR) at cylinder 0, head 0, sector 1 (the first sector on the disk). The MBR typically contains a partition table and generally also has a partition table search program. This MBR code, also known as a boot loader, locates the selected boot partition and begins to load and execute code from the boot sector of the selected boot partition. If, on the other hand, the located bootable media is non-partitioned (e.g., a floppy disk), the BIOS looks at the same address for the non-partitioned media (e.g., the first block of data) and loads that partition&#39;s boot sector into memory. In either case, once the BIOS has found a bootable media, execution control is based on the code located in the boot sector of the bootable media. 
     Thus, typical electronic devices require that the boot media to be specially formatted (e.g., corrected partitioned with MBR or boot sector) in order to be recognized by the BIOS as bootable media. If the BIOS does not detect any media (e.g., hard drive, floppy disk, CD-ROM, etc.) that is correctly formatted for booting, the device will not boot. It should also be noted that the formatting required to render non-partitioned media bootable will prevent that media from being used for standard data storage. 
     SUMMARY OF THE INVENTION 
     A boot media loader method includes detecting a bootable media independent of the partitioning of the boot media. When bootable media is detected, reading appropriate data from a predetermined location of the boot media. Next, the method determines the file system type from the read data. After determining the file system type, loading boot loader code for the corresponding file system type from the basic input and output system (BIOS) code. Next, transferring device control to the previously loaded boot loader code. In an exemplary embodiment, the boot loader code is stored along with the BIOS code. In an alternate embodiment, the boot loader code is stored on the boot media itself. 
     An electronic device includes at least one processor. A memory is coupled to the at least one processor, and includes a series of instructions maintained thereon. When the processor executes the series of instructions, the processor detects the presence of a bootable media, for example, a floppy disk drive, a hard disk drive, a CD-ROM or other suitable device or combinations thereof. If a bootable media is detected, the processor reads data from a predetermined location on the bootable media. Next, the processor determines the file system type of the boot media from the previously read data. Then, the processor loads boot loader code for the corresponding file system type from the basic input and output system code. Then, processor transfers execution control to the loaded boot loader code. 
     An advantage provided by the present invention is that it expedites the boot process by eliminating the need to have a master boot record for bootable partitioned media. 
     Another advantage provided by the present invention is that it further expedites the boot process by eliminating the need for a boot sector in bootable, non-partitioned media. 
     Yet another advantage provided by the present invention is that the bootable media may be used to store data as well as providing bootable media functionality. 
     A feature of the present invention is that the boot loader code is stored in BIOS rather than on the boot media. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       The aforementioned and related advantages and features of the present invention will be better understood and appreciated upon review of the following detailed description of the invention, taken in conjunction with the following drawings, where like numerals represent elements, in which: 
         FIG. 1  is a schematic block diagram of an exemplary electronic device configured to implement one or more aspects of the present invention; 
         FIG. 2  is a flow diagram of a prior art boot process; 
         FIGS. 3A-3B  are flow charts illustrating a boot process according to the one embodiment of the present invention; 
         FIG. 4  is one embodiment of an algorithm that may be utilized in conjunction with certain aspects of the present invention; and 
         FIG. 5  is a flow chart illustrating a process of performing additional aspects of the present invention. 
     
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
     One aspect of the present invention is to implement a media boot loader which expedites the boot process by eliminating the need to have a master boot record (MBR) for bootable partitioned media, or in the case of bootable non-partitioned media, eliminates the need for a boot sector. 
     In one embodiment, boot loader code is stored in BIOS rather than on the boot media itself. The boot media may be preloaded with information that identifies its file system type (e.g., FAT12, FAT16, FAT32, etc.). Based on this information, the BIOS code may cause a corresponding processor to load and execute the corresponding boot loader code. In one embodiment, this boot loader code is loaded and executed from BIOS. 
     In another embodiment, control is passed to the BIOS boot loader code which, in turn, may cause the processor to load a kernel loader that is present on the boot media. This kernel loader may then load an operating system (OS) into memory. In one embodiment, execution control is passed to the operating system upon initialization. 
     Another aspect of the present invention is to use the aforementioned kernel loader to load the OS into memory from the boot media itself. In one embodiment, this OS is a lightweight OS that may also be used to subsequently load one or more application programs from the boot media. 
     Yet another aspect of the present invention is to pre-format the boot media with a file allocation table (FAT) file system, thereby enabling the boot media to be usable for non-boot related data storage. In this fashion, the boot media may be used to store data in the same manner as traditional storage media, as well as provide the functionality of a bootable media. The present invention will now be described with reference to  FIGS. 1-5 . 
       FIG. 1  is a schematic block diagram of an exemplary electronic device  100 , for example, a tablet PC or other suitable device that is configured to implement one or more aspects of the present invention. Although described with reference to a tablet PC, the electronic device  100  may include, but is not limited to, general purpose computer systems (e.g., server, laptop, desktop, palmtop, personal electronic devices, etc.), personal computers (PCs), hard copy equipment (e.g., printer, plotter, fax machine, etc), or any suitable circuitry capable of processing data and combinations thereof. 
     The electronic device  100  includes a processor  104 , for example, a central processing unit (CPU). The CPU  104  may include an Arithmetic Logic Unit (ALU) for performing computations, a collection of registers for temporary storage of data and instructions, and a control unit for controlling operation for the electronic device  100 . In one embodiment, the CPU  104  includes any one of the x86, Pentium™, Pentium II™, and Pentium Pro™, Pentium Celeron™ Pentium III™, Pentium 4™, and Centrino™ microprocessors as marketed by Intel™ Corporation, the K-6 microprocessor as marketed by AMD™, or the 6x86MX microprocessor as marketed by Cyrix™ Corp. Further examples include the Alpha™ processor as marketed by Digital Equipment Corporation™, the 680X0 processor as marketed by Motorola™, or the Power PC™ processor as marketed by IBM™. In addition, any of a variety of other processors, including those from Sun Microsystems, MIPS, IBM, Motorola, NEC, Cyrix, AMD, Nexgen and others may be used for implementing CPU  104 . The CPU  104  is not limited to microprocessors but may take on other forms such as microcontrollers, digital signal processors, reduced instruction set computers (RISC), application specific integrated circuits, state machines and the like. Although shown with one CPU  104 , the electronic device  100  may alternatively include multiple processing units. 
     The CPU  104  is coupled to a bus controller  112  by way of a CPU bus  108 . Bus controller  112  provides an interface between the CPU  104  and memory  124  via memory bus  120 . Moreover, bus controller  112  provides an interface between memory  124 , CPU  104  and other devices coupled to system bus  128 . It should be appreciated that memory  124  may be system memory, such as synchronous dynamic random access memory (SDRAM) or may be another form of volatile memory. It should further be appreciated that memory  124  may include non-volatile memory, such as ROM or flash memory for maintaining BIOS code, for example, that includes the boot code for implementing the present invention. System bus  128  may be a peripheral component interconnect (PCI) bus, Industry Standard Architecture (ISA) bus, etc. 
     Coupled to the system bus  128  are a video controller  132 , a mass storage device  152 , a communication interface device  156 , and one or more input/output (I/O) devices  168   1 - 168   N . The video controller  132  controls the processing and other manipulation of data  133  that is presented for display on a display screen  148 , for example, a flat panel display, a CRT or any other suitable display device or combination thereof. In another embodiment, the video controller  132  is coupled to the CPU  104  through an Advanced Graphics Port (AGP) bus. 
     The mass storage device  152  may include, but is not limited to, a hard disc, floppy disc, CD-ROM, DVD-ROM, tape, high density floppy, high capacity removable media, low capacity removable media, solid state memory device, or any other suitable volatile or non-volatile memory device and combinations thereof. The communication interface device  156  includes a network card, a modem interface, etc. for accessing network  164  via communications link  160 . The I/O devices  168   1 - 168   N  may include a keyboard, mouse, audio/sound card, printer, and the like. The I/O devices  168   1 - 168   N  may be disk drive, such as a compact disk drive, a digital disk drive, a tape drive, a zip drive, a jazz drive, a digital versatile disk (DVD) drive, a magneto-optical disk drive, a high density floppy drive, a high capacity removable media drive, a low capacity media device, and/or any combination thereof. 
     In accordance with the practices of persons skilled in the art of computer programming, the present invention is described below with reference to symbolic representations of operations that are performed by the electronic device  100 , unless indicated otherwise. Such operations are sometimes referred to as being computer-executed. It will be appreciated that operations that are symbolically represented include the manipulation by CPU  104  of electrical signals representing data bits and the maintenance of data bits at memory locations in memory  124 , execution of software instructions maintained, for example, in the memory  124 , as well as other processing of signals. The memory locations where data bits are maintained are physical locations that have particular electrical, magnetic, optical, or organic properties corresponding to the data bits. 
     When implemented in software, the elements of the present invention are essentially the code segments to perform the necessary tasks. The program or code segments can be stored in a processor readable medium or transmitted by a computer data signal embodied in a carrier wave over a transmission medium or communication link. The “processor readable medium” or “machine-readable medium” may include any medium that can store or transfer information. Examples of the processor readable medium include, but are not limited to, an electronic circuit, a semiconductor memory device, a ROM, a flash memory, an erasable ROM (EROM), a floppy diskette, a CD-ROM, a DVD-ROM, an optical disk, a hard disk, a fiber optic medium, a radio frequency (RF) link or any other suitable medium or combination thereof. The computer data signal may include any signal that can propagate over a transmission medium such as electronic network channels, optical fibers, air, electromagnetic, RF links, etc. The code segments may be downloaded via computer networks such as the Internet, Intranet, etc. 
       FIG. 2  is a flow chart illustrating a conventional boot process. The boot process  200  begins at step  205  with the loading and execution of the BIOS boot block. 
     In step  210 , the BIOS then performs the POST operation and general hardware initialization. 
     In step  215 , the BIOS code searches for and detects bootable media that may be connected to the associated device. The BIOS of  FIG. 2  has often been programmed to search for bootable media in a particular order (e.g., check floppy drive first, then CD-ROM, then hard disk drive). 
     Once the BIOS has detected the presence of bootable media, a determination is made, in step  220 , as to whether the detected bootable media is partitioned. When bootable media is partitioned (such as is the case with a hard disk drive, removable disk drive, flash, memory, etc.), the boot process proceeds to step  225  where the BIOS validates the first block of data on the bootable media (known as the Master Boot Record (MBR)). Once the MBR has been validated, in step  230  the BIOS loads and executes the MBR loader code (which it assumes is in the MBR). 
     In step  235 , the MBR loader code loads and executes the code from the boot sector of the selected boot partition, where the boot sector is the first block of data in the selected boot partition. In step  240 , the executing boot sector code loads and executes operating system initialization files. 
     If, on the other hand, the determination in step  220  indicates that the detected bootable media is not partitioned (e.g., such as in the case of a floppy drive), the boot process proceeds to step  245  where the BIOS may validate the first block of data on the bootable media (i.e., boot sector). 
     In step  250 , the BIOS loads and executes code (which it assumes exists) from the boot sector. In step  255 , the boot sector code then loads and executes the operating system initialization files. 
     While  FIG. 2  represents a conventional boot process,  FIGS. 3A-3B  illustrates an exemplary boot process  300  consistent with the principles of the present invention. While the electronic device  100  ( FIG. 1 ) may employ or execute the illustrated boot process  300 , it should equally be appreciated that numerous other systems and devices, each with varying configurations may also be booted according to boot process  300 . The boot process starts at step  305 , where the BIOS boot block is loaded and executed. 
     In step  310 , the BIOS code may cause the processor to perform POST operations and system hardware initialization. 
     In step  315 , the boot process then causes the processor to check if a quick boot mode has been selected. In one embodiment, the quick boot mode is determined by having BIOS poll a flag in system memory or a register of a peripheral component, for example, a switch, a hard key, soft key using a keyboard controller or other suitable I/O devices or combinations thereof. 
     If, in step  320 , it is determined that quick boot mode has not been selected, then the BIOS code may cause the processor to perform normal boot operations in step  325 . If, on the other hand, the quick boot mode has been selected, then the boot process continues to step  330  where the BIOS code checks for bootable media. It should be appreciated that the BIOS code may cause the processor to check for bootable media in a particular order (e.g., flash memory, then floppy drive, CD-ROM, then hard disk drive, etc.), or may default to check for a particular type of bootable media. While in one embodiment the particular type of bootable media is a CompactFlash® card, it should equally be appreciated that any type of non-volatile media may be used, such as Secure Digital (SD) cards, Memory Stick™, floppy disk, CD-ROM, hard disk drive, removable hard drive, USB drive, etc. 
     Regardless of the media type for the bootable media, in step  335 , the process determines whether bootable media was found. If no bootable media was found, then boot process exits the quick boot mode in step  340 . At this point, the BIOS code may cause the processor to perform the normal boot operations or may provide an error message. 
     Alternatively, if bootable media was found, then the process continues to step  345  of  FIG. 3B  where the BIOS code causes the processor to initialize any additional hardware needed to perform booting operations from the located bootable media (e.g., PCMCIA controller, VGA BIOS, etc.). 
     Thereafter, in step  350 , the BIOS code may cause the processor  104  to read data from a predetermined location (e.g., Cylinder: 0, Head: 1, Sector: 1) of the bootable media. In one embodiment, the BIOS code causes the processor to read this data using BIOS interrupt INT13h. 
     In step  355 , the data read in step  350  may then be stored in a predetermined memory location. In one embodiment, this memory location is 0000:7C00h, although this predetermined location could equally be located elsewhere. 
     In step  360 , the file system type for the bootable media is determined from the previously read data. While in one embodiment, the file system type for the bootable media may be File Allocation Table (FAT) 12, FAT 16 or FAT 32, it should also be appreciated that the bootable media may also be formatted according to another file system (e.g., VFAT, HPFS, NTFS, etc.). In one embodiment, the BIOS code determines the type of file system using a predetermined algorithm, such as the algorithm illustrated in  FIG. 4 . 
     Referring back to  FIG. 3B , if the bootable media&#39;s file system is found to be FAT 12, the boot process proceeds to step  365  where a FAT 12 boot loader code is loaded from BIOS to a predetermined memory location (e.g., 0:7C40 memory location). As will be described in more detail below, in one embodiment the FAT 12 boot loader code may be stored in non-volatile memory along with the BIOS code (e.g., in ROM BIOS), rather than on the bootable media itself. If, on the other hand, it is determined that the bootable media&#39;s file system type is FAT 16, then the boot process will continue to step  370  where a FAT 16 boot loader code is loaded from BIOS to a predetermined memory location. Similarly, if the data read from the boot sector of the bootable media in step  350  indicates that the file system type is of some other type (e.g., FAT 32, NTFS or other suitable file system type), then the boot process proceeds to step  375  where a corresponding boot loader program code may then be loaded from BIOS. In one embodiment, if there is no corresponding boot loader program available, the boot process would exit and normal boot operations would continue. Alternatively, the boot process may provide an error message, followed by the electronic device being rebooted. 
     Once the appropriate boot loader code has been loaded, the boot process may then proceed to step  380  where execution control is passed to the BIOS boot loader code. In one embodiment, the BIOS boot loader code may then proceed to boot the electronic device  100  in the traditional fashion, in which case boot process would end while the BIOS boot loader code would continue to execute from BIOS non-volatile memory. However, in another embodiment, after step  380 , the boot process may proceed to process  500  of  FIG. 5 . 
       FIG. 5  is a flow chart illustrating the steps of process  500  which continue from where boot process  300  left off. In step  505 , the BIOS boot loader code causes the processor to check for executable programs to load from the bootable media. 
     In step  510 , if it is determined that there are no programs available on the bootable media to load, the process may then cause the processor to locate and load an operating system from some other available non-volatile media (e.g., hard drive, floppy drive, CD-ROM, etc.) in step  515 . 
     If, on the other hand, the BIOS boot loader code causes the processor to detect the presence of executable programs on the bootable media, the process may proceed to step  520  where a kernel loader of the BIOS boot loader actually loads and executes the program from the bootable media. While in one embodiment, this program may be an operating system for device  100 , it should equally be appreciated that the program may be a standalone application program. Moreover, additional programs located on the bootable media may subsequently be loaded in steps  525  and  530 . 
     In order to be able to perform the operations described above, the BIOS code of the electronic device  100  may be pre-configured at the factory level. For example, the BIOS code used to implement process  300  ( FIG. 3 ) and process  500  ( FIG. 5 ), as well as the individual BIOS boot loader programs that may be called, may all be programmed at the factory level prior to user-level delivery of the electronic device  100 . Alternatively, a firmware upgrade of the BIOS code for an existing device or suitable system may be undertaken to provide the functionality described above. In one embodiment, this firmware upgrade may be accomplished by having users download and execute a utility program, for example, Phoenix WinPhlash™ and/or Phoenix Phlash16™, manufactured and distributed by the assignee of the present invention or any other suitable device or combination thereof that is designed to re-program flashable memory. It should be appreciated, however, that any means known in the art for updating non-volatile memory may be used. 
     In a further embodiment, a single executable program may be downloaded and installed by a user where the single executable program includes both the application program(s) referred to above with reference to steps  520 - 530  of  FIG. 5 , as well as the flashable memory utility program. In this fashion, the single executable program may be used to cause the BIOS firmware upgrade to take place, as well as to install the one or more application programs onto the bootable media. It should of course be understood that more than one executable program may be similarly downloaded. 
     Thus, what is disclosed is a media boot loader that may be used to expedite the boot process by eliminating the need to have a master boot record (MBR) for bootable partitioned media, or in the case of bootable non-partitioned media, eliminate the need for a boot sector. With the boot loader code being stored in BIOS rather than on the bootable media itself, one aspect of the invention is to enable control to be passed to the BIOS boot loader code which, in turn, may load one or more programs into memory (e.g., an operating system (OS), standalone application programs, etc.). In another embodiment, since the bootable media does not have the special formatting or the MBR of traditional partitioned bootable media, the bootable media described herein may be used to store data as any non-bootable media would, while also being able to provide the functionality of bootable media. 
     While certain exemplary embodiments have been described and shown in the accompanying drawings, it is to be understood that such embodiments are merely illustrative of and not restrictive on the broad invention, and that this invention not be limited to the specific constructions and arrangements shown and described, since various other modifications may occur to those ordinarily skilled in the art.