American Megatrends, Inc.

IdeBusSrc

Copyright

Release Notes

© American Megatrends, Inc.


IdeBusSrc

AMIBIOS Document References

Previous Release Notes

Release Notes 05.htm

Release Notes 4.6.5.4.htm

Built on 10:11:50 09/03/12


Release Notes - NDA Required

Component Information:
Component Title: IdeBus
Component Reference Name: IdeBus
Component Type: ModulePart
Release Date: 2012-01-05
Source Control Label: Binaries - 4.6.3_IdeBus_05; Sources - 4.6.3_IdeBus_05
Binary Source Control Location: SS:ALASKA;$/Alaska/BIN/Core/Modules/IdeBus;
Sources Source Control Location: SS:ALASKA;$/Alaska/Source/Core/Modules/IdeBus;
Driver Dependencies
N0NE
Protocol Dependencies
N0NE
File Dependencies
N0NE
Non-Compiled BIN and LIB File(s) within this Component:
N0NE
Component Description:
The IdeBus Module can be added to a EFI BIOS to support ATA/ATAPI device Detection and Enumeration.

The following files are included in IdeBus Source module:
Filename | Description
Main Component | Root\Core\em\IdeBus
IdeBusSrc.cif | Component information file for the eModule
IdeBusSrc.mak | Make file becomes part of the BIOS build process
IdeBusSrc.sdl | Contains BIOS build parameters
Ata.c | File that has Ata Controller services Related Functions and Routines
Atapi.c | File that has Atapi Controller services Related Functions and Routines
IdeBus.c | File that has Idebus Related Functions and Routines which Inits, Detects and Enumerates the Drives Connected to the Bus
IdeBus.h | File that has Headers, Definitions, Macros and Function Prototypes
IdeBusMaster.c | File that has IdeBusMaster services Related Functions and Routines
IdePowerManagement.c | File that has Related Functions and Routines to support Powermanagement
IdeHPA.c | File that has Related Functions and Routines to support HostProtectionArea
IDEBusComponentName.c | File related to Component Name Protocol Member Functions for IDE Bus
IdeBusSrc.chm | CHM file for the IdeBusSrc module part
IdeBus has IdeBus Bin added to the Core Module. The following files are included in IdeBus Bin module:
Filename | Description
Main Component | Root\Core\em\IdeBus
IdeBus.cif | Component information file for the eModule
IdeBus.mak | Make file becomes part of the BIOS build process
IdeBus.sdl | Contains BIOS build parameters
IdeBus.chm | CHM file for the IdeBus module part
IDEBusProtocol ModulePart | Root\Include\Protocol\IDEBusProtocol - Contains the header file that defines Disk information Protocol and related structures.
PIDEBus.cif | Component information file for the ModulePart
PDiskInfo.h | File that contains EFI_DISK_INFO_PROTOCOL and related definitions.
IDEBusBoard ModulePart | Root\Board\em\IdeBusBoard - Install and Initialize PLATFORM_IDE_PROTOCOL.
IdeBusBoard.cif | Component information file for the ModulePart
IdeBusBoard.c | Installs PlatformIdeProtocol Interface and Initializes it.
IDEBusBoardProtocol ModulePart | Root\Include\Protocol\IdeBusBoardProtocol - Contains the header file that defines Platform Ide Protocol and related structures.
IdeBusBoardProtocol.cif | Component information file for the ModulePart
IdeBusBoard.h | File that contains PLATFORM_IDE_PROTOCOL and related definitions.
BIOS Parameters:
IdeBusSource Parameters:
Parameter Name | Type | Description
IdeBusSrc_SUPPORT | Boolean | Switch to enable IdeBusSrc support in Project
IdeBus Bin Module Parameters:
Parameter Name | Type | Description
IdeBus_SUPPORT | Boolean | Switch to enable IdeBus support in Project
MASTER_SLAVE_ENUMERATION | Boolean | Switch to detect drive enumeration order
IDEBUSMASTER_SUPPORT | Boolean | Switch to enable ATA and ATAPI Bus master support
ATAPI_BUSMASTER_SUPPORT | Boolean | Switch to Enable/Disable ATAPI Bus master support
ACOUSTIC_MANAGEMENT_SUPPORT | Boolean | Switch to Enable/Disable Acoustic Management support
IDE_POWER_MANAGEMENT_SUPPORT | Boolean | Switch to Enable/Disable Power Management support
STANDBY_TIMEOUT | Integer | Standby Timeout value in MINUTE
ADVANCED_POWER_MANAGEMENT_SUPPORT | Boolean | Switch to Enable/Disable Advanced Power Management support
ADVANCED_POWER_MANAGEMENT_LEVEL | Integer | Advanced Power Management Level value
POWERUP_IN_STANDBY_SUPPORT | Boolean | Switch to Enable Disable device spin up support
POWERUP_IN_STANDBY_MODE | Boolean | Switch to Enable Disable device spin-up
IDE_POWER_MANAGEMENT_INTERFACE_SUPPORT | Boolean | Switch to Install IDE power Management Interface
HOST_PROTECTED_AREA_SUPPORT | Boolean | Switch to Enable/Disable HOST Protected Area Interface
IDE_HP_SUPPORT | Boolean | Switch to Enable/Disable IDE Hot Plug support
AHCI_COMPATIBLE_MODE | Boolean | Switch to Enable/Disable AHCI Compatible mode
AMI Build Tools:
Aptio Tools Label: 4.5.5_Tools_35, Dated: 2010-10-04
Visual eBios: RSS.5.70.0171, Dated: 2010-10-04
Compiler Tool(s): Microsoft's Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
None
General Bug Fixes:
IdeBusSource Changes:

  • EIP#79612 & 80003 - System hangs with Blue screen during Win8 installation in IDE Mode (AMD Platforms) Use PLATFORM_IDE_PROTOCOL data instead of hard coded macro POWERON_BUSY_CLEAR_TIMEOUT in Ata.c file

EIP addressed in this label:
IdeBusSource Changes:

  • EIP# 79612 & 80003 - System hangs with Blue screen during Win8 installation in IDE Mode (AMD Platforms) Use PLATFORM_IDE_PROTOCOL data instead of hard coded macro POWERON_BUSY_CLEAR_TIMEOUT in Ata.c file

