American Megatrends, Inc.

FileSystem

Copyright

Release Notes

© American Megatrends, Inc.


Release Notes - NDA Required

Component Information:
Component Title: FileSystem
Component Reference Name: FileSystem
Component Type: ModulePart
Release Date: 2012-05-21
Source Control Label: 4.6.5.4
Source Control Location: SS: Alaska;$/Alaska/Source/Core/Modules/FileSystem;

Dependencies
N0NE
Non-Compiled BIN and LIB File(s) within this Component:
N0NE
Component Description:
This component supports reading and writing of storage media formatted with the FAT file system.
The FileSystem module contains the following files:

Filename | Description
Main Component | Root\Core\em\FileSystem
FileSystem.cif | Component information file for the ModulePart
FileSystem.mak | Make file becomes part of the BIOS build process
FileSystem.sdl | Contains BIOS build parameters of FileSystem driver.
FileSystem.h
 Headers, Definitions, Macros and Function Prototypes are defined in this File.
FileSystem.c | Installs the FileSystem driver protocol.
Open.c Handles the opening of volumes, the root directories of volumes, and individual files.
FileFatHandler.c | Handles file reading and writing.
Info.c | Handles translation of data between FAT standards and EFI_FILE_INFO.
DirectoryHandler.c
 Handles FAT directory structures.
VolFatHandler.c | Handles file allocation for open volumes.
MediaAccess.c | Handles media access via the Disk IO Protocol, and handles data caching.
FileSystemComponentName.c | File contains functions related to Component name producer of the FileSystem driver.

BIOS Parameters:
Parameter Name | Type | Description
FILESYSTEM_SUPPORT | Boolean | Switch to Enable/Disable FileSystem support.
DIRECTORTY_ENTRIES_CACHED | Integer | Indicate the number of Directory entries \that can be cached.
FAT_CACHE_SIZE | Integer | Specifiy the File Allocation Table cache size for each volume.
DIR_CACHE_SIZE | Integer | Specify the Directory Cache size for each volume.
AMI Build Tools:
Tools Label: 4.5.5_Tools_34, 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:
None
EIP addressed in this label:
  • Bug Fix: EIP 87352
    Symtoms: FAT Direcotry Opean/Creation Issue.
    Details: If a directory open was attempted with EFI_FILE_MODE_CREATE set, check for existing directory was not done.
    FilesModified: Open.c.
Files changed for EIP fixes:
  • Core/EM/FileSystem/Open.c (EIP 58999)

Known issues and limitations in this label:
None
Remaining Issues:
None
Unit Testing:

Execute this SCT 2.3 test: Bootable Image Support Test \ Simple File System Protocol Test.
Perform reads and writes on several different FAT formatted media.
Release History:
4.6.5.4

  • Bug Fix: EIP 87352
    Symtoms: FAT Direcotry Opean/Creation Issue.
    Details: If a directory open was attempted with EFI_FILE_MODE_CREATE set, check for existing directory was not done.
    FilesModified: Open.c.
4.6.5.3

  • No change

4.6.5.2

  • Bug Fix: EIP 75631
    Symtoms: If an application name includes a path, it won't run.
    Details: In the function ProcessOpenFileHandle(), the driver attempts to replace "\" in the path with a zero, but the code was one off, and the character past the "\" was being replaced.
    FilesModified: Open.c.
4.6.5.1

  • Bug Fix: EIP 58999
    Symtoms: Could not launch Shell from USB Filesystem device in Debug mode with latest Filesystem driver. An exception was generated.
    Details: The fix for EIP 28607 was using a fixed TPL value. The affected functions were modified to check for the higher of the fixed value and the current high level and use that.
    FilesModified: Info.c, MediaAccess.c, Open.c, FileSystem.h.
4.6.5.0

  • Improvement: EIP 28607
    Details : System was hanging for some time if Floppy Media removed while writing in meda in progress. EFI_TPL_CALLBACK priority level raised during media related calls.
    FilesModified: DiskIo.c, Info.c, MediaAccess.c, Open.c.
  • Bug Fix: EIP 38291
    Symptoms: USB key is not returning file list as expected.
    Details:ReadFIleHandle was not resetting pointers when a directory read returned an error.
    Files Modified: Open.c
  • Bug Fix: EIP 49934
    Symptoms: The new EDKII shell was not displaying filesystem devices properly.
    Details: Root directory file name was "\", with a size of one. Shell expected a null name for the root directory.
    Files Modified: Open.c
  • Bug Fix: EIP 51705
    Symptoms: If the volume label is the same name as a directory or file, the directory or file cannot be accessed. Also, a new directory cannot be created with the same name as the volume.
    Details: The functions FindMatchingFH() and FindMatchingDirEntry() did not check for ATTR_VOLUME_ID.
    Files Modified: Open.c
  • Bug Fix: EIP 51754
    Symptoms: The shell "mv" command makes directories disappear.
    Details: Directories were not removed from cache when deleted.
    Files Modified: Info.c
  • Bug Fix: EIP 52430
    Symptoms: When a directory is moved, the long name of the old directory is not deleted.
    Details: Only the short name component was being deleted in SetFileInfo().
    Files Modified: Info.c
  • Bug Fix: EIP 54399
    Symptoms: SCT 2.3 fails Bootable Image Support Test\Simple File System Protocol.
    Details: Did not check for matching name when attempting to change file name.
    Files Modified: Info.c
4.6.4.1

  • Initial release with CHM added.

© American Megatrends Inc.


FileSystem Test Report

The FileSystem module part has been validated under following test cases and conditions for Core Label 4.6.5.0

Platforms Tested:

Piketon - Project Label (INT)4.6.5_DH55HC_13

Test Case:

· UEFI Self Certification Test (SCT) Bootable Image Support Test \ Simple File System Protocol Test – PASS.

· Read and Write different FAT media - PASS.


Copyright

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

Copyright (c) 1999-2011 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.


Function by File Name

AMIBIOS Function Reference

By File Name

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

  • DirectoryHandler.c
  • FileFatHandler.c
  • FileSystem.c
  • FileSystem.h
  • FileSYstem.mak
  • FileSystemComponentName.c
  • Info.c
  • MediaAccess.c
  • Open.c
  • VolFatHandler.c
Built on 16:58:29 03/28/11


DirectoryHandler.c

Description:
Fat File System driver -- Directory Functions

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

Function | Description
CopyCharsToLfnSlot | Copies a character to the appropriate slot of a long name directory structure Parameters: DIR_ENTRY_LFN *Slot - Pointer to long name directory structure UINT32 *SlotPos - Pointer to slot position to fill UINT16 Ch - The character to be placed in the slot Return value: None
GenShortFilename | Generates a DOS 8.3 name component from a path Parameters: VOLUME_INFO *Vol - Pointer to volume information structure CHAR16 *InPath - Pointer to input path CHAR8 *ShortName - Pointer to generated DOS 8.3 name Return value: EFI_STATUS - Status of operation (EFI_SUCCESS)
GenUniqueShortFname | Generates a unique DOS 8.3 name from a possible long name Parameters: FILE_HANDLE *fh - Pointer to the file handle structure CHAR16 *LongName - Pointer to the possible long name CHAR8 *ShortName - Pointer to generated DOS 8.3 name BOOLEAN *LfnNeeded - Indicates a long name entry is needed for this input name Return value: EFI_STATUS - EFI_SUCCESS - Unique name generated EFI_ACCESS_DENIED - this name already exists on the volume
GetNameComponent | Gets the name component from a path Parameters: CHAR16 *Path - Pointer to input path CHAR16 *Name - Pointer to output name Return value: CHAR16 * path truncated to name
SplitLFN | Splits a long file name into long name directory enties. Parameters: CHAR16 *LongName - Pointer to a long file name DIR_ENTRY_32 *ShortEntry - Pointer to the corresponding short directory entry DIR_ENTRY_LFN *Slot - The structure of the long directory entries to be filled Return value: EFI_STATUS - Status of the operation (EFI_SUCCESS)

Built on 16:58:28 03/28/11


CopyCharsToLfnSlot in the DirectoryHandler.c

Function : CopyCharsToLfnSlot

File: DirectoryHandler.c
Description:
Copies a character to the appropriate slot of a long name
   directory structure

Parameters:      DIR_ENTRY_LFN *Slot - Pointer to long name directory
                         structure
   UINT32 *SlotPos - Pointer to slot position to fill
   UINT16 Ch - The character to be placed in the slot

Return value:    None
Modified:
None

Referral(s):     None

NOTE(S):
Built on 16:58:27 03/28/11


GenShortFilename in the DirectoryHandler.c

Function : GenShortFilename

File: DirectoryHandler.c
Description:
Generates a DOS 8.3 name component from a path

Parameters:      VOLUME_INFO *Vol - Pointer to volume information structure
   CHAR16 *InPath - Pointer to input path
   CHAR8 *ShortName - Pointer to generated DOS 8.3 name

Return value:    EFI_STATUS - Status of operation (EFI_SUCCESS)
Modified:
None

Referral(s):     None

NOTE(S):


GenUniqueShortFname in the DirectoryHandler.c

Function : GenUniqueShortFname

File: DirectoryHandler.c
Description:
Generates a unique DOS 8.3 name from a possible long name

Parameters:      FILE_HANDLE *fh - Pointer to the file handle structure
   CHAR16 *LongName - Pointer to the possible long name
   CHAR8 *ShortName - Pointer to generated DOS 8.3 name
   BOOLEAN *LfnNeeded - Indicates a long name entry is
                        needed for this input name

Return value:    EFI_STATUS - EFI_SUCCESS - Unique name generated
                EFI_ACCESS_DENIED - this name already exists
                on the volume
Modified:
None

Referral(s):     None

NOTE(S):


GetNameComponent in the DirectoryHandler.c

Function : GetNameComponent

File: DirectoryHandler.c
Description:
Gets the name component from a path

Parameters:      CHAR16 *Path - Pointer to input path
   CHAR16 *Name - Pointer to output name

Return value:    CHAR16 * path truncated to name
Modified:
None

Referral(s):     None

NOTE(S):


SplitLFN in the DirectoryHandler.c

Function : SplitLFN

File: DirectoryHandler.c
Description:
Splits a long file name into long name directory enties.

Parameters:      CHAR16 *LongName - Pointer to a long file name
   DIR_ENTRY_32 *ShortEntry - Pointer to the corresponding
                              short directory entry
   DIR_ENTRY_LFN *Slot - The structure of the long directory
                         entries to be filled

Return value:    EFI_STATUS - Status of the operation (EFI_SUCCESS)
Modified:
None

Referral(s):     None

NOTE(S):


FileFatHandler.c

Description:
Fat File System driver -- File Level Fat Handler

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

Function | Description
CheckFileWrite | Checks if file can be written to Parameters: FILE_HANDLE_INSTANCE *fhi - File Handle instance BOOLEAN IgnoreOpenMode - If true, ignore mode file was open with Return Value: EFI_STATUS
CheckforValidDirSpace | Cluster and Offset should point after the last valid directory entry. Parameters: IN VOLUME_INFO *Vi - Volume info structure IN BOOLEAN ROOTDIR - true if root directory IN UINT32 Cluster - Starting cluster IN UINT32 Offset - Offset in cluster IN UINT32 FreeBytesRequired IN UINT32 *FreeDirCluster IN UINT32 *FreeDirClusterOffset Return Value: EFI_STATUS
ExtendFile | Extends a file on the disk (it is written to) Parameters: IN FILE_HANDLE_INSTANCE *fhi - File handle instance IN UINT32 Length - Length to extend Return value: EFI_STATUS
GetSpaceforDirEntry | Enlarges directory to make space for a new entry Parameters: FILE_HANDLE *fh - Handle of file requireing entry UINT32 FreeBytesRequired - No. of bytes required for the new entry UINT32 *FreeDirCluster - Returned Cluster of free entry UINT32 *FreeDirClusterOffset - Offset of free entry BOOLEAN *LastDirEntry - True if new entry is the last one in the directory Return Value: EFI_STATUS - Status of the operation
LocateFreeDirEntry | Locates a free entry in a directory Parameters: FILE_HANDLE *fh - Handle of file requireing entry UINT32 FreeBytesRequired - No. of bytes required for the new entry UINT32 *FreeDirCluster - Returned Cluster of free entry UINT32 *FreeDirClusterOffset - Offset of free entry Returned value: EFI_STATUS - Status of the operation
ReadFromFile | Reads a specified number of bytes from a file into a specified buffer, beginning at a specified position in the file. Updates Size to number of bytes read. Updates Position to position after data read. Parameters: IN FILE_HANDLE_INSTANCE *File - File handle instance IN OUT VOID *Buffer - Buffer to read into IN OUT UINT32 *Size - Size to read (updated with size read) IN REGIONS DataRegion - Region of disk (dir, fat, normal) Return Value: EFI_STATUS
ReadWriteExistingBlock | Reads or writes an existing file. If writing, writes only an existing block, with no new allocation. Parameters: IN FILE_HANDLE_INSTANCE *File - File handle instance IN OUT VOID *Buffer - Output biffer IN OUT UINT32 *Size - Size written or read IN REGIONS DataRegion - Region of disk used (dir, fat, normal) IN ACCESS_METHOD Method - Method (read or write) Return Value: EFI_STATUS
WriteToFile | Writes a specified number of bytes to a file from a specified buffer, beginning at a specified position in the file. Updates Size to number of bytes written. Updates Position to position after data written. Parameters: IN FILE_HANDLE_INSTANCE *File - File handle instance IN OUT VOID *Buffer - Buffer to write from IN OUT UINT32 *Size - Size to write (updated with written) IN REGIONS DataRegion - Data region (dir, fat, normal) Return Value: EFI_STATUS
ZeroOutdisk | Zeros out directory region of disk Parameters: IN VOLUME_INFO *Vi - Volume info structure IN UINT32 Cluster - Cluster in directory region to zero IN UINT32 ClusterOffset - Offset in cluster IN UINT32 Size - Size to zero Return value: EFI_STATUS


CheckFileWrite in the FileFatHandler.c

Function : CheckFileWrite

File: FileFatHandler.c
Description:
Checks if file can be written to

Parameters:
FILE_HANDLE_INSTANCE *fhi - File Handle instance
BOOLEAN              IgnoreOpenMode - If true, ignore mode file was
                          open with

Return Value:
EFI_STATUS
Modified:
Notes:
Referrals:
Built on 16:58:27 03/28/11


CheckforValidDirSpace in the FileFatHandler.c

Function : CheckforValidDirSpace

File: FileFatHandler.c
Description:
Cluster and Offset should point after the last valid directory entry.

Parameters:
IN VOLUME_INFO *Vi - Volume info structure
IN BOOLEAN     ROOTDIR - true if root directory
IN UINT32      Cluster - Starting cluster
IN UINT32      Offset - Offset in cluster
IN UINT32      FreeBytesRequired
IN UINT32      *FreeDirCluster
IN UINT32      *FreeDirClusterOffset

Return Value: EFI_STATUS
Modified:
Notes:
No Directory Entry Will be created which crosses CLUSTER BOUNDRY
Referrals:
Built on 16:58:27 03/28/11


ExtendFile in the FileFatHandler.c

Function : ExtendFile

File: FileFatHandler.c
Description:
Extends a file on the disk (it is written to)

Parameters:
IN FILE_HANDLE_INSTANCE *fhi - File handle instance
IN UINT32               Length - Length to extend

Return value:
EFI_STATUS
Modified:
Notes:
Referrals:


