1. Technical Field
The present invention relates in general to an expansion device detachably installed into a portable computer system, such as "notebook" type computer, and more particularly to an expansion device which is capable of resuming a task quickly and precisely from the same point of execution when a computer system restarts power after suspending power supply to its components to save power.
2. Description of the Related Art
Recent advancements in technologies has resulted in a widespread use of portable or "notebook" type computers designed to have a small size and light weight for portability. An example of portable computer is shown in FIG. 18, in which portable computer 100 has relatively thin body 110 and cover 120, which is coupled to body 110 so that cover 120 can be opened and closed. Cover 120 has shallow case 121. At the bottom of case 121 is a pair of cylindrical protrusions 122 formed integrally within the case. With the pair of protrusions 122 rotatably supported with respect to the body, cover 120 is hinged on body 110, allowing cover 120 to be opened or closed with respect to body 110 in an axis of the protrusions 122. In the central portion of the open side, i.e. back side, of the cover, liquid crystal display or LCD 123 is provided as a display means of the personal computer (hereinafter the cover is generically called LCD120).
Body 110 has a shallow case 111 to which support plate 112 of a given width is attached to cover the rear portion of the upper opening of case 111. At the front portion of the upper opening, keyboard 113 is placed as an input means of the personal computer. At the back edge of keyboard 113, a pair of tongue protrusions 114 is formed integrally with keyboard 113. With the pair of protrusions 114 supported axially with the from edge of support plate 112, keyboard 113 is hinged on plate 112. This allows keyboard 113 to be opened or closed with respect to case 111 within an axis of protrusions 114, and the interior of case 111 is exposed when keyboard 113 is opened. Opening or closing of LCD120 with respect to body 110 and that of keyboard 113 with respect to case 111 is accomplished by two-step operation on open/dose control 115 provided on a side of case 111. Since closing LCD120 or opening keyboard 113 will disable computer 100, mechanical operations such as LCD dose and keyboard open are electrically converted into CPU interrupt factors.
FIG. 19 shows the exposed interior of case 111 with keyboard 113 being opened. At a near central portion of case 111, partition 116 is provided to separate the front portion of case 111 from its rear portion. Partition 116 may be formed of a thin metal plate by a bending process. In the rear portion of case 111, which is enclosed by partition 116, there is accommodated internal circuits (not shown) of the personal computer including CPU, ROM, RAM and system bus. The larger space in front of partition 116 is provided to accommodate expansion devices, such as floppy disk drive (FDD) pack 117 and hard disk drive (HDD) pack 119 and battery pack 118. Provided on a side of partition 116 are connectors (not shown) which comply with respective standards for the internal circuits of portable computer 100 to electrically connect these packs with the circuits.
As a new concept for such portable computer 100, there has been suggested that FDD pack 117 or HDD pack 118 be used exchangeable with other detachable expansion devices. For example, FDD pack 117 could be removed from the space in the front portion of case 111 to substitute CD-ROM drive pack 50. The term CD-ROM (Compact Disk Read Only Memory), as used herein, is meant to be an optical disk of aluminum reflective film type, and particularly a storage medium used only for playback which stores information by making use of the fact that depressions on the surface of the disk cause variation of the intensity or phase-shift of reflected light. Capable of high-density recording, CD-ROM has been used to record a great quantity of information such as text data and program data, as well as audio and image data (including pictures, animation and computer graphics). By incorporating a CD-ROM drive having such data playback function, the portable computer as a new medium (or multimedia) is expected to be widely used in fields including education and entertainment.
One of the purposes for which the portable computer is developed is outdoor use in a portable manner. Typically, power supply is therefore not dependent on a constant AC source, but on a battery pack (particularly NiCd, NiMH or Lilon rechargeable battery), as shown in FIG. 19. However, the battery pack is limited to the type of small size, light weight and short lifetime. Consequently, measures have been taken in recent portable computers for Power Management or Power Save.
One example of power save is "Suspend", which is a state where the computer is powered down to almost all portions except main memory to save power when a predetermined state occurs in which an I/O device activity has not been detected for a certain period of time or dosing of an LCD (cover) is detected. Before the suspend mode is entered, the data necessary for restarting a task, such as the hardware context information including I/O configuration, CPU status and the contents of VRAM, is saved in main memory. On the other hand, the operation for restarting power supply and exiting from the suspend mode is called "Resume". In the resume mode, the data previously saved in main memory is restored to each component to enable a task to be restarted from the same point it was at when the computer was powered down. This series of power management operations is actually executed by a program such as those called PM code (PMC) or Advanced PM (APM), which is a trademark of Astek International.
One challenge encountered in developing a power management technique is to resume a task quickly and from precisely the same point of execution as of interruption upon recovery from the power save mode such as suspend. As described above, the portable computer body (hereinafter called host) saves the system information which was present immediately before suspend, such as the hardware context information including register values of each chip and the contents of VRAM, in main memory to preserve the "same point of execution" for the host. For an expansion device, on the other hand, the only information to be provided when the host enters the suspend mode is "power down". In other words, the host does not consider the status of the expansion device, but considers only itself, that is, whether it has preserved the "same point of execution" to effect power down.
Expansion devices can be divided into ones which have no CPU, e.g. floppy disk drive or FDD, and ones which have a built-in CPU, e.g. hard disk or HDD and CD-ROM drive. Operation of the former type is controlled by a controller circuit provided within the host, such as floppy disk controller or FDC. In such cases, the host could preserve the status of an FDD immediately before transition to suspend, i.e., the "same point of execution", by the managing FDC.
However, the case is different in the expansion device having a built-in CPU. This type of expansion device includes ROM for storing various types of firmware and RAM as the working area of CPU. The host operating system or OS, does not directly control the expansion device, but only issues an instruction in a form of command to the CPU of the expansion device. The CPU of the expansion device interprets the command from the host in accordance with the firmware in ROM and performs actual tasks by using RAM as working area. The host OS is not required to directly control all components within the expansion device, and typically has no such function. In these environments, if the host references only the status of itself at power down, operation results, e.g. the contents of RAM, on the expansion device will be lost, and the lost contents of storage cannot be recovered even if power is supplied again from the host.
From the descriptions above, those skilled in the art will readily appreciate that conventional host computers cannot restart a task from precisely the same point of execution. For example, problems which arise when the status immediately before transition to the suspend mode is lost at the expansion device will now be briefly described with an example of CD-ROM drive.
The RAM at the CD-ROM drive has recorded various information on the disk being inserted. This information includes data allocation information such as Table of Contents or TOC, drive parameters indicating data rates, and audio parameters indicating audio output levels. Among these, the TOC information is necessary for searching recording positions during playback of the disk, and is retained when the disk contents are read into RAM during its insertion until either the disk is removed, or power on reset (POR) is done. Each value of drive and audio parameters is dynamically updated during processing of commands from the host. However, if power supply is suspended only for the convenience of the host, such data in RAM will be lost.
Once this working data in RAM is lost, some disadvantages are found during resume operation. Of these, the TOC information, as with normal Power On Reset (POR), must be read again from the disk. However, the CD-ROM drive has an average access time of as long as 350 milliseconds, requiring seconds or even tens of seconds for reading the TOC information. (The compact disk usually manages information for each session. The TOC is provided for every session and recorded in the Lead-In at the beginning of each session. The TOG has a size of 512 bytes per session. For a disk which consists of multiple sessions, the time required for the reading operation will be longer as the number of TOCs increases.) In addition, drive and audio parameters must be specified again, as with normal POR. In such case, the context of the task is destroyed, e.g. the disk is played back with a different audio level. This gives the user a sense of incompatibility. Briefly, playback of the CD-ROM is not restarted from the same point of execution. Similar problems might arise during wake-up after hibernation. (For details of the hibernation technique for computer systems, refer to Japanese patent application 5-184186.)
With its high capacity, the CD-ROM, among others, is often used for providing long programs such as role-playing games, and the user is likely to dose the LCD many times to stop a game until the program ends. Thus, the problem of the resume mode, i.e. restarting a task quickly from the same point of execution, becomes more severe.
Such problems during the resume mode, however, are unlikely to occur with the HDD since its average access time is relatively short, approximately 12 milliseconds. For the magneto optical (MO) disk drive, the average access time is slightly longer at 32 milliseconds at most, the problem of resuming being as severe as for the CD-ROM drive.
From the foregoing descriptions, it should be readily apparent to those skilled in the art that there is required information for restarting a task from the suspend mode at the host, and similarly, that there is also required information for restarting the task at an expansion device, especially one having its own CPU. Moreover, it should also be apparent to those skilled in the art that the host cannot control all the information required by the device for resuming. However, if no provision is available for managing such information at the expansion device, a longer period of time will be necessary for restarting a task and the context of the task will be lost.