TianoCore EDK2 master
|
#include "FvSimpleFileSystemInternal.h"
Go to the source code of this file.
Macros | |
#define | GUID_STRING_SIZE (37 * sizeof (CHAR16)) |
#define | FVFS_VOLUME_LABEL_PREFIX L"Firmware Volume: " |
#define | FVFS_VOLUME_LABEL_SIZE (sizeof (FVFS_VOLUME_LABEL_PREFIX) + GUID_STRING_SIZE - sizeof (CHAR16)) |
#define | FVFS_FALLBACK_VOLUME_LABEL L"Firmware Volume" |
Variables | |
EFI_UNICODE_COLLATION_PROTOCOL * | mUnicodeCollation = NULL |
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL | mSimpleFsTemplate |
EFI_DRIVER_BINDING_PROTOCOL | mDriverBinding |
This driver uses the EFI_FIRMWARE_VOLUME2_PROTOCOL to expose files in firmware volumes via the the EFI_SIMPLE_FILESYSTEM_PROTOCOL and EFI_FILE_PROTOCOL.
It will expose a single directory, containing one file for each file in the firmware volume. If a file has a UI section, its contents will be used as a filename. Otherwise, a string representation of the GUID will be used. Files of an executable type (That is PEIM, DRIVER, COMBINED_PEIM_DRIVER and APPLICATION) will have ".efi" added to their filename.
Its primary intended use is to be able to start EFI applications embedded in FVs from the UEFI shell. It is entirely read-only.
Copyright (c) 2014, ARM Limited. All rights reserved. Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file FvSimpleFileSystemEntryPoint.c.
#define FVFS_FALLBACK_VOLUME_LABEL L"Firmware Volume" |
Definition at line 32 of file FvSimpleFileSystemEntryPoint.c.
#define FVFS_VOLUME_LABEL_PREFIX L"Firmware Volume: " |
Definition at line 30 of file FvSimpleFileSystemEntryPoint.c.
#define FVFS_VOLUME_LABEL_SIZE (sizeof (FVFS_VOLUME_LABEL_PREFIX) + GUID_STRING_SIZE - sizeof (CHAR16)) |
Definition at line 31 of file FvSimpleFileSystemEntryPoint.c.
#define GUID_STRING_SIZE (37 * sizeof (CHAR16)) |
Definition at line 28 of file FvSimpleFileSystemEntryPoint.c.
EFI_STATUS EFIAPI FvSimpleFileSystemDriverStart | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | DriverBinding, |
IN EFI_HANDLE | ControllerHandle, | ||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath | OPTIONAL | ||
) |
Start this driver on ControllerHandle by opening a FV protocol and installing a SimpleFileSystem protocol on ControllerHandle.
DriverBinding | Protocol instance pointer. |
ControllerHandle | Handle of device to bind driver to |
RemainingDevicePath | Optional parameter use to pick a specific child device to start. |
EFI_SUCCESS | This driver is added to ControllerHandle |
EFI_ALREADY_STARTED | This driver is already running on ControllerHandle |
other | This driver does not support this device |
Definition at line 416 of file FvSimpleFileSystemEntryPoint.c.
EFI_STATUS EFIAPI FvSimpleFileSystemDriverStop | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | DriverBinding, |
IN EFI_HANDLE | ControllerHandle, | ||
IN UINTN | NumberOfChildren, | ||
IN EFI_HANDLE *ChildHandleBuffer | OPTIONAL | ||
) |
Stop this driver on ControllerHandle by removing SimpleFileSystem protocol and closing the FV protocol on ControllerHandle.
DriverBinding | Protocol instance pointer. |
ControllerHandle | Handle of device to stop driver on |
NumberOfChildren | Number of Handles in ChildHandleBuffer. If number of children is zero stop the entire bus driver. |
ChildHandleBuffer | List of Child Handles to Stop. |
EFI_SUCCESS | This driver is removed ControllerHandle |
other | This driver was not removed from this device |
Definition at line 551 of file FvSimpleFileSystemEntryPoint.c.
EFI_STATUS EFIAPI FvSimpleFileSystemDriverSupported | ( | IN EFI_DRIVER_BINDING_PROTOCOL * | DriverBinding, |
IN EFI_HANDLE | ControllerHandle, | ||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath | OPTIONAL | ||
) |
Test to see if this driver supports ControllerHandle.
DriverBinding | Protocol instance pointer. |
ControllerHandle | Handle of device to test |
RemainingDevicePath | Optional parameter use to pick a specific child device to start. |
EFI_SUCCESS | This driver supports this device |
EFI_ALREADY_STARTED | This driver is already running on this device |
other | This driver does not support this device |
Definition at line 384 of file FvSimpleFileSystemEntryPoint.c.
EFI_STATUS EFIAPI FvSimpleFileSystemEntryPoint | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
The user Entry Point for module FvSimpleFileSystem. The user code starts with this function.
[in] | ImageHandle | The firmware allocated handle for the EFI image. |
[in] | SystemTable | A pointer to the EFI System Table. |
EFI_SUCCESS | The entry point is executed successfully. |
other | Some error occurs when executing this entry point. |
Definition at line 659 of file FvSimpleFileSystemEntryPoint.c.
EFI_STATUS EFIAPI FvSimpleFileSystemOpenVolume | ( | IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL * | This, |
OUT EFI_FILE_PROTOCOL ** | RootFile | ||
) |
Open the root directory on a volume.
This | A pointer to the volume to open the root directory. |
RootFile | A pointer to the location to return the opened file handle for the root directory. |
EFI_SUCCESS | The device was opened. |
EFI_UNSUPPORTED | This volume does not support the requested file system type. |
EFI_NO_MEDIA | The device has no medium. |
EFI_DEVICE_ERROR | The device reported an error. |
EFI_VOLUME_CORRUPTED | The file system structures are corrupted. |
EFI_ACCESS_DENIED | The service denied access to the file. |
EFI_OUT_OF_RESOURCES | The volume was not opened due to lack of resources. |
EFI_MEDIA_CHANGED | The device has a different medium in it or the medium is no longer supported. Any existing file handles for this volume are no longer valid. To access the files on the new medium, the volume must be reopened with OpenVolume(). |
Definition at line 76 of file FvSimpleFileSystemEntryPoint.c.
EFI_STATUS InitializeUnicodeCollationSupport | ( | IN EFI_HANDLE | AgentHandle | ) |
Initialize Unicode Collation support.
It tries to locate Unicode Collation 2 protocol and matches it with current platform language code. If for any reason the first attempt fails, it then tries to use Unicode Collation Protocol.
AgentHandle | The handle used to open Unicode Collation (2) protocol. |
EFI_SUCCESS | The Unicode Collation (2) protocol has been successfully located. |
Others | The Unicode Collation (2) protocol has not been located. |
Definition at line 336 of file FvSimpleFileSystemEntryPoint.c.
EFI_STATUS InitializeUnicodeCollationSupportWorker | ( | IN EFI_HANDLE | AgentHandle, |
IN EFI_GUID * | ProtocolGuid, | ||
IN CONST CHAR16 * | VariableName, | ||
IN CONST CHAR8 * | DefaultLanguage | ||
) |
Worker function to initialize Unicode Collation support.
It tries to locate Unicode Collation (2) protocol and matches it with current platform language code.
AgentHandle | The handle used to open Unicode Collation (2) protocol. |
ProtocolGuid | The pointer to Unicode Collation (2) protocol GUID. |
VariableName | The name of the RFC 4646 or ISO 639-2 language variable. |
DefaultLanguage | The default language in case the RFC 4646 or ISO 639-2 language is absent. |
EFI_SUCCESS | The Unicode Collation (2) protocol has been successfully located. |
Others | The Unicode Collation (2) protocol has not been located. |
Definition at line 246 of file FvSimpleFileSystemEntryPoint.c.
EFI_DRIVER_BINDING_PROTOCOL mDriverBinding |
Definition at line 45 of file FvSimpleFileSystemEntryPoint.c.
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL mSimpleFsTemplate |
Definition at line 37 of file FvSimpleFileSystemEntryPoint.c.
EFI_UNICODE_COLLATION_PROTOCOL* mUnicodeCollation = NULL |
Definition at line 23 of file FvSimpleFileSystemEntryPoint.c.