GetSpaceforDirEntry in the FileFatHandler.c

Function : GetSpaceforDirEntry

File: FileFatHandler.c
Description:
Enlarges directory to make space for a new entry

Parameters:      FILE_HANDLE *fh - Handle of file requireing entry
   UINT32 FreeBytesRequired - No. of bytes required for
                              the new entry
   UINT32 *FreeDirCluster - Returned Cluster of free entry
   UINT32 *FreeDirClusterOffset - Offset of free entry
   BOOLEAN *LastDirEntry - True if new entry is the last one
                           in the directory

Return Value:    EFI_STATUS - Status of the operation
Modified:
Referrals:

NOTE(S):


LocateFreeDirEntry in the FileFatHandler.c

Function : LocateFreeDirEntry

File: FileFatHandler.c
Description:
Locates a free entry in a directory

Parameters:      FILE_HANDLE *fh - Handle of file requireing entry
   UINT32 FreeBytesRequired - No. of bytes required for
                              the new entry
   UINT32 *FreeDirCluster - Returned Cluster of free entry
   UINT32 *FreeDirClusterOffset - Offset of free entry

Returned value:  EFI_STATUS - Status of the operation
Modified:
None

Referral(s):     None

NOTE(S):


ReadFromFile in the FileFatHandler.c

Function : ReadFromFile

File: FileFatHandler.c
Description:
Reads a specified number of bytes from a file into a
specified buffer, beginning at a specified position
in the file. Updates Size to number of bytes read.
Updates Position to position after data read.

Parameters:
IN FILE_HANDLE_INSTANCE *File - File handle instance
IN OUT VOID             *Buffer - Buffer to read into
IN OUT UINT32           *Size - Size to read (updated with size read)
IN REGIONS              DataRegion - Region of disk (dir, fat, normal)

Return Value:
EFI_STATUS
Modified:
Notes:
Referrals:


ReadWriteExistingBlock in the FileFatHandler.c

Function : ReadWriteExistingBlock

File: FileFatHandler.c
Description:
Reads or writes an existing file. If writing, writes
only an existing block, with no new allocation.

Parameters:
IN FILE_HANDLE_INSTANCE *File - File handle instance
IN OUT VOID             *Buffer - Output biffer
IN OUT UINT32           *Size - Size written or read
IN REGIONS              DataRegion - Region of disk used (dir, fat, normal)
IN ACCESS_METHOD        Method - Method (read or write)

Return Value:
EFI_STATUS
Modified:
Notes:
Referrals:


WriteToFile in the FileFatHandler.c

Function : WriteToFile

File: FileFatHandler.c
Description:
Writes a specified number of bytes to a file from a
specified buffer, beginning at a specified position
in the file. Updates Size to number of bytes written.
Updates Position to position after data written.

Parameters:
IN FILE_HANDLE_INSTANCE *File - File handle instance
IN OUT VOID             *Buffer - Buffer to write from
IN OUT UINT32           *Size - Size to write (updated with written)
IN REGIONS              DataRegion - Data region (dir, fat, normal)

Return Value:
EFI_STATUS
Modified:
Notes:
Referrals:


ZeroOutdisk in the FileFatHandler.c

Function : ZeroOutdisk

File: FileFatHandler.c
Description:
Zeros out directory region of disk

Parameters:
IN VOLUME_INFO *Vi - Volume info structure
IN UINT32      Cluster - Cluster in directory region to zero
IN UINT32      ClusterOffset - Offset in cluster
IN UINT32      Size - Size to zero

Return value: EFI_STATUS
Modified:
Notes:
Referrals:


FileSystem.c

Description:
Installs Simple File System Protocol

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

Function | Description
DetectInstallVolume | Detects whether a valid volume is present or not Parameters: EFI_DISK_IO_PROTOCOL *DiskIo - Pointer to disk IO structure Parameters: EFI_BLOCK_IO_PROTOCOL *DiskIo - Pointer to boock IO structure Return value: EFI_STATUS - Status of the operation
DetectVolume | Detects the presence of a valid FAT volume Parameters: VOLUME_INFO *vi - Pointer to the volume info structure BOOLEAN StatusCheck - Only reads MBR if true Return value: EFI_STATUS - Status of the operation
FileSystemInitUnicodeCollation | Find the language Interface Parameters: EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this instance of driver binding protocol UINT8 *LandCode - Pointer to the language code EFI_UNICODE_COLLATION_PROTOCOL *gFileSystemUnicodeCollationInterface - Pointer to pointer to unicode collation interfact structure Return value: EFI_STATUS - Status of the operation
SimpleFileSystemEntryPoint | Installs gSimpleFileSystemDriverBinding protocol Parameters: EFI_HANDLE ImageHandle - Image handle for this driver image EFI_SYSTEM_TABLE *SystemTable - pointer to the EFI system table Return value: EFI_STATUS - Status of the operation
SimpleFileSystemStart | Installs Simple File Ssystem Protocol Parameters: EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this instance of driver binding protocol EFI_HANDLE Controller - Handle for this controller EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath Return value: EFI_STATUS - Status of the operation
SimpleFileSystemStop | Uninstall Simple File system Protocol Parameters: EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this instance of driver binding protocol EFI_HANDLE Controller - Handle for this controller EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath Return value: EFI_STATUS - Status of the operation
SimpleFileSystemSupported | Checks whether Simple File System Protocol can be installed on the controller or not. Parameters: EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this instance of driver binding protocol EFI_HANDLE Controller - Handle for this controller EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath Return value: EFI_STATUS - Status of the operation
UnloadSimpleFileSystemDriver | Unloads this driver Parameters: EFI_HANDLE ImageHandle - Image handle for this driver image Return value: EFI_STATUS - Status of the operation
Zeromemory | Zeros the contents of a specified memory location Parameters: VOID *Buffer - location of memory to zero UINT32 Size - Size in bytes to zero Return Value: none


DetectInstallVolume in the FileSystem.c

Function : DetectInstallVolume

File: FileSystem.c
Description:
Detects whether a valid volume is present or not

Parameters:      EFI_DISK_IO_PROTOCOL *DiskIo - Pointer to disk IO
                                  structure
Parameters:      EFI_BLOCK_IO_PROTOCOL *DiskIo - Pointer to boock IO
                                   structure

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):
Built on 16:58:27 03/28/11


DetectVolume in the FileSystem.c

Function : DetectVolume

File: FileSystem.c
Description:
Detects the presence of a valid FAT volume

Parameters:      VOLUME_INFO *vi - Pointer to the volume info structure
   BOOLEAN StatusCheck - Only reads MBR if true

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):
Built on 16:58:27 03/28/11


FileSystemInitUnicodeCollation in the FileSystem.c

Function : FileSystemInitUnicodeCollation

File: FileSystem.c
Description:
Find the language Interface

Parameters:      EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this
                                instance of driver binding
                                protocol
   UINT8 *LandCode - Pointer to the language code
   EFI_UNICODE_COLLATION_PROTOCOL *gFileSystemUnicodeCollationInterface
                                  - Pointer to pointer to unicode
                                  collation interfact structure

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


SimpleFileSystemEntryPoint in the FileSystem.c

Function : SimpleFileSystemEntryPoint

File: FileSystem.c
Description:
Installs gSimpleFileSystemDriverBinding protocol

Parameters:      EFI_HANDLE ImageHandle - Image handle for this driver
                            image
   EFI_SYSTEM_TABLE *SystemTable - pointer to the EFI
                                   system table

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):
Here is the control flow of this function:
1. Initialize Ami Lib.
2. Install Driver Binding Protocol
3. Return EFI_SUCCESS.


SimpleFileSystemStart in the FileSystem.c

Function : SimpleFileSystemStart

File: FileSystem.c
Description:
Installs Simple File Ssystem Protocol

Parameters:      EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this
                                instance of driver binding
                                protocol
   EFI_HANDLE Controller - Handle for this controller
   EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


SimpleFileSystemStop in the FileSystem.c

Function : SimpleFileSystemStop

File: FileSystem.c
Description:
Uninstall Simple File system Protocol

Parameters:      EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this
                                instance of driver binding
                                protocol
   EFI_HANDLE Controller - Handle for this controller
   EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


SimpleFileSystemSupported in the FileSystem.c

Function : SimpleFileSystemSupported

File: FileSystem.c
Description:
Checks whether Simple File System Protocol can be
   installed on the controller or not.

Parameters:      EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this
                                instance of driver binding
                                protocol
   EFI_HANDLE Controller - Handle for this controller
   EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):        DiskIO and BlockIO should have been installed on the
   controller.


UnloadSimpleFileSystemDriver in the FileSystem.c

Function : UnloadSimpleFileSystemDriver

File: FileSystem.c
Description:
Unloads this driver

Parameters:      EFI_HANDLE ImageHandle - Image handle for this driver
                            image

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


Zeromemory in the FileSystem.c

Function : Zeromemory

File: FileSystem.c
Description:
Zeros the contents of a specified memory location

Parameters:    VOID *Buffer - location of memory to zero
 UINT32 Size - Size in bytes to zero

Return Value:  none
Modified:

Referral(s):

NOTE(S):       For testing under Aptio and Alaska,
 This routine has been copied.


FileSystem.h

Description:
Header file for Simple File System driver

The following data structures are used in the file: FileSystem.h.

Variable | Description
ACCESS_METHOD | Enumeration of access methods (read or write)
BPB_COMMON | Structure of the common part of the BIOS parameter block
BPB_FAT_12_16 | Structure of the FAT 12 or 16 unique part of the BPB
BPB_FAT_32 | Structure of the FAT 32 unique part of the BPB
CACHE_HEADER | Structure containing cache header information
DIR_ENTRY_32 | Structure of a FAT32 directory entry
DIR_ENTRY_LFN | Structure of a long file name directory entry
DIR_ENTRY_LIST | Structure containing directory entry information
FAT_DATE | File date structure
FAT_DATE_TIME | Contains FAT_TIME and FAT_DATE
FAT_TIME | File time structure
FAT_TYPE | Enumeration of fat types
FILE_HANDLE | Structure containing File Handle information
FILE_HANDLE_INSTANCE | Structure containing File Handle Instance information
MEM_HEADER | Structure containing memory header information
REGIONS | Enumeration of volume REGIONS
VOLUME_BPB | Structure of the Volume BIOS Parameter Block. Combines common, FAT 12-16, and FAT 32 parts
VOLUME_INFO | Structure containing all Volume Information


ACCESS_METHOD in the FileSystem.h

Variable : ACCESS_METHOD

File: FileSystem.h
Description:
Enumeration of access methods (read or write)
Referrals:

Built on 16:58:27 03/28/11


BPB_COMMON in the FileSystem.h

Variable : BPB_COMMON

File: FileSystem.h
Description:
Structure of the common part of the BIOS parameter block
Referrals:

Built on 16:58:27 03/28/11


BPB_FAT_12_16 in the FileSystem.h

Variable : BPB_FAT_12_16

File: FileSystem.h
Description:
Structure of the FAT 12 or 16 unique part of the BPB
Referrals:

Built on 16:58:27 03/28/11


BPB_FAT_32 in the FileSystem.h

Variable : BPB_FAT_32

File: FileSystem.h
Description:
Structure of the FAT 32 unique part of the BPB
Referrals:

Built on 16:58:27 03/28/11


CACHE_HEADER in the FileSystem.h

Variable : CACHE_HEADER

File: FileSystem.h
Description:
Structure containing cache header information
Referrals:

Built on 16:58:27 03/28/11


DIR_ENTRY_32 in the FileSystem.h

Variable : DIR_ENTRY_32

File: FileSystem.h
Description:
Structure of a FAT32 directory entry
Referrals:

Built on 16:58:27 03/28/11


DIR_ENTRY_LFN in the FileSystem.h

Variable : DIR_ENTRY_LFN

File: FileSystem.h
Description:
Structure of a long file name directory entry
Referrals:

Built on 16:58:27 03/28/11


DIR_ENTRY_LIST in the FileSystem.h

Variable : DIR_ENTRY_LIST

File: FileSystem.h
Description:
Structure containing directory entry information
Referrals:

Built on 16:58:27 03/28/11


FAT_DATE in the FileSystem.h

Variable : FAT_DATE

File: FileSystem.h
Description:
File date structure
Referrals:


FAT_DATE_TIME in the FileSystem.h

Variable : FAT_DATE_TIME

File: FileSystem.h
Description:
Contains FAT_TIME and FAT_DATE
Referrals:


FAT_TIME in the FileSystem.h

Variable : FAT_TIME

File: FileSystem.h
Description:
File time structure
Referrals:


FAT_TYPE in the FileSystem.h

Variable : FAT_TYPE

File: FileSystem.h
Description:
Enumeration of fat types
Referrals:


FILE_HANDLE in the FileSystem.h

Variable : FILE_HANDLE

File: FileSystem.h
Description:
Structure containing File Handle information
Referrals:


FILE_HANDLE_INSTANCE in the FileSystem.h

Variable : FILE_HANDLE_INSTANCE

File: FileSystem.h
Description:
Structure containing File Handle Instance information
Referrals:


MEM_HEADER in the FileSystem.h

Variable : MEM_HEADER

File: FileSystem.h
Description:
Structure containing memory header information
Referrals:


REGIONS in the FileSystem.h

Variable : REGIONS

File: FileSystem.h
Description:
Enumeration of volume REGIONS
Referrals:


VOLUME_BPB in the FileSystem.h

Variable : VOLUME_BPB

File: FileSystem.h
Description:
Structure of the Volume BIOS Parameter Block. Combines common,
FAT 12-16, and FAT 32 parts
Referrals:


VOLUME_INFO in the FileSystem.h

Variable : VOLUME_INFO

File: FileSystem.h
Description:
Structure containing all Volume Information
Referrals:


FileSYstem.mak

Description:


FileSystemComponentName.c

Description:
Simple File System controller name functions

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

Function | Description
SimpleFileSystemCtlDriverName | Retrieves a Unicode string that is the user readable name of the EFI Driver. Parameters: EFI_COMPONENT_NAME_PROTOCOL This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. CHAR8 Language - A pointer to a three character ISO 639-2 language identifier. This is the language of the driver name that that the caller is requesting, and it must match one of the languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. CHAR16 DriverName - A pointer to the Unicode string to return. This Unicode string is the name of the driver specified by This in the language specified by Language. Return value: EFI_SUCCES - The Unicode string for the Driver specified by This and the language specified by Language was returned in DriverName. EFI_INVALID_PARAMETER - Language is NULL. EFI_INVALID_PARAMETER - DriverName is NULL. EFI_UNSUPPORTED - The driver specified by This does not support the language specified by Language.
SimpleFileSystemCtlGetControllerName | Retrieves a Unicode string that is the user readable name of the controller that is being managed by an EFI Driver. Parameters: EFI_COMPONENT_NAME_PROTOCOL This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. EFI_HANDLE ControllerHandle - The handle of a controller that the driver specified by This is managing. This handle specifies the controller whose name is to be returned. EFI_HANDLE ChildHandle - The handle of the child controller to retrieve the name of. This is an optional parameter that may be NULL. It will be NULL for device drivers. It will also be NULL for a bus drivers that wish to retrieve the name of the bus controller. It will not be NULL for a bus driver that wishes to retrieve the name of a child controller. CHAR8 Language - A pointer to a three character ISO 639-2 language identifier. This is the language of the controller name that that the caller is requesting, and it must match one of the languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. CHAR16 ControllerName - A pointer to the Unicode string to return. This Unicode string is the name of the controller specified by ControllerHandle and ChildHandle in the language specified by Language from the point of view of the driver specified by This. Return value: EFI_SUCCESS - The Unicode string for the user readable name in the language specified by Language for the driver specified by This was returned in DriverName. EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE. EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE. EFI_INVALID_PARAMETER - Language is NULL. EFI_INVALID_PARAMETER - ControllerName is NULL. EFI_UNSUPPORTED - The driver specified by This is not currently managing the controller specified by ControllerHandle and ChildHandle. EFI_UNSUPPORTED - The driver specified by This does not support the language specified by Language.