Files changed for EIP fixes:
IdeBusSource Changes:

  • Root\Core\eM\IdeBus\Ata.c (EIP # 79612, #80003)
Known issues and limitations in this label:
None
Remaining Issues:
None
Unit Testing:
IDE Hard Drive :

  1. Connect Hard Drive into IDE connector.
  2. Install and boot to OS.
  • Boot the system and Check hard drive is detected in Setup.
  • In Setup, make sure proper string of hard drive is displayed.
  • Install Linux, Windows XP, Vista, and 7. After installation boot to all OS.
SATA Hard Drive :

  1. Connect Hard Drive into SATA connector.
  2. Enter into setup and configure the Hard drive as IDE mode
  • Boot the system, enter into Setup. In Chipset tab, there is a setup question "South Bridge Configuration".
  • Enter into it. There is one more sub setup question "SATA Configuration".
  • Enter into it. There is one more sub setup question "SATA Mode Selection" in that choose "IDE".
  • Save the setup and reset the system.
  • Install and boot to OS.
    • Boot the system and Check hard drive is detected in Setup.
    • In Setup, make sure proper string of hard drive is displayed in the corresponding SATA port.
    • Install Linux, Windows XP, Vista, and 7. After installation boot to all OS.

    Validation Test Report
    ValidationTestReport
    Release History:
    4.6.3_IdeBus_05

    IdeBusSource Changes:

    • [TAG] - EIP 79612 & 80003
      [Category] - Bug Fix
      [Description] - System hangs with Blue screen during Win8 installation in IDE Mode (AMD Platforms) Use PLATFORM_IDE_PROTOCOL data instead of hard coded macro POWERON_BUSY_CLEAR_TIMEOUT in Ata.c file
      [Files] - Ata.c

    4.6.5.2

    IdeBusSource Changes:

    • [TAG] - EIP55207
      [Category] - Improvement
      [Description] - Ide Bus Drive Component Name does not remove trailing spaces from drive name
      [Files] - IdeBus.c

    • [TAG] - EIP60503
      [Description] - Added proper comment in InitAcousticSupport() function header
      [Files] - IdeBus.c

    • [TAG] - EIP62912
      [Category] - Improvement
      [Description] - Opal Security Definitions Should be Moved to PIDEBUS.h from StorageSecurityProtocol.h
      StorageSecurityProtocol.h included in OPAL security driver module will give build error when disabled without sdl token
      #if OpalSecurity_SUPPORT properly placed in Ahcibus and IdeBus drivers. But Bus driver should not depend on any tokens.
      For this reason need to move OPAL_SEC_INIT_PROTOCOL_GUID in Pidebus.h
      [Files] - IdeBus.c,Pidebus.h,OpalSecurity.cif,OpalSecurity.h,IdeOpalSec.c,AhciOpalSec.c

    • [TAG] - EIP73260
      [Category] - Improvement
      [Description] - IDE Driver Follow the UEFI Driver Model as per the UEFI Spec. and STOP function was Verified.
      [Files] - IdeBus.c

    • [TAG] - EIP73035
      [Category] - Improvement
      [Description] - Status used on line 2561, conditionally not set. Initilized to EFI_SUCCESS to avoid Junk values.
      [Files] - Idebus.c

    • [TAG] - EIP66476
      [Category] - Bug Fix
      [Severity] - Normal
      [Symptom] - AtaPioDataOut fails for data write commands
      [RootCause] - TempBuffer pointer has been assigned for both data read and write commands.
      [Solution] - TempBuffer pointer has to be assigned only for data read commands.
      [Files] - Ata.c

    • [TAG] - EIP69295
      [Category] - Improvement
      [Description] - The Timeout values used by IDE and AHCI drivers are made as SDL tokens, so that the timeout values can be varied.
      [Files] - IdeBusBoard.c, CORE_DXE.sdl, AhciSmm.h, AhciBus.h, IDESMM.h, Ata.c, Atapi.c, IdeBus.c, IdeBus.h, IdeBusMaster.c, IdeBusBoard.h

    • [TAG] - EIP73941
      [Category] - Improvement
      [Description] - BufferSize is 0 , ReadBlock function should return EFI_SUCCESS without actual reading.
      [Files] - Ata.c

    • [TAG] - EIP74607
      [Category] - Improvement
      [Description] - IoAlign values is 0 or 1 means that the buffer can be placed anywhere in memory. Otherwise, IoAlign must be a power of 2, and the requirement is that the start address of a buffer must be evenly divisible by 2 to the power of IoAlign with no remainder.
      [Files] - Ata.c, Atapi.c

    IdeBusBin Changes:

    • [TAG] - EIP56530
      [Category] - Improvement
      [Description] - EFI_IDE_CONTROLLER_INIT_PROTOCOL and EFI_DISK_INFO_PROTOCOL are used accordingly to the PI 1.2 spec
      [Files] - AhciBus.c, IdeControllerInit.h, PDiskInfo.h

    • [TAG] - EIP69295
      [Category] - Improvement
      [Description] - The Timeout values used by IDE and AHCI drivers are made as SDL tokens, so that the timeout values can be varied.
      [Files] - IdeBusBoard.c, CORE_DXE.sdl, AhciSmm.h, AhciBus.h, IDESMM.h, Ata.c, Atapi.c, IdeBus.c, IdeBus.h, IdeBusMaster.c, IdeBusBoard.h

    4.6.5.1

    IdeBusSource Changes:

    • EIP : 53710
      [Category] - NEW FEATURE
      [Description] - ATAPI ODD loading type information added into ATAPI device structure
      [Files Modified] - Atapi.c, Idebus.c, IdeBus.h
    • EIP : 58703
      [Category] - IMPROVEMENT
      [Description] - Implement correct behavior when RemainingDevicePath passed to Supported() function consist only of end node, as described in UEFI specification Version 2.3.1, page 10.1 EFI_DRIVER_BINDING_PROTOCOL.Supported() and Start()
      [Files Modified] - Idebus.c
    • EIP : 58686
      [Category] - IMPROVEMENT
      [Description] - Update implementation of EFI_BLOCK_IO_PROTOCOL as described in UEFI specification Version 2.3.1, page 12.8
      [Files Modified] - Idebus.c, Atapi.c, BlockIo.h
    4.6.5.0

    IdeBusSource Changes:

    • EIP : 41445
      [Category] - NEW FEATURE
      [Description] - Created SataPioDataOut and AtaPioDataOut protocol function that can accept additional input parameters.
      [Files Modified] - AhciBus.h, AhciBus.c, AhciController.c, Ata.c, IdeBus.c, IdeBus.h, IdeBusMaster.c,PAhciBus.h, PIdeBus.h
    4.6.4.1

    IdeBusBin Changes:

    • New Feature : EIP 37748
      Description : Move all the IDEBus Source driver SDL token into IdeBus Bin Driver.
      FilesModified : IdeBus.sdl, IdeBusBoard ModulePart added.
    IdeBusSource Changes:

    • New Feature : EIP 30719
      Description : Support for the HDD with sector size more than 512bytes.
      FilesModified : Ata.c, IdeBus.c, IdeBusMaster.c
    • Bug Fix: EIP 38384
      Symptoms : Sytem will get halt with the P-ATA to S-ATA transfer card on APTIO 4.6.4.
      FilesModified : IdeBus.c
      Details : Checked the Device Configuration Overlay feature set supported status before sending the DEV_CONFIG_FREEZE_LOCK.
    • Bug Fix: EIP 38384
      Symptoms : Sytem will get halt with the P-ATA to S-ATA transfer card on APTIO 4.6.4.
      FilesModified : IdeBus.c
      Details : Feature and Sector Count values are reversed in the invocation of IdeNonDataCommand to set DEV_CONFIG_FREEZE_LOCK. Fixed Feature and Sector Count values.
    • New Feature: EIP 37748
      Description : Move all the IDEBus Source driver SDL token into IdeBus Bin Driver.
      FilesModified : All
    • Test Report:
      - Tested Ata,Atapi device detection in EFI_IDE_PROTOCOL Enabled.
      - Tested Ata,Atapi device detection in EFI_IDE_PROTOCOL Disabled.
      - Tested Ata,Atapi device detection in X64 and X32 build.
      - Installed and booted to EFI OS
      - Installed and Booted to Legacy OS.
      - Tested Platform: Sandybridge, Calpella, GreenCity
    4.6.4.0
    • EIP 11835
      Runtime Acoustic Level Configurability.
    • EIP 22135
      IDE Power Management Code Improvement.
    • EIP 30041
      Support of the Device Initiated Power Management (DipM) for SATA devices is added.
    4.6.3_IdeBusSrc_004

    • EIP:20630
      • If the Erase command timeout value is 0 or 255, wait for the Erase command completion without timeout value
    • EIP:21548
      • Odd Type information Saved in Atapi Device Structure.
    • Coding Standard and File header updated.

    © American Megatrends Inc.


Release Notes - NDA Required

Component Information:
Component Title: IdeBus
Component Reference Name: IdeBus
Component Type: ModulePart
Release Date: 2012-05-21
Source Control Label: Binaries - 4.6.5.4 ; Sources - 4.6.5.4 ;
Binary Source Control Location: SS:ALASKA;$/Alaska/BIN/Core/Modules/IdeBus;
Sources Source Control Location: SS:ALASKA;$/Alaska/Source/Core/Modules/IdeBus;
Dependencies
Component Dependencies
N0NE

File Dependencies
N0NE

Protocol Dependencies
N0NE
Non-Compiled BIN and LIB File(s) within this Component:
N0NE
Component Description:
The IdeBus Module can be added to a EFI BIOS to support ATA/ATAPI device Detection and Enumeration.

The following files are included in IdeBus Source module:
Filename | Description
Main Component | Root\Core\em\IdeBus
IdeBusSrc.cif | Component information file for the eModule
IdeBusSrc.mak | Make file becomes part of the BIOS build process
IdeBusSrc.sdl | Contains BIOS build parameters
Ata.c | File that has Ata Controller services Related Functions and Routines
Atapi.c | File that has Atapi Controller services Related Functions and Routines
IdeBus.c | File that has Idebus Related Functions and Routines which Inits, Detects and Enumerates the Drives Connected to the Bus
IdeBus.h | File that has Headers, Definitions, Macros and Function Prototypes
IdeBusMaster.c | File that has IdeBusMaster services Related Functions and Routines
IdePowerManagement.c | File that has Related Functions and Routines to support Powermanagement
IdeHPA.c | File that has Related Functions and Routines to support HostProtectionArea
IDEBusComponentName.c | File related to Component Name Protocol Member Functions for IDE Bus
IdeBusSrc.chm | CHM file for the IdeBusSrc module part
IdeBus has IdeBus Bin added to the Core Module. The following files are included in IdeBus Bin module:
Filename | Description
Main Component | Root\Core\em\IdeBus
IdeBus.cif | Component information file for the eModule
IdeBus.mak | Make file becomes part of the BIOS build process
IdeBus.sdl | Contains BIOS build parameters
IdeBus.chm | CHM file for the IdeBus module part
IDEBusProtocol ModulePart | Root\Include\Protocol\IDEBusProtocol - Contains the header file that defines Disk information Protocol and related structures.
PIDEBus.cif | Component information file for the ModulePart
PDiskInfo.h | File that contains EFI_DISK_INFO_PROTOCOL and related definitions.
IDEBusBoard ModulePart | Root\Board\em\IdeBusBoard - Install and Initialize PLATFORM_IDE_PROTOCOL.
IdeBusBoard.cif | Component information file for the ModulePart
IdeBusBoard.c | Installs PlatformIdeProtocol Interface and Initializes it.
IDEBusBoardProtocol ModulePart | Root\Include\Protocol\IdeBusBoardProtocol - Contains the header file that defines Platform Ide Protocol and related structures.
IdeBusBoardProtocol.cif | Component information file for the ModulePart
IdeBusBoard.h | File that contains PLATFORM_IDE_PROTOCOL and related definitions.
BIOS Parameters:
IdeBusSource Parameters:
Parameter Name | Type | Description
IdeBusSrc_SUPPORT | Boolean | Switch to enable IdeBusSrc support in Project
IdeBus Bin Module Parameters:
Parameter Name | Type | Description
IdeBus_SUPPORT | Boolean | Switch to enable IdeBus support in Project
MASTER_SLAVE_ENUMERATION | Boolean | Switch to detect drive enumeration order
IDEBUSMASTER_SUPPORT | Boolean | Switch to enable ATA and ATAPI Bus master support
ATAPI_BUSMASTER_SUPPORT | Boolean | Switch to Enable/Disable ATAPI Bus master support
ACOUSTIC_MANAGEMENT_SUPPORT | Boolean | Switch to Enable/Disable Acoustic Management support
IDE_POWER_MANAGEMENT_SUPPORT | Boolean | Switch to Enable/Disable Power Management support
STANDBY_TIMEOUT | Integer | Standby Timeout value in MINUTE
ADVANCED_POWER_MANAGEMENT_SUPPORT | Boolean | Switch to Enable/Disable Advanced Power Management support
ADVANCED_POWER_MANAGEMENT_LEVEL | Integer | Advanced Power Management Level value
POWERUP_IN_STANDBY_SUPPORT | Boolean | Switch to Enable Disable device spin up support
POWERUP_IN_STANDBY_MODE | Boolean | Switch to Enable Disable device spin-up
IDE_POWER_MANAGEMENT_INTERFACE_SUPPORT | Boolean | Switch to Install IDE power Management Interface
HOST_PROTECTED_AREA_SUPPORT | Boolean | Switch to Enable/Disable HOST Protected Area Interface
IDE_HP_SUPPORT | Boolean | Switch to Enable/Disable IDE Hot Plug support
AHCI_COMPATIBLE_MODE | Boolean | Switch to Enable/Disable AHCI Compatible mode
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_38 , Dated: 2011-12-20
Visual eBios: RSS.5.70.0171, Dated: 2011-12-20
Compiler Tool(s): Microsoft's Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
NONE
General Bug Fixes and EIP Addressed in this Label:
IdeBusSource Changes:
General Bug Fixes
EIP#79612 & 80003 - System hangs with Blue screen during Win8 installation in IDE Mode (AMD Platforms) Use PLATFORM_IDE_PROTOCOL data instead of hard coded macro POWERON_BUSY_CLEAR_TIMEOUT in Ata.c file

EIP Addressed
EIP#79612 & 80003 - System hangs with Blue screen during Win8 installation in IDE Mode (AMD Platforms) Use PLATFORM_IDE_PROTOCOL data instead of hard coded macro POWERON_BUSY_CLEAR_TIMEOUT in Ata.c file
Files Changed for General Bug Fixes and EIP Addressed in this Label:
IdeBusSource Changes:

EIP Addressed
Root\Core\eM\IdeBus\Ata.c (EIP #79612, #80003)
Known Limitations and Erratas in this label:
NONE
Remaining Issues:
NONE
Unit Testing:
IDE Hard Drive :

  1. Connect Hard Drive into IDE connector.
  2. Install and boot to OS.
  • Boot the system and Check hard drive is detected in Setup.
  • In Setup, make sure proper string of hard drive is displayed.
  • Install Linux, Windows XP, Vista, and 7. After installation boot to all OS.
SATA Hard Drive :

  1. Connect Hard Drive into SATA connector.
  2. Enter into setup and configure the Hard drive as IDE mode
  • Boot the system, enter into Setup. In Chipset tab, there is a setup question "South Bridge Configuration".
  • Enter into it. There is one more sub setup question "SATA Configuration".
  • Enter into it. There is one more sub setup question "SATA Mode Selection" in that choose "IDE".
  • Save the setup and reset the system.
  • Install and boot to OS.
    • Boot the system and Check hard drive is detected in Setup.
    • In Setup, make sure proper string of hard drive is displayed in the corresponding SATA port.
    • Install Linux, Windows XP, Vista, and 7. After installation boot to all OS.

    Validation Testing:
    Here is the Quality Assurance System Test Plan
    Here is the Quality Assurance Test Results
    Release History:
    4.6.5.4

      To create label for core version 4.6.5.4 and No check-in for this release

    Release_4.6.3_IdeBus_05

    © American Megatrends Inc.


IdeBusSrc

AMIBIOS Document References

Previous Validation Test Reports

Validation Test Report 05.htm

Validation Test Report 4.6.5.4.htm

Built on 10:11:50 09/03/12


IDEBUS TEST REPORT

IdeBus driver has been validated under following test cases and conditions for Core Label (INT)4.6.5.1.
Platforms Tested:
Piketon - Project Label (INT)4.6.5_DH55HC_13
Test Case:
  • ATA/ATAPI device detection in SETUP - PASS.
  • OS environment Tested on:
    OS | Test Case
    Installation | Boot to OS
    Win7(EFI aware) | PASS | PASS
    Win Vista(32 bit) | PASS | PASS


Copyright

American Megatrends, Inc.
5555 Oakbrook Parkway
Suite 200
Norcross, GA 30093 (USA)

Copyright (c) 1999-2012 American Megatrends, Inc. All Rights Reserved.

This publication contains proprietary information, which is protected by copyright. No part of this publication may be reproduced, transcribed, stored in a retrieval system, translated into any language or computer language, or transmitted in any form whatsoever without the prior written consent of the publisher, American Megatrends, Inc.

American Megatrends, Inc. retains the right to update, change, modify this publication at any time, without notice.

For Additional Information

Call American Megatrends BIOS Sales Department at 1-800-828-9264 for additional information.

Limitations of Liability

In no event shall American Megatrends be held liable for any loss, expenses, or damages of any kind whatsoever, whether direct, indirect, incidental, or consequential, arising from the design or use of this product or the support materials provided with the product.

Limited Warranty

No warranties are made, either expressed or implied, with regard to the contents of this work, its merchantability, or fitness for a particular use. American Megatrends assumes no responsibility for errors and omissions or for the uses made of the material contained herein or reader decisions based on such use.

Trademark and Copyright Acknowledgments

All product names used in this publication are for identification purposes only and are trademarks of their respective Companies.


Release Notes - NDA Required

Component Information:
Component Title: IdeBus
Component Reference Name: IdeBus
Component Type: ModulePart
Release Date: 2012-09-03
Source Control Label: Binaries - 4.6.3_IdeBus_06; Sources - 4.6.3_IdeBus_06;
Binary Source Control Location: SS:ALASKA;$/Alaska/BIN/Core/Modules/IdeBus;
Sources Source Control Location: SS:ALASKA;$/Alaska/Source/Core/Modules/IdeBus;
Dependencies
Component Dependencies
N0NE

File Dependencies
N0NE

Protocol Dependencies
N0NE
Non-Compiled BIN and LIB File(s) within this Component:
N0NE
Component Description:
The IdeBus Module can be added to a EFI BIOS to support ATA/ATAPI device Detection and Enumeration.

The following files are included in IdeBus Source module:
Filename | Description
Main Component | Root\Core\em\IdeBus
IdeBusSrc.cif | Component information file for the eModule
IdeBusSrc.mak | Make file becomes part of the BIOS build process
IdeBusSrc.sdl | Contains BIOS build parameters
Ata.c | File that has Ata Controller services Related Functions and Routines
Atapi.c | File that has Atapi Controller services Related Functions and Routines
IdeBus.c | File that has Idebus Related Functions and Routines which Inits, Detects and Enumerates the Drives Connected to the Bus
IdeBus.h | File that has Headers, Definitions, Macros and Function Prototypes
IdeBusMaster.c | File that has IdeBusMaster services Related Functions and Routines
IdePowerManagement.c | File that has Related Functions and Routines to support Powermanagement
IdeHPA.c | File that has Related Functions and Routines to support HostProtectionArea
IDEBusComponentName.c | File related to Component Name Protocol Member Functions for IDE Bus
IdeBusSrc.chm | CHM file for the IdeBusSrc module part
IdeBus has IdeBus Bin added to the Core Module. The following files are included in IdeBus Bin module:
Filename | Description
Main Component | Root\Core\em\IdeBus
IdeBus.cif | Component information file for the eModule
IdeBus.mak | Make file becomes part of the BIOS build process
IdeBus.sdl | Contains BIOS build parameters
IdeBus.chm | CHM file for the IdeBus module part
IDEBusProtocol ModulePart | Root\Include\Protocol\IDEBusProtocol - Contains the header file that defines Disk information Protocol and related structures.
PIDEBus.cif | Component information file for the ModulePart
PDiskInfo.h | File that contains EFI_DISK_INFO_PROTOCOL and related definitions.
IDEBusBoard ModulePart | Root\Board\em\IdeBusBoard - Install and Initialize PLATFORM_IDE_PROTOCOL.
IdeBusBoard.cif | Component information file for the ModulePart
IdeBusBoard.c | Installs PlatformIdeProtocol Interface and Initializes it.
IDEBusBoardProtocol ModulePart | Root\Include\Protocol\IdeBusBoardProtocol - Contains the header file that defines Platform Ide Protocol and related structures.
IdeBusBoardProtocol.cif | Component information file for the ModulePart
IdeBusBoard.h | File that contains PLATFORM_IDE_PROTOCOL and related definitions.
BIOS Parameters:
IdeBusSource Parameters:
Parameter Name | Type | Description
IdeBusSrc_SUPPORT | Boolean | Switch to enable IdeBusSrc support in Project
IdeBus Bin Module Parameters:
Parameter Name | Type | Description
IdeBus_SUPPORT | Boolean | Switch to enable IdeBus support in Project
MASTER_SLAVE_ENUMERATION | Boolean | Switch to detect drive enumeration order
IDEBUSMASTER_SUPPORT | Boolean | Switch to enable ATA and ATAPI Bus master support
ATAPI_BUSMASTER_SUPPORT | Boolean | Switch to Enable/Disable ATAPI Bus master support
ACOUSTIC_MANAGEMENT_SUPPORT | Boolean | Switch to Enable/Disable Acoustic Management support
IDE_POWER_MANAGEMENT_SUPPORT | Boolean | Switch to Enable/Disable Power Management support
STANDBY_TIMEOUT | Integer | Standby Timeout value in MINUTE
ADVANCED_POWER_MANAGEMENT_SUPPORT | Boolean | Switch to Enable/Disable Advanced Power Management support
ADVANCED_POWER_MANAGEMENT_LEVEL | Integer | Advanced Power Management Level value
POWERUP_IN_STANDBY_SUPPORT | Boolean | Switch to Enable Disable device spin up support
POWERUP_IN_STANDBY_MODE | Boolean | Switch to Enable Disable device spin-up
IDE_POWER_MANAGEMENT_INTERFACE_SUPPORT | Boolean | Switch to Install IDE power Management Interface
HOST_PROTECTED_AREA_SUPPORT | Boolean | Switch to Enable/Disable HOST Protected Area Interface
IDE_HP_SUPPORT | Boolean | Switch to Enable/Disable IDE Hot Plug support
AHCI_COMPATIBLE_MODE | Boolean | Switch to Enable/Disable AHCI Compatible mode
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_39, Dated: 2012-01-04
Visual eBios: RSS.5.72.0220, Dated: 2012-01-04
Compiler Tool(s): Microsoft's Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
EIP#88683 - EFI_ATA_PASS_THRU_PROTOCOL Support for Aptio IDE
EIP#97048 - ATAPI PassThru Support using EFI_EXT_SCSI_PASS_THRU_PROTOCOL.
General Bug Fixes and EIP Addressed in this Label:
IdeBusSource Changes:

EIP Addressed
EIP#88683 - EFI_ATA_PASS_THRU_PROTOCOL Support for Aptio IDE
EIP#97048 - ATAPI PassThru Support using EFI_EXT_SCSI_PASS_THRU_PROTOCOL.
EIP#92381 - A slip of pen in function IdeBusStart.
EIP#97113 - AtaPassThru - Module Enhancement.
Files Changed for General Bug Fixes and EIP Addressed in this Label:
IdeBusSource Changes:

EIP Addressed
Root\Core\eM\IdeBus\IdeBus.c (EIP #88683, #92381, #97113, #97048)
Root\Core\eM\IdeBus\IdeBus.h (EIP #88683)
Known Limitations and Erratas in this label:
NONE
Remaining Issues:
NONE
Unit Testing:
IDE Hard Drive :

  1. Connect Hard Drive into IDE connector.
  2. Install and boot to OS.
  • Boot the system and Check hard drive is detected in Setup.
  • In Setup, make sure proper string of hard drive is displayed.
  • Install Linux, Windows XP, Vista, and 7. After installation boot to all OS.
SATA Hard Drive :

  1. Connect Hard Drive into SATA connector.
  2. Enter into setup and configure the Hard drive as IDE mode
  • Boot the system, enter into Setup. In Chipset tab, there is a setup question "South Bridge Configuration".
  • Enter into it. There is one more sub setup question "SATA Configuration".
  • Enter into it. There is one more sub setup question "SATA Mode Selection" in that choose "IDE".
  • Save the setup and reset the system.
  • Install and boot to OS.
    • Boot the system and Check hard drive is detected in Setup.
    • In Setup, make sure proper string of hard drive is displayed in the corresponding SATA port.
    • Install Linux, Windows XP, Vista, and 7. After installation boot to all OS.

    Validation Testing:
    Here is the Quality Assurance System Test Plan
    Here is the Quality Assurance Test Results
    Release History:
    4.6.3_IdeBus_06

    IdeBusSource Changes:

    • [TAG] EIP88683
      [Category] New Feature
      [Description] EFI_ATA_PASS_THRU_PROTOCOL Support for Aptio IDE
      [Files] AhciBus.c,AhciBus.h,AInt13.h,IdeBus.c,IdeBus.h,PIDEBus.h,PAhciBus.h,AtaPassThru.sdl,AtaPassThru.mak,AtaPassThru.c, AtaPassThruSupport.h,AtaPassThru.chm

    • [TAG] EIP92381
      [Category] Improvement
      [Description] A slip of pen in function IdeBusStart
      [Files] IdeBus.c

    • [TAG] EIP97113
      [Category] Improvement [Description] AtaPassThru - Module Enhancement
      [Files] AtaPassThru.c, AtaPassThruSupport.h,AtaPassThru.mak,IdeBus.c,AhciBus.c

    • TAG] EIP97048
      [Category] New Feature
      [Description] ATAPI PassThru Support using EFI_EXT_SCSI_PASS_THRU_PROTOCOL.
      [Files] AhciBus.c, AhciController.c, IdeBus.c, Atapi.c, PIDEBus.h, PAhciBus.h, ScsiPassThruAtapi.sdl, ScsiPassThruAtapi.mak, ScsiPassThruAtapi.c, ScsiPassThruAtapiSupport.h, ScsiPassThruAtapi.chm, ScsiPassThruExt.h

    Release_4.6.5.4
    Release_4.6.3_IdeBus_05

    © American Megatrends Inc.


Release Notes - NDA Required

Validation Test Report for Ahcidriver Label 4.6.3_IdeBus_06

Platform Information Form :

Board Information - Sugar Bay
BIOS Information (Label, Path) - Labeled '(INT)4.6.5.4';
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3.1 BIOS Versions
ACPI
S3
REF-28665: Windows 7 x64 S3 Power Button---- PASS
Status Update:
REF-33104: Windows 8 x64 Beta S3 Power Button---- U/T
Status Update:Drivers is not available

Hdd Acoustic
REF-33885: EFI Check Bypass Mode with AcousticVal.efi in IDE mode ---- PASS
Status Update:
REF-33887: EFI Check Max.Performance with AcousticVal.efi in IDE ---- PASS
Status Update:
REF-33886: EFI Check Quiet Mode with AcousticVal.efi in IDE mode ---- PASS
Status Update:
REF-33889: EFI Multiple HDD verify with AcousticVal.efi in IDE ---- PASS
Status Update:

Hdd Security
REF-28741 :.N/A HDD Password Validation in IDE Mode ---- PASS
Status Update:
REF-33707 :.N/A Remove HDD password in IDE Mode---- PASS
Status Update:
REF-33711 : Windows 7 x64 Windows 7 S3 Resume in IDE Mode---- PASS
Status Update:

IDE
REF-34030: Windows 8 x64 Beta UEFI Windows 8 x64 bit (Ide Mode) ---- PASS
Status Update:
REF-34027: Windows 7 x86 Windows 7 x32 bit (Ide Mode)---- PASS
Status Update:
REF-34028: Windows 7 x64 Windows 7 x64 bit (Ide Mode) ---- PASS
Status Update:
REF-34029: Windows 8 x64 Beta Windows 8 x64 bit (Ide Mode) ---- PASS
Status Update:

OS
REF-31795 :Windows 2008 x64 UEFI Windows 2008 R2 Server Installation(IDE Mode) ---- PASS
Status Update:
REF-31785 : Windows 7 x64 UEFI Windows7 x64 Install(IDE Mode) ---- PASS
Status Update:

S.M.A.R.T.
REF-28785 :Not OS Specific Bad S.M.A.R.T. Hard Drive Detection ---- U/T
Status Update: No Bad S.M.A.R.T. Hard Drive available
REF-31714 : Not OS Specific Hard Drive with S.M.A.R.T support (No errors) ---- PASS
Status Update:
REF-31715 : Not OS Specific Hard Drive Without S.M.A.R.T Support ---- PASS
Status Update:

Setup
TSE
REF-27846 :Not OS Specific TSE Manual Device Boot ---- PASS
Status Update:
REF-27847 :Not OS Specific TSE SATA Configuration ---- PASS
Status Update:

Platform Information Form :

Board Information - ChiefRiver
BIOS Information (Label, Path) - Labeled'4.6.5.3_VEB_1APTJ023 '; Path 'SS: Alaska;$/Alaska/Projects/Intel/IvyBridge/PantherPoint_ChiefRiver_Crb_1APTJ/ChiefRiver.veb';
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3.1 BIOS Versions
ACPI
S3
REF-28665: Windows 7 x64 S3 Power Button---- PASS
Status Update:
REF-33104: Windows 8 x64 Beta S3 Power Button---- PASS
Status Update:

Hdd Acoustic
REF-33885: EFI Check Bypass Mode with AcousticVal.efi in IDE mode ---- PASS
Status Update:
REF-33887: EFI Check Max.Performance with AcousticVal.efi in IDE ---- PASS
Status Update:
REF-33886: EFI Check Quiet Mode with AcousticVal.efi in IDE mode ---- PASS
Status Update:
REF-33889: EFI Multiple HDD verify with AcousticVal.efi in IDE ---- PASS
Status Update:

Hdd Security
REF-28741 :.N/A HDD Password Validation in IDE Mode ---- PASS
Status Update:
REF-33707 :.N/A Remove HDD password in IDE Mode---- PASS
Status Update:
REF-33711 : Windows 7 x64 Windows 7 S3 Resume in IDE Mode---- PASS
Status Update:

IDE
REF-34030: Windows 8 x64 Beta UEFI Windows 8 x64 bit (Ide Mode) ---- PASS
Status Update:
REF-34027: Windows 7 x86 Windows 7 x32 bit (Ide Mode)---- PASS
Status Update:
REF-34028: Windows 7 x64 Windows 7 x64 bit (Ide Mode) ---- PASS
Status Update:
REF-34029: Windows 8 x64 Beta Windows 8 x64 bit (Ide Mode) ---- PASS
Status Update:

OS
REF-31795 :Windows 2008 x64 UEFI Windows 2008 R2 Server Installation(IDE Mode) ---- PASS
Status Update:
REF-31785 : Windows 7 x64 UEFI Windows7 x64 Install(IDE Mode) ---- PASS
Status Update:

S.M.A.R.T.
REF-28785 :Not OS Specific Bad S.M.A.R.T. Hard Drive Detection ---- U/T
Status Update: No Bad S.M.A.R.T. Hard Drive available
REF-31714 : Not OS Specific Hard Drive with S.M.A.R.T support (No errors) ---- PASS
Status Update:
REF-31715 : Not OS Specific Hard Drive Without S.M.A.R.T Support ---- PASS
Status Update:

Setup
TSE
REF-27846 :Not OS Specific TSE Manual Device Boot ---- PASS
Status Update:
REF-27847 :Not OS Specific TSE SATA Configuration ---- PASS
Status Update:

Platform Information Form :

Board Information - Bromolow
BIOS Information (Label, Path) - Labeled'4.6.4.1_VEB_1AOSX015'; Path 'SS: Alaska;$/Alaska/Projects/Intel/SandyBridge/CougarPoint_Bromolow_Crb_1AOSX/Bromolow.veb';
Chipset Information (Type, Stepping) -
CPU Information (Type, Stepping) -
Memory Info (Manufacturer, Speed, Configuration) -
Graphics (Please specify which one in used) -
Chipset driver Version -
Graphics drive Version -

The following BQA Tests have been validated in UEFI 2.3.1 BIOS Versions
ACPI
S3
REF-28665: Windows 7 x64 S3 Power Button---- U/T
Status Update: Drivers is not available
REF-33104: Windows 8 x64 Beta S3 Power Button---- U/T
Status Update: Drivers is not available

Hdd Acoustic
REF-33885: EFI Check Bypass Mode with AcousticVal.efi in IDE mode ---- PASS
Status Update:
REF-33887: EFI Check Max.Performance with AcousticVal.efi in IDE ---- PASS
Status Update:
REF-33886: EFI Check Quiet Mode with AcousticVal.efi in IDE mode ---- PASS
Status Update:
REF-33889: EFI Multiple HDD verify with AcousticVal.efi in IDE ---- PASS
Status Update:

Hdd Security
REF-28741 :.N/A HDD Password Validation in IDE Mode ---- PASS
Status Update:
REF-33707 :.N/A Remove HDD password in IDE Mode---- PASS
Status Update:
REF-33711 : Windows 7 x64 Windows 7 S3 Resume in IDE Mode---- <U/T
Status Update: Drivers is not available

IDE
REF-34030: Windows 8 x64 Beta UEFI Windows 8 x64 bit (Ide Mode) ---- PASS
Status Update:
REF-34027: Windows 7 x86 Windows 7 x32 bit (Ide Mode)---- PASS
Status Update:
REF-34028: Windows 7 x64 Windows 7 x64 bit (Ide Mode) ---- PASS
Status Update:
REF-34029: Windows 8 x64 Beta Windows 8 x64 bit (Ide Mode) ---- PASS
Status Update:

OS
REF-31795 :Windows 2008 x64 UEFI Windows 2008 R2 Server Installation(IDE Mode) ---- PASS
Status Update:
REF-31785 : Windows 7 x64 UEFI Windows7 x64 Install(IDE Mode) ---- PASS
Status Update:

S.M.A.R.T.
REF-28785 :Not OS Specific Bad S.M.A.R.T. Hard Drive Detection ---- U/T
Status Update: No Bad S.M.A.R.T. Hard Drive available
REF-31714 : Not OS Specific Hard Drive with S.M.A.R.T support (No errors) ---- PASS
Status Update:
REF-31715 : Not OS Specific Hard Drive Without S.M.A.R.T Support ---- PASS
Status Update:

Setup
TSE
REF-27846 :Not OS Specific TSE Manual Device Boot ---- PASS
Status Update:
REF-27847 :Not OS Specific TSE SATA Configuration ---- PASS
Status Update:


Function by File Name

AMIBIOS Function Reference

By File Name

The following is a list of the .asm files.
For a list in alphabetical order, see In Alphabetical Order.

  • Ata.c
  • Atapi.c
  • IdeBus.c
  • IdeBus.h
  • IdeBus.mak
  • IDEBusComponentName.c
  • IdeBusMaster.c
  • IdeBusSrc.mak
  • IdeHPA.c
  • IdePowerManagement.c
Built on 10:11:50 09/03/12


Ata.c

Description:
ATA Services

The following functions are used in the file: Ata.c.

Function | Description
AtaBlkFlush | Flush the cache
AtaBlkRead | Read from ATA device
AtaBlkWrite | Write to ATA device
AtaIdentifyCommand | Issues IDENTIFY DATA command (0xEC)
AtapiIdentifyCommand | Issues IDENTIFY PACKET DATA command (0xA1)
AtaPioDataIn | Issues command which require data to be read
AtaPioDataOut | Issues Read/Write Command and Read/Write the data from/to the ATA device with SubCommand Support.
AtaReadWritePio | Issues Read/Write Command and Read/Write the data from/to the ATA device
AtaReset | Reset ATA device
Check48BitCommand | Checks if the command is for 48-bit LBA
CheckDriveReady | Check if BSY is cleared and DRDY set
ControllerPresence | Detects the ATA/ATAPI Controller
DetectIdeDevice | Detects the ATA/ATAPI device
DisableIdeInterrupt | Disabled Interrupt generation feature
GetIdentifyData | Gets Identify command data.
IdeNonDataCommand | Issues command where no data transfer takes place
IdeNonDataCommandExp | Issues command where no data transfer takes place
IdeReadByte | Reads 1 Byte of data from the IO port
IdeReadMultipleByte | Reads N Bytes of data from the IO port
IdeReadMultipleWord | Reads N Word of data from the IO port
IdeReadWord | Reads 1 Word of data from the IO port
IdeSetFeatureCommand | Issue a ATA Non-Data Command
IdeSoftReset | Issue a Soft Reset
IdeWriteByte | Writes 1 Byte of data to the IO port
IdeWriteDword | Writes 1 Dword of data to the IO port
IdeWriteMultipleByte | Writes N Bytes of data to the IO port
IdeWriteMultipleWord | Writes N Words of data to the IO port
IdeWriteWord | Writes 1 word of data to the IO port
IssueAtaReadWriteCommand | Issues ATA Read/Write Command
ReturnMSBset | Returns the MOST significant Bit set.
WaitforBitClear | Waits for the given bit to be clear
WaitforBitClearWithoutTimeout | Waits for the given bit to be clear
WaitforBitSet | Checks for a particular Bit to be set for a given amount of time
WaitForCmdCompletion | Waits for BSY bit to get clear
WaitForCmdCompletionWithTimeOutValue | Waits for BSY bit to get clear

Built on 10:11:50 09/03/12


AtaBlkFlush in the Ata.c

Function : AtaBlkFlush

File: Ata.c
Description:
Flush the cache
Input:
IN EFI_BLOCK_IO_PROTOCOL                        *This,
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

InitIdeBlockIO

Built on 10:11:49 09/03/12


AtaBlkRead in the Ata.c

Function : AtaBlkRead

File: Ata.c
Description:
Read from ATA device
Input:
IN EFI_BLOCK_IO_PROTOCOL                        *This,
IN UINT32                                       MediaId,
IN EFI_LBA                                      LBA,
IN UINTN                                        BufferSize,
OUT VOID                                        *Buffer
Output:
EFI_STATUS
Modified:
Notes:
1. Check for error conditions.
2. Call AtaReadWritePio.
Referrals:
InitIdeBlockIO, AtaReadWritePio
Built on 10:11:49 09/03/12


AtaBlkWrite in the Ata.c

Function : AtaBlkWrite

File: Ata.c
Description:
Write to ATA device
Input:
IN EFI_BLOCK_IO_PROTOCOL                        *This,
IN UINT32                                       MediaId,
IN EFI_LBA                                      LBA,
IN UINTN                                        BufferSize,
OUT VOID                                        *Buffer
Output:
EFI_STATUS
Modified:
Notes:
1. Check for error conditions.
2. Call AtaReadWritePio.
Referrals:
InitIdeBlockIO, AtaReadWritePio
Built on 10:11:49 09/03/12


AtaIdentifyCommand in the Ata.c

Function : AtaIdentifyCommand

File: Ata.c
Description:
Issues IDENTIFY DATA command (0xEC)
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
IN OUT VOID						*Buffer
Output:
*Buffer
Modified:
Notes:

Referrals:

AtaPioDataIn

Built on 10:11:49 09/03/12


AtapiIdentifyCommand in the Ata.c

Function : AtapiIdentifyCommand

File: Ata.c
Description:
Issues IDENTIFY PACKET DATA command (0xA1)
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
IN OUT VOID						*Buffer
Output:
*Buffer
Modified:
Notes:

Referrals:

AtaPioDataIn

Built on 10:11:49 09/03/12


AtaPioDataIn in the Ata.c

Function : AtaPioDataIn

File: Ata.c
Description:
Issues command which require data to be read
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
VOID                                                    *Buffer,
UINT32							ByteCount,
UINT8							SectorCount,
UINT8							LBALow,
UINT8							LBAMid,
UINT8							LBAHigh,
UINT8							Device,
UINT8							Command,
BOOLEAN							Multiple  // to determine the block size
Output:
*Buffer
Modified:
Notes:
Used to get Identify command data etc.
1. Issue the command
2. Check for errors.
3. Check if Data is ready. If yes, read it else return error.
Referrals:
Built on 10:11:49 09/03/12


AtaPioDataOut in the Ata.c

Function : AtaPioDataOut

File: Ata.c
Description:
Issues Read/Write Command and Read/Write the data from/to the ATA device
with SubCommand Support.
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
VOID                            *Buffer,
UINTN							ByteCount,
UINT8                           Features,
UINT32							SectorCountIn,
UINT8							LBALow,
UINT8							LBALowExp,
UINT8							LBAMid,
UINT8							LBAMidExp,
UINT8							LBAHigh,
UINT8							LBAHighExp,
UINT8							Device,
UINT8							Command,
BOOLEAN						    ReadWrite, // Read/Write = 0/1
BOOLEAN							Multiple   // to determine the block size
Output:
*Buffer
Modified:
Notes:
1. Check if Multiple sectors can be read/written to the ATA device.
2. Check for 48-bit LBA support.
3. Issue the command based on step 1 and step 2 results.
4. check for errors.
5. If success read/write data.
6. Based on step 1 results, complete the read/write sequence
7. If all sectors are not completed, goto step 3.
Referrals:
Built on 10:11:49 09/03/12


AtaReadWritePio in the Ata.c

Function : AtaReadWritePio

File: Ata.c
Description:
Issues Read/Write Command and Read/Write the data from/to the ATA device
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
VOID                                                    *Buffer,
UINTN							ByteCount,
UINT64							LBA
IN UINT8						ReadWriteCommand,
IN BOOLEAN						ReadWrite		 Read/Write = 0/1
Output:
*Buffer
Modified:
Notes:
1. Check if Multiple sectors can be read/written to the ATA device.
2. Check for 48-bit LBA support.
3. Issue the command based on step 1 and step 2 results.
4. check for errors.
5. If success read/write data.
6. Based on step 1 results, complete the read/write sequence
7. If all sectors are not completed, goto step 3.
Referrals:
AtaBlkWrite, AtaBlkRead
Built on 10:11:49 09/03/12


AtaReset in the Ata.c

Function : AtaReset

File: Ata.c
Description:
Reset ATA device
Input:
IN IDE_BUS_PROTOCOL			*IdeBusInterface,
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

InitIdeBlockIO

Built on 10:11:49 09/03/12


Check48BitCommand in the Ata.c

Function : Check48BitCommand

File: Ata.c
Description:
Checks if the command is for 48-bit LBA
Input:
IN UINT8			Command
Output:
TRUE/FLASE
Modified:
Notes:

Referrals:

Built on 10:11:49 09/03/12


CheckDriveReady in the Ata.c

Function : CheckDriveReady

File: Ata.c
Description:
Check if BSY is cleared and DRDY set
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

Built on 10:11:49 09/03/12


ControllerPresence in the Ata.c

Function : ControllerPresence

File: Ata.c
Description:
Detects the ATA/ATAPI Controller
Input:
IDE_BUS_PROTOCOL			*IdeBusInterface;
Output:
EFI_STATUS
Modified:
Notes:
Here is the control flow of this function:
1. Select the drive
2. Read status Register
3. If Status_Reg = 0xff, return Not_Found
4. Check if Busy bit is clear, return Found
5. If the BUS is not floating return EFI_DEVICE_ERROR
Referrals:
DetectIdeDevice
Built on 10:11:49 09/03/12


DetectIdeDevice in the Ata.c

Function : DetectIdeDevice

File: Ata.c
Description:
Detects the ATA/ATAPI device
Input:
IDE_BUS_PROTOCOL    *IdeBusInterface;
Output:
EFI_STATUS
Modified:
Notes:
Here is the control flow of this function:
1. If controller not present return EFI_NOT_FOUND
2. If BSY bit not clear and DRDY not set, return EFI_DEVICE_ERROR
3. If Identify command fails, return EFI_NOT_FOUND
4. Else return Success
Referrals:
IdeBusStart
Built on 10:11:49 09/03/12


DisableIdeInterrupt in the Ata.c

Function : DisableIdeInterrupt

File: Ata.c
Description:
Disabled Interrupt generation feature
Input:
IDE_BUS_PROTOCOL			*IdeBusInterface;
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

Built on 10:11:49 09/03/12


GetIdentifyData in the Ata.c

Function : GetIdentifyData

File: Ata.c
Description:
Gets Identify command data.
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
Output:
EFI_STATUS
Modified:
Notes:
ATA/ATAPI device type should have beeen known already.
Referrals:
Built on 10:11:49 09/03/12


IdeNonDataCommand in the Ata.c

Function : IdeNonDataCommand

File: Ata.c
Description:
Issues command where no data transfer takes place
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
VOID                                                    *Buffer,
UINT32							ByteCount,
UINT8							SectorCount,
UINT8							LBALow,
UINT8							LBAMid,
UINT8							LBAHigh,
UINT8							Device,
UINT8							Command,
Output:
*Buffer
Modified:
Notes:

Referrals:

IdeSetFeatureCommand

Built on 10:11:50 09/03/12


IdeNonDataCommandExp in the Ata.c

Function : IdeNonDataCommandExp

File: Ata.c
Description:
Issues command where no data transfer takes place
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
VOID                                                    *Buffer,
UINT32							ByteCount,
UINT8							SectorCount,
UINT8							SectorCountExp,
UINT8							LBALow,
UINT8							LBALowExp,
UINT8							LBAMid,
UINT8							LBAMidExp,
UINT8							LBAHigh,
UINT8							LBAHighExp,
UINT8							Device,
UINT8							Command,
Output:
*Buffer
Modified:
Notes:

Referrals:

IdeSetFeatureCommand

Built on 10:11:50 09/03/12


IdeReadByte in the Ata.c

Function : IdeReadByte

File: Ata.c
Description:
Reads 1 Byte of data from the IO port
Input:
IN EFI_PCI_IO_PROTOCOL			*PciIO,
IN UINT16						Register,
OUT UINT8						*Data8
Output:
OUT UINT8						*Data8
Modified:
Notes:

Referrals:

Built on 10:11:50 09/03/12


IdeReadMultipleByte in the Ata.c

Function : IdeReadMultipleByte

File: Ata.c
Description:
Reads N Bytes of data from the IO port
Input:
IN EFI_PCI_IO_PROTOCOL			*PciIO,
IN UINT16						Register,
IN UINT64						Count
OUT UINT8						*Data8
Output:
OUT UINT8						*Data8
Modified:
Notes:

Referrals:

Built on 10:11:50 09/03/12


IdeReadMultipleWord in the Ata.c

Function : IdeReadMultipleWord

File: Ata.c
Description:
Reads N Word of data from the IO port
Input:
IN EFI_PCI_IO_PROTOCOL			*PciIO,
IN UINT16						Register,
IN UINT32						Count   (Count in WORDS)
OUT UINT8						*Data16
Output:
OUT UINT16						*Data16
Modified:
Notes:

Referrals:

Built on 10:11:50 09/03/12


IdeReadWord in the Ata.c

Function : IdeReadWord

File: Ata.c
Description:
Reads 1 Word of data from the IO port
Input:
IN EFI_PCI_IO_PROTOCOL			*PciIO,
IN UINT16						Register,
OUT UINT16						*Data16
Output:
OUT UINT16						*Data16
Modified:
Notes:

Referrals:

Built on 10:11:50 09/03/12


IdeSetFeatureCommand in the Ata.c

Function : IdeSetFeatureCommand

File: Ata.c
Description:
Issue a ATA Non-Data Command
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

IdeNonDataCommand

Built on 10:11:50 09/03/12


IdeSoftReset in the Ata.c

Function : IdeSoftReset

File: Ata.c
Description:
Issue a Soft Reset
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

DetectIdeDevice

Built on 10:11:50 09/03/12


IdeWriteByte in the Ata.c

Function : IdeWriteByte

File: Ata.c
Description:
Writes 1 Byte of data to the IO port
Input:
IN EFI_PCI_IO_PROTOCOL			*PciIO,
IN UINT16						Register,
OUT UINT8						Data8
Output:
OUT UINT8						*Data8
Modified:
Notes:

Referrals:

Built on 10:11:50 09/03/12


IdeWriteDword in the Ata.c

Function : IdeWriteDword

File: Ata.c
Description:
Writes 1 Dword of data to the IO port
Input:
IN EFI_PCI_IO_PROTOCOL			*PciIO,
IN UINT16						Register,
OUT UINT16						*Data16
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

Built on 10:11:50 09/03/12


IdeWriteMultipleByte in the Ata.c

Function : IdeWriteMultipleByte

File: Ata.c
Description:
Writes N Bytes of data to the IO port
Input:
IN EFI_PCI_IO_PROTOCOL			*PciIO,
IN UINT16						Register,
IN UINT32						Count  (Count in BYTES)
IN UINT8						*Data8
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

Built on 10:11:50 09/03/12


IdeWriteMultipleWord in the Ata.c

Function : IdeWriteMultipleWord

File: Ata.c
Description:
Writes N Words of data to the IO port
Input:
IN EFI_PCI_IO_PROTOCOL			*PciIO,
IN UINT16						Register,
IN UINT64						Count (Count in WORDS)
IN UINT16						*Data16
Output:
Modified:
Notes:
Count : # of WORDs to write
Referrals:
Built on 10:11:50 09/03/12


IdeWriteWord in the Ata.c

Function : IdeWriteWord

File: Ata.c
Description:
Writes 1 word of data to the IO port
Input:
IN EFI_PCI_IO_PROTOCOL			*PciIO,
IN UINT16						Register,
OUT UINT16						*Data16
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

Built on 10:11:50 09/03/12


IssueAtaReadWriteCommand in the Ata.c

Function : IssueAtaReadWriteCommand

File: Ata.c
Description:
Issues ATA Read/Write Command
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
UINT64							LBA,
INT32							SectorCount,
UINT8							Command
UINT8                           Features         OPTIONAL
Output:
        EFI_STATUS
Modified:
Notes:
1. Select the drive.
2. check if BSY and DRQ bits are zero.
3. Issue the command.
Referrals:
AtaReadWritePio
Built on 10:11:50 09/03/12


ReturnMSBset in the Ata.c

Function : ReturnMSBset

File: Ata.c
Description:
Returns the MOST significant Bit set.
Input:
UINT32		Data
Output:
UINT8
Modified:
Notes:

Referrals:

Built on 10:11:50 09/03/12


WaitforBitClear in the Ata.c

Function : WaitforBitClear

File: Ata.c
Description:
Waits for the given bit to be clear
Input:
UINT16		AlternateStatus,
UINT8		BitClear
UINT32		BUSY_CLEAR_TIMEOUT		// Millisecond
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

Built on 10:11:50 09/03/12


WaitforBitClearWithoutTimeout in the Ata.c

Function : WaitforBitClearWithoutTimeout

File: Ata.c
Description:
Waits for the given bit to be clear
Input:
UINT16		AlternateStatus,
UINT8		BitClear
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

Built on 10:11:50 09/03/12


WaitforBitSet in the Ata.c

Function : WaitforBitSet

File: Ata.c
Description:
Checks for a particular Bit to be set for a given amount of time
Input:
IN EFI_PCI_IO_PROTOCOL			*PciIO,
UINT16							AlternateStatusReg,
UINT8							BitSet,
UINT32							TimeOut
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

Built on 10:11:50 09/03/12


WaitForCmdCompletion in the Ata.c

Function : WaitForCmdCompletion

File: Ata.c
Description:
Waits for BSY bit to get clear
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface
Output:
EFI_STATUS
Modified:
Notes:
Wait for BSY bit to get clear. Check for any errors.
Referrals:
AtaReadWritePio
Built on 10:11:50 09/03/12


WaitForCmdCompletionWithTimeOutValue in the Ata.c

Function : WaitForCmdCompletionWithTimeOutValue

File: Ata.c
Description:
Waits for BSY bit to get clear
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface
IN UINT32						TimeOutValue
Output:
EFI_STATUS
Modified:
Notes:
Wait for BSY bit to get clear. Check for any errors.
Referrals:
AtaReadWritePio
Built on 10:11:50 09/03/12


Atapi.c

Description:
Supports ATAPI devices

The following functions are used in the file: Atapi.c.

Function | Description
AtapiBlkFlush | Flush the cache
AtapiBlkRead | Read from the Atapi Device
AtapiBlkWrite | Write to the Atapi Device
AtapiInquiryData | Issues Atapi Inquiry Command and returns the DATA.
AtapiReadWritePio | Read/Write data from/to the ATAPI device
AtapiReset | Issues ATAPI Reset command.
CheckCHKonEntry | Check for CHK bit. If set Issue ATAPI reset.
DetectAtapiMedia | Detects whether a Media is present in the ATAPI Removable device or not.
GeneralAtapiCommandAndData | Issues the ATAPI cammand and reads the data
GetOddLoadingType | Find the ODD Loading Type information and return it
GetOddType | Find the ODD device Type and return it
HandleAtapiError | Handle Atapi error if any.
IssueAtapiPacketCommand | Issues ATAPI Packet command and send the packet.
IssueAtapiReset | Issues ATAPI Reset command
ReadAtapiData | Read data from the data port based on Byte count value
TestUnitReady | Issues Start/Stop unit Command
WriteAtapiData | Write data to the data port based on Byte count value

Built on 10:11:50 09/03/12


AtapiBlkFlush in the Atapi.c

Function : AtapiBlkFlush

File: Atapi.c
Description:
Flush the cache
Input:
IN EFI_BLOCK_IO_PROTOCOL                        *This,
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

InitIdeBlockIO

Built on 10:11:49 09/03/12


AtapiBlkRead in the Atapi.c

Function : AtapiBlkRead

File: Atapi.c
Description:
Read from the Atapi Device
Input:
IN EFI_BLOCK_IO_PROTOCOL            *This,
IN UINT32                                           MediaId,
IN EFI_LBA                                          LBA,
IN UINTN                                            BufferSize,
OUT VOID                                            *Buffer
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

AtapiReadWritePio, InitIdeBlockIO

Built on 10:11:49 09/03/12


AtapiBlkWrite in the Atapi.c

Function : AtapiBlkWrite

File: Atapi.c
Description:
Write to the Atapi Device
Input:
IN EFI_BLOCK_IO_PROTOCOL                        *This,
IN UINT32                                       MediaId,
IN EFI_LBA                                      LBA,
IN UINTN                                        BufferSize,
OUT VOID                                        *Buffer
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

AtapiReadWritePio, InitIdeBlockIO

Built on 10:11:49 09/03/12


AtapiInquiryData in the Atapi.c

Function : AtapiInquiryData

File: Atapi.c
Description:
Issues Atapi Inquiry Command and returns the DATA.
Input:
IDE_BUS_INIT_PROTOCOL			*IdeBusInitInterface
UINT8							*InquiryData,
UINT32							*InquiryDataSize
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

InitIdeBlockIO

Built on 10:11:49 09/03/12


AtapiReadWritePio in the Atapi.c

Function : AtapiReadWritePio

File: Atapi.c
Description:
Read/Write data from/to the ATAPI device
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
VOID                                                    *Buffer,
UINTN							ByteCount,
UINT64							LBA,
UINT8							ReadWriteCommand,
BOOLEAN							READWRITE
Output:
EFI_STATUS
Modified:
Notes:
1. Prepare ATAPI Command Packet
2. Check for errors. If Media_Change, detect the new atapi media if present and return status accordingly.
3. Read/write data if the command packet is issues successfully.
4. Repeat from step 1 untill all data has been read/written.
Referrals:
AtapiBlkRead, AtapiBlkWrite
Built on 10:11:49 09/03/12


AtapiReset in the Atapi.c

Function : AtapiReset

File: Atapi.c
Description:
Issues ATAPI Reset command.
Input:
IN EFI_BLOCK_IO_PROTOCOL				*This,
IN BOOLEAN					ExtendedVerification
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

IssueAtapiReset, InitIdeBlockIO

Built on 10:11:49 09/03/12


CheckCHKonEntry in the Atapi.c

Function : CheckCHKonEntry

File: Atapi.c
Description:
Check for CHK bit. If set Issue ATAPI reset.
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

Built on 10:11:49 09/03/12


DetectAtapiMedia in the Atapi.c

Function : DetectAtapiMedia

File: Atapi.c
Description:
Detects whether a Media is present in the ATAPI Removable device or not.
Input:
IDE_BUS_INIT_PROTOCOL			*IdeBusInitInterface
Output:
EFI_STATUS
Modified:
Notes:
1. Issue Read Capacity command for CDROM or Read Format command for other ATAPI devices.
2. If step 1  is successfull, update last LBA, Block Size, Read/Write capable, Media ID
Referrals:
InitIdeBlockIO
Built on 10:11:49 09/03/12


GeneralAtapiCommandAndData in the Atapi.c

Function : GeneralAtapiCommandAndData

File: Atapi.c
Description:
Issues the ATAPI cammand and reads the data
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
UINT8                           *PacketBuffer,
UINT8                           *Buffer,
IN OUT UINT16					*ByteCount
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

Built on 10:11:49 09/03/12


GetOddLoadingType in the Atapi.c

Function : GetOddLoadingType

File: Atapi.c
Description:
Find the ODD Loading Type information and return it
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
Output:
OUT UINT16						*OddLoadingType
Built on 10:11:49 09/03/12


GetOddType in the Atapi.c

Function : GetOddType

File: Atapi.c
Description:
Find the ODD device Type and return it
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
Output:
OUT UINT16						*OddType
Modified:
Notes:

Referrals:

Built on 10:11:49 09/03/12


HandleAtapiError in the Atapi.c

Function : HandleAtapiError

File: Atapi.c
Description:
Handle Atapi error if any.
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface
Output:
EFI_STATUS
Modified:
Notes:
If DF and CHK bits are not set, return EFI_SUCCESS. If either
    one of the bits are set, analyse the error and return appropraite
    error message.
Referrals:
Built on 10:11:49 09/03/12


IssueAtapiPacketCommand in the Atapi.c

Function : IssueAtapiPacketCommand

File: Atapi.c
Description:
Issues ATAPI Packet command and send the packet.
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
UINT16							*PacketBuffer,		// Pointer to packet
UINT16							ByteCount		    // Byte count Limit
Output:
EFI_STATUS
Modified:
Notes:
The Packet Command and the packet are sent. Error is not analysed in this
    Routine. Once the packet is sent successfully, EFI_SUCCESS is returned.
    It is the callers responsibilty to check the status.
Referrals:
Built on 10:11:50 09/03/12


IssueAtapiReset in the Atapi.c

Function : IssueAtapiReset

File: Atapi.c
Description:
Issues ATAPI Reset command
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface
IN BOOLEAN						TestUnitReady
Output:
EFI_STATUS
Modified:
Notes:
If TestUnitReady is TRUE, after ATAPI Reset, TestUnitReady command is issued.
Generally after DEVICE RESET command, ATAPI device respond to and command with
POWER ON RESET OCCURRED and followed by MEDIA CHANGE.
Referrals:
Built on 10:11:50 09/03/12


ReadAtapiData in the Atapi.c

Function : ReadAtapiData

File: Atapi.c
Description:
Read data from the data port based on Byte count value
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
OUT UINT8							AtapiCommand
OUT UINT16							*BytesRead
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

Built on 10:11:50 09/03/12


TestUnitReady in the Atapi.c

Function : TestUnitReady

File: Atapi.c
Description:
Issues Start/Stop unit Command
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
Output:
EFI_STATUS			EFI_SUCCESS               : If Media is accessible
                    EFI_NO_MEDIA
                    EFI_MEDIA_CHANGED
                    EFI_DEVICE_ERROR
Modified:
Notes:

Referrals:

Built on 10:11:50 09/03/12


WriteAtapiData in the Atapi.c

Function : WriteAtapiData

File: Atapi.c
Description:
Write data to the data port based on Byte count value
Input:
IN IDE_BUS_PROTOCOL					*IdeBusInterface,
OUT UINT8							AtapiCommand
OUT UINT16							*BytesRead
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

Built on 10:11:50 09/03/12


IdeBus.c

Description:
Provides IDE Block IO protocol

The following functions are used in the file: IdeBus.c.

Function | Description
CheckAhciMode | Checks If the controller is in AHCI MODE.
CheckHPControllerPresence | A quick check to see if ports are still decoded.
ConfigureIdeDevice | Issues SET FEATURE Command
ConfigureIdeDeviceAndController | PIO and DMA mode programming both on the Controller as well as on the Device is done
CreateIdeDevicePath | Creates a IDE device devicepath and adds it to IdeBusInterface
DiskInfoIdentify | Return Identify Data
DiskInfoInquiry |
DiskInfoSenseData | Return InfoSenseData.
DiskInfoWhichIDE | Returns whether the device is PM/PS/SM/SS
DMACapable | Check if DMA is supported
GetEnumOddType | Get the Enum value for ODD type found on profile
IdeBusEntryPoint | Installs gIdeBusDriverBinding protocol
IdeBusExitBootServices | Enables IDE controller interrupt on ExitBootServices
IdeBusStart | Installs IDE Block IO Protocol
IdeBusStop | Uninstall all devices installed in start procedure.
IdeBusSupported | Checks whether IDE_PROTOCOL_INTERFACE is installed on the controller. If 'yes', return SUCCESS else ERROR
IdeHPTimer | Checks for any HP IDE device
InitAcousticSupport | Initializes Acoustic Management Support functionality
InitIdeBlockIO | Initializes IDE Block IO interface
InitIdeDiskInfo | Initializes IDE DiskInfo Interface
InitMiscConfig | Initialize misc IDE configurations.
InstallBusInitProtocol | Installs BUS Init Protocol on the IDE controller Handle
IssueFreezeLockCommand | Issue the Freeze lock command.
PrintIdeDeviceInfo | Prints Debug Level 3 Trace Messages
UpdateBaseAddress | Updates Command and Control reg address.

Built on 10:11:50 09/03/12


CheckAhciMode in the IdeBus.c

Function : CheckAhciMode

File: IdeBus.c
Description:
Checks If the controller is in AHCI MODE.
Input:
IDE_BUS_PROTOCOL			*IdeBusInterface;
Output:
BOOLEAN                     TRUE  - AHCI Mode
               FALSE - IDE Mode
Modified:
Notes:

Referrals:

Built on 10:11:49 09/03/12


CheckHPControllerPresence in the IdeBus.c

Function : CheckHPControllerPresence

File: IdeBus.c
Description:
A quick check to see if ports are still decoded.
Input:
IN IDE_BUS_PROTOCOL			*IdeBusInterface
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

Built on 10:11:49 09/03/12


ConfigureIdeDevice in the IdeBus.c

Function : ConfigureIdeDevice

File: IdeBus.c
Description:
Issues SET FEATURE Command
Input:
IDE_BUS_PROTOCOL			*IdeBusInterface,
IDE_BUS_INIT_PROTOCOL		*IdeBusInitInterface
Output:
EFI_STATUS
Modified:
Notes:
Here is the control flow of this function:
1. Issue Set feature commend to set PIO mode if needed.
2. Set Multiple Mode command for ATA devices if needed.
3. Issue Set feature commend to set UDMA/MWDMA. If it fails, disable Busmaster support.
Referrals:
ConfigureIdeDeviceAndController, IdeSetFeatureCommand
Built on 10:11:49 09/03/12


ConfigureIdeDeviceAndController in the IdeBus.c

Function : ConfigureIdeDeviceAndController

File: IdeBus.c
Description:
PIO and DMA mode programming both on the Controller as well as on the Device is done
Input:
IDE_BUS_INIT_PROTOCOL			*IdeBusInitInterface
IDE_CONTROLLER_PROTOCOL			*IdeControllerInterface
IDE_BUS_INIT_PROTOCOL			*IdeBusInitInterface
Output:
EFI_STATUS
Modified:
Notes:
Here is the control flow of this function:
1. Get the Best PIO and DMA mode supported by the device from Identify Data
2. Set the PIO and DMA mode in the IDE controller.
3. Configure the IDE device with the PIO and DMA mode.
4. Update the Identify Data.
5. Based on the IDE device select the proper Read/Write commands.
6. Construct a unicode string for the IDE device.
Referrals:
ConfigureIdeDevice, GetIdentifyData
Built on 10:11:49 09/03/12


CreateIdeDevicePath in the IdeBus.c

Function : CreateIdeDevicePath

File: IdeBus.c
Description:
Creates a IDE device devicepath and adds it to IdeBusInterface
Input:
IN EFI_DRIVER_BINDING_PROTOCOL  *This,
IN EFI_HANDLE                   Controller,
IDE_BUS_INIT_PROTOCOL			*IdeBusInitInterface;
IN EFI_DEVICE_PATH_PROTOCOL     *RemainingDevicePath
UINT8							Current_Channel
UINT8							Current_Device
Output:
EFI_STATUS
Modified:
Notes:
Here is the control flow of this function:
1.  If Remaining Devicepath is not NULL, we have already verified that it is a
    valid Atapi device path in IdeBusStart. So nothing to do. Just exit.
2.	Build a Atapi devicepath and a End devce path.
3.  Get the Devicepath for the IDE controller.
3.  Append Atapi devicepath to  IDE controller devicepath.
Referrals:
AllocatePool, OpenProtocol, IdeBusStart
Built on 10:11:49 09/03/12


DiskInfoIdentify in the IdeBus.c

Function : DiskInfoIdentify

File: IdeBus.c
Description:
Return Identify Data
Input:
EFI_DISK_INFO_PROTOCOL			*This,
IN OUT VOID						*IdentifyData,
IN OUT UINT32					*IdentifyDataSize
Output:
EFI_STATUS
Modified:
Notes:
1. Return the Identify command data.
Referrals:
InitIdeDiskInfo
Built on 10:11:49 09/03/12


DiskInfoInquiry in the IdeBus.c

Function : DiskInfoInquiry

File: IdeBus.c
Description:
Input:
IN EFI_DISK_INFO_PROTOCOL	*This,
IN OUT VOID					*InquiryData,
IN OUT UINT32				*InquiryDataSize
Output:
EFI_STATUS
Modified:
Notes:
1. Check for Atapi Device. If not exit
2. COpy the Inquiry Data from AtapiDevice->InquiryData to the input pointer.
Referrals:
InitIdeDiskInfo
Built on 10:11:49 09/03/12


DiskInfoSenseData in the IdeBus.c

Function : DiskInfoSenseData

File: IdeBus.c
Description:
Return InfoSenseData.
Input:
EFI_DISK_INFO_PROTOCOL          *This,
VOID						*SenseData,
UINT32						*SenseDataSize,
UINT8						*SenseDataNumber
Output:
EFI_STATUS
Modified:
Notes:
1. Return the Sense data for the Atapi device.
Referrals:
InitIdeDiskInfo
Built on 10:11:49 09/03/12


DiskInfoWhichIDE in the IdeBus.c

Function : DiskInfoWhichIDE

File: IdeBus.c
Description:
Returns whether the device is PM/PS/SM/SS
Input:
IN EFI_DISK_INFO_PROTOCOL	*This,
OUT UINT32					*IdeChannel,
OUT UINT32					*IdeDevice
Output:
EFI_STATUS
Modified:
Notes:
1. Return information about the Primary/Secondary channel and Master/Slave information.
Referrals:
InitIdeDiskInfo
Built on 10:11:49 09/03/12


DMACapable in the IdeBus.c

Function : DMACapable

File: IdeBus.c
Description:
Check if DMA is supported
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
Output:
TRUE : DMA Capable
Modified:
Notes:

Referrals:

Built on 10:11:49 09/03/12


GetEnumOddType in the IdeBus.c

Function : GetEnumOddType

File: IdeBus.c
Description:
Get the Enum value for ODD type found on profile
Input:

UINT16      Oddtype
Output:
ODD_TYPE    EnumValue
Modified:
Notes:

Referrals:

Built on 10:11:49 09/03/12


IdeBusEntryPoint in the IdeBus.c

Function : IdeBusEntryPoint

File: IdeBus.c
Description:
Installs gIdeBusDriverBinding protocol
Input:
IN EFI_HANDLE        ImageHandle,
IN EFI_SYSTEM_TABLE  *SystemTable
Output:
EFI_STATUS
Modified:
Notes:
Here is the control flow of this function:
1. Initialize Ami Lib.
2. Install Driver Binding Protocol
3. Return EFI_SUCCESS.
Referrals:
InitAmiLib InstallMultipleProtocolInterfaces
Built on 10:11:49 09/03/12


IdeBusExitBootServices in the IdeBus.c

Function : IdeBusExitBootServices

File: IdeBus.c
Description:
Enables IDE controller interrupt on ExitBootServices
Input:
Event   - The Event that is being processed
Context - Event Context
Output:
None
Modified:
Notes:

Referrals:

Built on 10:11:49 09/03/12


IdeBusStart in the IdeBus.c

Function : IdeBusStart

File: IdeBus.c
Description:
Installs IDE Block IO Protocol
Input:
IN EFI_DRIVER_BINDING_PROTOCOL    *This,
IN EFI_HANDLE                     Controller,
IN EFI_DEVICE_PATH_PROTOCOL       *RemainingDevicePath
Output:
EFI_STATUS
Modified:
Notes:
Here is the control flow of this function:
1.  Check if "gEfiIdeBusInitProtocolGuid" is already installed. If not, install it "InstallBusInitProtocol".
2.  If Devicepath is valid, initialize so that only particular device will be detected and
confgiured, else all devices will be detected and configured.
3.  check whether the device has not been already detected. If yes, skip it and go for next device
4.  IdeBusInterface is initialized for this device. Update Base address.
5.  Do the detection "DetectIdeDevice". Update the status in "IdeBusInitProtocol". If failure undo the process "IdeBusInterface".
6.  Repeat for all devices from step 3.
7.  Start the configuration process for devices which are detected successfully "DEVICE_DETECTED_SUCCESSFULLY".
8.  "ConfigureIdeDeviceAndController" will do the configuration.
9.  If above step is success, build Devicepath "CreateIdeDevicePath"
10. Create the Block_io_Protocol"InitIdeBlockIO". Install it only if Device is not Password protected.
11. Create the DISK_INFO_PROTOCOL "InitIdeDiskInfo". Install it only if Device is not Password protected.
12. Install a child device with the above three protocols.
13. Open "gEfiIdeControllerProtocolGuid" with the child handle.
14. Repeat from step 8 for the remaining devices.
Referrals:
OpenProtocol CloseProtocol InstallProtocolInterface AllocatePool
Built on 10:11:49 09/03/12


IdeBusStop in the IdeBus.c

Function : IdeBusStop

File: IdeBus.c
Description:
Uninstall all devices installed in start procedure.
Input:
IN EFI_DRIVER_BINDING_PROTOCOL    *This,
IN EFI_HANDLE                     Controller,
IN EFI_DEVICE_PATH_PROTOCOL       *RemainingDevicePath
Output:
EFI_STATUS
Modified:
Notes:
Here is the control flow of this function:
1.  Check whether "gEfiIdeBusInitProtocolGuid" is installed on this controller. If not exit with error.
2.  If "NumberOfChildren" is zero, check wether all child devices have been stopped. If not exit with error.
       if all child devices have been stopped, then close "gEfiIdeControllerProtocolGuid" and "gEfiIdeBusInitProtocolGuid",
        uninstall "gEfiIdeBusInitProtocolGuid" and then exit with success.
3.  If "NumberOfChildren" is non-zero,	close "gEfiIdeControllerProtocolGuid" opened by the child device in start function.
    uninstall all protocols installed on this child device in start function,
    free up all resources allocated in start function. Repeat step	3 for all child devices and	return success at the end.
Referrals:
OpenProtocol CloseProtocol
Built on 10:11:50 09/03/12


IdeBusSupported in the IdeBus.c

Function : IdeBusSupported

File: IdeBus.c
Description:
Checks whether IDE_PROTOCOL_INTERFACE is installed on the controller.
        If 'yes', return SUCCESS else ERROR
Input:
IN EFI_DRIVER_BINDING_PROTOCOL    *This,
IN EFI_HANDLE                     Controller,
IN EFI_DEVICE_PATH_PROTOCOL       *RemainingDevicePath
Output:
EFI_STATUS
Modified:
Notes:
Here is the control flow of this function:
1. If Devicepath is NULL, check "gEfiIdeControllerProtocolGuid" is installed by IdeController device driver,
if yes, it is the IDE controller that this Bus will manage. Then return Success.
2. If Devicepath is valid, check if "gEfiIdeBusInitProtocolGuid" is already installed by this BUS driver,
if yes, check whether it is OK to configure this device. if not installed goto step 1.
Referrals:
OpenProtocol CloseProtocol
Built on 10:11:50 09/03/12


IdeHPTimer in the IdeBus.c

Function : IdeHPTimer

File: IdeBus.c
Description:
Checks for any HP IDE device
Input:
IN EFI_EVENT            Event,
IN VOID                         *Context
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

Built on 10:11:50 09/03/12


InitAcousticSupport in the IdeBus.c

Function : InitAcousticSupport

File: IdeBus.c
Description:
Initializes Acoustic Management Support functionality
Input:
IDE_BUS_PROTOCOL			*IdeBusInterface,
Output:
EFI_STATUS
Modified:
Notes:
1. Check if the device support Acoustic management.
2. Check the desired state Vs the current state.
3. If both are equal nothing to do exit else program the desired level
Referrals:
IdeSetFeatureCommand
Built on 10:11:50 09/03/12


InitIdeBlockIO in the IdeBus.c

Function : InitIdeBlockIO

File: IdeBus.c
Description:
Initializes IDE Block IO interface
Input:

IDE_BUS_PROTOCOL				*IdeBusInterface,
Output:
EFI_STATUS
Modified:
Notes:
Here is the control flow of this function:
1. Initialize EFI_BLOCK_IO_PROTOCOL Protocol.
2. In case of Removable devices, detect Media presence.
Referrals:
AllocatePool, OpenProtocol, DetectAtapiMedia, AtapiInquiryData
Built on 10:11:50 09/03/12


InitIdeDiskInfo in the IdeBus.c

Function : InitIdeDiskInfo

File: IdeBus.c
Description:
Initializes IDE DiskInfo Interface
Input:

IDE_BUS_PROTOCOL		*IdeBusInterface,
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

AllocatePool OpenProtocol

Built on 10:11:50 09/03/12


InitMiscConfig in the IdeBus.c

Function : InitMiscConfig

File: IdeBus.c
Description:
Initialize misc IDE configurations.
Input:
IN SATA_DEVICE_INTERFACE	*SataDevInterface
Output:
None
Built on 10:11:50 09/03/12


InstallBusInitProtocol in the IdeBus.c

Function : InstallBusInitProtocol

File: IdeBus.c
Description:
Installs BUS Init Protocol on the IDE controller Handle
Input:
IN EFI_HANDLE                     Controller,
IDE_BUS_INIT_PROTOCOL			*IdeBusInitInterface;
IDE_CONTROLLER_PROTOCOL			*IdeControllerInterface
Output:
EFI_STATUS
Modified:
Notes:
Here is the control flow of this function:
1. Call "IdeGetControllerInfo", to get channel information from IdeController driver.
2. Install "gEfiIdeBusInitProtocolGuid" on the IDE controller.
Referrals:
AllocatePool, InstallProtocolInterface, IdeGetControllerInfo
Built on 10:11:50 09/03/12


IssueFreezeLockCommand in the IdeBus.c

Function : IssueFreezeLockCommand

File: IdeBus.c
Description:
Issue the Freeze lock command.
Input:
IDE_BUS_PROTOCOL			*IdeBusInterface;
Output:
Modified:
Notes:

Referrals:

Built on 10:11:50 09/03/12


PrintIdeDeviceInfo in the IdeBus.c

Function : PrintIdeDeviceInfo

File: IdeBus.c
Description:
Prints Debug Level 3 Trace Messages
Input:
IN IDE_BUS_PROTOCOL			*IdeBusInterface
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

Built on 10:11:50 09/03/12


UpdateBaseAddress in the IdeBus.c

Function : UpdateBaseAddress

File: IdeBus.c
Description:
Updates Command and Control reg address.
Input:
IDE_BUS_PROTOCOL			*IdeBusInterface;
Output:
EFI_STATUS
Modified:
Notes:
Here is the control flow of this function:
1. Using PCI_IO_PROTOCOL, update the Command, control and Busmaster reg address.
Make use of Channel number while updating. Also check whether controller is running in Legacy/Native mode
Referrals:
IdeBusStart
Built on 10:11:50 09/03/12


IdeBus.h

Description:
This file contains the Includes, Definitions, typedefs,
        Variable and External Declarations, Structure and
function prototypes needed for the IdeBus driver
Built on 10:11:50 09/03/12


IdeBus.mak

Description:
IdeBus BIN make file.
Built on 10:11:50 09/03/12


IDEBusComponentName.c

Description:
Component Name Protocol Member Functions for IDE Bus.
Built on 10:11:50 09/03/12


IdeBusMaster.c

Description:
BusMaster Services

The following functions are used in the file: IdeBusMaster.c.

Function | Description
AtapiReadWriteBusMaster | Read/Write data from/to the ATAPI device
AtaReadWriteBusMaster | Issues Read/Write Command and Read/Write the data from/to the ATA device using BusMaster
CreateDescriptorTable | Creates a IDE BUS master Descriptor Table
HandleATABMErrors | Check for any errors
InitBusMasterRegisters | Initialize Bus Master registers
MaskandSaveInterrupt | Mask IDE interrupt
RestoreInterrupt | Restore the Interrupt mask
StartStopBusMastering | Start/Stop Bus mAstering
WaitforDMAtoCompletion | Start/Stop Bus mAstering

Built on 10:11:50 09/03/12


AtapiReadWriteBusMaster in the IdeBusMaster.c

Function : AtapiReadWriteBusMaster

File: IdeBusMaster.c
Description:
Read/Write data from/to the ATAPI device
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
VOID                                                    *Buffer,
UINTN							ByteCount,
UINT64							LBA,
UINT8							ReadWriteCommand,
BOOLEAN							READWRITE
Output:
EFI_STATUS
Modified:
Notes:
1. Prepare ATAPI Command Packet
2. Check for errors. If Media_Change, detect the new atapi media if present and return status accordingly.
3. Read/write data if the command packet is issues successfully.
4. Repeat from step 1 untill all data has been read/written.
Referrals:
AtapiBlkRead, AtapiBlkWrite
Built on 10:11:49 09/03/12


AtaReadWriteBusMaster in the IdeBusMaster.c

Function : AtaReadWriteBusMaster

File: IdeBusMaster.c
Description:
Issues Read/Write Command and Read/Write the data from/to the ATA device
        using BusMaster
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
VOID                                                    *Buffer,
UINT32							ByteCount,
UINT64							LBA
Output:
*Buffer
Modified:
Notes:
1. Create Descriptor Table
2. Issue ATA Read/Write command. Enable BusMastering
3. Wait for Data Transfer
4. Check for errors
5. If success, check if any more data need to transferred, if yes, goto step 1
Referrals:
AtaBlkWrite, AtaBlkRead
Built on 10:11:49 09/03/12


CreateDescriptorTable in the IdeBusMaster.c

Function : CreateDescriptorTable

File: IdeBusMaster.c
Description:
Creates a IDE BUS master Descriptor Table
Input:
IN OUT VOID						**DescriptorBuffer  // 128KB buffer
IN UINT32						StartAddress
IN UINT32						ByteCount
OUT	UINTN						*FinalByteCount
Output:
DescriptorBuffer, EFI_STATUS
Modified:
Notes:
1. Create a Physical Region Descriptor for IDE  Bus Master.
2. FinalByteCount will be the total # of Bytes that can be transferred
    using this Descriptor. Most of the time FinalByteCount will be equal to ByteCount.
/			If the Descriptor Buffer exceeds 64K, then partial transfer will take place.
Referrals:
Built on 10:11:49 09/03/12


HandleATABMErrors in the IdeBusMaster.c

Function : HandleATABMErrors

File: IdeBusMaster.c
Description:
Check for any errors
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

Built on 10:11:49 09/03/12


InitBusMasterRegisters in the IdeBusMaster.c

Function : InitBusMasterRegisters

File: IdeBusMaster.c
Description:
Initialize Bus Master registers
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
IN OUT VOID						*DescriptorBuffer
IN BOOLEAN						ReadWrite
Output:
DescriptorBuffer, EFI_STATUS
Modified:
Notes:
1. Create a Physical Region Descriptor for IDE  Bus Master.
2. FinalByteCount will be the total # of Bytes that can be transferred
    using this Descriptor. Most of the time FinalByteCount will be equal to ByteCount.
/			If the Descriptor Buffer exceeds 64K, then partial transfer will take place.
Referrals:
Built on 10:11:50 09/03/12


MaskandSaveInterrupt in the IdeBusMaster.c

Function : MaskandSaveInterrupt

File: IdeBusMaster.c
Description:
Mask IDE interrupt
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
Output:
Modified:
Notes:

Referrals:

AtaReadWriteBusMaster

Built on 10:11:50 09/03/12


RestoreInterrupt in the IdeBusMaster.c

Function : RestoreInterrupt

File: IdeBusMaster.c
Description:
Restore the Interrupt mask
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
Output:
Modified:
Notes:

Referrals:

AtaReadWriteBusMaster

Built on 10:11:50 09/03/12


StartStopBusMastering in the IdeBusMaster.c

Function : StartStopBusMastering

File: IdeBusMaster.c
Description:
Start/Stop Bus mAstering
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
IN BOOLEAN						StartStop       //	Start = TRUE
Output:
EFI_STATUS
Modified:
Notes:
Don't destroy Read/Write Control bit
Referrals:
Built on 10:11:50 09/03/12


WaitforDMAtoCompletion in the IdeBusMaster.c

Function : WaitforDMAtoCompletion

File: IdeBusMaster.c
Description:
Start/Stop Bus mAstering
Input:
IN IDE_BUS_PROTOCOL				*IdeBusInterface,
IN UINT32						TimeDelay (msec)
Output:
EFI_STATUS   Success : If DMA completes with or with out Error.
EFI_DEVICE_ERROR	 : If timed out.
Modified:
Notes:
1. Check for Interrupt bit set. If yes, command completed.
2. Check for Active bit to go Zero. If yes, command completed.
3. Waits for a max. of TimeDelay/10,000 sec for the command to get completed.
Referrals:
Built on 10:11:50 09/03/12


IdeBusSrc.mak

Description:
Built on 10:11:50 09/03/12


IdeHPA.c

Description:
Host Protection Area Support

The following functions are used in the file: IdeHPA.c.

Function | Description
GetNativeMaxAddress | Returns the Native Max LBA address supported by the device
HPADisabledLastLBA | Returns the valid last LBA # when HPA is disabled.
InstallHPAInterface | Checks whether Host Protcted Area feature is supported or not. If Supported, installs HPAProtocol.
IssueSetMaxPasswordCmd | Sets the Password to Lock/Unlock use of SetMaxAddress command
SetMaxAddress | Set the Max LBA address
SetMaxFreezeLock | Locks all SET MAX ADDRESS/PASSWORD/LOCK/UNLOCK command untill next power cycle. GetNativeMaxAddress is allowed.
SetMaxLock | Locks the device from accepting commands except UNLOCK and FREEZELOCK
SetMaxPassword | Sets the Password
SetMaxUnLock | Unlocks the device and allows it to accept all SET MAX commands
StopHPAInterface | Uninstall HPA Protocol

Built on 10:11:50 09/03/12


GetNativeMaxAddress in the IdeHPA.c

Function : GetNativeMaxAddress

File: IdeHPA.c
Description:
Returns the Native Max LBA address supported by the device
Input:
IN      IDE_HPA_INTERFACE			*This,
OUT	UINT64						*LBA
Output:
LBA : Returns Native MAX LBA address.
            EFI_STATUS  : EFI_SUCCESS/EFI_DEVICE_ERROR
Modified:
Notes:

Referrals:

Built on 10:11:49 09/03/12


HPADisabledLastLBA in the IdeHPA.c

Function : HPADisabledLastLBA

File: IdeHPA.c
Description:
Returns the valid last LBA # when HPA is disabled.
Input:
IN      IDE_HPA_INTERFACE			*This,
OUT	    UINT64						*LBA
Output:
EFI_STATUS  : EFI_SUCCESS
Modified:
Notes:
The LBA returned will be the maximum valid LBA number an OS can make use of.
Referrals:
Built on 10:11:49 09/03/12


InstallHPAInterface in the IdeHPA.c

Function : InstallHPAInterface

File: IdeHPA.c
Description:
Checks whether Host Protcted Area feature is supported or not.
        If Supported, installs HPAProtocol.
Input:
IDE_BUS_PROTOCOL			*IdeBusInterface,
Output:
EFI_STATUS  : EFI_UNSUPPORTED/EFI_SUCCESS/EFI_OUT_OF_RESOURCES
Modified:
Notes:

Referrals:

IdeBusStart

Built on 10:11:50 09/03/12


IssueSetMaxPasswordCmd in the IdeHPA.c

Function : IssueSetMaxPasswordCmd

File: IdeHPA.c
Description:
Sets the Password to Lock/Unlock use of SetMaxAddress command
Input:
IN      IDE_HPA_INTERFACE			*This,
IN	BOOLEAN						LockUnLock (TRUE : LOCK, FALSE :UNLOCK
Output:
EFI_STATUS  : EFI_UNSUPPORTED/EFI_SUCCESS/EFI_DEVICE_ERROR
Modified:
Notes:
READ NATIVE MAX ADDRESS should not have immediatley PRECEED this command.
    To take care of this situation, a Dummy Identify Device Command will be given before
    issuing a SET MAX LOCK/UNLOCK command
Referrals:
Built on 10:11:50 09/03/12


SetMaxAddress in the IdeHPA.c

Function : SetMaxAddress

File: IdeHPA.c
Description:
Set the Max LBA address
Input:
IN      IDE_HPA_INTERFACE			*This,
OUT     UINT64						LBA,
IN      BOOLEAN						Volatile
Output:
EFI_STATUS  :
Modified:
Notes:
if Volatile = TRUE, Values will not be preserved across resets.
Referrals:
Built on 10:11:50 09/03/12


SetMaxFreezeLock in the IdeHPA.c

Function : SetMaxFreezeLock

File: IdeHPA.c
Description:
Locks all SET MAX ADDRESS/PASSWORD/LOCK/UNLOCK command untill
        next power cycle. GetNativeMaxAddress is allowed.
Input:
IN      IDE_HPA_INTERFACE			*This,
Output:
EFI_STATUS  : EFI_UNSUPPORTED/EFI_SUCCESS/EFI_DEVICE_ERROR
Modified:
Notes:
READ NATIVE MAX ADDRESS should not have immediatley PRECEED this command.
    To take care of this situation, a Dummy Identify Device Command will be given before
    issuing a SET MAX FREEZELOCK command
Referrals:
Built on 10:11:50 09/03/12


SetMaxLock in the IdeHPA.c

Function : SetMaxLock

File: IdeHPA.c
Description:
Locks the device from accepting commands except UNLOCK and FREEZELOCK
Input:
IN      IDE_HPA_INTERFACE			*This,
Output:
EFI_STATUS  : EFI_UNSUPPORTED/EFI_SUCCESS/EFI_DEVICE_ERROR
Modified:
Notes:
READ NATIVE MAX ADDRESS should not have immediatley PRECEED this command.
    To take care of this situation, a Dummy Identify Device Command will be given before
    issuing a SET MAX LOCK/UNLOCK command
Referrals:
Built on 10:11:50 09/03/12


SetMaxPassword in the IdeHPA.c

Function : SetMaxPassword

File: IdeHPA.c
Description:
Sets the Password
Input:
IN      IDE_HPA_INTERFACE			*This,
IN	    UINT8						*PasswordBuffer, (32 Bytes of Password)
Output:
EFI_STATUS  : EFI_UNSUPPORTED/EFI_SUCCESS/EFI_DEVICE_ERROR
Modified:
Notes:
READ NATIVE MAX ADDRESS should not have immediatley PRECEEDED this command.
    To take care of this situation, a Dummy Identify Device Command will be given before
    issuing a SET MAX PASSWORD command
    Once the device is locked, it should be unlocked with the password before
    issuing any SetMaxAddress.
    After issuing this command device will be in UNLOCKED state.
Referrals:
Built on 10:11:50 09/03/12


SetMaxUnLock in the IdeHPA.c

Function : SetMaxUnLock

File: IdeHPA.c
Description:
Unlocks the device and allows it to accept all SET MAX commands
Input:
IN      IDE_HPA_INTERFACE			*This,
IN	    UINT8						*PasswordBuffer
Output:
EFI_STATUS  : EFI_UNSUPPORTED/EFI_SUCCESS/EFI_DEVICE_ERROR
Modified:
Notes:
READ NATIVE MAX ADDRESS should not have immediatley PRECEED this command.
    To take care of this situation, a Dummy Identify Device Command will be given before
    issuing a SET MAX LOCK/UNLOCK command
Referrals:
Built on 10:11:50 09/03/12


StopHPAInterface in the IdeHPA.c

Function : StopHPAInterface

File: IdeHPA.c
Description:
Uninstall HPA Protocol
Input:
IDE_BUS_PROTOCOL			*IdeBusInterface,
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

IdeBusStop

Built on 10:11:50 09/03/12


IdePowerManagement.c

Description:
IDE Power Management Support

The following functions are used in the file: IdePowerManagement.c.

Function | Description
AdvancePowerMgmtMode | Enables Adavance Power Management
CheckPowerMode | Returns the Current State of the device
ConvertStanbyTimeoutValue | Initializes IDE power Managment
IdleMode | Puts the device in Idle Mode
InitIDEPowerManagement | Initializes IDE power Management
InstallIDEPowerMgmtInterface | Install IDE power Management Interface
StandbyMode | Puts the device in StandbyMode
StopIDEPowerMgmtInterface | Uninstall IDE power Management Interface

Built on 10:11:50 09/03/12


AdvancePowerMgmtMode in the IdePowerManagement.c

Function : AdvancePowerMgmtMode

File: IdePowerManagement.c
Description:
Enables Adavance Power Management
Input:
AdvPowerMgmtLevel ( 0 : Disable, FEh : Max. Performance, 81h - FDh Intermediate performance without Standby
                        80h : Min. Power Consumption without Standby, 02h - 7Fh Intermediate Performance with Standby
                        01h : Min. Power Consumption with Standby)
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

Built on 10:11:49 09/03/12


CheckPowerMode in the IdePowerManagement.c

Function : CheckPowerMode

File: IdePowerManagement.c
Description:
Returns the Current State of the device
Input:

Output:

EFI_STATUS, Current state of the Device,

Modified:

Notes:

PowerMode : 00 Standby Mode, 80h : Idle Mode, FF : Active/Idle Mode

Referrals:

Built on 10:11:49 09/03/12


ConvertStanbyTimeoutValue in the IdePowerManagement.c

Function : ConvertStanbyTimeoutValue

File: IdePowerManagement.c
Description:
Initializes IDE power Managment
Input:
IN UINT8		StandbyTimeout (In Minutes)
Output:
UINT8		StandbyTimeout  (Converted Timeout period)
Modified:
Notes:

Referrals:

Built on 10:11:49 09/03/12


IdleMode in the IdePowerManagement.c

Function : IdleMode

File: IdePowerManagement.c
Description:
Puts the device in Idle Mode
Input:
StandbyTimeout : Value in Minutes. (0 : Disabled)
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

Built on 10:11:50 09/03/12


InitIDEPowerManagement in the IdePowerManagement.c

Function : InitIDEPowerManagement

File: IdePowerManagement.c
Description:
Initializes IDE power Management
Input:
IDE_BUS_PROTOCOL			*IdeBusInterface;
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

ConfigureIdeDevice

Built on 10:11:50 09/03/12


InstallIDEPowerMgmtInterface in the IdePowerManagement.c

Function : InstallIDEPowerMgmtInterface

File: IdePowerManagement.c
Description:
Install  IDE power Management Interface
Input:
IDE_BUS_PROTOCOL			*IdeBusInterface;
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

IdeBusStart

Built on 10:11:50 09/03/12


StandbyMode in the IdePowerManagement.c

Function : StandbyMode

File: IdePowerManagement.c
Description:
Puts the device in StandbyMode
Input:
StandbyTimeout : Value in Minutes. (0 : Disabled)
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

Built on 10:11:50 09/03/12


StopIDEPowerMgmtInterface in the IdePowerManagement.c

Function : StopIDEPowerMgmtInterface

File: IdePowerManagement.c
Description:
Uninstall  IDE power Management Interface
Input:
IDE_BUS_PROTOCOL			*IdeBusInterface;
Output:
EFI_STATUS
Modified:
Notes:

Referrals:

IdeBusStop

Built on 10:11:50 09/03/12


Functions in Alphabetical Order

In Alphabetical Order

The following topics provide a list in alphabetical order.
For a list by file name, see By File Name.

  • A
  • C
  • D
  • G
  • H
  • I
  • M
  • P
  • R
  • S
  • T
  • U
  • W
Built on 10:11:49 09/03/12


Functions in Alphabetical Order

A

Function | Description
AdvancePowerMgmtMode | Enables Adavance Power Management
AtaBlkFlush | Flush the cache
AtaBlkRead | Read from ATA device
AtaBlkWrite | Write to ATA device
AtaIdentifyCommand | Issues IDENTIFY DATA command (0xEC)
AtapiBlkFlush | Flush the cache
AtapiBlkRead | Read from the Atapi Device
AtapiBlkWrite | Write to the Atapi Device
AtapiIdentifyCommand | Issues IDENTIFY PACKET DATA command (0xA1)
AtapiInquiryData | Issues Atapi Inquiry Command and returns the DATA.
AtaPioDataIn | Issues command which require data to be read
AtaPioDataOut | Issues Read/Write Command and Read/Write the data from/to the ATA device with SubCommand Support.
AtapiReadWriteBusMaster | Read/Write data from/to the ATAPI device
AtapiReadWritePio | Read/Write data from/to the ATAPI device
AtapiReset | Issues ATAPI Reset command.
AtaReadWriteBusMaster | Issues Read/Write Command and Read/Write the data from/to the ATA device using BusMaster
AtaReadWritePio | Issues Read/Write Command and Read/Write the data from/to the ATA device
AtaReset | Reset ATA device

Built on 10:11:49 09/03/12


Functions in Alphabetical Order

C

Function | Description
Check48BitCommand | Checks if the command is for 48-bit LBA
CheckAhciMode | Checks If the controller is in AHCI MODE.
CheckCHKonEntry | Check for CHK bit. If set Issue ATAPI reset.
CheckDriveReady | Check if BSY is cleared and DRDY set
CheckHPControllerPresence | A quick check to see if ports are still decoded.
CheckPowerMode | Returns the Current State of the device
ConfigureIdeDevice | Issues SET FEATURE Command
ConfigureIdeDeviceAndController | PIO and DMA mode programming both on the Controller as well as on the Device is done
ControllerPresence | Detects the ATA/ATAPI Controller
ConvertStanbyTimeoutValue | Initializes IDE power Managment
CreateDescriptorTable | Creates a IDE BUS master Descriptor Table
CreateIdeDevicePath | Creates a IDE device devicepath and adds it to IdeBusInterface

Built on 10:11:49 09/03/12


Functions in Alphabetical Order

D

Function | Description
DetectAtapiMedia | Detects whether a Media is present in the ATAPI Removable device or not.
DetectIdeDevice | Detects the ATA/ATAPI device
DisableIdeInterrupt | Disabled Interrupt generation feature
DiskInfoIdentify | Return Identify Data
DiskInfoInquiry |
DiskInfoSenseData | Return InfoSenseData.
DiskInfoWhichIDE | Returns whether the device is PM/PS/SM/SS
DMACapable | Check if DMA is supported

Built on 10:11:49 09/03/12


Functions in Alphabetical Order

G

Function | Description
GeneralAtapiCommandAndData | Issues the ATAPI cammand and reads the data
GetEnumOddType | Get the Enum value for ODD type found on profile
GetIdentifyData | Gets Identify command data.
GetNativeMaxAddress | Returns the Native Max LBA address supported by the device
GetOddLoadingType | Find the ODD Loading Type information and return it
GetOddType | Find the ODD device Type and return it

Built on 10:11:49 09/03/12


Functions in Alphabetical Order

H

Function | Description
HandleATABMErrors | Check for any errors
HandleAtapiError | Handle Atapi error if any.
HPADisabledLastLBA | Returns the valid last LBA # when HPA is disabled.

Built on 10:11:49 09/03/12


Functions in Alphabetical Order

I

Function | Description
IdeBusEntryPoint | Installs gIdeBusDriverBinding protocol
IdeBusExitBootServices | Enables IDE controller interrupt on ExitBootServices
IdeBusStart | Installs IDE Block IO Protocol
IdeBusStop | Uninstall all devices installed in start procedure.
IdeBusSupported | Checks whether IDE_PROTOCOL_INTERFACE is installed on the controller. If 'yes', return SUCCESS else ERROR
IdeHPTimer | Checks for any HP IDE device
IdeNonDataCommand | Issues command where no data transfer takes place
IdeNonDataCommandExp | Issues command where no data transfer takes place
IdeReadByte | Reads 1 Byte of data from the IO port
IdeReadMultipleByte | Reads N Bytes of data from the IO port
IdeReadMultipleWord | Reads N Word of data from the IO port
IdeReadWord | Reads 1 Word of data from the IO port
IdeSetFeatureCommand | Issue a ATA Non-Data Command
IdeSoftReset | Issue a Soft Reset
IdeWriteByte | Writes 1 Byte of data to the IO port
IdeWriteDword | Writes 1 Dword of data to the IO port
IdeWriteMultipleByte | Writes N Bytes of data to the IO port
IdeWriteMultipleWord | Writes N Words of data to the IO port
IdeWriteWord | Writes 1 word of data to the IO port
IdleMode | Puts the device in Idle Mode
InitAcousticSupport | Initializes Acoustic Management Support functionality
InitBusMasterRegisters | Initialize Bus Master registers
InitIdeBlockIO | Initializes IDE Block IO interface
InitIdeDiskInfo | Initializes IDE DiskInfo Interface
InitIDEPowerManagement | Initializes IDE power Management
InitMiscConfig | Initialize misc IDE configurations.
InstallBusInitProtocol | Installs BUS Init Protocol on the IDE controller Handle
InstallHPAInterface | Checks whether Host Protcted Area feature is supported or not. If Supported, installs HPAProtocol.
InstallIDEPowerMgmtInterface | Install IDE power Management Interface
IssueAtapiPacketCommand | Issues ATAPI Packet command and send the packet.
IssueAtapiReset | Issues ATAPI Reset command
IssueAtaReadWriteCommand | Issues ATA Read/Write Command
IssueFreezeLockCommand | Issue the Freeze lock command.
IssueSetMaxPasswordCmd | Sets the Password to Lock/Unlock use of SetMaxAddress command

Built on 10:11:49 09/03/12


Functions in Alphabetical Order

M

Function | Description
MaskandSaveInterrupt | Mask IDE interrupt

Built on 10:11:49 09/03/12


Functions in Alphabetical Order

P

Function | Description
PrintIdeDeviceInfo | Prints Debug Level 3 Trace Messages

Built on 10:11:49 09/03/12


Functions in Alphabetical Order

R

Function | Description
ReadAtapiData | Read data from the data port based on Byte count value
RestoreInterrupt | Restore the Interrupt mask
ReturnMSBset | Returns the MOST significant Bit set.

Built on 10:11:49 09/03/12


Functions in Alphabetical Order

S

Function | Description
SetMaxAddress | Set the Max LBA address
SetMaxFreezeLock | Locks all SET MAX ADDRESS/PASSWORD/LOCK/UNLOCK command untill next power cycle. GetNativeMaxAddress is allowed.
SetMaxLock | Locks the device from accepting commands except UNLOCK and FREEZELOCK
SetMaxPassword | Sets the Password
SetMaxUnLock | Unlocks the device and allows it to accept all SET MAX commands
StandbyMode | Puts the device in StandbyMode
StartStopBusMastering | Start/Stop Bus mAstering
StopHPAInterface | Uninstall HPA Protocol
StopIDEPowerMgmtInterface | Uninstall IDE power Management Interface

Built on 10:11:49 09/03/12


Functions in Alphabetical Order

T

Function | Description
TestUnitReady | Issues Start/Stop unit Command

Built on 10:11:49 09/03/12


Functions in Alphabetical Order

U

Function | Description
UpdateBaseAddress | Updates Command and Control reg address.

Built on 10:11:49 09/03/12


Functions in Alphabetical Order

W

Function | Description
WaitforBitClear | Waits for the given bit to be clear
WaitforBitClearWithoutTimeout | Waits for the given bit to be clear
WaitforBitSet | Checks for a particular Bit to be set for a given amount of time
WaitForCmdCompletion | Waits for BSY bit to get clear
WaitForCmdCompletionWithTimeOutValue | Waits for BSY bit to get clear
WaitforDMAtoCompletion | Start/Stop Bus mAstering
WriteAtapiData | Write data to the data port based on Byte count value

Built on 10:11:49 09/03/12


General Information

Built on 10:11:50 09/03/12