Fdc.h revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
/** @file
Definition of FDC registers and structures.
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions
of the BSD License which accompanies this distribution. The
full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef _PEI_RECOVERY_FDC_H_
#define _PEI_RECOVERY_FDC_H_
//
// FDC Registers
//
//
// FDC Register Bit Definitions
//
//
// Digital Out Register(WO)
//
//
// Main Status Register(RO)
//
//
// Configuration Control Register(WO)
//
//
// Digital Input Register(RO)
//
//
// FDC Command Code
//
#define READ_DATA_CMD 0x06
#define SEEK_CMD 0x0F
#define RECALIBRATE_CMD 0x07
#define SENSE_INT_STATUS_CMD 0x08
#define SPECIFY_CMD 0x03
#define SENSE_DRV_STATUS_CMD 0x04
///
/// CMD_MT: Multi_Track Selector
/// when set , this flag selects the multi-track operating mode.
/// In this mode, the FDC treats a complete cylinder under head0 and 1 as a single track
///
///
/// A one selects the double density(MFM) mode
/// A zero selects single density (FM) mode
///
///
/// CMD_SK: Skip Flag
/// When set to 1, sectors containing a deleted data address mark will automatically be skipped
/// during the execution of Read Data.
/// When set to 0, the sector is read or written the same as the read and write commands.
///
//
// FDC Status Register Bit Definitions
//
//
// Status Register 0
//
//
// STS0_US1 & STS0_US0: Drive Select(the current selected drive)
//
//
// Status Register 1
//
//
// BIT6 is unused
//
#define STS1_DE BIT5 // Data Error: The FDC detected a CRC error in either the ID field or data field of a sector
#define STS1_OR BIT4 // Overrun/Underrun: Becomes set if FDC does not receive CPU or DMA service within the required time interval
//
// BIT3 is unused
//
//
// Status Register 2
//
// BIT7 is unused
//
#define STS2_WC BIT4 // Wrong Cylinder: The track address from sector ID field is different from the track address maintained inside FDC
//
// BIT3 is unused
// BIT2 is unused
//
//
// Status Register 3
//
// BIT7 is unused
//
//
// BIT5 is unused
//
//
// BIT3 is unused
//
//
// STS3_US1 & STS3_US0 : Drive Select
//
//
// Status Register 0 Interrupt Code Description
//
///
/// Table of parameters for diskette
///
typedef struct {
///
/// Structure for FDC Command Packet 1
///
typedef struct {
///
/// Structure for FDC Command Packet 2
///
typedef struct {
///
/// Structure for FDC Specify Command
///
typedef struct {
///
/// Structure for FDC Seek Command
///
typedef struct {
} FDC_SEEK_CMD;
///
/// Structure for FDC Result Packet
///
typedef struct {
#endif