SimpleFileSystemCtlDriverName in the FileSystemComponentName.c

Function : SimpleFileSystemCtlDriverName

File: FileSystemComponentName.c
Description:
Retrieves a Unicode string that is the user readable name of
the EFI Driver.
Parameters:
EFI_COMPONENT_NAME_PROTOCOL
This       - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
CHAR8
Language   - A pointer to a three character ISO 639-2 language identifier.
  This is the language of the driver name that that the caller
  is requesting, and it must match one of the languages specified
  in SupportedLanguages.  The number of languages supported by a
  driver is up to the driver writer.
CHAR16
DriverName - A pointer to the Unicode string to return.  This Unicode string
  is the name of the driver specified by This in the language
  specified by Language.

Return value:
EFI_SUCCES            - The Unicode string for the Driver specified by This
             and the language specified by Language was returned
             in DriverName.
EFI_INVALID_PARAMETER - Language is NULL.
EFI_INVALID_PARAMETER - DriverName is NULL.
EFI_UNSUPPORTED       - The driver specified by This does not support the
             language specified by Language.
Modified:

Referral(s):

NOTE(S):


SimpleFileSystemCtlGetControllerName in the FileSystemComponentName.c

Function : SimpleFileSystemCtlGetControllerName

File: FileSystemComponentName.c
Description:
Retrieves a Unicode string that is the user readable name of
the controller that is being managed by an EFI Driver.

Parameters:
EFI_COMPONENT_NAME_PROTOCOL
This             - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
EFI_HANDLE
ControllerHandle - The handle of a controller that the driver specified by
        This is managing.  This handle specifies the controller
        whose name is to be returned.
EFI_HANDLE
ChildHandle      - The handle of the child controller to retrieve the name
        of.  This is an optional parameter that may be NULL.  It
        will be NULL for device drivers.  It will also be NULL
        for a bus drivers that wish to retrieve the name of the
        bus controller.  It will not be NULL for a bus driver
        that wishes to retrieve the name of a child controller.
CHAR8
Language         - A pointer to a three character ISO 639-2 language
        identifier.  This is the language of the controller name
        that that the caller is requesting, and it must match one
        of the languages specified in SupportedLanguages.  The
        number of languages supported by a driver is up to the
        driver writer.
CHAR16
ControllerName   - A pointer to the Unicode string to return.  This Unicode
        string is the name of the controller specified by
        ControllerHandle and ChildHandle in the language
        specified by Language from the point of view of the
        driver specified by This.

Return value:
EFI_SUCCESS           - The Unicode string for the user readable name in the
             language specified by Language for the driver
             specified by This was returned in DriverName.
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
             EFI_HANDLE.
EFI_INVALID_PARAMETER - Language is NULL.
EFI_INVALID_PARAMETER - ControllerName is NULL.
EFI_UNSUPPORTED       - The driver specified by This is not currently
             managing the controller specified by
             ControllerHandle and ChildHandle.
EFI_UNSUPPORTED       - The driver specified by This does not support the
             language specified by Language.
Modified:

Referral(s):

NOTE(S):


Info.c

Description:
Simple File System driver information handling functions

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

Function | Description
EfiToFatTime | Converts date/time in EFI format to FAT format Parameters: EFI_TIME EfiTime - Time in EFI format UINT16 *Date - Pointer to returned date in FAT format UINT16 *Time - Pointer to returned time in FAT format Return value: None
FatToEfiTime | Converts time/date in FAT format to EFI format Parameters: EFI_TIME *EfiTime - Ponter to returned time in EFI format UINT16 Date - Date in FAT format UINT16 Time - Time in FAT format Return value: None
GetfileInfo | Returns information on a file Parameters: FILE_HANDLE_INSTANCE *fh1 - Pointer to file handle instance UINTN *BufferSize - Pointer to size of buffer VOID *Buffer - Ponter to buffer for returned data Return value: EFI_STATUS - Status of the operation
GetFileInfoFromFH | Returns information on a file from it's handle Parameters: FILE_HANDLE_INSTANCE *fh1 - Pointer to file handle instance UINTN *BufferSize - Pointer to size of buffer VOID *Buffer - Ponter to buffer for returned data Return value: EFI_STATUS - Status of the operation
GetInfoFileHandle | Returns file info, system info, or the label of a volume depending on information type specified Parameters: EFI_FILE_PROTOCOL *This - Pointer to this instance of file protocol EFI_GUID *InformationType - Pointer to information type requested UINTN *BufferSize - Pointer to size of buffer VOID *Buffer - Pointer to buffer for returned info Return value: EFI_STATUS - Status of the operation
GetSystemInfo | Returns file system info on a volume Parameters: VOLUME_INFO *vi - Pointer to volume info structure UINTN *BufferSize - Pointer to size of buffer VOID *Buffer - Ponter to buffer for returned data Return value: EFI_STATUS - Status of the operation
GetVolumeLabel | Returns label of a volume Parameters: VOLUME_INFO *vi - Pointer to volume info structure UINTN *BufferSize - Pointer to size of buffer VOID *Buffer - Ponter to buffer for returned data Return value: EFI_STATUS - Status of the operation
LocateDel |
SetfileInfo | Sets the information on a file (updates dir entry) Parameters: FILE_HANDLE_INSTANCE *fh1 - Pointer to file handle instance UINTN *BufferSize - Pointer to size of buffer VOID *Buffer - Ponter to buffer containing new data Return value: EFI_STATUS - Status of the operation
SetSystemInfo | Sets the information in a volume label Parameters: VOLUME_INFO *vi - Pointer to volume info structure UINTN *BufferSize - Pointer to size of buffer VOID *Buffer - Ponter to buffer containing new data Return value: EFI_STATUS - Status of the operation
SetVolumeLabel | Updates the label on a volume Parameters: VOLUME_INFO *vi - Pointer to volume info structure UINTN *BufferSize - Pointer to size of buffer VOID *Buffer - Ponter to buffer containing new label Return value: EFI_STATUS - Status of the operation
UpdateAccAndWriteTime | Updates access and write times in a directory entry Parameters: DIR_ENTRY_LIST *del - pointer to the directory entry list structure Return value: EFI_STATUS - Status of the operation
UpdateAccDate | Updates the access date in a directory entry Parameters: DIR_ENTRY_LIST *del - pointer to the directory entry list structure Return value: EFI_STATUS - Status of the operation
UpdateAccDateRequired | Indicates when update of the access date of a file is required Parameters: DIR_ENTRY_LIST *del - pointer to the directory entry list structure Return value: BOOLEAN - True if update required
UpdateDirListFromFHDir | Updates directory list from file handle directory entry Parameters: FILE_HANDLE *fh - Pointer to file handle structure Return value: EFI_STATUS - Status of the operation


EfiToFatTime in the Info.c

Function : EfiToFatTime

File: Info.c
Description:
Converts date/time in EFI format to FAT format

Parameters:      EFI_TIME EfiTime - Time in EFI format
   UINT16 *Date - Pointer to returned date in FAT format
   UINT16 *Time - Pointer to returned time in FAT format

Return value:    None
Modified:

Referral(s):

NOTE(S):
Built on 16:58:27 03/28/11


FatToEfiTime in the Info.c

Function : FatToEfiTime

File: Info.c
Description:
Converts time/date in FAT format to EFI format

Parameters:      EFI_TIME *EfiTime - Ponter to returned time in EFI format
   UINT16 Date - Date in FAT format
   UINT16 Time - Time in FAT format

Return value:    None
Modified:

Referral(s):

NOTE(S):


GetfileInfo in the Info.c

Function : GetfileInfo

File: Info.c
Description:
Returns information on a file

Parameters:      FILE_HANDLE_INSTANCE *fh1 - Pointer to file handle
                               instance
   UINTN *BufferSize - Pointer to size of buffer
   VOID *Buffer - Ponter to buffer for returned data

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


GetFileInfoFromFH in the Info.c

Function : GetFileInfoFromFH

File: Info.c
Description:
Returns information on a file from it's handle

Parameters:      FILE_HANDLE_INSTANCE *fh1 - Pointer to file handle
                               instance
   UINTN *BufferSize - Pointer to size of buffer
   VOID *Buffer - Ponter to buffer for returned data

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


GetInfoFileHandle in the Info.c

Function : GetInfoFileHandle

File: Info.c
Description:
Returns file info, system info, or the label of a volume
   depending on information type specified

Parameters:      EFI_FILE_PROTOCOL *This - Pointer to this instance of
                             file protocol
   EFI_GUID *InformationType - Pointer to information type
                               requested
   UINTN *BufferSize - Pointer to size of buffer
   VOID *Buffer - Pointer to buffer for returned info

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


GetSystemInfo in the Info.c

Function : GetSystemInfo

File: Info.c
Description:
Returns file system info on a volume

Parameters:      VOLUME_INFO *vi - Pointer to volume info structure
   UINTN *BufferSize - Pointer to size of buffer
   VOID *Buffer - Ponter to buffer for returned data

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


GetVolumeLabel in the Info.c

Function : GetVolumeLabel

File: Info.c
Description:
Returns label of a volume

Parameters:      VOLUME_INFO *vi - Pointer to volume info structure
   UINTN *BufferSize - Pointer to size of buffer
   VOID *Buffer - Ponter to buffer for returned data

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


LocateDel in the Info.c

Function : LocateDel

File: Info.c
Description:
Input:
Output:

Modified:

Notes:

Referrals:


SetfileInfo in the Info.c

Function : SetfileInfo

File: Info.c
Description:
Sets the information on a file (updates dir entry)

Parameters:      FILE_HANDLE_INSTANCE *fh1 - Pointer to file handle
                               instance
   UINTN *BufferSize - Pointer to size of buffer
   VOID *Buffer - Ponter to buffer containing new data

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


SetSystemInfo in the Info.c

Function : SetSystemInfo

File: Info.c
Description:
Sets the information in a volume label

Parameters:      VOLUME_INFO *vi - Pointer to volume info structure
   UINTN *BufferSize - Pointer to size of buffer
   VOID *Buffer - Ponter to buffer containing new data

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


SetVolumeLabel in the Info.c

Function : SetVolumeLabel

File: Info.c
Description:
Updates the label on a volume

Parameters:      VOLUME_INFO *vi - Pointer to volume info structure
   UINTN *BufferSize - Pointer to size of buffer
   VOID *Buffer - Ponter to buffer containing new label

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


UpdateAccAndWriteTime in the Info.c

Function : UpdateAccAndWriteTime

File: Info.c
Description:
Updates access and write times in a directory entry

Parameters:      DIR_ENTRY_LIST *del - pointer to the directory entry list
                         structure

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


UpdateAccDate in the Info.c

Function : UpdateAccDate

File: Info.c
Description:
Updates the access date in a directory entry

Parameters:      DIR_ENTRY_LIST *del - pointer to the directory entry list
                         structure

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


UpdateAccDateRequired in the Info.c

Function : UpdateAccDateRequired

File: Info.c
Description:
Indicates when update of the access date of a file is
   required

Parameters:      DIR_ENTRY_LIST *del - pointer to the directory entry list
                         structure

Return value:    BOOLEAN - True if update required
Modified:

Referral(s):

NOTE(S):


UpdateDirListFromFHDir in the Info.c

Function : UpdateDirListFromFHDir

File: Info.c
Description:
Updates directory list from file handle directory entry

Parameters:      FILE_HANDLE *fh - Pointer to file handle structure

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):         Updates DIR list from FH Directory Entry and also writes
   to the disk.


MediaAccess.c

Description:
Handles all Media access

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

Function | Description
CheckCached | Checks to see if the media data we're working with is cached Parameters: VOLUME_INFO *vi, Pointer to volume info structure UINT64 AbsoluteOffset, Absolute offset of data UINT32 ByteCount, Byte Count of data UINT8 **cBuffer, Cache buffer UINT32 *cBufferLength Cache buffer length CACHE_HEADER **ch Cache header stucture REGIONS DataRegion See descriptions of REGION. Primarily used to dtermine caching algorithm. Return value: EFI_STATUS - Status of the operation
CreateSpaceforCache | Creates space on media for cache Parameters: VOLUME_INFO *vi, Volume info structure UINT32 ByteCount, Bytes of space to create REGIONS DataRegion See descriptions of REGION. Primarily used to dtermine caching algorithm. Return value: None
ExtractShortFileName | Extracts short file name from buffer Parameters: VOLUME_INFO *Vi, CHAR16 *lfn, UINT8 *Buffer Return value: EFI_STATUS - Status of the operation
FatLfnIsValid | Checks for valid long file name Parameters: CHAR16 *Name Return value: BOOLEAN - True if long file name is valid
FreeMemory | Parameters: VOLUME_INFO *Vi, VOID *Buffer Return value: EFI_STATUS - Status of the operation
FreeUpResources | Frees up resouces when volumes opened/closed Parameters: VOLUME_INFO *vi, Volume info structure EFI_STATUS Status Status to update file handles with Return value: EFI_STATUS - Status of the operation
fsAllocateMemory | Allocates memory for use by file system driver Parameters: VOLUME_INFO *vi VOID **Buffer UINT32 Size Return value: EFI_STATUS - Status of the operation
fsDeAllocateMemory | De-allocates memory used by file system driver Parameters: VOLUME_INFO *vi, void *Buffer Return value: EFI_STATUS - Status of the operation
FsReadMedia | Reads a specified no. of bytes from media at a specified location (abs. sector and offset in sector) Parameters: VOLUME_INFO *vi, Pointer to Volume Info structure UINT8 *Buffer, Valid Buffer pointer should be Passed UINT64 Sector, Start Sector number UINT32 Offset, Offset within the sector to read from UINT32 ByteCount, Number of bytes to read from the offset REGIONS DataRegion See descriptions of REGION. Primarily used to dtermine caching algorithm. typedef enum { RESERVED_REGION, FAT_REGION, DIRECTORY_REGION, DATA_REGION } REGIONS; Return value: EFI_STATUS - Status of the operation
FsWriteMedia | Writes a specified no. of bytes to media at a specified location (abs. sector and offset in sector) Parameters: VOLUME_INFO *vi, UINT8 *Buffer, Valid Buffer pointer should be Passed UINT64 Sector, Start Sector number UINT32 Offset, Offset within the sector to read from UINT32 ByteCount, Number of bytes to read from the offset REGIONS DataRegion See descriptions of REGION. Primarily used to dtermine caching algorithm. Return value: EFI_STATUS - Status of the operation
GetMemory | Gets memory for a buffer Parameters: MEM_HEADER *Mem, UINT32 Blocks, VOID **Buffer, BOOLEAN CLEAR Return value: EFI_STATUS - Status of the operation
GetNextCompName | Gets next component name in path Parameters: IN OUT CHAR16 **FileName, IN CHAR16 *NextCompName Return value: EFI_STATUS - Status of the operation
GetPositionFileHandle | Gets position in an open file handle Parameters: IN EFI_FILE_PROTOCOL *This, IN UINT64 *Position Return value: EFI_STATUS - Status of the operation
HandleDiskIoError | Handles disk read/write error Parameters: VOLUME_INFO *vi, Volume Info Structure Return value: None
InternalMemAllocate | Adds allocated memory to internal manager Parameters: VOLUME_INFO *vi, UINT32 Size, VOID **Buffer, BOOLEAN CLEAR Return value: EFI_STATUS - Status of the operation
IsCacheHit | Parameters: VOLUME_INFO *vi, Pointer to volume info structure UINT64 AbsoluteOffset, Absolute offset of data UINT32 ByteCount, Byte Count of data UINT8 **cBuffer, Cache buffer UINT32 *cBufferLength Cache buffer length Return value: BOOLEAN - True if cache hit
RemoveFH | Romoves file handle (closed file) Parameters: FILE_HANDLE *fh Return value: EFI_STATUS - Status of the operation
SetPositionFileHandle | Sets position in an open file handle Parameters: IN FILE_HANDLE_INSTANCE *fhi, IN UINT64 Position Return value: EFI_STATUS - Status of the operation
SetPositionFileHandleThis | Sets position in current file handle instance Parameters: IN EFI_FILE_PROTOCOL *This, IN UINT64 Position Return value: EFI_STATUS - Status of the operation
ValidateCurrentStatus | Validates status if file handle instance Parameters: FILE_HANDLE_INSTANCE *fhi Return value: EFI_STATUS - Status of the operation


