• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /** @file
2   This driver produces file explorer protocol layered on top of the FileExplorerLib from the MdeModulePkg.
3 
4 Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution.  The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9 
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 
13 **/
14 
15 #include <PiDxe.h>
16 
17 #include <Protocol/FileExplorer.h>
18 #include <Library/FileExplorerLib.h>
19 #include <Library/UefiBootServicesTableLib.h>
20 #include <Library/DebugLib.h>
21 #include <Library/UefiDriverEntryPoint.h>
22 
23 EFI_HANDLE  mFileExplorerThunkHandle = NULL;
24 
25 CONST EFI_FILE_EXPLORER_PROTOCOL mFileExplorerProtocol = {
26   ChooseFile
27 };
28 
29 /**
30   The user Entry Point for File explorer module.
31 
32   This is the entry point for Print DXE Driver. It installs the file explorer Protocol.
33 
34   @param[in] ImageHandle    The firmware allocated handle for the EFI image.
35   @param[in] SystemTable    A pointer to the EFI System Table.
36 
37   @retval EFI_SUCCESS       The entry point is executed successfully.
38   @retval Others            Some error occurs when executing this entry point.
39 
40 **/
41 EFI_STATUS
42 EFIAPI
FileExplorerEntryPoint(IN EFI_HANDLE ImageHandle,IN EFI_SYSTEM_TABLE * SystemTable)43 FileExplorerEntryPoint (
44   IN EFI_HANDLE           ImageHandle,
45   IN EFI_SYSTEM_TABLE     *SystemTable
46   )
47 {
48   EFI_STATUS  Status;
49 
50   Status = gBS->InstallMultipleProtocolInterfaces (
51                   &mFileExplorerThunkHandle,
52                   &gEfiFileExplorerProtocolGuid, &mFileExplorerProtocol,
53                   NULL
54                   );
55   ASSERT_EFI_ERROR (Status);
56 
57   return Status;
58 }
59