TianoCore EDK2 master
|
#include "FatLitePeim.h"
Go to the source code of this file.
Macros | |
#define | CHAR_FAT_VALID 0x01 |
Functions | |
CHAR16 | ToUpper (IN CHAR16 Letter) |
EFI_STATUS | FatReadBlock (IN PEI_FAT_PRIVATE_DATA *PrivateData, IN UINTN BlockDeviceNo, IN EFI_PEI_LBA Lba, IN UINTN BufferSize, OUT VOID *Buffer) |
EFI_STATUS | FatGetCacheBlock (IN PEI_FAT_PRIVATE_DATA *PrivateData, IN UINTN BlockDeviceNo, IN UINT64 Lba, OUT CHAR8 **CachePtr) |
EFI_STATUS | FatReadDisk (IN PEI_FAT_PRIVATE_DATA *PrivateData, IN UINTN BlockDeviceNo, IN UINT64 StartingAddress, IN UINTN Size, OUT VOID *Buffer) |
VOID | EngFatToStr (IN UINTN FatSize, IN CHAR8 *Fat, OUT CHAR16 *Str) |
BOOLEAN | EngStriColl (IN PEI_FAT_PRIVATE_DATA *PrivateData, IN CHAR16 *Str1, IN CHAR16 *Str2) |
General purpose supporting routines for FAT recovery PEIM
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file FatLiteLib.c.
#define CHAR_FAT_VALID 0x01 |
Definition at line 12 of file FatLiteLib.c.
This version is different from the version in Unicode collation protocol in that this version strips off trailing blanks. Converts an 8.3 FAT file name using an OEM character set to a Null-terminated Unicode string. Here does not expand DBCS FAT chars.
FatSize | The size of the string Fat in bytes. |
Fat | A pointer to a Null-terminated string that contains an 8.3 file name using an OEM character set. |
Str | A pointer to a Null-terminated Unicode string. The string must be allocated in advance to hold FatSize Unicode characters |
Definition at line 307 of file FatLiteLib.c.
BOOLEAN EngStriColl | ( | IN PEI_FAT_PRIVATE_DATA * | PrivateData, |
IN CHAR16 * | Str1, | ||
IN CHAR16 * | Str2 | ||
) |
Performs a case-insensitive comparison of two Null-terminated Unicode strings.
PrivateData | Global memory map for accessing global variables |
Str1 | First string to perform case insensitive comparison. |
Str2 | Second string to perform case insensitive comparison. |
Definition at line 342 of file FatLiteLib.c.
EFI_STATUS FatGetCacheBlock | ( | IN PEI_FAT_PRIVATE_DATA * | PrivateData, |
IN UINTN | BlockDeviceNo, | ||
IN UINT64 | Lba, | ||
OUT CHAR8 ** | CachePtr | ||
) |
Find a cache block designated to specific Block device and Lba. If not found, invalidate an oldest one and use it. (LRU cache)
PrivateData | the global memory map. |
BlockDeviceNo | the Block device. |
Lba | the Logical Block Address |
CachePtr | Ptr to the starting address of the memory holding the data; |
EFI_SUCCESS | The function completed successfully. |
EFI_DEVICE_ERROR | Something error while accessing media. |
Definition at line 128 of file FatLiteLib.c.
EFI_STATUS FatReadBlock | ( | IN PEI_FAT_PRIVATE_DATA * | PrivateData, |
IN UINTN | BlockDeviceNo, | ||
IN EFI_PEI_LBA | Lba, | ||
IN UINTN | BufferSize, | ||
OUT VOID * | Buffer | ||
) |
Reads a block of data from the block device by calling underlying Block I/O service.
PrivateData | Global memory map for accessing global variables |
BlockDeviceNo | The index for the block device number. |
Lba | The logic block address to read data from. |
BufferSize | The size of data in byte to read. |
Buffer | The buffer of the |
EFI_DEVICE_ERROR | The specified block device number exceeds the maximum device number. |
EFI_DEVICE_ERROR | The maximum address has exceeded the maximum address of the block device. |
Definition at line 54 of file FatLiteLib.c.
EFI_STATUS FatReadDisk | ( | IN PEI_FAT_PRIVATE_DATA * | PrivateData, |
IN UINTN | BlockDeviceNo, | ||
IN UINT64 | StartingAddress, | ||
IN UINTN | Size, | ||
OUT VOID * | Buffer | ||
) |
Disk reading.
PrivateData | the global memory map; |
BlockDeviceNo | the block device to read; |
StartingAddress | the starting address. |
Size | the amount of data to read. |
Buffer | the buffer holding the data |
EFI_SUCCESS | The function completed successfully. |
EFI_DEVICE_ERROR | Something error. |
Definition at line 221 of file FatLiteLib.c.
CHAR16 ToUpper | ( | IN CHAR16 | Letter | ) |
Converts a union code character to upper case. This functions converts a unicode character to upper case. If the input Letter is not a lower-cased letter, the original value is returned.
Letter | The input unicode character. |
Definition at line 26 of file FatLiteLib.c.