CheckCached in the MediaAccess.c

Function : CheckCached

File: MediaAccess.c
Description:
Checks to see if the media data we're working with is
   cached

Parameters:
VOLUME_INFO     *vi,                Pointer to volume info structure
UINT64          AbsoluteOffset,     Absolute offset of data
UINT32          ByteCount,          Byte Count of data
UINT8           **cBuffer,          Cache buffer
UINT32          *cBufferLength      Cache buffer length
CACHE_HEADER    **ch                Cache header stucture
REGIONS         DataRegion          See descriptions of REGION. Primarily
                       used to dtermine caching algorithm.

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):
Built on 16:58:27 03/28/11


CreateSpaceforCache in the MediaAccess.c

Function : CreateSpaceforCache

File: MediaAccess.c
Description:
Creates space on media for cache

Parameters:
VOLUME_INFO     *vi,            Volume info structure
UINT32          ByteCount,      Bytes of space to create
REGIONS         DataRegion      See descriptions of REGION. Primarily used
                   to dtermine caching algorithm.

Return value:    None
Modified:

Referral(s):

NOTE(S):
Built on 16:58:27 03/28/11


ExtractShortFileName in the MediaAccess.c

Function : ExtractShortFileName

File: MediaAccess.c
Description:
Extracts short file name from buffer

Parameters:
VOLUME_INFO         *Vi,
CHAR16              *lfn,
UINT8               *Buffer

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


FatLfnIsValid in the MediaAccess.c

Function : FatLfnIsValid

File: MediaAccess.c
Description:
Checks for valid long file name

Parameters:
CHAR16      *Name

Return value:    BOOLEAN - True if long file name is valid
Modified:

Referral(s):

NOTE(S):


FreeMemory in the MediaAccess.c

Function : FreeMemory

File: MediaAccess.c
Description:

Parameters:
VOLUME_INFO         *Vi,
VOID                *Buffer

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


FreeUpResources in the MediaAccess.c

Function : FreeUpResources

File: MediaAccess.c
Description:
Frees up resouces when volumes opened/closed

Parameters:
VOLUME_INFO     *vi,        Volume info structure
EFI_STATUS      Status      Status to update file handles with

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


fsAllocateMemory in the MediaAccess.c

Function : fsAllocateMemory

File: MediaAccess.c
Description:
Allocates memory for use by file system driver

Parameters:
VOLUME_INFO     *vi
VOID            **Buffer
UINT32          Size

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


fsDeAllocateMemory in the MediaAccess.c

Function : fsDeAllocateMemory

File: MediaAccess.c
Description:
De-allocates memory used by file system driver

Parameters:
VOLUME_INFO     *vi,
void            *Buffer

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


FsReadMedia in the MediaAccess.c

Function : FsReadMedia

File: MediaAccess.c
Description:
Reads a specified no. of bytes from media at a specified
   location (abs. sector and offset in sector)

Parameters:
VOLUME_INFO     *vi,            Pointer to Volume Info structure
UINT8           *Buffer,        Valid Buffer pointer should be Passed
UINT64          Sector,         Start Sector number
UINT32          Offset,         Offset within the sector to read  from
UINT32          ByteCount,      Number of bytes to read from the offset
REGIONS         DataRegion      See descriptions of REGION. Primarily
                   used to dtermine caching algorithm.
typedef enum {
RESERVED_REGION,
FAT_REGION,
DIRECTORY_REGION,
DATA_REGION
} REGIONS;

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


FsWriteMedia in the MediaAccess.c

Function : FsWriteMedia

File: MediaAccess.c
Description:
Writes a specified no. of bytes to media at a specified
   location (abs. sector and offset in sector)

Parameters:
VOLUME_INFO     *vi,
UINT8           *Buffer,        Valid Buffer pointer should be Passed
UINT64          Sector,         Start Sector number
UINT32          Offset,         Offset within the sector to read from
UINT32          ByteCount,      Number of bytes to read from the offset
REGIONS         DataRegion      See descriptions of REGION. Primarily used
                   to dtermine caching algorithm.

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


GetMemory in the MediaAccess.c

Function : GetMemory

File: MediaAccess.c
Description:
Gets memory for a buffer

Parameters:
MEM_HEADER  *Mem,
UINT32      Blocks,
VOID        **Buffer,
BOOLEAN     CLEAR

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


GetNextCompName in the MediaAccess.c

Function : GetNextCompName

File: MediaAccess.c
Description:
Gets next component name in path

Parameters:
IN OUT CHAR16   **FileName,
IN CHAR16       *NextCompName

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


GetPositionFileHandle in the MediaAccess.c

Function : GetPositionFileHandle

File: MediaAccess.c
Description:
Gets position in an open file handle

Parameters:
IN EFI_FILE_PROTOCOL *This,
IN UINT64 *Position

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


HandleDiskIoError in the MediaAccess.c

Function : HandleDiskIoError

File: MediaAccess.c
Description:
Handles disk read/write error

Parameters:
VOLUME_INFO     *vi,    Volume Info Structure

Return value:    None
Modified:

Referral(s):

NOTE(S):


InternalMemAllocate in the MediaAccess.c

Function : InternalMemAllocate

File: MediaAccess.c
Description:
Adds allocated memory to internal manager

Parameters:
VOLUME_INFO     *vi,
UINT32          Size,
VOID            **Buffer,
BOOLEAN         CLEAR

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


IsCacheHit in the MediaAccess.c

Function : IsCacheHit

File: MediaAccess.c
Description:

Parameters:
VOLUME_INFO     *vi,                Pointer to volume info structure
UINT64          AbsoluteOffset,     Absolute offset of data
UINT32          ByteCount,          Byte Count of data
UINT8           **cBuffer,          Cache buffer
UINT32          *cBufferLength      Cache buffer length

Return value:    BOOLEAN - True if cache hit
Modified:

Referral(s):

NOTE(S):


RemoveFH in the MediaAccess.c

Function : RemoveFH

File: MediaAccess.c
Description:
Romoves file handle (closed file)

Parameters:
FILE_HANDLE         *fh

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


SetPositionFileHandle in the MediaAccess.c

Function : SetPositionFileHandle

File: MediaAccess.c
Description:
Sets position in an open file handle

Parameters:
IN FILE_HANDLE_INSTANCE *fhi,
IN UINT64               Position

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


SetPositionFileHandleThis in the MediaAccess.c

Function : SetPositionFileHandleThis

File: MediaAccess.c
Description:
Sets position in current file handle instance

Parameters:
IN EFI_FILE_PROTOCOL *This,
IN UINT64 Position

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


ValidateCurrentStatus in the MediaAccess.c

Function : ValidateCurrentStatus

File: MediaAccess.c
Description:
Validates status if file handle instance

Parameters:
FILE_HANDLE_INSTANCE    *fhi

Return value:    EFI_STATUS - Status of the operation
Modified:

Referral(s):

NOTE(S):


Open.c

Description:
Handles Opening File Handles.

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

Function | Description
AddToDirList | Adds a directory entry to DirList Parameters: IN FILE_HANDLE *fh - File Handle Return Value: EFI_STATUS
CloseFileHandle | Closes an open file Parameters: IN EFI_FILE_PROTOCOL *This - File Protocol instance Return Value: EFI_STATUS
CreateDirectoryEntry | Creates a directory entry Parameters: IN FILE_HANDLE *fh - File handle IN CHAR16 *NextCompName - Unicode name to create OUT FILE_HANDLE **fh1 - File handle for new name IN UINT64 Attributes Return Value: EFI_STATUS
CreateDirEntryInDisk | Creates a directory entry on the disk Parameters: IN FILE_HANDLE *fh - File handle IN CHAR16 *NextCompName - Name to create IN UINT64 Attributes - Attributes for entry OUT UINT32 *DirCluster - Cluster of entry created OUT UINT32 *DirClusterOffset - Offset in cluster Return Value: EFI_STATUS
CreateFHFromDirEntryList | Creates a file handle from directory entry list Parameters: IN DIR_ENTRY_LIST *Del - Directory entry list IN FILE_HANDLE *fh - Directory file handle OUT FILE_HANDLE **fh1 - New file handle Return Value: EFI_STATUS
CreateFileHandleInstance | Creates an instance of a file handle Parameters: IN FILE_HANDLE *fh - Handle of the file to work on IN OUT FILE_HANDLE_INSTANCE **fhi - File handle instance IN UINT64 OpenMode - Open mode (read, write, both) Return Value: EFI_STATUS
DeleteFileHandle | Deletes a file Parameters: IN EFI_FILE_PROTOCOL *This - File Protocol instance Return Value: EFI_STATUS
FetchLongName | Fetch a long name from a directory entry Parameters: FILE_HANDLE *fh - File handle of the directory DIR_ENTRY_32 *Buffer - Buffer containing directory entry UINT32 BufferPos - Position in buffer UINT16 *Name - Unicode name placed here UINT32 ClusterNumber - Current directory cluster UINT32 ClusterSize - Cluster size in bytes Return Value: EFI_STATUS
FindMatchingDirEntry | Finds a directory entry matching the input name Parameters: IN FILE_HANDLE *fh - Directory file handle IN CHAR16 *NextCompName - Unicode name to match OUT DIR_ENTRY_LIST **Del - Directory list where found Return Value: EFI_STATUS
FindMatchingFH | Finds the Child FH, whose name matches with the input. In the Attributes, check whther both are file or Directory Parameters: IN VOLUME_INFO *Vi - Volume info structure IN CHAR16 *NextCompName - Unicode name to compare IN FILE_HANDLE *fh - Parent file handle OUT FILE_HANDLE **fh1 - Child file handle Return Value: EFI_STATUS
FindMatchingSFNDirEntry | Finds short file name directory entry matching input Parameters: IN FILE_HANDLE *fh - Directory file handle IN CHAR8 *ShortFileName - Name to find OUT DIR_ENTRY_LIST **Del - Directory list where found Return Value: EFI_STATUS
FindShortName | Return a valid short name Directory Entry from DirCluster beginning from ReadPosition. Parameters: UINT8 *Buffer - Buffer to search in UINT32 *Offset - Offset in buffer where entry found UINT32 BufferSize - Size of buffer Return Value: BOOLEAN - True = name found
FlushFileHandle | Flushes a file (writes any portion left in cache) Parameters: IN EFI_FILE_PROTOCOL *This - File Protocol instance Return Value: EFI_STATUS
FreeUpDirEntries | Free up cached directory entries Parameters: VOLUME_INFO *vi - Volume info FILE_HANDLE *pfh - Parent file handle Return Value: EFI_STATUS
FreeUpFHEntries | Release all file handles whose instance count is 0 Parameters: VOLUME_INFO *vi - Volume info FILE_HANDLE *pfh - Parent file handle Return Value: EFI_STATUS
GetDirListAtPosition | Get directory list at current position in directory file Parameters: FILE_HANDLE *Pfh - Parent file handle UINT64 Position - Current position DIR_ENTRY_LIST **Del - Directory entry list Return Value:
GetTempBuffer | Gets a temporary buffer Parameters: VOLUME_INFO *Vi - Volume info VOID **Buffer - Buffer Return Value: EFI_STATUS
InitEFIFileInterface | Initializes the EFI_FILE_PROTOCOL interface Parameters: EFI_FILE_PROTOCOL *EFIFileInterface - Interface structure Return Value: EFI_STATUS
LfnChecksum | Calculate long file name entry section checksum Parameters: UINT8 *D - Pointer to long name entry Return Value: UINT8 - Checksum
OpenFileHandle | Opens a file handle (when a file is opened) Parameters: IN EFI_FILE_PROTOCOL *This - File System Protocol instance OUT EFI_FILE_PROTOCOL **NewHandle - Handle of open file IN CHAR16 *FileName - Unicode name of file IN UINT64 OpenMode - Open mode (read, write, both) IN UINT64 Attributes - Attributes of open file Return Value: EFI_STATUS
OpenRoot | Opens the Root Directory on the Volume. Parameters: IN VOLUME_INFO *VolumeInfo - Volume Info Structure IN OUT FILE_HANDLE **Root - Root directory handle Return Value: EFI_STATUS
OpenVolume | Opens a file system Volume. Parameters: IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *This - File System Protocol Instance OUT EFI_FILE_PROTOCOL **Root Return Value: EFI_STATUS
ProcessOpenFileHandle | Performs whatever is needed to process an open handle (create dir. entry, create instance, allocate clusters) Parameters: IN FILE_HANDLE_INSTANCE *ParentFi - Parent file handle instance IN CHAR16 **FileName - Unicode file name OUT EFI_FILE_PROTOCOL **NewHandle - New file handle IN UINT64 OpenMode - Open mode (read, write, both) IN UINT64 Attributes - File attributes Return Value: EFI_STATUS
ReadAllDirectoryEntries | Reads entries in a directory Parameters: IN FILE_HANDLE *fh - File handle structure Return Value: EFI_STATUS
ReadClusterOfDirectoryEntries | Reads one cluster of directory entries Parameters: IN FILE_HANDLE *fh, IN UINT32 ClusterNumber -- 0-based number of which cluster to read Return Value: EFI_STATUS
ReadFileHandle | Read from a file (normal file or directory) Parameters: IN EFI_FILE_PROTOCOL *This - File System Protocol instance IN OUT UINTN *BufferSize - Size of read buffer OUT VOID *Buffer - Points to read buffer Return Value: EFI_STATUS
ReleaseTempBuffer | Releases a temporary buffer Parameters: VOLUME_INFO *Vi - Volume Info Return Value: EFI_STATUS
RemoveAllDirList | Removes all directory lists from cache (needs to be re-read) Parameters: FILE_HANDLE *lfh - list file handle Return Value: EFI_STATUS
RemoveDirList | Removes a directory list from cache Parameters: FILE_HANDLE *fh - Directory file handle DIR_ENTRY_LIST *Del - Directory list Return Value: EFI_STATUS
SetInfoFileHandle | Sets file info Parameters: IN EFI_FILE_PROTOCOL *This, IN EFI_GUID *InformationType, IN UINTN BufferSize, IN VOID *Buffer Return Value: EFI_STATUS
Wcscmpcaseinsensitive | Case insensitive unicode string compare Parameters: CHAR16 *string1 - First string CHAR16 *string2 - Second string Return Value: INT - Difference where mis-matched
WriteFileHandle | Writes to a file Parameters: IN EFI_FILE_PROTOCOL *This, IN OUT UINTN *BufferSize, IN VOID *Buffer Return Value: EFI_STATUS


