NuBIOS & Enhanced Disk Drive Control

Download Report

Transcript NuBIOS & Enhanced Disk Drive Control

Boot Engineering
Extension Record
(B.E.E.R.)
By
Curtis E. Stevens
Agenda






Introduction to Booting
Why BEER?
BEER and Booting
BEER and Runtime Services
BEER and SETUP
Summary
Introduction to Booting
System Initialization


Enable ISA and PCI devices
Detect ATAPI/ATAPI devices


Wait up to 31 seconds for ~BSY


Phoenix proprietary
 Uses Floating Bus Test, Device Diagnostics,
and sometimes reads/writes cylinder
registers when device remains busy too long
Save ATAPI signature...
Wait up to 31 seconds for RDY
System Initialization



Issue ID Device or ATAPI ID Device as
necessary (uses much shorter timeout)
Continue the boot process
Configure the devices and interfaces for
their operational modes



Includes PIO, DMA, UDMA, etc.
Continue the boot process
Execute INT 19 initial boot load
BIOS Booting






Real Mode
INT 13 based
Load sector at CHS=0,0,1 or LBA 0 to
system memory 7C0h:0
Clear registers to 0
Set DL = boot drive (00h or 80h)
Jump to 7C0h:0
MBR Booting

Code in MBR is written by various OS
manufacturers
Can be by any OS installed on the system
 Good virus target because there is actually no
owner



Scans the partition table looking for an active
partition
Loads the first sector of the partition into
memory and jumps to it

Generally at 7C0h:0 as well.
Process Drawbacks

No MBR Owner
Lots of different programs manipulating the
same data structure
 Partition types are out of control and conflicting


System information is assumed
Code is INT 13 based
 If INT 13 changes data structures become
invalid
 No good way to detect error conditions

Enter SETMAX




Custom uses for this space are already
happening
Now there are multiple applications
looking to use this area
New area of expansion has no defined
owner
New area of expansion needs
organization!!

Big Big mess 1-2 years from now...
Why BEER?
BEER


Provides BIOS readable information
regarding drive formatting
Resides in protected area



Some degree of protection from viruses
Provides centralized organization as
systems move towards supporting multiple
operating environments
Allows for the authentication of data
before it is placed in protected areas
BIOS readable information




INT 13 parameters and ID Device
parameters used to make calculations
BIOS useable vs reported sectors/drive
Last INT 13 device number assigned to
drive
Device name
Can be manufacturer ID
 Can also be other things

More BIOS Readable
Information

Self describing service areas
Eliminates the need for interpretive code
 Allows the user to pick and choose from
something that makes sense


Allows several uses for the “SETMAX”
area including
Diagnostics/Recovery
 Suspend to Disk
 Other protected BIOS level data storage

BEER Formatted Disk
BEER
Sector
Normal User Space
Managed
SETMAX Space
SETMAX Space
Managed Space
Diagnostics
BIOS Utilities
BEER
Sector
Suspend
Information
BEER and Booting
Booting Assumptions

No effect on non-BEER drives



Normal booting process continues to function
BEER booting enabled when a BEER
sector is present
BEER capabilities are enabled by user
intervention
Keypress during post
 Integration with boot menu feature

BIOS Booting Changes

If BEER is available and there are no user
boot requests
Load parameters from the Service Area with
the last boot flag set
 Issue SETMAX to the end of the Service Area
 Load the first sector of the Service Area to
7C0h:0
 Jump to 7C0h:0

More Booting Changes

If BEER is available and there ARE user
boot requests
Load parameters from the Service Area
selected by the user or BIOS
 Issue SETMAX to the end of the Service Area
 Load the first sector of the Service Area to
7C0h:0
 Jump to 7C0h:0

Boot Selection

Can be OEM platform specific


For instance, systems can have a watchdog
function, if windows fails to boot the system
automatically boots to diagnostics the next
time.
Can be general at the same time

POST or SETUP option for selecting the next
service to boot
BEER and Runtime Services
Runtime Services


Only INT 13 changes
Fn 8/48
Parameters are generated from the Directory
of Services (DOS)
 Only the current service area is reported


All media access functions
Add the Service Area Start to the media
address
 SETMAX limits the high end of the media
access

Advantages of this method

No ATA protocol changes required




Works with drives shipping today
BIOS changes are minimal
Supports all DOS based applications as
written
Limits exposure to viruses
Disadvantages Of This
Method

Applications that provide proprietary disk
interfaces will fail




Possible drive corruption
Code overhead to the BIOS
New technology
Need to protect SETMAX Command
BEER and SETUP
What’s Necessary

A method for selecting the alternate boot
capability. An entry like “Boot to
Diagnostics” would probably suffice


Could easily be made to perform the function
for one boot only
If the system is not field updateable, the
drive can be preconfigured and no other
SETUP changes are necessary
Field Updates
Scenario #1

Need a drive maintenance mode
Prepares new drives by creating the BEER
sector
 Updates existing drives by adding entries to
the directory of services
 Can transfer data from other devices into the
directory of services
 May authenticate the data

Field Updates
Scenario #2

Need a drive maintenance mode
Prepares new drives be creating the BEER sector
 Updates existing drives by adding entries to the
directory of services
 Enables a service area



Boot from floppy or other device and the
BIOS presents the service area as an empty
device
Use normal DOS utilities to format the space
In Summary



BEER is a management data structure
controlled by the BIOS for allowing
several Operating Systems to co-exist on a
disk drive, but only 1 OS to execute
There is a lot of room for product
differentiation
There is a lot of room to expand this
capability
If system manufacturers are interested in the
concept presented here
Interaction of INT 13 and INT 19 with BEER
can be added to the specification
Other capabilities can be added to BEER