]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Include/Library/PlatformBdsLib.h
Committing changes to the comments, after review with engineers.
[mirror_edk2.git] / IntelFrameworkModulePkg / Include / Library / PlatformBdsLib.h
index 2e4b0d86c80a88570f3adbcebcd8f6653e7dcb5b..d2099f142cc9222ff3bbe72577f1193abcc6eee0 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 /** @file\r
-  Platform BDS library definition. Platform can implement an\r
-  instances to support the platform specific behavior.\r
+  Platform BDS library definition. A platform can implement \r
+  instances to support platform-specific behavior.\r
 \r
 Copyright (c) 2008 - 2009, Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials\r
 \r
 Copyright (c) 2008 - 2009, Intel Corporation. <BR>\r
 All rights reserved. This program and the accompanying materials\r
@@ -16,12 +16,52 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #ifndef __PLATFORM_BDS_LIB_H_\r
 #define __PLATFORM_BDS_LIB_H_\r
 \r
 #ifndef __PLATFORM_BDS_LIB_H_\r
 #define __PLATFORM_BDS_LIB_H_\r
 \r
-#include <Protocol/Bds.h>\r
 #include <Protocol/GenericMemoryTest.h>\r
 #include <Library/GenericBdsLib.h>\r
 \r
 /**\r
 #include <Protocol/GenericMemoryTest.h>\r
 #include <Library/GenericBdsLib.h>\r
 \r
 /**\r
-  Platform Bds init. Include the platform firmware vendor, revision\r
+  Perform the memory test base on the memory test intensive level,\r
+  and update the memory resource.\r
+\r
+  @param  Level         The memory test intensive level.\r
+\r
+  @retval EFI_STATUS    Success test all the system memory and update\r
+                        the memory resource\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *BASEM_MEMORY_TEST)(\r
+  IN EXTENDMEM_COVERAGE_LEVEL Level\r
+  );\r
+\r
+/**\r
+  This routine is called to see if there are any capsules we need to process.\r
+  If the boot mode is not UPDATE, then we do nothing. Otherwise find the\r
+  capsule HOBS and produce firmware volumes for them via the DXE service.\r
+  Then call the dispatcher to dispatch drivers from them. Finally, check\r
+  the status of the updates.\r
+\r
+  This function should be called by BDS in case we need to do some\r
+  sort of processing even if there is no capsule to process. We\r
+  need to do this if an earlier update went away and we need to\r
+  clear the capsule variable so on the next reset PEI does not see it and\r
+  think there is a capsule available.\r
+\r
+  @param BootMode                 the current boot mode\r
+\r
+  @retval EFI_INVALID_PARAMETER   boot mode is not correct for an update\r
+  @retval EFI_SUCCESS             There is no error when processing capsule\r
+\r
+**/\r
+typedef \r
+EFI_STATUS\r
+(EFIAPI *PROCESS_CAPSULES)(\r
+  IN EFI_BOOT_MODE BootMode\r
+  );\r
+\r
+/**\r
+  Platform Bds initialization. Includes the platform firmware vendor, revision\r
   and so crc check.\r
 \r
 **/\r
   and so crc check.\r
 \r
 **/\r
@@ -38,17 +78,21 @@ PlatformBdsInit (
 \r
   @param  DriverOptionList        The header of the driver option link list\r
   @param  BootOptionList          The header of the boot option link list\r
 \r
   @param  DriverOptionList        The header of the driver option link list\r
   @param  BootOptionList          The header of the boot option link list\r
+  @param  ProcessCapsules         A pointer to ProcessCapsules()\r
+  @param  BaseMemoryTest          A pointer to BaseMemoryTest()\r
 \r
 **/\r
 VOID\r
 EFIAPI\r
 PlatformBdsPolicyBehavior (\r
   IN LIST_ENTRY                      *DriverOptionList,\r
 \r
 **/\r
 VOID\r
 EFIAPI\r
 PlatformBdsPolicyBehavior (\r
   IN LIST_ENTRY                      *DriverOptionList,\r
-  IN LIST_ENTRY                      *BootOptionList\r
+  IN LIST_ENTRY                      *BootOptionList,\r
+  IN PROCESS_CAPSULES                ProcessCapsules,\r
+  IN BASEM_MEMORY_TEST               BaseMemoryTest\r
   );\r
 \r
 /**\r
   );\r
 \r
 /**\r
-  Hook point after a boot attempt fails.\r
+  Hook point for a user-provided function, for after a boot attempt fails. \r
 \r
   @param  Option                  Pointer to Boot Option that failed to boot.\r
   @param  Status                  Status returned from failed boot.\r
 \r
   @param  Option                  Pointer to Boot Option that failed to boot.\r
   @param  Status                  Status returned from failed boot.\r
@@ -69,15 +113,15 @@ PlatformBdsBootFail (
   Hook point after a boot attempt succeeds. We don't expect a boot option to\r
   return, so the UEFI 2.0 specification defines that you will default to an\r
   interactive mode and stop processing the BootOrder list in this case. This\r
   Hook point after a boot attempt succeeds. We don't expect a boot option to\r
   return, so the UEFI 2.0 specification defines that you will default to an\r
   interactive mode and stop processing the BootOrder list in this case. This\r
-  is alos a platform implementation and can be customized by IBV/OEM.\r
+  is also a platform implementation, and can be customized by an IBV/OEM.\r
 \r
 \r
-  @param  Option                  Pointer to Boot Option that succeeded to boot.\r
+  @param  Option                  Pointer to Boot Option that successfully booted.\r
 \r
 **/\r
 VOID\r
 EFIAPI\r
 PlatformBdsBootSuccess (\r
 \r
 **/\r
 VOID\r
 EFIAPI\r
 PlatformBdsBootSuccess (\r
-  IN  BDS_COMMON_OPTION *Option\r
+  IN  BDS_COMMON_OPTION  *Option\r
   );\r
 \r
 \r
   );\r
 \r
 \r
@@ -85,11 +129,28 @@ PlatformBdsBootSuccess (
   This function locks platform flash that is not allowed to be updated during normal boot path.\r
   The flash layout is platform specific.\r
 \r
   This function locks platform flash that is not allowed to be updated during normal boot path.\r
   The flash layout is platform specific.\r
 \r
-  @retval EFI_SUCCESS             The non-updatable flash areas.\r
-**/\r
-EFI_STATUS\r
+  **/\r
+VOID\r
 EFIAPI\r
 PlatformBdsLockNonUpdatableFlash (\r
   VOID\r
   );\r
 EFIAPI\r
 PlatformBdsLockNonUpdatableFlash (\r
   VOID\r
   );\r
+\r
+/**\r
+  Lock the ConsoleIn device in system table. All key\r
+  presses will be ignored until the Password is typed in. The only way to\r
+  disable the password is to type it in to a ConIn device.\r
+\r
+  @param  Password        Password used to lock ConIn device.\r
+\r
+  @retval EFI_SUCCESS     lock the Console In Spliter virtual handle successfully.\r
+  @retval EFI_UNSUPPORTED Password not found\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+LockKeyboards (\r
+  IN  CHAR16    *Password\r
+  );\r
+\r
 #endif\r
 #endif\r