Locking system for coupling modules to a modular computer

Abstract: This is a method and system to lock and release modules on computing devices. The system may include: An automatic lock system for modules (160, 162) on a computing device (100), the system comprising: a processor connected to a system bus; an input means connected to the processor by the system bus; an output means connected to the processor by the system bus; and a module that inserts into the computing device and is connected to the system bus; a module controller that controls the module and is connected to the system bus; a latch (134) that locks and releases the module to and from the computing device; and a subsystem that controls the latch. The system may also include a basic input/output system (BIOS). The subsystem may include: a means to determine whether the module is being accessed by the processor; a means to communicate to the module controller to terminate input/output activity; a means to remove a plurality of device drivers for the module from the BIOS; and a means to inform an operating system that the module is removed. The module may include: a battery system, a media bay module (162), a CD-ROM, a hard disk drive, a floppy disk drive, and a magneto-optical drive. Other devices, systems and methods are also disclosed.

Description: FIELD OF THE INVENTION This invention generally relates to computers, and more particularly to computers with a module locking system controlled by computer software. BACKGROUND OF THE INVENTION Although this invention is described in relation to a computer, and specifically a notebook computer, it may be implemented into any device that has a locking system controlled by a computer software program. Today, computers may include anything the user may dream of from CD-ROM players to 2 gigabyte hard disk drives, to fully accessoried docking stations. However, in order to reduce the size and weight of the computer, the computer manufacturer must choose what items the user must have and what items the user can do without. A method to provide the user the most flexibility and lightest and smallest computer, is to provide a media bay with swapable options. A computer may include a Media Bay that allows the user to customize the computer for different applications or environments. A customizable Media Bay could include options for a number of peripherals. For example, the media bay could include: a CD-ROM drive, a secondary hard disk, a floppy diskette drive, a magneto optical (MO) drive, or an additional battery. With these type of options, the user could dynamically change the computer to accommodate multimedia applications, more storage, lighter weight, removable mass storage, or longer battery life. When used with a Plug and Play (PnP) operating system, a computer will provide the user with seamless insertion and removal of the media bay options; peripherals can be "hot plugged" into the media bay while the computer is running. However, while this hot plugged feature is advantageous, it is also very dangerous. Even though the computer may allow the user to remove or insert the media bay module at any time, it may not be wise to do so. Users may damage the hardware or lose data if the swap is not handled carefully. JP-A-721 966, as represented by its equivalent US-A-5 648 762, discloses an apparatus consisting of a docking station main body into which a notebook computer may be inserted and from which, subsequently, the notebook computer may be removed. According to US 5 648 762, inserting the notebook computer into the docking station involves suspending the operation of the notebook computer CPU and removing the notebook computer from the docking station involves stopping the operation of the notebook computer CPU, there being no disclosure of any accompanying change to any basic input-output system (BIOS). GB-A-2 262 825 discloses a computer system in which removable system elements, carried on cards, include full device drivers and, additionally, device driver stubs. According to GB-A-2 262 825, the device driver stub is copied into the computer system memory when a system element card is inserted into the computer system, but the full device driver code is not copied and the device driver stub remains in the computer system memory when the card is removed. WO-A-96/14732 discloses a computer system having a built-in compressed bus with module bays into which may be plugged a variety of function modules providing functions including CPU, power, floppy disc, hard disc, RAM, LAN communications, modem, FAX communication and data acquisition. JP-A-03 206 584 discloses the use of a blocking member, which is movable by an electrical power supply switch, to prevent the insertion of a circuit board into an electrical apparatus when the power supply switch is in the "on" position. The present invention provides a computing apparatus including: a processor, an input means and an output means connected together by way of a system bus, a basic input/output system (BIOS), a module controller, connected to the system bus, for controlling a module which is removably connected to the system bus, a locking mechanism that, when enabled locks the module to and unlocks the module from the computing apparatus and a sub-system, connected to control the locking mechanism, capable of preparing the computing apparatus for the physical removal of the module and, on being instructed, to prepare the computing apparatus for the physical removal of the module the sub-system further including : (i) means for determining whether the module is being accessed by the processor, (ii) means for acting through the module controller to close files and terminate applications involving the module, (iii) means for removing device drivers for the module from the BIOS, (iv) means for informing the computing apparatus of the removal of the device drivers and (v) means for releasing the locking mechanism after removing the device drivers. Suitable modules include an additional battery system, a media bay module, a CD-ROM drive, a magneto-optical drive, a hard disc drive and a floppy disc drive. Preferably, the locking mechanism is capable of being selectively disabled and enabled by a user of the apparatus. Advantageously, the locking mechanism is capable of remaining locked when the apparatus is switched off with the locking mechanism in the locked position. Additionally, the locking mechanism is capable of being disabled for maintaining a condition in which the module is not locked to the apparatus. Preferably, the sub-system for controlling the locking mechanism includes software that is password-protected. Preferably, the locking mechanism includes a latching mechanism capable of latching the module to the apparatus and a solenoid capable of blocking the movement of the latching mechanism for locking the latching mechanism. Preferably, the input means is a keyboard and, preferably, the output means is a display device. Advantageously, the computing apparatus is capable of accommodating the replacement of a module with another module of different functionality including, advantageously, a module selected from a plurality of modules differing in functionality from one another. Preferably, the modules include a module implemented as a secondary IDE controller in a programmable logic device (PLD). Preferably, the PLD further provides electrical switches (Q-buffers) to connect or disconnect all signals to the module and, preferably, the switches are under software control through a register in the PLD. Preferably, the BIOS can disable the signals to the module, effectively disconnecting the module from the rest of the computing apparatus and, preferably, ID bits which identify the module and power and ground signals to the module are not controlled by the Q-buffers. SUMMARY OF THE INVENTION This invention provides means for the user to change the media bay module when the computer is turned "ON" and not damage the media. In addition, this method will operate with the Plug and Play (PnP) options of the Microsoft™ Windows 95™ operating system. The present invention is implemented with a computer software program that locks and releases the media bay module. However, the present invention can also include a manual lever that can eject the media bay module whenever the computer is turned "OFF". Once a media bay module is inserted into the computer, a locking mechanism insures that the device is secure inside the bay. Optionally a password can be used to prevent the device from being removed. When the user wants to remove a device from the bay, the present invention is invoked and commanded to release the module. However, the present invention will first query the operating system to find out if it is safe to unlock the device; thus, the system protects against data loss or device damage resulting from accidental removal of a device in use. This is a method and system to lock and release modules on computing devices. Accordingly the present invention provides A locking system for coupling modules to a computing device comprising, means for coupling a module to said computing device, said coupling being arranged for providing an electrical connection between said module and a system bus of said computing device, a module controller for controlling operation of said module, said module controller being arranged for electrical connection to said system bus, a latch for securing and releasing said module to and from said computing device, and a sub-system for controlling the actuation of said latch. The system may also include a basic input/output system (BIOS). The subsystem may include: a means to determine whether the module is being accessed by the processor; a means to communicate to the module controller to terminate input/output activity; a means to remove a plurality of device drivers for the module from the BIOS; and a means to inform an operating system that the module is removed. The module may include: a battery system, a media bay module, a CD-ROM, a hard disk drive, a floppy disk drive, and a magneto-optical drive. The method of locking and releasing a module in a computing device may include: requesting device removal from a basic input/output system (BIOS); determining whether application programs have any files open on module; removing a plurality of device drivers for the module; and informing the BIOS to remove the module. Other devices, systems and methods are also disclosed. BRIEF DESCRIPTION OF THE DRAWINGS The present invention will now be further described by way of example, with reference to the accompanying drawings in which: Figure 1 is an isometric view of a portable computer; Figure 2 is an exploded view of the base of the portable computer of Figure 1; Figure 3 is a block diagram of the electronic architecture of the portable computer of Figure 1; Figure 4 is another block diagram of the electronic architecture of the portable computer of figure 1; Figure 5 is a close-up of the base of the portable computer; Figure 6 is a flowchart of insertion of the Media Bay module Figure 7 is a flowchart of removal of the Media Bay module; Figure 8 is a flowchart of how the BIOS removes a device; Figure 9 is a diagram of the power states of the computer; Figure 10 is a flowchart of inserting a device one of the power states of the computer depicted in Figure 9; Figure 11 is a chart depicting the generation of the Media Bay SMI; Figure 12 is a flowchart of the software implemented under the Microsoft™ Windows 95™; and Figures 13-16 are dialog boxes of the Media Bay Monitor. Corresponding numerals and symbols in the different figures refer to corresponding parts unless otherwise indicated. DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS Figures 1-4 illustrate a portable personnel computer which the present invention could be implemented on. Figures 5-16 illustrate details of the present invention. Figure 1 illustrates a portable personal computer 100 having a primary display 123, a base unit 102 and a keyboard 164. The present invention is ideally suited for the portable computer 100. The alternate display could include a clear window made of plastic or glass directly above the PCMCIA cards. In addition, the display could include a sliding privacy window, to close the clear window for privacy purposes. However, the alternate display could include an opaque window that slides back to leave an opening to see the PCMCIA card display. Moreover, one possible configuration for the alternate display would display messages in one or two lines, and scroll as needed. However, although figure 1 illustrates one embodiment, other embodiments will be discussed later. Figure 2 illustrates an exploded view of the base unit 102 of figure 1. Keyboard 164 is attached to top cover 172. The speaker assemblies 156 and the pick button assembly 113 both attach to the top cover 172. Moreover, the top printed wiring board 166 and the bottom printed wiring board 168 are attached to the heatplate and printed wiring board assembly 108. The bus/VGA printed wiring board 170 also attaches to the bottom printed wiring board 168. The assembly 108 and printed wiring boards 168, 170 and 166 fit into the base assembly 122. The base assembly 122 has a connector door 121 that exposes the connectors for the user's access. The connector door 121 is operated by the door release button 125. The base assembly 122 also has a modem door 118, hard drive assembly 109 and media release latches 134. The media release latches 134 release and secure the battery pack 160 and media bay 162. Figure 3 is a block diagram of the top printed wiring board 166 of portable computer 100 (shown in figure 2). Portable computer 100 is a color portable computer based upon the Intel™ Pentium™ microprocessor 300. Operating speed of the Pentium™ is 120 Mhz internal to the processor, but with a 60 Mhz external bus speed. A 60 Mhz oscillator is supplied to the ACC Microelectronics 2056 core logic chip which in turn uses this to supply the microprocessor. This 60 Mhz CPU clock is multiplied by a phase locked loop internal to the processor to achieve the 120 Mhz CPU speed. The processor 300 contains 16 KB of internal cache and 256 KB of external cache 302 on the logic board. The 60 Mhz bus of the CPU is connected to a VL to PCI bridge chip 326 from ACC microelectronics to generate the PCI bus, the ISA bus and the MD bus. The bridge chip takes a 33.333 Mhz oscillator to make the PCI bus clock. The primary video controller 314 and an alternative video controller (not shown) are driven from the PCI bus. In addition, both, a docking options connector 312 and a cardbus I/F 318 are connected to the PCI bus. The cardbus I/F 318 connects a PCMCIA card system which allows two PCMCIA cards to be connected to the PCI bus. These slots may be used with third party boards to provide various expansion options. The primary video controller 314 has a 14.318 Mhz oscillator input which it uses internally to synthesize the higher video frequencies necessary to drive an internal 10.4" TFT panel or external CRT monitors. When running in VGA or Super VGA resolution modes, the TFT panel may be operated at the same time as the external analog monitor. For XVGA resolutions only the external CRT may be used. In addition, the PCMCIA card system has a zoom video connection to the primary video controller. Portable computer 100 contains 16 Megabytes of standard memory 308, 310 which may be increased by the user up to 48 Megabytes by installing optional expansion memory boards 304, 306. The first memory expansion board can be obtained with either 8 or 16 Megabytes of memory. With the first expansion board installed, another 8 or 16 Megabytes of memory may be attached to make the maximum amount. Operation input to portable computer 100 is made through the keyboard and an internal pointing device imbedded in the keyboard. Both types of input feed into the keyscan controller 320 which is connected by the ISA bus. In addition, I/O register 324 is connected through the ISA bus. Moreover, a board-to-board connector 322 connects the top printed wiring board to the bottom printed wiring board. Figure 4 is a block diagram of the bottom printed wiring board 168 of the portable computer 100 (shown in figure 2). The battery system (not shown) of portable computer 100 is Lithium Ion and has internal controllers which monitor the capacity of the battery. These controllers use a 4.19 Mhz crystal internal to the battery. Portable computer 100 also has an internal sound chip 334 which can be used to generate or record music and/or sound effects. The sound chip 334 is fed by internal speakers, an external speaker connection, and internal and external microphones. In addition, a zoom video port feeds into a codec chip 332 which is connected to the sound chip set 334. The codec chip 332 is a digital to analog converter. The modem chip set 342 is connected to a DAA daughter card 336, a modem codec 340, and a voice codec 346 which also connects to the microphones and speakers. The DAA daughter card 336 is an adapter that allows the modem 342 to adapt to many different types of telecommunications around the world without modification to the modem 342 itself. The super I/O (input/output) chip set 344 is connected to a set of buffers 338, a floppy disk drive, an IDE hard disk drive, and serial and parallel ports. In addition, a second serial port is connected to a Serial Infrared (SIR) device. This SIR device has an interface chip which uses a 3.6864 Mhz oscillator. The SIR port can be used to communicate serial data to other computers or peripherals equipped to either receive or transmit SIR data. The programmable logic device (PLD) 348 controls many proprietary functions of the computer. For example, the PLD 348 controls the IDE interface to the media bay module which may include a CD-ROM player, an additional hard disk or other peripherals devices. In addition, if the media bay module is a floppy disk drive, the PLD 348 will route the communications to the super I/O chip 344. The P160 350 is a board-to-board connector that connects the bottom printed wiring board to the top printed wiring board. The sound chip set 334, the modem chip set 342, and the super I/O chip set 344 are all connected to the interrupt (IRQ), the SA (ISA address bus), and the SD (ISA data bus) lines. Figure 5 depicts more detail of the media bay module 162, the release mechanism 134 and the computer base 122. However, the release mechanism in this figure is just one embodiment of many possible implementations. In addition, the connector door 121 and the battery pack 160 are also shown. As stated earlier in relation to figure 4, the media bay module is implemented as a secondary IDE controller in a programmable logic device (PLD). When a device is inserted into the media bay, the PLD generates a signal (SMI) to allow the basic input/output system (BIOS) to detect the insertion of the device. The PLD also provides a device identification (ID) register that holds the ID of the inserted device. The ID is 4 bits long identifying one of 16 possible media bay devices. When the bay is empty, the ID is 1111. The PLD also provides electrical switches (Q-buffers) to connect or disconnect all signals to the device in the bay. These switches are under software control through a register in the PLD. The BIOS can disable those signals, effectively disconnecting the device from the rest of the system. The ID bits and power and ground signals to the media bay device are not controlled by Q-buffers. The preferred embodiment of the media bay also includes a locking mechanism that prevents accidental removal of a media bay device while it is in use. This locking mechanism can be implemented as a solenoid that blocks the movement of the media bay latch. The locking mechanism can be controlled by a register in the PLD. The PLD could thus indicate if the mechanism is locked or unlocked using bits in a locking mechanism status register. The media bay also includes a media bay LED (not shown) that gives the user visual feedback that the solenoid is locked and the device is in use. The LED is software controlled. SOFTWARE CONTROL FOR MODULE LATCH AND RELEASE The software programs involved in the control of the media bay fall into one of four categories: BIOS, Operating System, Device Drivers, and Applications. Media bay operation is highly dependent on the operating system running on the computer. A PnP operating system like Windows 95™ takes full advantage of the media bay features and offers the most flexibility in insertion and removal of media bay devices. Windows 95™ supports event notification and dynamically loadable virtual device drivers (VxD). This allows devices to be hot plugged into the computer without the need for closing applications or rebooting. Upon insertion, the user only sees a small delay (hourglass) and then automatically a new drive letter for the drive inserted appears. The present invention, the Media Bay Monitor, is an application that manages the Media Bay, providing status and coordinating the removal of Media Bay Devices with Windows 95™. The present invention can be implemented as a Windows 95™ application that provides the user with an easy and safe way to remove devices from the media bay. Other operating systems that do not support PnP, like Windows for Workgroups™ and DOS™, require the user to reboot in order to change media bay devices. OPERATION UNDER WINDOWS 95™ The Media Bay Monitor appears as a miniature icon on the toolbar. When the icon is double clicked, the Media Bay Monitor shows status of the Media Bay, and presents the option to remove the media. If removing the Media Bay Device is desired, the Media Bay Monitor initiates the removal with BIOS. The Media Bay Monitor waits for messages from BIOS indicating that a Media Bay Device has been or is in the process of being removed. The Media Bay Monitor pops up a dialog box warning that the Media Bay Monitor should be used to properly remove media. Figure 6 details insertion of the Media Bay module. When a device is inserted into the Media Bay (MB) (block 400), the PLD will generate a system management interrupt (SMI) as soon as the Device ID is valid (block 402) and the latch switch is released. The MB SMI bit in the "SMI cause status and clear SMI" register (Port El) should be cleared to allow further MB SMI interrupts. The solenoid can be turned "ON" to lock the device into the Media Bay, provided the user has not set an option in CMOS memory (Device_Always_Unlocked) to keep the solenoid unlocked (block 406). After locking the device if necessary, the Q-Buffers for the appropriate device are turned "ON", and the Media Bay LED is turned "ON". The device is now active (block 408). BIOS will then post a CONFIG_CHANGED message in the PnP Event Q (block 410). Windows 95™ will receive this message and re-enumerate all devices (block 412). When the new device is found, Windows 95™ will load the class driver for it(block 414), assign a drive letter (block 416), and the device will be available to use. MEDIA BAY DEVICE REMOVAL Removing a media bay device while it is active may result in data corruption on the drive or electrical damage. Applications may have open files on the device even if it does not appear to be working. It is therefore important to ensure that applications are not actively using the drive to be removed. The user has the option to disable the locking of the Media Bay Device. If the device is not locked the Media Bay Monitor will warn the user that he may corrupt his data. Figure 7 shows a flowchart of how the Media Bay Monitor removes a device. When it is desired to remove the Media Bay Device, the user should engage the Media Bay Monitor's icon on the tool bar. This will bring up a dialog box showing the status. On this dialog box, there is a button to remove the Media Bay Device (block 420). This button (block 420) will cause the Media Bay Monitor to call BIOS PnP Function 4 (SendMessage) passing the OEM Defined message "Unplug Media Bay Device" (0x8000) (block 422). Next, a dialog box (block 424) appears saying we are waiting for the system to prepare to remove the device. While the dialog box is running, the Media Bay Monitor is polling OEM_FLAG waiting for it to change to OK, or CANCEL. If a CANCEL is received (block 426) instead of an OK while waiting for the OS to prepare for device removal, the OS has determined that device should not be removed. The OS will inform the user why the device cannot be removed (block 432) (per Plug and Play BIOS Specification). If a CANCEL - BOOTDEVICE (block 430) is received instead of an OK while waiting for the OS to prepare for device removal, the BIOS will not let the device be changed because it is the boot device (block 436). If OEM_FLAG changes to OK (block 428), it is OK to remove the Media Bay Device. BIOS has already turned "OFF" the Q-Buffers, unlocked the solenoid, and turned "OFF" the Media Bay LED. A dialog box is then displayed telling the user it is OK to remove the Media Bay Device (block 434). The Media Bay Monitor then polls OEM_FLAG again (block 434) waiting for it to be cleared indicating that the Media Bay Device has been removed. The process is complete once the OEM_FLAG has been cleared (block 438). Figure 8 shows a flowchart of how the BIOS removes a device. When a user presses the "Remove Device" button on the Media Bay Monitor, the BIOS's PnP Function 4 (Sendmessage) will be called with the OEM defined message "Unplug Media Bay Device" (0x8000) (as shown and described in figure 7). When the Unplug Media Bay Device message is received (block 440), BIOS will first clear the OEM_FLAG (block 442). On a PnP OS, BIOS will post an ABOUT_TO_CHANGE_CONFIG message in the PnP Event Q (block 452). On a non-PnP OS, BIOS will prepare the device to be removed by turning "OFF" the Q Buffers, LED and unlock the Solenoid (block 458). The OEM_FLAG will also be set to OK indicating to the Media Bay Monitor it is OK to tell the user to remove the Media Bay Device (block 454). When the OS receives the ABOUT_TO_CHANGE_CONFIG message (block 452), it polls applications to make sure it is OK to remove the device. If everything is OK it will call BIOS's PnP Function 4 (SendMessage) passing OK (block 456). If the OS doesn't want the device to be removed, CANCEL will be sent to the BIOS (block 472). When BIOS Receives the OK message (block 456), the Media Bay Device will be prepared for removal by turning "OFF" the Q Buffers, LED and unlock the Solenoid (block 458). The OEM_FLAG will also be set to OK indicating to the Media Bay Monitor it is OK to tell the user to remove the Media Bay Device (block 460). After the Media Bay Monitor sees the OEM_FLAG go to OK, it will inform the user that the Media Bay Device can be removed. When the device is removed, an SMI is generated by the hardware (block 462). When the SMI is received (block 462), the OEM_FLAG is cleared (block 464), and if we are in a Plug and Play OS, BIOS will then post a SYSTEM_DEVICE_CHANGED message in the PnP Event Q (block 468) and the process is complete (block 470). If BIOS receives a CANCEL message (block 472) instead of the OK message, the OEM_FLAG will be set to CANCEL (block 474), and the process is complete (block 476). OPERATION UNDER NON PnP OPERATING SYSTEMS The operating systems under this category are DOS™, Windows for Workgroups™ (WFW), OS/2™ and others. Presently, these operating systems do not support Plug and Play, event notification, or dynamically loadable virtual device drivers. All the peripherals in the system must be present before the operating system is loaded and must remain unchanged. The operation of the media bay under these operating system is "cold" insertion and removal. BIOS must identify and record in CMOS memory the relevant device parameters before the OS is loaded. This is done in the system setup. To insert or remove a media bay device, the user must perform the following operations: Close all applications Shut down the operating system Power off the computer Insert/Remove media bay device Power on the computer and press F2 at the setup prompt Configure media bay device parameters Restart OS and applications OPERATION UNDER DIFFERENT POWER STATES Figure 9 shows the power states of the computer. Device insertion/removal is discussed in each of these states and during transitions from one state to another. S1 - OFF state In this state, the user can insert or remove any media bay device safely since all applications have been closed and power is not applied to the media bay. An important consideration is that the solenoid must be in the unlocked position (latch open) when the computer is "OFF". If the solenoid is locked while the bay is empty, the latch will be blocked and the user may force the device into the bay and damage the latch or solenoid mechanism. To ensure that the solenoid is open, every path leading to this state must unlock the latch first (there is one exception to this requirement discussed at the end of this section). As shown above, transitions from any of three states can lead to this state. These are FULL ON (S2), STANDBY (S3), and SUSPEND (S4). The user can get to the "OFF" state from any of the above states by pressing the power switch. This is a "soft" switch which allows BIOS to unlock the latch then power down the system. If the user gets to the OFF state by removing the battery or AC power plug instead of pressing the power switch the solenoid will be left in the locked position while the unit is "OFF". The user will not be able to swap devices even though the computer is powered "OFF". There is no mechanical override (e.g. paper clip hole) to unlock the solenoid. A "proper_shutdown" flag in CMOS will allow the user to unlock the solenoid by restarting the machine. A post procedure can examine this flag and unlock the solenoid if necessary. However, it may be desirable to leave the device locked when the computer is "OFF" as a safety feature for units on display in stores. A CMOS option (Device_Locked_When_Off) will prevent a customer from powering "OFF" the unit and "borrowing" the disk drive (the CMOS configuration may be protected with a password). S2 - FULL ON state In this state, if the media bay is occupied with a battery, the solenoid is unlocked and the user can remove it freely. Inserting a device into the bay in this state will cause the sequence of operations depicted in figure 10. First, the device is inserted (block 480). The PLD then generates the SMI (block 482). The handler then reads the device ID from the PLD (block 484). The solenoid then gets turned "ON" (block 486). The Q buffers and MB LED then get turned "ON". Finally, the BIOS posts a config_changed message in the PnP Q. After point A, the operation is OS dependent. If the OS is PnP compliant, the OS will receive this message and re-enumerate all devices. When the new device is found, the OS will load the class driver for it, assign a drive letter, and the device will be available to use. If the OS is not PnP compliant, the event is ignored and the drive is not recognized. Alternatively, the SMI handler can check the PnP_OS CMOS flag and display a message to the user before turning "ON" the Q buffers, and LED. A transition to this state exists from 4 other states; these are: OFF, STANDBY, SUSPEND, and SAVE TO DISK. From the OFF state: Enumeration at startup under a PnP device would have discovered the media bay device and loaded proper drivers for it. Under a non PnP OS, setup would have the relevant drive parameters. From the STANDBY state: A key press would have returned the computer to FULL "ON". The solenoid remains locked in standby and the bay device cannot be removed. From the SUSPEND state: A key press would also return the computer to the FULL "ON" state. The solenoid remains locked in suspend and the bay device cannot be removed. Upon resuming from a suspended state, a re-enumeration is performed, but the media bay device is unchanged. From the SAVE TO DISK state: Pressing the power switch returns the computer to the FULL "ON" state. The solenoid is unlocked in SAVE TO DISK and the bay device may have changed. Upon resuming from a saved configuration, the BIOS must verify that the computer has not changed (e.g. the user is not using the disk in a computer with more memory, different display type etc. ). S3 - STANDBY state There is only one way to get to this state - pressing FN-fx. In this state the display is blanked, but applications are still active so the solenoid is locked and the media bay LED is "ON" to signal the device is in use. S4 - SUSPEND state In this state, applications are not active, but the solenoid is in the locked position to prevent error messages resulting from changing the media bay device and attempting to resume a previous application in DRAM. S5 - SAVE TO DISK state In this state, applications are not active, and power to the computer is "OFF"; the solenoid is in the unlocked position. This allows the user to take out the media bay device for security or other reasons. When the unit is powered back "ON", POST must ensure that a resume operation from the disk drive is about to be performed on the right computer by storing the media bay drive serial number or a checksum of it in CMOS before a save to disk operation is performed. OPTIONS Media Bay Password In order to prevent anyone from being able to just walk up to the computer and remove the Media Bay Device, the Media Bay Monitor can password protect the "Remove Device" button. The Media Bay Monitor will ensure that the CMOS variable Device_Locked_When_Off is true when Media Bay Passwords are used. BIOS will look at Device_Locked_When_Off when powering down and ensure that the Device is locked when powered down. Media Bay Always Unlocked There is an option stored in CMOS "Device_Always_Unlocked" that prevents the Media Bay Device from ever being locked. This CMOS location must be checked in the BIOS before locking the Media Bay Device. SMI GENERATION Figure 11 shows the generation of the Media Bay SMI. State 1 State 1 is when the Media Bay is empty or contains a battery (MBID == F) and the Latch is not pressed. This is the normal state when the Media Bay is empty. Once the Latch is pressed we transition to State 2 State 2 State 2 is when the Media Bay is empty or contains a battery (MBID == F) and the Latch has been pressed. If the Latch is released we transition to State 1. If a Media Bay Device is inserted in the Media Bay, we transition to State 3. State 3 State 3 is when there is a Media Bay Device in the Media Bay (MBID == x) and the Latch is pressed. If the Latch is released, an SMI is generated as we transition to State 4. If the Media Bay Device is removed, an SMI is generated as we transition to State 2. Because leaving State 3 will generate an SMI going to State 2 or State 4, the SMI handler must know if a Media Bay Device is currently installed or not. If a Media Bay Device is not installed when the SMI is received, and the MBID is valid, a new device was inserted. The Q Buffers should be turned "ON" and the OS should be notified about the new device. If an SMI is received and the MBID is 0xF, the SMI can be ignored. If a Media Bay Device is installed when an SMI is received, and if the MBID is valid, the device has been removed. The Q Buffers should be turned "ON" and the OS should be notified about the removal. If we receive an SMI and the MBID is valid, the SMI can be ignored. Note that under normal operation when the Media Bay Monitor is used, BIOS is expecting an SMI when a Media Bay Device is removed and will have already turned "OFF" the Q Buffers, and the OS will already have removed the Device Drivers. State 4 State 4 is when there is a Media Bay Device in the Media Bay (MBID == x) and the Latch is not pressed. This is the normal state when a Media Bay Device is installed. SOLENOID POWER UP STATE When Reset is applied to the hardware, the solenoid is unlocked. The POST code will look at the CMOS Variable "Device_Always_Unlocked". If this variable is not set, the solenoid will be locked if a device is present. SOLENOID NOT PRESENT There may not be a solenoid present. The status bit "Solenoid Present" can be read from the PLD to determine if the solenoid is present. The solenoid not being present causes exceptions to the normal operation of the Media Bay Monitor: 1. Surprise Removal of the Media Bay Device If the solenoid is not present to lock the Media Bay Device, it is possible for the user to eject the Media Bay Device without first informing the OS. If the Media Bay Device is ejected without using the Media Bay Monitor, the BIOS has no choice but to turn "OFF" the Q-Buffers and inform the OS "SYSTEM_DEVICE_CHANGED". The Media Bay Monitor will notice the device was removed and pull up a dialog box informing the user he should use the "Remove" button on the Media Bay Monitor to remove devices to avoid probably loss of data and possible damage to Media Bay Devices. 2. Media Bay Password Since the Media Bay Device cannot be locked, the Media Bay Password protection cannot be enabled. The Password Protection will not be presented in the Media Bay Monitor - the user will not know it is even possible with proper hardware. The Media Bay will ensure that the CMOS variable Device_Locked_When_Off is FALSE. 3. Solenoid Status Available If the solenoid is not present, the "Solenoid Status Available" and the "Solenoid Status" flag should indicate so. SOFTWARE IMPLEMENTATION UNDER WINDOWS 95™ Figures 12-16 will be used to describe the implementation of the Media Bay Monitor under the Microsoft™ Windows 95™ operating system. Figure 12 shows the detail of how the software can be implemented under the operating system, and Figures 13-16 show dialog boxes that interact with the user. Reference will be made to the blocks in figure 12 and also to the dialog boxes in the following description. When the Media Bay Monitor is launched (block 500 and block 502), it creates a "Notification Icon" (Mini Icon) (block 510) on the Task Bar and waits for WM-DEVICECHANGE Notification Messages or user actions. When it is desired to remove Media Bay Devices, the Media Bay Monitor should be used. The Media Bay Monitor will initiate the process by telling BIOS to remove the device. Removing Media Bay Devices can be initiated two ways: the icon (block 510) on the tool bar can be double-clicked activating the Media Bay Monitor; or the Media Bay Monitor can be run from the Start Menu (block 512). Either of these actions will cause the Media Bay Monitor to display the "Media Bay Status" dialog box (Figure 13). This shows the status of the Media Bay, and if a Media Bay Device is present, the "Remove Device" button is enabled to allow the removal of the Media Day Device. After the "Remove Device" button is pressed, the Media Bay Monitor tells BIOS to post an ABOUT-TO-CHANGE-CONFIG message. When the OS receives this message it will poll all applications asking if it is OK to remove the device (block 516). If all applications agree, the device driver can be removed (block 518) and the OS will inform BIOS to continue (block 520). The Media Bay Monitor displays a dialog box "Removing Device Driver" (figure 16), and waits for the BIOS to be informed to proceed. Once the BIOS has been informed to proceed, the Media Bay Monitor will display the "Remove Media Device" dialog box (Figure 14). If BIOS is informed to cancel, the user is informed why, and the "Media Bay Status" dialog box (figure 13) reappears. The "Remove Media Device" dialog box (figure 14) watches the Media Bay waiting for the Media Bay Device to be removed. Once the Media Bay Device is removed the dialog box disappears. The Media Bay Monitor then goes to it's Idle Message Loop (block 526) waiting for the next event. While waiting for the Media Bay Device to be removed, the user can press the cancel button. If the cancel button is pressed, the OS is told to reload the Device Drivers (block 524) and we return to the "Media Bay Status" dialog box (figure 13). Media Removed without using Media Bay Monitor When the Media Bay Latch is pressed, an SMI interrupts and BIOS posts a SYSTEM-DEVICE-CHANGED to the OS. The OS will then post a WM-DEVICECHANGE message to all Apps. When the message is received by the Media Bay Monitor, the wParam is checked for DBT-DEVICEREMOVEDCOMPLETE. If the Media Bay Device has been removed, the Media Bay Monitor displays the "Unexpected Media Device Removal" dialog box (block 506) (figure 15), and the OS removes the drivers (block 508). MEDIA BAY MONITOR SUMMARY The following table summarizes specific conditions, events and results under both, PnP and non-PnP operating systems. OS INITIAL CONDITIONS EVENT SMI RESULT PnP (Win 95) Media bay empty User moves latch No No effect on running software • Disk in Media Bay • No active I/O to disk User moves latch to remove drive Yes • BIOS turns Q buffers "OFF" • Media Monitor notified (INT15) • Warning message displayed • config- changed message posted in PNP Q • 0.5 seconds later, Windows reenumerates removes drive VXD. • Disk in Media Bay • Files open on disk • No active I/O to disk User moves latch to remove drive Yes • BIOS turns Q buffers "OFF" • Media Monitor notified • Warning message displayed • config_changed message posted in PNP Q 0.5 seconds later, Windows reenumerates, attempts to close files- fails, "Media error on drive D retry - cancel" • Possible recovery path if drive isreinserted Possible data corruption (unflushed caches, file buffers lost.) pnp (Win 95) • Disk in Media Bay • Files open on disk • Active I/O to disk User moves latch to remove drive Yes • BIOS turns Q buffers "OFF" Media Monitor notified Warning message displayed config_ changed message posted in PNP Q 0.5 seconds later, Windows reenumerates, attempts to close file - fails, "Media error in drive D retry - cancel" • No recovery if • drive reinserted Data corruption unflushed caches, file buffers lost.) • Disk in Media Bay • Files open on disk • Active I/O to disk User initiates media change from Media Monitor icon (recommended method) No • Media Monitor informs BIOS (INT15 interface) • BIOS posts about_to_change message in PnP Q • Windows closes all files and terminates apps using drive • Window responds with ok or abort • If ok BIOS turns Q buffers, LED off Non PnP (DOS, Win 31) Media bay empty User moves latch No No effect on running software • Disk in Media Bay • No open files on disk • No active I/O to disk User moves latch to remove drive Yes • BIOS turns Q buffers and, LED "OFF" • OS reports error on subsequent access • Possible recovery path if drive is reinserted No data corruption • Disk in Media Bay • Files open on disk • No active I/O to disk User moves latch to remove drive Yes • BIOS turns Q buffers "OFF" • No Possible recovery path if drive is reinserted (current file pointers lost on init) • Data corruption unflushed caches, file buffers lost). While this invention has been described with reference to being implemented on a notebook computer, this description is not intended to be construed in a limiting sense. In addition, various modifications and combinations of the illustrative embodiments, as well as other embodiments of the invention, will be apparent to persons skilled in the art upon reference to the description. For example, the locking mechanism some other type of lock which can be activated by the computer. In addition, the media bay has many other variations not listed in this description. The dialog boxes and software code can be altered. SOFTWARE CODE USED IN IMPLEMENTATION The following software programs are used in the preferred embodiment under a Microsoft™ Windows 95™ environment, but can be changed to operate under different operating systems. Name of Program : purpose AboutDlg.h : header file AboutDlg.cpp : implementation file MainWnd.cpp : implementation file MainWnd.h : header file MBMon.clw : CLW file contains information for MFC ClassWizard MBMon.cpp : Defines the class behaviors for the application. MBMon.h : main header file for the MBMON application MBMon.rc : Microsoft™Developer Studio generated. MBMon.rc2 : MBMON.RC2 - resources Microsoft™ Visual C++ RemoveMedia.cpp : implementation file RemoveMedia.h : header file RemovingDriver.cpp : implementation file RemovingDriver.h : header file resource.h : Microsoft™ Developer Studio generated include file. SMIDlg.cpp : implementation file SMIDlg.h : header file stdafx.cpp : source file that includes just the standard includes stdafx.h : include file for standard system include files, stdtypes.h : from Windows.h TISYS.H : header file for interface to OS

