1d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten/** @file 2d8387fa4af2abae05dc6ec502b27adea455cdaaajljustenPrivate include file for IsaFloppyPei PEIM. 3d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 4d8387fa4af2abae05dc6ec502b27adea455cdaaajljustenCopyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> 5d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 6d8387fa4af2abae05dc6ec502b27adea455cdaaajljustenThis program and the accompanying materials 7d8387fa4af2abae05dc6ec502b27adea455cdaaajljustenare licensed and made available under the terms and conditions 8d8387fa4af2abae05dc6ec502b27adea455cdaaajljustenof the BSD License which accompanies this distribution. The 9d8387fa4af2abae05dc6ec502b27adea455cdaaajljustenfull text of the license may be found at 10d8387fa4af2abae05dc6ec502b27adea455cdaaajljustenhttp://opensource.org/licenses/bsd-license.php 11d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 12d8387fa4af2abae05dc6ec502b27adea455cdaaajljustenTHE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 13d8387fa4af2abae05dc6ec502b27adea455cdaaajljustenWITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 15d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten**/ 16d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 17d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#ifndef _RECOVERY_FLOPPY_H_ 18d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define _RECOVERY_FLOPPY_H_ 19d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 20d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#include <Ppi/BlockIo.h> 21d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 22d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#include <Library/DebugLib.h> 23d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#include <Library/PeimEntryPoint.h> 24d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#include <Library/PeiServicesLib.h> 25d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#include <Library/BaseMemoryLib.h> 26d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#include <Library/ReportStatusCodeLib.h> 27d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#include <Library/TimerLib.h> 28d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#include <Library/IoLib.h> 29d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#include <Library/MemoryAllocationLib.h> 30d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#include <Library/PcdLib.h> 31d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 32d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#include "Fdc.h" 33d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 34d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 35d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten// 36d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten// Some PC AT Compatible Device definitions 37d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten// 38d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten// 39d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten// 8237 DMA registers 40d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten// 41d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_BASE_CA_CH0 0x00 42d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_BASE_CA_CH1 0x02 43d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_BASE_CA_CH2 0x04 44d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_BASE_CA_CH3 0xd6 45d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_BASE_CA_CH5 0xc4 46d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_BASE_CA_CH6 0xc8 47d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_BASE_CA_CH7 0xcc 48d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 49d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_BASE_CC_CH0 0x01 50d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_BASE_CC_CH1 0x03 51d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_BASE_CC_CH2 0x05 52d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_BASE_CC_CH3 0xd7 53d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_BASE_CC_CH5 0xc6 54d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_BASE_CC_CH6 0xca 55d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_BASE_CC_CH7 0xce 56d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 57d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_MEM_LP_CH0 0x87 58d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_MEM_LP_CH1 0x83 59d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_MEM_LP_CH2 0x81 60d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_MEM_LP_CH3 0x82 61d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_MEM_LP_CH5 0x8B 62d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_MEM_LP_CH6 0x89 63d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_MEM_LP_CH7 0x8A 64d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 65d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 66d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_COMMAND_CH0_3 0x08 67d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_COMMAND_CH4_7 0xd0 68d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define B_8237_DMA_COMMAND_GAP 0x10 69d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define B_8237_DMA_COMMAND_CGE 0x04 70d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 71d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 72d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_STA_CH0_3 0x09 73d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_STA_CH4_7 0xd2 74d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 75d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_WRSMSK_CH0_3 0x0a 76d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_WRSMSK_CH4_7 0xd4 77d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define B_8237_DMA_WRSMSK_CMS 0x04 78d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 79d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 80d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_CHMODE_CH0_3 0x0b 81d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_CHMODE_CH4_7 0xd6 82d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define V_8237_DMA_CHMODE_DEMAND 0x00 83d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define V_8237_DMA_CHMODE_SINGLE 0x40 84d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define V_8237_DMA_CHMODE_CASCADE 0xc0 85d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define B_8237_DMA_CHMODE_DECREMENT 0x20 86d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define B_8237_DMA_CHMODE_INCREMENT 0x00 87d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define B_8237_DMA_CHMODE_AE 0x10 88d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define V_8237_DMA_CHMODE_VERIFY 0 89d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define V_8237_DMA_CHMODE_IO2MEM 0x04 90d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define V_8237_DMA_CHMODE_MEM2IO 0x08 91d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 92d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_CBPR_CH0_3 0x0c 93d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_CBPR_CH4_7 0xd8 94d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 95d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_MCR_CH0_3 0x0d 96d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_MCR_CH4_7 0xda 97d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 98d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_CLMSK_CH0_3 0x0e 99d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_CLMSK_CH4_7 0xdc 100d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 101d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_WRMSK_CH0_3 0x0f 102d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define R_8237_DMA_WRMSK_CH4_7 0xde 103d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 104d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten/// 105d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten/// ISA memory range 106d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten/// 107d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define ISA_MAX_MEMORY_ADDRESS 0x1000000 108d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 109d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten// 110d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten// Macro for time delay & interval 111d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten// 112d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define STALL_1_SECOND 1000000 113d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define STALL_1_MSECOND 1000 114d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define FDC_CHECK_INTERVAL 50 115d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 116d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define FDC_SHORT_DELAY 50 117d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define FDC_MEDIUM_DELAY 100 118d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define FDC_LONG_DELAY 4000 119d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define FDC_RESET_DELAY 2000 120d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define FDC_RECALIBRATE_DELAY 250000 121d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 122d8387fa4af2abae05dc6ec502b27adea455cdaaajljustentypedef enum { 123d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten FdcType360K360K = 0, 124d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten FdcType360K1200K, 125d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten FdcType1200K1200K, 126d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten FdcType720K720K, 127d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten FdcType720K1440K, 128d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten FdcType1440K1440K, 129d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten FdcType720K2880K, 130d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten FdcType1440K2880K, 131d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten FdcType2880K2880K 132d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten} FDC_DISKET_TYPE; 133d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 134d8387fa4af2abae05dc6ec502b27adea455cdaaajljustentypedef struct { 135d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten UINT8 Register; 136d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten UINT8 Value; 137d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten} PEI_DMA_TABLE; 138d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 139d8387fa4af2abae05dc6ec502b27adea455cdaaajljustentypedef struct { 140d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten UINT8 DevPos; 141d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten UINT8 Pcn; 142d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten BOOLEAN MotorOn; 143d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten BOOLEAN NeedRecalibrate; 144d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten FDC_DISKET_TYPE Type; 145d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten EFI_PEI_BLOCK_IO_MEDIA MediaInfo; 146d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten} PEI_FLOPPY_DEVICE_INFO; 147d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 148d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define FDC_BLK_IO_DEV_SIGNATURE SIGNATURE_32 ('F', 'b', 'i', 'o') 149d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 150d8387fa4af2abae05dc6ec502b27adea455cdaaajljustentypedef struct { 151d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten UINTN Signature; 152d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten EFI_PEI_RECOVERY_BLOCK_IO_PPI FdcBlkIo; 153d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten EFI_PEI_PPI_DESCRIPTOR PpiDescriptor; 154d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten UINTN DeviceCount; 155d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten PEI_FLOPPY_DEVICE_INFO DeviceInfo[2]; 156d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten} FDC_BLK_IO_DEV; 157d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 158d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#define PEI_RECOVERY_FDC_FROM_BLKIO_THIS(a) CR (a, FDC_BLK_IO_DEV, FdcBlkIo, FDC_BLK_IO_DEV_SIGNATURE) 159d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 160d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten// 161d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten// PEI Recovery Block I/O PPI 162d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten// 163d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 164d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten/** 165d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten Get the number of FDC devices. 166d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 167d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten This function implements EFI_PEI_RECOVERY_BLOCK_IO_PPI.GetNumberOfBlockDevices. 168d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten It get the number of FDC devices in the system. 169d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 170d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. 171d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @param This Pointer to this PPI instance. 172d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @param NumberBlockDevices Pointer to the the number of FDC devices for output. 173d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 174d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @retval EFI_SUCCESS Number of FDC devices is retrieved successfully. 175d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @retval EFI_INVALID_PARAMETER Parameter This is NULL. 176d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 177d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten**/ 178d8387fa4af2abae05dc6ec502b27adea455cdaaajljustenEFI_STATUS 179d8387fa4af2abae05dc6ec502b27adea455cdaaajljustenEFIAPI 180d8387fa4af2abae05dc6ec502b27adea455cdaaajljustenFdcGetNumberOfBlockDevices ( 181d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten IN EFI_PEI_SERVICES **PeiServices, 182d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten IN EFI_PEI_RECOVERY_BLOCK_IO_PPI *This, 183d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten OUT UINTN *NumberBlockDevices 184d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten ); 185d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 186d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten/** 187d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten Get the specified media information. 188d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 189d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten This function implements EFI_PEI_RECOVERY_BLOCK_IO_PPI.GetBlockDeviceMediaInfo. 190d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten It gets the specified media information. 191d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 192d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. 193d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @param This Pointer to this PPI instance. 194d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @param DeviceIndex Index of FDC device to get information. 195d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @param MediaInfo Pointer to the media info buffer for output. 196d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 197d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @retval EFI_SUCCESS Number of FDC devices is retrieved successfully. 198d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @retval EFI_INVALID_PARAMETER Parameter This is NULL. 199d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @retval EFI_INVALID_PARAMETER Parameter MediaInfo is NULL. 200d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @retval EFI_INVALID_PARAMETER DeviceIndex is not valid. 201d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @retval EFI_DEVICE_ERROR FDC device does not exist or has errors. 202d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 203d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten**/ 204d8387fa4af2abae05dc6ec502b27adea455cdaaajljustenEFI_STATUS 205d8387fa4af2abae05dc6ec502b27adea455cdaaajljustenEFIAPI 206d8387fa4af2abae05dc6ec502b27adea455cdaaajljustenFdcGetBlockDeviceMediaInfo ( 207d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten IN EFI_PEI_SERVICES **PeiServices, 208d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten IN EFI_PEI_RECOVERY_BLOCK_IO_PPI *This, 209d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten IN UINTN DeviceIndex, 210d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten OUT EFI_PEI_BLOCK_IO_MEDIA *MediaInfo 211d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten ); 212d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 213d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten/** 214d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten Get the requested number of blocks from the specified FDC device. 215d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 216d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten This function implements EFI_PEI_RECOVERY_BLOCK_IO_PPI.ReadBlocks. 217d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten It reads the requested number of blocks from the specified FDC device. 218d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 219d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. 220d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @param This Pointer to this PPI instance. 221d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @param DeviceIndex Index of FDC device to get information. 222d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @param StartLba The start LBA to read from. 223d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @param BufferSize The size of range to read. 224d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @param Buffer Buffer to hold the data read from FDC. 225d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 226d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @retval EFI_SUCCESS Number of FDC devices is retrieved successfully. 227d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @retval EFI_INVALID_PARAMETER Parameter This is NULL. 228d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @retval EFI_INVALID_PARAMETER Parameter Buffer is NULL. 229d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @retval EFI_INVALID_PARAMETER Parameter BufferSize cannot be divided by block size of FDC device. 230d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @retval EFI_NO_MEDIA No media present. 231d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @retval EFI_DEVICE_ERROR FDC device has error. 232d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten @retval Others Fail to read blocks. 233d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 234d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten**/ 235d8387fa4af2abae05dc6ec502b27adea455cdaaajljustenEFI_STATUS 236d8387fa4af2abae05dc6ec502b27adea455cdaaajljustenEFIAPI 237d8387fa4af2abae05dc6ec502b27adea455cdaaajljustenFdcReadBlocks ( 238d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten IN EFI_PEI_SERVICES **PeiServices, 239d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten IN EFI_PEI_RECOVERY_BLOCK_IO_PPI *This, 240d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten IN UINTN DeviceIndex, 241d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten IN EFI_PEI_LBA StartLba, 242d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten IN UINTN BufferSize, 243d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten OUT VOID *Buffer 244d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten ); 245d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten 246d8387fa4af2abae05dc6ec502b27adea455cdaaajljusten#endif 247