AddToDirList in the Open.c

Function : AddToDirList

File: Open.c
Description:
Adds a directory entry to DirList

Parameters:
IN FILE_HANDLE    *fh - File Handle

Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:

ReadAllDirectoryEntries

Built on 16:58:27 03/28/11


CloseFileHandle in the Open.c

Function : CloseFileHandle

File: Open.c
Description:
Closes an open file

Parameters:
IN EFI_FILE_PROTOCOL *This - File Protocol instance

Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:

DeleteFileHandle

Built on 16:58:27 03/28/11


CreateDirectoryEntry in the Open.c

Function : CreateDirectoryEntry

File: Open.c
Description:
Creates a directory entry

Parameters:
IN  FILE_HANDLE       *fh - File handle
IN  CHAR16            *NextCompName - Unicode name to create
OUT FILE_HANDLE       **fh1 - File handle for new name
IN UINT64             Attributes

Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:

ProcessOpenFileHandle

Built on 16:58:27 03/28/11


CreateDirEntryInDisk in the Open.c

Function : CreateDirEntryInDisk

File: Open.c
Description:
Creates a directory entry on the disk

Parameters:
IN  FILE_HANDLE     *fh - File handle
IN  CHAR16          *NextCompName - Name to create
IN  UINT64          Attributes - Attributes for entry
OUT UINT32          *DirCluster - Cluster of entry created
OUT UINT32          *DirClusterOffset - Offset in cluster

Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:

CreateDirectoryEntry

Built on 16:58:27 03/28/11


CreateFHFromDirEntryList in the Open.c

Function : CreateFHFromDirEntryList

File: Open.c
Description:
Creates a file handle from directory entry list

Parameters:
IN DIR_ENTRY_LIST *Del - Directory entry list
IN FILE_HANDLE    *fh - Directory file handle
OUT FILE_HANDLE   **fh1 - New file handle

Return Value:
EFI_STATUS
Modified:
Notes:
Should not link the FH to any LIST
Referrals:
ReadFileHandle, ProcessOpenFileHandle
Built on 16:58:27 03/28/11


CreateFileHandleInstance in the Open.c

Function : CreateFileHandleInstance

File: Open.c
Description:
Creates an instance of a file handle

Parameters:
IN FILE_HANDLE              *fh - Handle of the file to work on
IN OUT FILE_HANDLE_INSTANCE **fhi - File handle instance
IN UINT64                   OpenMode - Open mode (read, write, both)

Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:

Built on 16:58:27 03/28/11


DeleteFileHandle in the Open.c

Function : DeleteFileHandle

File: Open.c
Description:
Deletes a file

Parameters:
IN EFI_FILE_PROTOCOL *This - File Protocol instance

Return Value:
EFI_STATUS
Modified:
Notes:
For FAT32, Cluster(s) occupied by root directory will not be released
as Del/rm command will not give a call to delete RootHandle.
In a empty FAt32 disk, free space will be less by clusters occupied by ROOT Directory
Referrals:
Built on 16:58:27 03/28/11


FetchLongName in the Open.c

Function : FetchLongName

File: Open.c
Description:
Fetch a long name from a directory entry

Parameters:
FILE_HANDLE  *fh - File handle of the directory
DIR_ENTRY_32 *Buffer - Buffer containing directory entry
UINT32       BufferPos - Position in buffer
UINT16       *Name - Unicode name placed here
UINT32       ClusterNumber - Current directory cluster
UINT32       ClusterSize - Cluster size in bytes

Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:

ReadAllDirectoryEntries


FindMatchingDirEntry in the Open.c

Function : FindMatchingDirEntry

File: Open.c
Description:
Finds a directory entry matching the input name

Parameters:
IN FILE_HANDLE     *fh - Directory file handle
IN CHAR16          *NextCompName - Unicode name to match
OUT DIR_ENTRY_LIST **Del - Directory list where found
Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:

ProcessOpenFileHandle


FindMatchingFH in the Open.c

Function : FindMatchingFH

File: Open.c
Description:
Finds the Child FH, whose name matches with the input.
In the Attributes, check whther both are file or Directory

Parameters:
IN VOLUME_INFO  *Vi - Volume info structure
IN CHAR16       *NextCompName - Unicode name to compare
IN FILE_HANDLE  *fh - Parent file handle
OUT FILE_HANDLE **fh1 - Child file handle

Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:

ProcessOpenFileHandle


FindMatchingSFNDirEntry in the Open.c

Function : FindMatchingSFNDirEntry

File: Open.c
Description:
Finds short file name directory entry matching input

Parameters:
IN FILE_HANDLE     *fh - Directory file handle
IN CHAR8           *ShortFileName - Name to find
OUT DIR_ENTRY_LIST **Del - Directory list where found
Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:


FindShortName in the Open.c

Function : FindShortName

File: Open.c
Description:
Return a valid short name Directory Entry from DirCluster
beginning from ReadPosition.

Parameters:
UINT8       *Buffer - Buffer to search in
UINT32      *Offset - Offset in buffer where entry found
UINT32      BufferSize - Size of buffer
Return Value:
BOOLEAN - True = name found
Modified:
Notes:

Referrals:

ReadAllDirectoryEntries


FlushFileHandle in the Open.c

Function : FlushFileHandle

File: Open.c
Description:
Flushes a file (writes any portion left in cache)

Parameters:
IN EFI_FILE_PROTOCOL *This - File Protocol instance

Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:


FreeUpDirEntries in the Open.c

Function : FreeUpDirEntries

File: Open.c
Description:
Free up cached directory entries

Parameters:
VOLUME_INFO       *vi - Volume info
FILE_HANDLE       *pfh - Parent file handle
Return Value:
EFI_STATUS
Modified:
Notes:
Don't remove pfh
Referrals:
ReadAllDirectoryEntries, CloseFileHandle


FreeUpFHEntries in the Open.c

Function : FreeUpFHEntries

File: Open.c
Description:
Release all file handles whose instance count is 0

Parameters:
VOLUME_INFO       *vi - Volume info
FILE_HANDLE       *pfh - Parent file handle
Return Value:
EFI_STATUS
Modified:
Notes:
Don't remove pfh
Referrals:
CloseFileHandle


GetDirListAtPosition in the Open.c

Function : GetDirListAtPosition

File: Open.c
Description:
Get directory list at current position in directory file

Parameters:
FILE_HANDLE       *Pfh - Parent file handle
UINT64            Position - Current position
DIR_ENTRY_LIST    **Del - Directory entry list

Return Value:
Modified:
Notes:

Referrals:

ReadFileHandle


GetTempBuffer in the Open.c

Function : GetTempBuffer

File: Open.c
Description:
Gets a temporary buffer

Parameters:
VOLUME_INFO     *Vi - Volume info
VOID            **Buffer - Buffer

Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:

ProcessOpenFileHandle, ReadAllDirectoryEntries, CloseFileHandle


InitEFIFileInterface in the Open.c

Function : InitEFIFileInterface

File: Open.c
Description:
Initializes the EFI_FILE_PROTOCOL interface

Parameters:
EFI_FILE_PROTOCOL *EFIFileInterface - Interface structure

Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:

OpenProtocol CloseProtocol


LfnChecksum in the Open.c

Function : LfnChecksum

File: Open.c
Description:
Calculate long file name entry section checksum

Parameters:
UINT8 *D - Pointer to long name entry
Return Value:
UINT8 - Checksum
Modified:
Notes:

Referrals:

FetchLongName


OpenFileHandle in the Open.c

Function : OpenFileHandle

File: Open.c
Description:
Opens a file handle (when a file is opened)

Parameters:
IN EFI_FILE_PROTOCOL  *This - File System Protocol instance
OUT EFI_FILE_PROTOCOL **NewHandle - Handle of open file
IN CHAR16             *FileName - Unicode name of file
IN UINT64             OpenMode - Open mode (read, write, both)
IN UINT64             Attributes - Attributes of open file

Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:


OpenRoot in the Open.c

Function : OpenRoot

File: Open.c
Description:
Opens the Root Directory on the Volume.

Parameters:
IN VOLUME_INFO        *VolumeInfo - Volume Info Structure
IN OUT FILE_HANDLE    **Root - Root directory handle

Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:


OpenVolume in the Open.c

Function : OpenVolume

File: Open.c
Description:
Opens a file system Volume.

Parameters:
IN  EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *This - File System Protocol Instance
OUT EFI_FILE_PROTOCOL **Root

Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:


ProcessOpenFileHandle in the Open.c

Function : ProcessOpenFileHandle

File: Open.c
Description:
Performs whatever is needed to process an open handle
(create dir. entry, create instance, allocate clusters)

Parameters:
IN  FILE_HANDLE_INSTANCE  *ParentFi - Parent file handle instance
IN  CHAR16                **FileName - Unicode file name
OUT EFI_FILE_PROTOCOL     **NewHandle - New file handle
IN UINT64                 OpenMode - Open mode (read, write, both)
IN UINT64                 Attributes - File attributes

Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:


ReadAllDirectoryEntries in the Open.c

Function : ReadAllDirectoryEntries

File: Open.c
Description:
Reads entries in a directory

Parameters:
IN FILE_HANDLE    *fh - File handle structure

Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:

ReadFileHandle, ProcessOpenFileHandle


ReadClusterOfDirectoryEntries in the Open.c

Function : ReadClusterOfDirectoryEntries

File: Open.c
Description:
Reads one cluster of directory entries

Parameters:
IN FILE_HANDLE    *fh,
IN UINT32         ClusterNumber -- 0-based number of which cluster to read

Return Value:
EFI_STATUS
Modified:
Notes:
For end of cluster, BufferSize = 0 and EFI_SUCCESS returned.
For FAT12/16, All the Root Directories are read in one shot.
Referrals:
ReadAllDirectoryEntries


ReadFileHandle in the Open.c

Function : ReadFileHandle

File: Open.c
Description:
Read from a file (normal file or directory)

Parameters:
IN EFI_FILE_PROTOCOL *This - File System Protocol instance
IN OUT UINTN         *BufferSize - Size of read buffer
OUT VOID             *Buffer - Points to read buffer

Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:


ReleaseTempBuffer in the Open.c

Function : ReleaseTempBuffer

File: Open.c
Description:
Releases a temporary buffer

Parameters:
VOLUME_INFO     *Vi - Volume Info

Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:

ProcessOpenFileHandle, ReadAllDirectoryEntries, CloseFileHandle


RemoveAllDirList in the Open.c

Function : RemoveAllDirList

File: Open.c
Description:
Removes all directory lists from cache (needs to be re-read)

Parameters:
FILE_HANDLE *lfh - list file handle

Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:

ReadFileHandle, DeleteFileHandle, FreeUpDirEntries


RemoveDirList in the Open.c

Function : RemoveDirList

File: Open.c
Description:
Removes a directory list from cache

Parameters:
FILE_HANDLE    *fh - Directory file handle
DIR_ENTRY_LIST *Del - Directory list

Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:

DeleteFileHandle, RemoveAllDirList


SetInfoFileHandle in the Open.c

Function : SetInfoFileHandle

File: Open.c
Description:
Sets file info

Parameters:
IN EFI_FILE_PROTOCOL  *This,
IN EFI_GUID           *InformationType,
IN UINTN              BufferSize,
IN VOID               *Buffer

Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:


Wcscmpcaseinsensitive in the Open.c

Function : Wcscmpcaseinsensitive

File: Open.c
Description:
Case insensitive unicode string compare

Parameters:
CHAR16 *string1 - First string
CHAR16 *string2 - Second string

Return Value:
INT - Difference where mis-matched
Modified:
Notes:

Referrals:

FindMatchingFH, FindMatchingDirEntry


WriteFileHandle in the Open.c

Function : WriteFileHandle

File: Open.c
Description:
Writes to a file

Parameters:
IN EFI_FILE_PROTOCOL *This,
IN OUT UINTN         *BufferSize,
IN VOID              *Buffer

Return Value:
EFI_STATUS
Modified:
Notes:

Referrals:


VolFatHandler.c

Description:
Fat File System driver -- Volume Level Fat Handler

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

Function | Description
AllocateAndLinkClusters | Allocates clusters for use in a file Parameters: IN VOLUME_INFO *Vol - Volume info IN UINT32 BeginCluster - Beginning cluster no. IN UINT32 Size - Size to allocate OUT UINT32 *FirstCluster - First cluster allocated OUT UINT32 *ClusterCount - Count of clusters allocated Return value: EFI_STATUS
ClusterToSector | Converts a custer number to an absolute sector number (relative to the beginning of the volume). Parameters: IN VOLUME_INFO *Vol, The volume structure OUT UINTN Cluster The cluster to be converted Return value: Returns the sector number.
FatClusterNumberLocation | Returns the location (sector and offset) of a valid cluster number in the specified FAT. Parameters: IN VOLUME_INFO *Vol, The volume structure IN UINTN Cluster, A cluster number IN UINTN FatNumber, The fat number (0 or 1) Return value: EFI_STATUS EFI_SUCCESS - Cluster located OUT UINT32 *Sector, Fat sector in which cluster is located OUT UINT32 *SectorOffset Offset in the sector where cluster is other - Cluster not located
FindFreeClusters | Searches a volume for a free cluster in the specified range of clusters. Parameters: IN VOLUME_INFO *Vol, The volume structure IN UINT32 From, Cluster to start search at IN UINT32 To, End of search range OUT UINT32 *StartCluster Free cluster found IN OUT UINT32 *FreeClusters In - free clustere requested. Out - Free clusters found OUT UINT32 *TotalFree Total free clusters found in this search Return value: EFI_STATUS EFI_SUCCESS - Free cluster found, Vol->LastFreeCluster updated. EFI_NOT_FOUND - Free cluster not found. other - any other error.
GetAbsSectorInfo | Gets the nunber of contiguous clusters starting from the specified cluster Parameters: IN VOLUME_INFO *Vol, The volume structure IN OUT UINT32 Cluster The cluster to start with Return value: Returns the number of contiguous clusters in Cluster.
GetClusterCount | Gets the cluster count of a file (usually a directory, because Dir_FileSize is zero for these, and we need to know the file size). Parameters: IN VOLUME_INFO *Vol, The volume structure IN OUT UINT32 Cluster In - the first cluster. Out - count Return value:
GetClusterPosition | Gets the nunber of contiguous clusters starting from the specified cluster Parameters: IN VOLUME_INFO *Vol, The volume structure IN OUT UINT32 Cluster The cluster to start with Return value: Returns the number of contiguous clusters in Cluster.
GetClustersRequired | Gets the amount of clusters required to store N blocks. Parameters: IN VOLUME_INFO *Vol, The volume structure IN UINT32 N A byte count Return value: Returns the required clusters.
GetContiguousClusters | Gets the nunber of contiguous clusters starting from the specified cluster Parameters: IN VOLUME_INFO *Vol, The volume structure IN OUT UINT32 Cluster The cluster to start with Return value: Returns the number of contiguous clusters in Cluster.
GetFreeClusterCount | Gets the count of free clusters on a disk. Parameters: IN VOLUME_INFO *Vol, The volume structure OUT UINT32 *FreeClusters Free clusters on volume OUT UINT32 *FreeClusterBlock First cluster in a block of free clusters OUT UINT32 *FreeBlockCount Number of clusters in the free block. Return value: EFI_STATUS
GetSectorAddressDir | Gets the absolute sector of a directory Parameters: FILE_HANDLE *fh - File Handle UINT32 Cluster - Cluster of directory UINT32 ClusterOffset - Offset in cluster UINT32 *Sector - Absolute sector of directory UINT32 *SectorOffset - Offset in sector Return value: None
MarkVolumeDirty | Marks a volume as dirty so that the OS will know to fix it. Parameters: IN VOLUME_INFO *vi - Volume info structure Return value:
ReadFatClusterNumber | Reads a single cluster number from the specified fat table Parameters: IN VOLUME_INFO *Vol, The volume structure IN UINTN Cluster, A cluster number IN UINT8 FatNumber, The fat number (0 or 1) OUT UINT32 *Value The returned cluster number Return value: EFI_STATUS EFI_SUCCESS - Cluster read other - Cluster not read
ReturnFreeSpace | Returns the amount of free space (in clusters) on a volume Parameters: IN VOLUME_INFO *vi - Volume info structure Return value: UINT32 - free space in clusters
SectorToCluster | Converts an absolute sector number (relative to the beginning of a volume) to a cluster number, and the sector within that cluster. Parameters: IN VOLUME_INFO *Vol, The volume structure OUT UINTN Sector The sector to be converted Return value: Sector - The sector offset in the returned cluster. Returns the sector number.
ShrinkClusters | Reduces the number of clusters used by a file (part of it deleted). Parameters: IN VOLUME_INFO *Vol, IN UINT32 StartCluster, IN UINT32 ClusterCount Return value: EFI_STATUS
UnlinkFat | Unlinks (marks as free) all the clusters of the chain starting from cluster Cluster (that must be part of a valid chain) until the EOC. Parameters: IN VOLUME_INFO *Vol, The volume structure IN UINTN Cluster A cluster number Return value: EFI_STATUS EFI_SUCCESS - Chain unlinked. other - Chain not unlinked
UpdateFreeSpace | Updates the volume info free space in clusters Parameters: IN VOLUME_INFO *vi - Volume info structure Return value: EFI_STATUS
WriteFatClusterNumber | Writes a single cluster number into the specified FAT table Parameters: IN VOLUME_INFO *Vol, The volume structure IN UINTN Cluster, A cluster number IN UINT8 FatNumber, The fat number (0 or 1) IN UINT32 Value The cluster value to be written Return value: EFI_STATUS EFI_SUCCESS - Cluster written other - Cluster not written

