Using The ATA-4 Protected Area

to setting up an IDE drive, EZ Drive also solves capacity
barriers imposed by the system BIOS by installing the EZ BIOS Master Boot Record (MBR) code.
EZ Drive is the program used to setup the hard drive and EZ BIOS is the boot code that is installed,
if necessary, by EZ Drive.
2
How does EZ-Drive differ from DriveGuide?
Both EZ Drive and DriveGuide will setup an ATA hard drive. However, where DriveGuide utilizes a
graphical interface, EZ Drive is strictly text driven (see the figures below and on the next page to
view UI differences). Another area where these two utilities differ is DriveGuide contains a Guided
Installation routine to assist users with the physical installation of a hard drive. EZ Drive is designed
to partition and format ATA drive after it has been installed into a system. It contains no installation
guide.


Figure 1 EZ-Drive UI

3
What is EZ BIOS?
EZ-BIOS is an Interrupt 13h (Int13) handler that resides in the boot sector of an IDE/ATA drive. EZ
BIOS will control ATA hard drives during the boot process and while the system is running in DOS
mode. While running Windows 95 or NT the hard drives are usually controlled directly by the OS
and EZ-BIOS is bypassed. EZ-BIOS is installed and configured automatically by EZ-Drive if the
system BIOS is unable to handle the total capacity of a drive being setup by EZ Drive. EZ-BIOS can
also be manually installed, configured and uninstalled through EZ-Drive menu options.
Note: EZ-BIOS does not support hard drives on an Ultra ATA card. The BIOS on the Ultra ATA
card should be able to handle the capacity of the attached hard drive, so EZ-BIOS is not necessary.
However, EZ-Drive will still partition and format an ATA drive on an Ultra ATA controller. StorageSoft, Inc.
EZ-Drive Technical Bulletin
3
Sales: 1.800.817.5119

Sales:
sales@storagesoftsolutions.com

Support: 1.303.381.2681

E-mail:
support@storagesoft.com

4
How does EZ Drive determine if EZ BIOS is necessary or not?
Basically EZ-Drive compares the capacity reported by the hard drive to the capacity the system
BIOS reports the drive as. If these capacity values do not match then EZ-Drive will install EZ-BIOS.
The way this is accomplished is this, when EZ Drive loads it sends out an ATA Drive ID command
to obtain drive information. The attached drive(s) will respond with a 256 word data string. During a
partition and format routine EZ Drive derives the total capacity by looking at words 1, 3, and 6 and
words 60 and 61 of the 256 word response for the drive being setup. If the drive is less than 8.4 Gig
then the CHS values contained in words 1, 3, and 6 are used for total capacity. If the drive is
greater than 8.4 Gig then EZ Drive uses the total addressable LBA sectors in words 60 and 61 to
obtain total capacity. Once EZ Drive obtains the total capacity of a drive the program will send out
an Int13 function 8, or an Extended Int13 Function 48 call to find out how the BIOS will handle the
drive. If the BIOS capacity differs from the ATA Drive ID capacity then EZ Drive will install EZ BIOS
to handle the drive that is being setup.
5
What are the components of EZ BIOS?
EZ-BIOS MBR - Resides at LBA (Logical Block Address) 0 on the hard drive. LBA 0 is Cylinder-
Head-Sector Address 0-0-1. This code replaces the normal MBR and is loaded and executed by
the system BIOS instead of the normal MBR. The EZ-BIOS MBR loads and executes the Int13
handler first and then the Regular MBR, both described below.
Int13 Handler - Resides at LBA 2 through 16 on the hard drive. This code, which is loaded and
executed by the EZ-BIOS MBR, is divided into two parts. There is a non-resident portion that
initializes the drives and hooks Int13, and a resident portion that handles the Int13 requests. The
resident portion occupies the top 5k of lower memory, just below the VGA frame buffer, starting at
635k.
Regular MBR - Resides at LBA 1 on the hard drive. This code, which is loaded and executed by
the EZ-BIOS MBR, is a clone of a regular DOS/Windows MBR. If there appears to be an existing
MBR on a drive when EZ-BIOS is installed, that MBR may be moved to LBA 1 instead of installing
this generic one. The function of this code is to locate, load and execute the DBR (DOS Boot
Record) of the active partition.
6
What is the boot sequence of the EZ BIOS components?
1. The system BIOS uses its own Int13 to load and execute LBA 0 of device 80h, which is
usually the boot drive in a system. That sector contains the EZ-BIOS MBR.
2. The EZ-BIOS MBR uses the system BIOS Int13 to load and call the code in LBA 2 through
16, which is the EZ-BIOS Int13 handler. The resident portion starts at 635k and the
initialization portion is below that. The memory location in the ROM BIOS data area that
contains the number of kilobytes of conventional memory installed is decremented by 5k,
which effectively protects the memory from being overwritten by the OS.
3. After the Int13 handler is initialized, EZ-BIOS is controlling the drive and the system BIOS is
no longer used. Execution is returned to the EZ-BIOS MBR, still resident in lower memory,
which then loads the Regular MBR in LBA 1 and jumps to it.
4. At this point the normal boot sequence proceeds with the Regular MBR loading the DBR,
which loads IO.SYS and then loads COMMAND.COM and off we go.
7
Can EZ BIOS get overwritten if the EZ BIOS code doesnt load?
Yes it can. Generally this scenario occurs when a user boots directly from bootable floppy diskette
and the OS modifies the MBR code at LBA 0. By booting in this manner the EZ BIOS code does
not get a chance to load. StorageSoft, Inc.
EZ-Drive Technical Bulletin
4
Sales: 1.800.817.5119

