The header file of HII Config Access protocol implementation of SecureBoot\r
configuration module.\r
\r
-Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
#include <Library/PrintLib.h>\r
#include <Library/PlatformSecureLib.h>\r
#include <Library/BaseCryptLib.h>\r
+#include <Library/FileExplorerLib.h>\r
+\r
#include <Guid/MdeModuleHii.h>\r
#include <Guid/AuthenticatedVariableFormat.h>\r
#include <Guid/FileSystemVolumeLabelInfo.h>\r
CHAR16 TargetName[1];\r
} ISCSI_DEVICE_PATH_WITH_NAME;\r
\r
-typedef enum _FILE_EXPLORER_DISPLAY_CONTEXT {\r
- FileExplorerDisplayFileSystem,\r
- FileExplorerDisplayDirectory,\r
- FileExplorerDisplayUnknown\r
-} FILE_EXPLORER_DISPLAY_CONTEXT;\r
-\r
-typedef enum _FILE_EXPLORER_STATE {\r
- FileExplorerStateInActive = 0,\r
- FileExplorerStateEnrollPkFile,\r
- FileExplorerStateEnrollKekFile,\r
- FileExplorerStateEnrollSignatureFileToDb,\r
- FileExplorerStateEnrollSignatureFileToDbx,\r
- FileExplorerStateEnrollSignatureFileToDbt,\r
- FileExplorerStateUnknown\r
-} FILE_EXPLORER_STATE;\r
-\r
typedef struct {\r
CHAR16 *Str;\r
UINTN Len;\r
UINTN MenuNumber;\r
} SECUREBOOT_MENU_OPTION;\r
\r
-extern SECUREBOOT_MENU_OPTION FsOptionMenu;\r
-extern SECUREBOOT_MENU_OPTION DirectoryMenu;\r
-\r
-typedef struct {\r
- UINTN Signature;\r
- LIST_ENTRY Link;\r
- UINTN OptionNumber;\r
- UINT16 *DisplayString;\r
- UINT16 *HelpString;\r
- EFI_STRING_ID DisplayStringToken;\r
- EFI_STRING_ID HelpStringToken;\r
- VOID *FileContext;\r
-} SECUREBOOT_MENU_ENTRY;\r
-\r
typedef struct {\r
- EFI_HANDLE Handle;\r
- EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
EFI_FILE_HANDLE FHandle;\r
UINT16 *FileName;\r
- EFI_FILE_SYSTEM_VOLUME_LABEL *Info;\r
-\r
- BOOLEAN IsRoot;\r
- BOOLEAN IsDir;\r
- BOOLEAN IsRemovableMedia;\r
- BOOLEAN IsLoadFile;\r
- BOOLEAN IsBootLegacy;\r
} SECUREBOOT_FILE_CONTEXT;\r
\r
\r
EFI_HII_HANDLE HiiHandle;\r
EFI_HANDLE DriverHandle;\r
\r
- FILE_EXPLORER_STATE FeCurrentState;\r
- FILE_EXPLORER_DISPLAY_CONTEXT FeDisplayContext;\r
-\r
- SECUREBOOT_MENU_ENTRY *MenuEntry;\r
SECUREBOOT_FILE_CONTEXT *FileContext;\r
\r
EFI_GUID *SignatureGUID;\r
} SECUREBOOT_CONFIG_PRIVATE_DATA;\r
\r
extern SECUREBOOT_CONFIG_PRIVATE_DATA mSecureBootConfigPrivateDateTemplate;\r
+extern SECUREBOOT_CONFIG_PRIVATE_DATA *gSecureBootPrivateData;\r
\r
#define SECUREBOOT_CONFIG_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('S', 'E', 'C', 'B')\r
#define SECUREBOOT_CONFIG_PRIVATE_FROM_THIS(a) CR (a, SECUREBOOT_CONFIG_PRIVATE_DATA, ConfigAccess, SECUREBOOT_CONFIG_PRIVATE_DATA_SIGNATURE)\r
);\r
\r
\r
-/**\r
- Update the file explorer page with the refreshed file system.\r
-\r
- @param[in] PrivateData Module private data.\r
- @param[in] KeyValue Key value to identify the type of data to expect.\r
-\r
- @retval TRUE Inform the caller to create a callback packet to exit file explorer.\r
- @retval FALSE Indicate that there is no need to exit file explorer.\r
-\r
-**/\r
-BOOLEAN\r
-UpdateFileExplorer (\r
- IN SECUREBOOT_CONFIG_PRIVATE_DATA *PrivateData,\r
- IN UINT16 KeyValue\r
- );\r
-\r
-\r
-/**\r
- Free resources allocated in Allocate Rountine.\r
-\r
- @param[in, out] MenuOption Menu to be freed\r
-\r
-**/\r
-VOID\r
-FreeMenu (\r
- IN OUT SECUREBOOT_MENU_OPTION *MenuOption\r
- );\r
-\r
-\r
/**\r
Read file content into BufferPtr, the size of the allocate buffer\r
is *FileSize plus AddtionAllocateSize.\r
IN UINTN BufferSize\r
);\r
\r
+/**\r
+ Update the PK form base on the input file path info.\r
+\r
+ @param FilePath Point to the file path.\r
+\r
+ @retval TRUE Exit caller function.\r
+ @retval FALSE Not exit caller function.\r
+**/\r
+BOOLEAN\r
+UpdatePKFromFile (\r
+ IN EFI_DEVICE_PATH_PROTOCOL *FilePath\r
+ );\r
+\r
+/**\r
+ Update the KEK form base on the input file path info.\r
+\r
+ @param FilePath Point to the file path.\r
+\r
+ @retval TRUE Exit caller function.\r
+ @retval FALSE Not exit caller function.\r
+**/\r
+BOOLEAN\r
+UpdateKEKFromFile (\r
+ IN EFI_DEVICE_PATH_PROTOCOL *FilePath\r
+ );\r
+\r
+/**\r
+ Update the DB form base on the input file path info.\r
+\r
+ @param FilePath Point to the file path.\r
+\r
+ @retval TRUE Exit caller function.\r
+ @retval FALSE Not exit caller function.\r
+**/\r
+BOOLEAN\r
+UpdateDBFromFile (\r
+ IN EFI_DEVICE_PATH_PROTOCOL *FilePath\r
+ );\r
+\r
+/**\r
+ Update the DBX form base on the input file path info.\r
+\r
+ @param FilePath Point to the file path.\r
+\r
+ @retval TRUE Exit caller function.\r
+ @retval FALSE Not exit caller function.\r
+**/\r
+BOOLEAN\r
+UpdateDBXFromFile (\r
+ IN EFI_DEVICE_PATH_PROTOCOL *FilePath\r
+ );\r
+\r
+/**\r
+ Update the DBT form base on the input file path info.\r
+\r
+ @param FilePath Point to the file path.\r
+\r
+ @retval TRUE Exit caller function.\r
+ @retval FALSE Not exit caller function.\r
+**/\r
+BOOLEAN\r
+UpdateDBTFromFile (\r
+ IN EFI_DEVICE_PATH_PROTOCOL *FilePath\r
+ );\r
+\r
#endif\r