Built on 16:58:29 03/28/11


AllocateAndLinkClusters in the VolFatHandler.c

Function : AllocateAndLinkClusters

File: VolFatHandler.c
Description:
Allocates clusters for use in a file

Parameters:
IN VOLUME_INFO *Vol - Volume info
IN UINT32      BeginCluster - Beginning cluster no.
IN UINT32      Size - Size to allocate
OUT UINT32     *FirstCluster - First cluster allocated
OUT UINT32     *ClusterCount - Count of clusters allocated

Return value:  EFI_STATUS
Modified:
Notes:

Referrals:

Built on 16:58:27 03/28/11


ClusterToSector in the VolFatHandler.c

Function : ClusterToSector

File: VolFatHandler.c
Description:
Converts a custer number to an absolute sector number
(relative to the beginning of the volume).

Parameters:
IN VOLUME_INFO      *Vol,         The volume structure
OUT UINTN           Cluster       The cluster to be converted

Return value:
Returns the sector number.
Modified:
Notes:

Referrals:

Built on 16:58:27 03/28/11


FatClusterNumberLocation in the VolFatHandler.c

Function : FatClusterNumberLocation

File: VolFatHandler.c
Description:
Returns the location (sector and offset) of a valid cluster
number in the specified FAT.

Parameters:
IN VOLUME_INFO      *Vol,       The volume structure
IN UINTN            Cluster,    A cluster number
IN UINTN            FatNumber,  The fat number (0 or 1)

Return value:
EFI_STATUS
EFI_SUCCESS - Cluster located
OUT UINT32          *Sector,        Fat sector in which cluster is located
OUT UINT32          *SectorOffset   Offset in the sector where cluster is
other       - Cluster not located
Modified:
Notes:

Referrals:


FindFreeClusters in the VolFatHandler.c

Function : FindFreeClusters

File: VolFatHandler.c
Description:
Searches a volume for a free cluster in the specified range
of clusters.

Parameters:
IN VOLUME_INFO      *Vol,           The volume structure
IN UINT32           From,           Cluster to start search at
IN UINT32           To,             End of search range
OUT UINT32          *StartCluster   Free cluster found
IN OUT UINT32       *FreeClusters   In - free clustere requested.
                       Out - Free clusters found
OUT UINT32          *TotalFree      Total free clusters found in this
                       search

Return value:
EFI_STATUS
EFI_SUCCESS   - Free cluster found, Vol->LastFreeCluster updated.
EFI_NOT_FOUND - Free cluster not found.
other         - any other error.
Modified:
Notes:

Referrals:


GetAbsSectorInfo in the VolFatHandler.c

Function : GetAbsSectorInfo

File: VolFatHandler.c
Description:
Gets the nunber of contiguous clusters starting from the
specified cluster

Parameters:
IN VOLUME_INFO      *Vol,   The volume structure
IN OUT UINT32       Cluster The cluster to start with

Return value:
Returns the number of contiguous clusters in Cluster.
Modified:
Notes:

Referrals:


GetClusterCount in the VolFatHandler.c

Function : GetClusterCount

File: VolFatHandler.c
Description:
Gets the cluster count of a file (usually a directory,
because Dir_FileSize is zero for these, and we need to
know the file size).

Parameters:
IN VOLUME_INFO      *Vol,         The volume structure
IN OUT UINT32       Cluster       In - the first cluster. Out - count

Return value:
Modified:
Notes:

Referrals:


GetClusterPosition in the VolFatHandler.c

Function : GetClusterPosition

File: VolFatHandler.c
Description:
Gets the nunber of contiguous clusters starting from the
specified cluster

Parameters:
IN VOLUME_INFO      *Vol,   The volume structure
IN OUT UINT32       Cluster The cluster to start with

Return value:
Returns the number of contiguous clusters in Cluster.
Modified:
Notes:

Referrals:


GetClustersRequired in the VolFatHandler.c

Function : GetClustersRequired

File: VolFatHandler.c
Description:
Gets the amount of clusters required to store N blocks.

Parameters:
IN VOLUME_INFO      *Vol,   The volume structure
IN UINT32           N       A byte count

Return value:
Returns the required clusters.
Modified:
Notes:

Referrals:


GetContiguousClusters in the VolFatHandler.c

Function : GetContiguousClusters

File: VolFatHandler.c
Description:
Gets the nunber of contiguous clusters starting from the
specified cluster

Parameters:
IN VOLUME_INFO      *Vol,   The volume structure
IN OUT UINT32       Cluster The cluster to start with

Return value:
Returns the number of contiguous clusters in Cluster.
Modified:
Notes:

Referrals:


GetFreeClusterCount in the VolFatHandler.c

Function : GetFreeClusterCount

File: VolFatHandler.c
Description:
Gets the count of free clusters on a disk.

Parameters:
IN VOLUME_INFO      *Vol,               The volume structure
OUT UINT32          *FreeClusters       Free clusters on volume
OUT UINT32          *FreeClusterBlock   First cluster in a block of free clusters
OUT UINT32          *FreeBlockCount     Number of clusters in the free block.

Return value:
EFI_STATUS
Modified:
Notes:

Referrals:


GetSectorAddressDir in the VolFatHandler.c

Function : GetSectorAddressDir

File: VolFatHandler.c
Description:
Gets the absolute sector of a directory

Parameters:
FILE_HANDLE *fh - File Handle
UINT32      Cluster - Cluster of directory
UINT32      ClusterOffset - Offset in cluster
UINT32      *Sector - Absolute sector of directory
UINT32      *SectorOffset - Offset in sector

Return value: None
Modified:
Notes:
Use this routine if DIR region neeeds to be Read/Written.
For Data Region or FAT32 ROOT dir use GetAbsSectorInfo
For FAT12/16 root dir, Cluster is not valid. ClusterOffset
is the relative offset within the Root Dir Region.
Referrals:


MarkVolumeDirty in the VolFatHandler.c

Function : MarkVolumeDirty

File: VolFatHandler.c
Description:
Marks a volume as dirty so that the OS will know to fix it.

Parameters:
IN VOLUME_INFO      *vi - Volume info structure

Return value:
Modified:
Notes:

Referrals:


ReadFatClusterNumber in the VolFatHandler.c

Function : ReadFatClusterNumber

File: VolFatHandler.c
Description:
Reads a single cluster number from the specified fat table

Parameters:
IN VOLUME_INFO      *Vol,       The volume structure
IN UINTN            Cluster,    A cluster number
IN UINT8            FatNumber,  The fat number (0 or 1)
OUT UINT32          *Value      The returned cluster number

Return value:
EFI_STATUS
EFI_SUCCESS - Cluster read
other       - Cluster not read
Modified:
Notes:

Referrals:


ReturnFreeSpace in the VolFatHandler.c

Function : ReturnFreeSpace

File: VolFatHandler.c
Description:
Returns the amount of free space (in clusters) on a volume

Parameters:
IN VOLUME_INFO      *vi - Volume info structure

Return value:  UINT32 - free space in clusters
Modified:
Notes:

Referrals:


SectorToCluster in the VolFatHandler.c

Function : SectorToCluster

File: VolFatHandler.c
Description:
Converts an absolute sector number (relative to the beginning
of a volume) to a cluster number, and the sector within that
cluster.

Parameters:
IN VOLUME_INFO      *Vol,         The volume structure
OUT UINTN           Sector        The sector to be converted

Return value:
Sector - The sector offset in the returned cluster.
Returns the sector number.
Modified:
Notes:

Referrals:


ShrinkClusters in the VolFatHandler.c

Function : ShrinkClusters

File: VolFatHandler.c
Description:
Reduces the number of clusters used by a file
(part of it deleted).

Parameters:
IN VOLUME_INFO      *Vol,
IN UINT32           StartCluster,
IN UINT32           ClusterCount

Return value: EFI_STATUS
Modified:
Notes:
ClusterCount :  Total number of Final clusters starting from StartCluster
Referrals:


UnlinkFat in the VolFatHandler.c

Function : UnlinkFat

File: VolFatHandler.c
Description:
Unlinks (marks as free) all the clusters of the chain
starting from cluster Cluster (that must be part of a valid
chain) until the EOC.

Parameters:
IN VOLUME_INFO      *Vol,       The volume structure
IN UINTN            Cluster     A cluster number

Return value:
EFI_STATUS
EFI_SUCCESS - Chain unlinked.
other       - Chain not unlinked
Modified:
Notes:

Referrals:


UpdateFreeSpace in the VolFatHandler.c

Function : UpdateFreeSpace

File: VolFatHandler.c
Description:
Updates the volume info free space in clusters

Parameters:
IN VOLUME_INFO      *vi - Volume info structure

Return value: EFI_STATUS
Modified:
Notes:

Referrals:


WriteFatClusterNumber in the VolFatHandler.c

Function : WriteFatClusterNumber

File: VolFatHandler.c
Description:
Writes a single cluster number into the specified FAT table

Parameters:
IN VOLUME_INFO      *Vol,       The volume structure
IN UINTN            Cluster,    A cluster number
IN UINT8            FatNumber,  The fat number (0 or 1)
IN UINT32           Value       The cluster value to be written

Return value:
EFI_STATUS
EFI_SUCCESS - Cluster written
other       - Cluster not written
Modified:
Notes:

Referrals:


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
  • B
  • C
  • D
  • E
  • F
  • G
  • H
  • I
  • L
  • M
  • O
  • P
  • R
  • S
  • U
  • V
  • W
  • Z
Built on 16:58:27 03/28/11


Functions in Alphabetical Order

A

Function | Description
AddToDirList | Adds a directory entry to DirList Parameters: IN FILE_HANDLE *fh - File Handle Return Value: EFI_STATUS
AllocateAndLinkClusters | Allocates clusters for use in a file Parameters: IN VOLUME_INFO *Vol - Volume info IN UINT32 BeginCluster - Beginning cluster no. IN UINT32 Size - Size to allocate OUT UINT32 *FirstCluster - First cluster allocated OUT UINT32 *ClusterCount - Count of clusters allocated Return value: EFI_STATUS

Data Structure | Description
ACCESS_METHOD | Enumeration of access methods (read or write)

Built on 16:58:27 03/28/11


Functions in Alphabetical Order

B

Data Structure | Description
BPB_COMMON | Structure of the common part of the BIOS parameter block
BPB_FAT_12_16 | Structure of the FAT 12 or 16 unique part of the BPB
BPB_FAT_32 | Structure of the FAT 32 unique part of the BPB

Built on 16:58:27 03/28/11


Functions in Alphabetical Order

C

Function | Description
CheckCached | Checks to see if the media data we're working with is cached Parameters: VOLUME_INFO *vi, Pointer to volume info structure UINT64 AbsoluteOffset, Absolute offset of data UINT32 ByteCount, Byte Count of data UINT8 **cBuffer, Cache buffer UINT32 *cBufferLength Cache buffer length CACHE_HEADER **ch Cache header stucture REGIONS DataRegion See descriptions of REGION. Primarily used to dtermine caching algorithm. Return value: EFI_STATUS - Status of the operation
CheckFileWrite | Checks if file can be written to Parameters: FILE_HANDLE_INSTANCE *fhi - File Handle instance BOOLEAN IgnoreOpenMode - If true, ignore mode file was open with Return Value: EFI_STATUS
CheckforValidDirSpace | Cluster and Offset should point after the last valid directory entry. Parameters: IN VOLUME_INFO *Vi - Volume info structure IN BOOLEAN ROOTDIR - true if root directory IN UINT32 Cluster - Starting cluster IN UINT32 Offset - Offset in cluster IN UINT32 FreeBytesRequired IN UINT32 *FreeDirCluster IN UINT32 *FreeDirClusterOffset Return Value: EFI_STATUS
CloseFileHandle | Closes an open file Parameters: IN EFI_FILE_PROTOCOL *This - File Protocol instance Return Value: EFI_STATUS
ClusterToSector | Converts a custer number to an absolute sector number (relative to the beginning of the volume). Parameters: IN VOLUME_INFO *Vol, The volume structure OUT UINTN Cluster The cluster to be converted Return value: Returns the sector number.
CopyCharsToLfnSlot | Copies a character to the appropriate slot of a long name directory structure Parameters: DIR_ENTRY_LFN *Slot - Pointer to long name directory structure UINT32 *SlotPos - Pointer to slot position to fill UINT16 Ch - The character to be placed in the slot Return value: None
CreateDirectoryEntry | Creates a directory entry Parameters: IN FILE_HANDLE *fh - File handle IN CHAR16 *NextCompName - Unicode name to create OUT FILE_HANDLE **fh1 - File handle for new name IN UINT64 Attributes Return Value: EFI_STATUS
CreateDirEntryInDisk | Creates a directory entry on the disk Parameters: IN FILE_HANDLE *fh - File handle IN CHAR16 *NextCompName - Name to create IN UINT64 Attributes - Attributes for entry OUT UINT32 *DirCluster - Cluster of entry created OUT UINT32 *DirClusterOffset - Offset in cluster Return Value: EFI_STATUS
CreateFHFromDirEntryList | Creates a file handle from directory entry list Parameters: IN DIR_ENTRY_LIST *Del - Directory entry list IN FILE_HANDLE *fh - Directory file handle OUT FILE_HANDLE **fh1 - New file handle Return Value: EFI_STATUS
CreateFileHandleInstance | Creates an instance of a file handle Parameters: IN FILE_HANDLE *fh - Handle of the file to work on IN OUT FILE_HANDLE_INSTANCE **fhi - File handle instance IN UINT64 OpenMode - Open mode (read, write, both) Return Value: EFI_STATUS
CreateSpaceforCache | Creates space on media for cache Parameters: VOLUME_INFO *vi, Volume info structure UINT32 ByteCount, Bytes of space to create REGIONS DataRegion See descriptions of REGION. Primarily used to dtermine caching algorithm. Return value: None