Sales:
sales@storagesoftsolutions.com

Support: 1.303.381.2681

E-mail:
support@storagesoft.com

8
Is there any kind of safeguard that will keep EZ BIOS from being
overwritten?
EZ Drive utilizes a feature called Floppy Boot Protection (FBP). FBP is an unusual mechanism that
solves two problems. The first problem is this: when EZ-BIOS is installed on a drive it is because
the system BIOS is not handling it properly; however, if the user boots directly to a floppy disk it
bypasses the loading of EZ-BIOS from the hard disk. At that point the system BIOS is controlling all
hard disks, some or all incorrectly. If the user were to access any files on the incorrectly handled
drives there could be data corruption.
To get around this problem EZ-Drive make two copies of the partition table. If FBP is enabled the
partition table in the normal position at LBA 0 has all partition types changed to type 55h which is an
unknown partition type for any OS. The real unadulterated partition table is kept at LBA 1. If the
user boots directly to a floppy disk, no partitions on the drive will be accessible through the OS,
thereby preventing inadvertent data loss. When the user boots to the hard drive, or uses the Floppy
Boot Procedure (described below) to boot to a floppy disk, then EZ-BIOS is loaded. EZ-BIOS will
see that FBP is enabled and any requests to access LBA 0 will be redirected to LBA 1. This makes
the real partition table visible to the OS and all drives are accessible.
The other problem that FBP solves is this: When installing an Operating System, many times
the MBR is overwritten with new code. If it werent for FBP the OS would overwrite the EZ-BIOS
MBR with its own and then EZ-BIOS would never load. With FBP enabled however, the request to
write the new MBR to LBA 0 would be redirected to LBA 1. Since the EZ-BIOS MBR chains to the
MBR in LBA 1 after loading EZ-BIOS, this is exactly where the new MBR should go.
9
What is the Floppy Boot Procedure?
If the user wishes to boot to a floppy disk he or she must use the Floppy Boot Procedure in order to
insure that EZ-BIOS gets loaded. This is the procedure:
1. Allow the hard drive to boot to the point where this message appears:
EZ-BIOS: Hold the CTRL key down for Status Screen or to boot from floppy...
2. Press and hold the Ctrl key until the status screen appears.
3. Press the A key.
4. Insert the floppy disk.
5. Press any key to boot to the floppy.
Following this procedure will insure that EZ-BIOS is loaded and controlling any hard drives that are
set up for EZ-BIOS control. If this procedure is not followed, the ROM BIOS may be controlling
some drives incorrectly and data loss could result.
10 What are the features of EZ BIOS?
Large Drive Support - Overcomes system BIOS limitations to handle the largest ATA hard drives
currently available.
Multi-Sector Transfers - Speeds throughput by generating a single interrupt per multi-sector
transfer rather than one interrupt per sector.
Double Word Transfers - Speeds throughput by transferring data 32 bits at a time over the PCI
bus.
Logical Block Addressing - LBA is a method of accessing the drive using a single 32 bit sector
number rather than separate Cylinder, Head and Sector numbers. EZ-BIOS uses LBA to access
drives that support this method. StorageSoft, Inc.
EZ-Drive Technical Bulletin
5
Sales: 1.800.817.5119

Sales:
sales@storagesoftsolutions.com

Support: 1.303.381.2681

E-mail:
support@storagesoft.com

Floppy Boot Protection - Prevents data corruption by hiding the drive from the OS if the user
boots directly to a floppy disk which bypasses the loading of EZ-BIOS and allows an incorrect
system BIOS to control the drive.
Extended Int13 Functions - Allows access to drives over 8.4 GB if the OS utilizes the functions,
which generally means Win