Claims: A computing apparatus including: a processor (300), an input means and an output means connected together by way of a system bus, a basic input/output system (BIOS), a module controller (326), connected to the system bus, for controlling a module which is removably connected to the system bus, a locking mechanism (134) that, when activated locks the module to and unlocks the module from the computing apparatus and a sub-system, connected to control the locking mechanism (134), capable of preparing the computing apparatus for the physical removal of the module and, on being instructed to prepare the computing apparatus for the physical removal of the module the sub-system further including : (i) means for determining whether the module is being accessed by the processor, (ii) means for acting through the module controller to close files and terminate applications involving the module, (iii) means for removing device drivers for the module from the BIOS, (iv) means for informing the computing apparatus of the removal of the device drivers and (v) means for releasing the locking mechanism (134) after removing the device drivers. An apparatus as claimed in claim 1, wherein the module is an additional battery system. An apparatus as claimed in claim 1, wherein the module is a media bay module. An apparatus as claimed in claim 3, wherein the media bay module includes a CD-ROM drive. An apparatus as claimed in claim 3, wherein the media bay module includes a magneto-optical drive. An apparatus as claimed in claim 3, wherein the media bay module includes a hard disc drive. An apparatus as claimed in claim 3, wherein the media bay module includes a floppy disc drive. An apparatus as claimed in any one of claims 1 to 7, wherein the locking mechanism is capable of being selectively disabled and enabled by a user of the apparatus. An apparatus as claimed in any one of claims 1 to 8, wherein the locking mechanism is capable of remaining locked when the apparatus is switched off with the locking mechanism in the locked position. An apparatus as claimed in any one of claims 1 to 9, wherein the locking mechanism is capable of being disabled for maintaining a condition in which the module is not locked to the apparatus. An apparatus as claimed in any one of claims 1 to 10, wherein the sub-system for controlling the locking mechanism includes software that is password-protected. An apparatus as claimed in any one of claims 1 to 11, wherein the locking mechanism includes a latching mechanism capable of latching the module to the apparatus and a solenoid capable of blocking the movement of the latching mechanism for locking the latching mechanism. An apparatus as claimed in any one of claims 1 to 12, wherein the input means is a keyboard (164). An apparatus as claimed in any one of claims 1 to 13 wherein the output means is a display device. An apparatus as claimed in any one of claims 1 to 14, wherein the computing apparatus is capable of accommodating the replacement of a module with another module of different functionality. An apparatus as claimed in any one of claims 1 to 14, including a module selected from a plurality of modules differing in functionality from one another. An apparatus as claimed in any one of claims 1 to 16, including a module implemented as a secondary IDE controller in a programmable logic device (PLD). An apparatus as claimed in claim 17, wherein the PLD further provides electrical switches (Q-buffers) to connect or disconnect all signals to the module. An apparatus as claimed in claim 18, wherein the switches are under software control through a register in the PLD. An apparatus as claimed in claim 19, wherein the BIOS can disable the signals to the module, effectively disconnecting the module from the rest of the computing apparatus. An apparatus as claimed in any one of claims 18 to 20, wherein ID bits which identify the module and power and ground signals to the module are not controlled by the Q-buffers.

Inventors: HARVEY DAVID L, LEAVITT THOMAS, SHIN SEONG, HARVEY, DAVID L., LEAVITT, THOMAS, SHIN, SEONG
Applicants: TEXAS INSTRUMENTS INC, TEXAS INSTRUMENTS INCORPORATED
Application year: 1997
Main classification: G06F13
IPC codes: G06F13, G06F1, G06F3