Data Structure | Description
CACHE_HEADER | Structure containing cache header information

Built on 16:58:27 03/28/11


Functions in Alphabetical Order

D

Function | Description
DeleteFileHandle | Deletes a file Parameters: IN EFI_FILE_PROTOCOL *This - File Protocol instance Return Value: EFI_STATUS
DetectInstallVolume | Detects whether a valid volume is present or not Parameters: EFI_DISK_IO_PROTOCOL *DiskIo - Pointer to disk IO structure Parameters: EFI_BLOCK_IO_PROTOCOL *DiskIo - Pointer to boock IO structure Return value: EFI_STATUS - Status of the operation
DetectVolume | Detects the presence of a valid FAT volume Parameters: VOLUME_INFO *vi - Pointer to the volume info structure BOOLEAN StatusCheck - Only reads MBR if true Return value: EFI_STATUS - Status of the operation

Data Structure | Description
DIR_ENTRY_32 | Structure of a FAT32 directory entry
DIR_ENTRY_LFN | Structure of a long file name directory entry
DIR_ENTRY_LIST | Structure containing directory entry information

Built on 16:58:27 03/28/11


Functions in Alphabetical Order

E

Function | Description
EfiToFatTime | Converts date/time in EFI format to FAT format Parameters: EFI_TIME EfiTime - Time in EFI format UINT16 *Date - Pointer to returned date in FAT format UINT16 *Time - Pointer to returned time in FAT format Return value: None
ExtendFile | Extends a file on the disk (it is written to) Parameters: IN FILE_HANDLE_INSTANCE *fhi - File handle instance IN UINT32 Length - Length to extend Return value: EFI_STATUS
ExtractShortFileName | Extracts short file name from buffer Parameters: VOLUME_INFO *Vi, CHAR16 *lfn, UINT8 *Buffer Return value: EFI_STATUS - Status of the operation

Built on 16:58:27 03/28/11


Functions in Alphabetical Order

F

Function | Description
FatClusterNumberLocation | Returns the location (sector and offset) of a valid cluster number in the specified FAT. Parameters: IN VOLUME_INFO *Vol, The volume structure IN UINTN Cluster, A cluster number IN UINTN FatNumber, The fat number (0 or 1) Return value: EFI_STATUS EFI_SUCCESS - Cluster located OUT UINT32 *Sector, Fat sector in which cluster is located OUT UINT32 *SectorOffset Offset in the sector where cluster is other - Cluster not located
FatLfnIsValid | Checks for valid long file name Parameters: CHAR16 *Name Return value: BOOLEAN - True if long file name is valid
FatToEfiTime | Converts time/date in FAT format to EFI format Parameters: EFI_TIME *EfiTime - Ponter to returned time in EFI format UINT16 Date - Date in FAT format UINT16 Time - Time in FAT format Return value: None
FetchLongName | Fetch a long name from a directory entry Parameters: FILE_HANDLE *fh - File handle of the directory DIR_ENTRY_32 *Buffer - Buffer containing directory entry UINT32 BufferPos - Position in buffer UINT16 *Name - Unicode name placed here UINT32 ClusterNumber - Current directory cluster UINT32 ClusterSize - Cluster size in bytes Return Value: EFI_STATUS
FileSystemInitUnicodeCollation | Find the language Interface Parameters: EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this instance of driver binding protocol UINT8 *LandCode - Pointer to the language code EFI_UNICODE_COLLATION_PROTOCOL *gFileSystemUnicodeCollationInterface - Pointer to pointer to unicode collation interfact structure Return value: EFI_STATUS - Status of the operation
FindFreeClusters | Searches a volume for a free cluster in the specified range of clusters. Parameters: IN VOLUME_INFO *Vol, The volume structure IN UINT32 From, Cluster to start search at IN UINT32 To, End of search range OUT UINT32 *StartCluster Free cluster found IN OUT UINT32 *FreeClusters In - free clustere requested. Out - Free clusters found OUT UINT32 *TotalFree Total free clusters found in this search Return value: EFI_STATUS EFI_SUCCESS - Free cluster found, Vol->LastFreeCluster updated. EFI_NOT_FOUND - Free cluster not found. other - any other error.
FindMatchingDirEntry | Finds a directory entry matching the input name Parameters: IN FILE_HANDLE *fh - Directory file handle IN CHAR16 *NextCompName - Unicode name to match OUT DIR_ENTRY_LIST **Del - Directory list where found Return Value: EFI_STATUS
FindMatchingFH | Finds the Child FH, whose name matches with the input. In the Attributes, check whther both are file or Directory Parameters: IN VOLUME_INFO *Vi - Volume info structure IN CHAR16 *NextCompName - Unicode name to compare IN FILE_HANDLE *fh - Parent file handle OUT FILE_HANDLE **fh1 - Child file handle Return Value: EFI_STATUS
FindMatchingSFNDirEntry | Finds short file name directory entry matching input Parameters: IN FILE_HANDLE *fh - Directory file handle IN CHAR8 *ShortFileName - Name to find OUT DIR_ENTRY_LIST **Del - Directory list where found Return Value: EFI_STATUS
FindShortName | Return a valid short name Directory Entry from DirCluster beginning from ReadPosition. Parameters: UINT8 *Buffer - Buffer to search in UINT32 *Offset - Offset in buffer where entry found UINT32 BufferSize - Size of buffer Return Value: BOOLEAN - True = name found
FlushFileHandle | Flushes a file (writes any portion left in cache) Parameters: IN EFI_FILE_PROTOCOL *This - File Protocol instance Return Value: EFI_STATUS
FreeMemory | Parameters: VOLUME_INFO *Vi, VOID *Buffer Return value: EFI_STATUS - Status of the operation
FreeUpDirEntries | Free up cached directory entries Parameters: VOLUME_INFO *vi - Volume info FILE_HANDLE *pfh - Parent file handle Return Value: EFI_STATUS
FreeUpFHEntries | Release all file handles whose instance count is 0 Parameters: VOLUME_INFO *vi - Volume info FILE_HANDLE *pfh - Parent file handle Return Value: EFI_STATUS
FreeUpResources | Frees up resouces when volumes opened/closed Parameters: VOLUME_INFO *vi, Volume info structure EFI_STATUS Status Status to update file handles with Return value: EFI_STATUS - Status of the operation
fsAllocateMemory | Allocates memory for use by file system driver Parameters: VOLUME_INFO *vi VOID **Buffer UINT32 Size Return value: EFI_STATUS - Status of the operation
fsDeAllocateMemory | De-allocates memory used by file system driver Parameters: VOLUME_INFO *vi, void *Buffer Return value: EFI_STATUS - Status of the operation
FsReadMedia | Reads a specified no. of bytes from media at a specified location (abs. sector and offset in sector) Parameters: VOLUME_INFO *vi, Pointer to Volume Info structure UINT8 *Buffer, Valid Buffer pointer should be Passed UINT64 Sector, Start Sector number UINT32 Offset, Offset within the sector to read from UINT32 ByteCount, Number of bytes to read from the offset REGIONS DataRegion See descriptions of REGION. Primarily used to dtermine caching algorithm. typedef enum { RESERVED_REGION, FAT_REGION, DIRECTORY_REGION, DATA_REGION } REGIONS; Return value: EFI_STATUS - Status of the operation
FsWriteMedia | Writes a specified no. of bytes to media at a specified location (abs. sector and offset in sector) Parameters: VOLUME_INFO *vi, UINT8 *Buffer, Valid Buffer pointer should be Passed UINT64 Sector, Start Sector number UINT32 Offset, Offset within the sector to read from UINT32 ByteCount, Number of bytes to read from the offset REGIONS DataRegion See descriptions of REGION. Primarily used to dtermine caching algorithm. Return value: EFI_STATUS - Status of the operation

Data Structure | Description
FAT_DATE | File date structure
FAT_DATE_TIME | Contains FAT_TIME and FAT_DATE
FAT_TIME | File time structure
FAT_TYPE | Enumeration of fat types
FILE_HANDLE | Structure containing File Handle information
FILE_HANDLE_INSTANCE | Structure containing File Handle Instance information

Built on 16:58:27 03/28/11


Functions in Alphabetical Order

G

Function | Description
GenShortFilename | Generates a DOS 8.3 name component from a path Parameters: VOLUME_INFO *Vol - Pointer to volume information structure CHAR16 *InPath - Pointer to input path CHAR8 *ShortName - Pointer to generated DOS 8.3 name Return value: EFI_STATUS - Status of operation (EFI_SUCCESS)
GenUniqueShortFname | Generates a unique DOS 8.3 name from a possible long name Parameters: FILE_HANDLE *fh - Pointer to the file handle structure CHAR16 *LongName - Pointer to the possible long name CHAR8 *ShortName - Pointer to generated DOS 8.3 name BOOLEAN *LfnNeeded - Indicates a long name entry is needed for this input name Return value: EFI_STATUS - EFI_SUCCESS - Unique name generated EFI_ACCESS_DENIED - this name already exists on the volume
GetAbsSectorInfo | Gets the nunber of contiguous clusters starting from the specified cluster Parameters: IN VOLUME_INFO *Vol, The volume structure IN OUT UINT32 Cluster The cluster to start with Return value: Returns the number of contiguous clusters in Cluster.
GetClusterCount | Gets the cluster count of a file (usually a directory, because Dir_FileSize is zero for these, and we need to know the file size). Parameters: IN VOLUME_INFO *Vol, The volume structure IN OUT UINT32 Cluster In - the first cluster. Out - count Return value:
GetClusterPosition | Gets the nunber of contiguous clusters starting from the specified cluster Parameters: IN VOLUME_INFO *Vol, The volume structure IN OUT UINT32 Cluster The cluster to start with Return value: Returns the number of contiguous clusters in Cluster.
GetClustersRequired | Gets the amount of clusters required to store N blocks. Parameters: IN VOLUME_INFO *Vol, The volume structure IN UINT32 N A byte count Return value: Returns the required clusters.
GetContiguousClusters | Gets the nunber of contiguous clusters starting from the specified cluster Parameters: IN VOLUME_INFO *Vol, The volume structure IN OUT UINT32 Cluster The cluster to start with Return value: Returns the number of contiguous clusters in Cluster.
GetDirListAtPosition | Get directory list at current position in directory file Parameters: FILE_HANDLE *Pfh - Parent file handle UINT64 Position - Current position DIR_ENTRY_LIST **Del - Directory entry list Return Value:
GetfileInfo | Returns information on a file Parameters: FILE_HANDLE_INSTANCE *fh1 - Pointer to file handle instance UINTN *BufferSize - Pointer to size of buffer VOID *Buffer - Ponter to buffer for returned data Return value: EFI_STATUS - Status of the operation
GetFileInfoFromFH | Returns information on a file from it's handle Parameters: FILE_HANDLE_INSTANCE *fh1 - Pointer to file handle instance UINTN *BufferSize - Pointer to size of buffer VOID *Buffer - Ponter to buffer for returned data Return value: EFI_STATUS - Status of the operation
GetFreeClusterCount | Gets the count of free clusters on a disk. Parameters: IN VOLUME_INFO *Vol, The volume structure OUT UINT32 *FreeClusters Free clusters on volume OUT UINT32 *FreeClusterBlock First cluster in a block of free clusters OUT UINT32 *FreeBlockCount Number of clusters in the free block. Return value: EFI_STATUS
GetInfoFileHandle | Returns file info, system info, or the label of a volume depending on information type specified Parameters: EFI_FILE_PROTOCOL *This - Pointer to this instance of file protocol EFI_GUID *InformationType - Pointer to information type requested UINTN *BufferSize - Pointer to size of buffer VOID *Buffer - Pointer to buffer for returned info Return value: EFI_STATUS - Status of the operation
GetMemory | Gets memory for a buffer Parameters: MEM_HEADER *Mem, UINT32 Blocks, VOID **Buffer, BOOLEAN CLEAR Return value: EFI_STATUS - Status of the operation
GetNameComponent | Gets the name component from a path Parameters: CHAR16 *Path - Pointer to input path CHAR16 *Name - Pointer to output name Return value: CHAR16 * path truncated to name
GetNextCompName | Gets next component name in path Parameters: IN OUT CHAR16 **FileName, IN CHAR16 *NextCompName Return value: EFI_STATUS - Status of the operation
GetPositionFileHandle | Gets position in an open file handle Parameters: IN EFI_FILE_PROTOCOL *This, IN UINT64 *Position Return value: EFI_STATUS - Status of the operation
GetSectorAddressDir | Gets the absolute sector of a directory Parameters: FILE_HANDLE *fh - File Handle UINT32 Cluster - Cluster of directory UINT32 ClusterOffset - Offset in cluster UINT32 *Sector - Absolute sector of directory UINT32 *SectorOffset - Offset in sector Return value: None
GetSpaceforDirEntry | Enlarges directory to make space for a new entry Parameters: FILE_HANDLE *fh - Handle of file requireing entry UINT32 FreeBytesRequired - No. of bytes required for the new entry UINT32 *FreeDirCluster - Returned Cluster of free entry UINT32 *FreeDirClusterOffset - Offset of free entry BOOLEAN *LastDirEntry - True if new entry is the last one in the directory Return Value: EFI_STATUS - Status of the operation
GetSystemInfo | Returns file system info on a volume Parameters: VOLUME_INFO *vi - Pointer to volume info structure UINTN *BufferSize - Pointer to size of buffer VOID *Buffer - Ponter to buffer for returned data Return value: EFI_STATUS - Status of the operation
GetTempBuffer | Gets a temporary buffer Parameters: VOLUME_INFO *Vi - Volume info VOID **Buffer - Buffer Return Value: EFI_STATUS
GetVolumeLabel | Returns label of a volume Parameters: VOLUME_INFO *vi - Pointer to volume info structure UINTN *BufferSize - Pointer to size of buffer VOID *Buffer - Ponter to buffer for returned data Return value: EFI_STATUS - Status of the operation

Built on 16:58:27 03/28/11


Functions in Alphabetical Order

H

Function | Description
HandleDiskIoError | Handles disk read/write error Parameters: VOLUME_INFO *vi, Volume Info Structure Return value: None

Built on 16:58:27 03/28/11


Functions in Alphabetical Order

I

Function | Description
InitEFIFileInterface | Initializes the EFI_FILE_PROTOCOL interface Parameters: EFI_FILE_PROTOCOL *EFIFileInterface - Interface structure Return Value: EFI_STATUS
InternalMemAllocate | Adds allocated memory to internal manager Parameters: VOLUME_INFO *vi, UINT32 Size, VOID **Buffer, BOOLEAN CLEAR Return value: EFI_STATUS - Status of the operation
IsCacheHit | Parameters: VOLUME_INFO *vi, Pointer to volume info structure UINT64 AbsoluteOffset, Absolute offset of data UINT32 ByteCount, Byte Count of data UINT8 **cBuffer, Cache buffer UINT32 *cBufferLength Cache buffer length Return value: BOOLEAN - True if cache hit

Built on 16:58:27 03/28/11


Functions in Alphabetical Order

L

Function | Description
LfnChecksum | Calculate long file name entry section checksum Parameters: UINT8 *D - Pointer to long name entry Return Value: UINT8 - Checksum
LocateDel |
LocateFreeDirEntry | Locates a free entry in a directory Parameters: FILE_HANDLE *fh - Handle of file requireing entry UINT32 FreeBytesRequired - No. of bytes required for the new entry UINT32 *FreeDirCluster - Returned Cluster of free entry UINT32 *FreeDirClusterOffset - Offset of free entry Returned value: EFI_STATUS - Status of the operation

Built on 16:58:27 03/28/11


Functions in Alphabetical Order

M

Function | Description
MarkVolumeDirty | Marks a volume as dirty so that the OS will know to fix it. Parameters: IN VOLUME_INFO *vi - Volume info structure Return value:

Data Structure | Description
MEM_HEADER | Structure containing memory header information

Built on 16:58:27 03/28/11


Functions in Alphabetical Order

O

Function | Description
OpenFileHandle | Opens a file handle (when a file is opened) Parameters: IN EFI_FILE_PROTOCOL *This - File System Protocol instance OUT EFI_FILE_PROTOCOL **NewHandle - Handle of open file IN CHAR16 *FileName - Unicode name of file IN UINT64 OpenMode - Open mode (read, write, both) IN UINT64 Attributes - Attributes of open file Return Value: EFI_STATUS
OpenRoot | Opens the Root Directory on the Volume. Parameters: IN VOLUME_INFO *VolumeInfo - Volume Info Structure IN OUT FILE_HANDLE **Root - Root directory handle Return Value: EFI_STATUS
OpenVolume | Opens a file system Volume. Parameters: IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *This - File System Protocol Instance OUT EFI_FILE_PROTOCOL **Root Return Value: EFI_STATUS

Built on 16:58:27 03/28/11


Functions in Alphabetical Order

P

Function | Description
ProcessOpenFileHandle | Performs whatever is needed to process an open handle (create dir. entry, create instance, allocate clusters) Parameters: IN FILE_HANDLE_INSTANCE *ParentFi - Parent file handle instance IN CHAR16 **FileName - Unicode file name OUT EFI_FILE_PROTOCOL **NewHandle - New file handle IN UINT64 OpenMode - Open mode (read, write, both) IN UINT64 Attributes - File attributes Return Value: EFI_STATUS

Built on 16:58:27 03/28/11


Functions in Alphabetical Order

R

Function | Description
ReadAllDirectoryEntries | Reads entries in a directory Parameters: IN FILE_HANDLE *fh - File handle structure Return Value: EFI_STATUS
ReadClusterOfDirectoryEntries | Reads one cluster of directory entries Parameters: IN FILE_HANDLE *fh, IN UINT32 ClusterNumber -- 0-based number of which cluster to read Return Value: EFI_STATUS
ReadFatClusterNumber | Reads a single cluster number from the specified fat table Parameters: IN VOLUME_INFO *Vol, The volume structure IN UINTN Cluster, A cluster number IN UINT8 FatNumber, The fat number (0 or 1) OUT UINT32 *Value The returned cluster number Return value: EFI_STATUS EFI_SUCCESS - Cluster read other - Cluster not read
ReadFileHandle | Read from a file (normal file or directory) Parameters: IN EFI_FILE_PROTOCOL *This - File System Protocol instance IN OUT UINTN *BufferSize - Size of read buffer OUT VOID *Buffer - Points to read buffer Return Value: EFI_STATUS
ReadFromFile | Reads a specified number of bytes from a file into a specified buffer, beginning at a specified position in the file. Updates Size to number of bytes read. Updates Position to position after data read. Parameters: IN FILE_HANDLE_INSTANCE *File - File handle instance IN OUT VOID *Buffer - Buffer to read into IN OUT UINT32 *Size - Size to read (updated with size read) IN REGIONS DataRegion - Region of disk (dir, fat, normal) Return Value: EFI_STATUS
ReadWriteExistingBlock | Reads or writes an existing file. If writing, writes only an existing block, with no new allocation. Parameters: IN FILE_HANDLE_INSTANCE *File - File handle instance IN OUT VOID *Buffer - Output biffer IN OUT UINT32 *Size - Size written or read IN REGIONS DataRegion - Region of disk used (dir, fat, normal) IN ACCESS_METHOD Method - Method (read or write) Return Value: EFI_STATUS
ReleaseTempBuffer | Releases a temporary buffer Parameters: VOLUME_INFO *Vi - Volume Info Return Value: EFI_STATUS
RemoveAllDirList | Removes all directory lists from cache (needs to be re-read) Parameters: FILE_HANDLE *lfh - list file handle Return Value: EFI_STATUS
RemoveDirList | Removes a directory list from cache Parameters: FILE_HANDLE *fh - Directory file handle DIR_ENTRY_LIST *Del - Directory list Return Value: EFI_STATUS
RemoveFH | Romoves file handle (closed file) Parameters: FILE_HANDLE *fh Return value: EFI_STATUS - Status of the operation
ReturnFreeSpace | Returns the amount of free space (in clusters) on a volume Parameters: IN VOLUME_INFO *vi - Volume info structure Return value: UINT32 - free space in clusters

Data Structure | Description
REGIONS | Enumeration of volume REGIONS

Built on 16:58:27 03/28/11


Functions in Alphabetical Order

S

Function | Description
SectorToCluster | Converts an absolute sector number (relative to the beginning of a volume) to a cluster number, and the sector within that cluster. Parameters: IN VOLUME_INFO *Vol, The volume structure OUT UINTN Sector The sector to be converted Return value: Sector - The sector offset in the returned cluster. Returns the sector number.
SetfileInfo | Sets the information on a file (updates dir entry) Parameters: FILE_HANDLE_INSTANCE *fh1 - Pointer to file handle instance UINTN *BufferSize - Pointer to size of buffer VOID *Buffer - Ponter to buffer containing new data Return value: EFI_STATUS - Status of the operation
SetInfoFileHandle | Sets file info Parameters: IN EFI_FILE_PROTOCOL *This, IN EFI_GUID *InformationType, IN UINTN BufferSize, IN VOID *Buffer Return Value: EFI_STATUS
SetPositionFileHandle | Sets position in an open file handle Parameters: IN FILE_HANDLE_INSTANCE *fhi, IN UINT64 Position Return value: EFI_STATUS - Status of the operation
SetPositionFileHandleThis | Sets position in current file handle instance Parameters: IN EFI_FILE_PROTOCOL *This, IN UINT64 Position Return value: EFI_STATUS - Status of the operation
SetSystemInfo | Sets the information in a volume label Parameters: VOLUME_INFO *vi - Pointer to volume info structure UINTN *BufferSize - Pointer to size of buffer VOID *Buffer - Ponter to buffer containing new data Return value: EFI_STATUS - Status of the operation
SetVolumeLabel | Updates the label on a volume Parameters: VOLUME_INFO *vi - Pointer to volume info structure UINTN *BufferSize - Pointer to size of buffer VOID *Buffer - Ponter to buffer containing new label Return value: EFI_STATUS - Status of the operation
ShrinkClusters | Reduces the number of clusters used by a file (part of it deleted). Parameters: IN VOLUME_INFO *Vol, IN UINT32 StartCluster, IN UINT32 ClusterCount Return value: EFI_STATUS
SimpleFileSystemCtlDriverName | Retrieves a Unicode string that is the user readable name of the EFI Driver. Parameters: EFI_COMPONENT_NAME_PROTOCOL This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. CHAR8 Language - A pointer to a three character ISO 639-2 language identifier. This is the language of the driver name that that the caller is requesting, and it must match one of the languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. CHAR16 DriverName - A pointer to the Unicode string to return. This Unicode string is the name of the driver specified by This in the language specified by Language. Return value: EFI_SUCCES - The Unicode string for the Driver specified by This and the language specified by Language was returned in DriverName. EFI_INVALID_PARAMETER - Language is NULL. EFI_INVALID_PARAMETER - DriverName is NULL. EFI_UNSUPPORTED - The driver specified by This does not support the language specified by Language.
SimpleFileSystemCtlGetControllerName | Retrieves a Unicode string that is the user readable name of the controller that is being managed by an EFI Driver. Parameters: EFI_COMPONENT_NAME_PROTOCOL This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. EFI_HANDLE ControllerHandle - The handle of a controller that the driver specified by This is managing. This handle specifies the controller whose name is to be returned. EFI_HANDLE ChildHandle - The handle of the child controller to retrieve the name of. This is an optional parameter that may be NULL. It will be NULL for device drivers. It will also be NULL for a bus drivers that wish to retrieve the name of the bus controller. It will not be NULL for a bus driver that wishes to retrieve the name of a child controller. CHAR8 Language - A pointer to a three character ISO 639-2 language identifier. This is the language of the controller name that that the caller is requesting, and it must match one of the languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. CHAR16 ControllerName - A pointer to the Unicode string to return. This Unicode string is the name of the controller specified by ControllerHandle and ChildHandle in the language specified by Language from the point of view of the driver specified by This. Return value: EFI_SUCCESS - The Unicode string for the user readable name in the language specified by Language for the driver specified by This was returned in DriverName. EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE. EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE. EFI_INVALID_PARAMETER - Language is NULL. EFI_INVALID_PARAMETER - ControllerName is NULL. EFI_UNSUPPORTED - The driver specified by This is not currently managing the controller specified by ControllerHandle and ChildHandle. EFI_UNSUPPORTED - The driver specified by This does not support the language specified by Language.
SimpleFileSystemEntryPoint | Installs gSimpleFileSystemDriverBinding protocol Parameters: EFI_HANDLE ImageHandle - Image handle for this driver image EFI_SYSTEM_TABLE *SystemTable - pointer to the EFI system table Return value: EFI_STATUS - Status of the operation
SimpleFileSystemStart | Installs Simple File Ssystem Protocol Parameters: EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this instance of driver binding protocol EFI_HANDLE Controller - Handle for this controller EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath Return value: EFI_STATUS - Status of the operation
SimpleFileSystemStop | Uninstall Simple File system Protocol Parameters: EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this instance of driver binding protocol EFI_HANDLE Controller - Handle for this controller EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath Return value: EFI_STATUS - Status of the operation
SimpleFileSystemSupported | Checks whether Simple File System Protocol can be installed on the controller or not. Parameters: EFI_DRIVER_BINDING_PROTOCOL *This - Pointer to this instance of driver binding protocol EFI_HANDLE Controller - Handle for this controller EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath Return value: EFI_STATUS - Status of the operation
SplitLFN | Splits a long file name into long name directory enties. Parameters: CHAR16 *LongName - Pointer to a long file name DIR_ENTRY_32 *ShortEntry - Pointer to the corresponding short directory entry DIR_ENTRY_LFN *Slot - The structure of the long directory entries to be filled Return value: EFI_STATUS - Status of the operation (EFI_SUCCESS)

Built on 16:58:27 03/28/11


Functions in Alphabetical Order

U

Function | Description
UnlinkFat | Unlinks (marks as free) all the clusters of the chain starting from cluster Cluster (that must be part of a valid chain) until the EOC. Parameters: IN VOLUME_INFO *Vol, The volume structure IN UINTN Cluster A cluster number Return value: EFI_STATUS EFI_SUCCESS - Chain unlinked. other - Chain not unlinked
UnloadSimpleFileSystemDriver | Unloads this driver Parameters: EFI_HANDLE ImageHandle - Image handle for this driver image Return value: EFI_STATUS - Status of the operation
UpdateAccAndWriteTime | Updates access and write times in a directory entry Parameters: DIR_ENTRY_LIST *del - pointer to the directory entry list structure Return value: EFI_STATUS - Status of the operation
UpdateAccDate | Updates the access date in a directory entry Parameters: DIR_ENTRY_LIST *del - pointer to the directory entry list structure Return value: EFI_STATUS - Status of the operation
UpdateAccDateRequired | Indicates when update of the access date of a file is required Parameters: DIR_ENTRY_LIST *del - pointer to the directory entry list structure Return value: BOOLEAN - True if update required
UpdateDirListFromFHDir | Updates directory list from file handle directory entry Parameters: FILE_HANDLE *fh - Pointer to file handle structure Return value: EFI_STATUS - Status of the operation
UpdateFreeSpace | Updates the volume info free space in clusters Parameters: IN VOLUME_INFO *vi - Volume info structure Return value: EFI_STATUS

Built on 16:58:27 03/28/11


Functions in Alphabetical Order

V

Function | Description
ValidateCurrentStatus | Validates status if file handle instance Parameters: FILE_HANDLE_INSTANCE *fhi Return value: EFI_STATUS - Status of the operation

Data Structure | Description
VOLUME_BPB | Structure of the Volume BIOS Parameter Block. Combines common, FAT 12-16, and FAT 32 parts
VOLUME_INFO | Structure containing all Volume Information

Built on 16:58:27 03/28/11


Functions in Alphabetical Order

W

Function | Description
Wcscmpcaseinsensitive | Case insensitive unicode string compare Parameters: CHAR16 *string1 - First string CHAR16 *string2 - Second string Return Value: INT - Difference where mis-matched
WriteFatClusterNumber | Writes a single cluster number into the specified FAT table Parameters: IN VOLUME_INFO *Vol, The volume structure IN UINTN Cluster, A cluster number IN UINT8 FatNumber, The fat number (0 or 1) IN UINT32 Value The cluster value to be written Return value: EFI_STATUS EFI_SUCCESS - Cluster written other - Cluster not written
WriteFileHandle | Writes to a file Parameters: IN EFI_FILE_PROTOCOL *This, IN OUT UINTN *BufferSize, IN VOID *Buffer Return Value: EFI_STATUS
WriteToFile | Writes a specified number of bytes to a file from a specified buffer, beginning at a specified position in the file. Updates Size to number of bytes written. Updates Position to position after data written. Parameters: IN FILE_HANDLE_INSTANCE *File - File handle instance IN OUT VOID *Buffer - Buffer to write from IN OUT UINT32 *Size - Size to write (updated with written) IN REGIONS DataRegion - Data region (dir, fat, normal) Return Value: EFI_STATUS

Built on 16:58:27 03/28/11


Functions in Alphabetical Order

Z

Function | Description
Zeromemory | Zeros the contents of a specified memory location Parameters: VOID *Buffer - location of memory to zero UINT32 Size - Size in bytes to zero Return Value: none
ZeroOutdisk | Zeros out directory region of disk Parameters: IN VOLUME_INFO *Vi - Volume info structure IN UINT32 Cluster - Cluster in directory region to zero IN UINT32 ClusterOffset - Offset in cluster IN UINT32 Size - Size to zero Return value: EFI_STATUS

Built on 16:58:27 03/28/11


General Information

Built on 15:30:29 05/05/11