Revision: 17297
http://sourceforge.net/p/edk2/code/17297
Author: oliviermartin
Date: 2015-05-05 14:58:57 +0000 (Tue, 05 May 2015)
Log Message:
-----------
ArmPkg/BdsLib: Exposed ShutdownUefiBootServices() in the BdsLib interface
Other libraries/modules could use it (eg: EFI Shell command `runaxf`).
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <[email protected]>
Reviewed-by: Ronald Cron <[email protected]>
Modified Paths:
--------------
trunk/edk2/ArmPkg/Include/Library/BdsLib.h
trunk/edk2/ArmPkg/Library/BdsLib/BdsInternal.h
trunk/edk2/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf
trunk/edk2/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmHwDxe.inf
trunk/edk2/ArmPlatformPkg/Library/ArmShellCmdRunAxf/ArmShellCmdRunAxf.inf
trunk/edk2/ArmPlatformPkg/Library/ArmShellCmdRunAxf/RunAxf.c
Modified: trunk/edk2/ArmPkg/Include/Library/BdsLib.h
===================================================================
--- trunk/edk2/ArmPkg/Include/Library/BdsLib.h 2015-05-05 14:56:51 UTC (rev
17296)
+++ trunk/edk2/ArmPkg/Include/Library/BdsLib.h 2015-05-05 14:58:57 UTC (rev
17297)
@@ -1,6 +1,6 @@
/** @file
*
-* Copyright (c) 2013, ARM Limited. All rights reserved.
+* Copyright (c) 2013-2015, ARM Limited. All rights reserved.
*
* This program and the accompanying materials
* are licensed and made available under the terms and conditions of the BSD
License
@@ -221,4 +221,12 @@
OUT UINTN *FileSize
);
+/**
+ * Call BS.ExitBootServices with the appropriate Memory Map information
+ */
+EFI_STATUS
+ShutdownUefiBootServices (
+ VOID
+ );
+
#endif
Modified: trunk/edk2/ArmPkg/Library/BdsLib/BdsInternal.h
===================================================================
--- trunk/edk2/ArmPkg/Library/BdsLib/BdsInternal.h 2015-05-05 14:56:51 UTC
(rev 17296)
+++ trunk/edk2/ArmPkg/Library/BdsLib/BdsInternal.h 2015-05-05 14:58:57 UTC
(rev 17297)
@@ -104,11 +104,6 @@
// BdsHelper.c
EFI_STATUS
-ShutdownUefiBootServices (
- VOID
- );
-
-EFI_STATUS
GetSystemMemoryResources (
LIST_ENTRY *ResourceList
);
Modified: trunk/edk2/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf
===================================================================
--- trunk/edk2/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf
2015-05-05 14:56:51 UTC (rev 17296)
+++ trunk/edk2/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmFvpDxe.inf
2015-05-05 14:58:57 UTC (rev 17297)
@@ -44,6 +44,7 @@
ArmLib
ArmPlatformLib
BaseMemoryLib
+ DxeServicesTableLib
MemoryAllocationLib
UefiDriverEntryPoint
UefiBootServicesTableLib
Modified: trunk/edk2/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmHwDxe.inf
===================================================================
--- trunk/edk2/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmHwDxe.inf
2015-05-05 14:56:51 UTC (rev 17296)
+++ trunk/edk2/ArmPlatformPkg/ArmVExpressPkg/ArmVExpressDxe/ArmHwDxe.inf
2015-05-05 14:58:57 UTC (rev 17297)
@@ -32,6 +32,7 @@
[LibraryClasses]
ArmShellCmdRunAxfLib
+ DxeServicesTableLib
MemoryAllocationLib
UefiDriverEntryPoint
Modified:
trunk/edk2/ArmPlatformPkg/Library/ArmShellCmdRunAxf/ArmShellCmdRunAxf.inf
===================================================================
--- trunk/edk2/ArmPlatformPkg/Library/ArmShellCmdRunAxf/ArmShellCmdRunAxf.inf
2015-05-05 14:56:51 UTC (rev 17296)
+++ trunk/edk2/ArmPlatformPkg/Library/ArmShellCmdRunAxf/ArmShellCmdRunAxf.inf
2015-05-05 14:58:57 UTC (rev 17297)
@@ -43,6 +43,7 @@
[LibraryClasses]
ArmLib
BaseLib
+ BdsLib
DebugLib
HiiLib
ShellLib
Modified: trunk/edk2/ArmPlatformPkg/Library/ArmShellCmdRunAxf/RunAxf.c
===================================================================
--- trunk/edk2/ArmPlatformPkg/Library/ArmShellCmdRunAxf/RunAxf.c
2015-05-05 14:56:51 UTC (rev 17296)
+++ trunk/edk2/ArmPlatformPkg/Library/ArmShellCmdRunAxf/RunAxf.c
2015-05-05 14:58:57 UTC (rev 17297)
@@ -15,11 +15,13 @@
**/
#include <Guid/GlobalVariable.h>
+
#include <Library/PrintLib.h>
#include <Library/HandleParsingLib.h>
#include <Library/DevicePathLib.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
+#include <Library/BdsLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/DebugLib.h>
@@ -36,64 +38,6 @@
STATIC
EFI_STATUS
-ShutdownUefiBootServices (
- VOID
- )
-{
- EFI_STATUS Status;
- UINTN MemoryMapSize;
- EFI_MEMORY_DESCRIPTOR *MemoryMap;
- UINTN MapKey;
- UINTN DescriptorSize;
- UINT32 DescriptorVersion;
- UINTN Pages;
-
- MemoryMap = NULL;
- MemoryMapSize = 0;
- Pages = 0;
-
- do {
- Status = gBS->GetMemoryMap (
- &MemoryMapSize,
- MemoryMap,
- &MapKey,
- &DescriptorSize,
- &DescriptorVersion
- );
- if (Status == EFI_BUFFER_TOO_SMALL) {
-
- Pages = EFI_SIZE_TO_PAGES (MemoryMapSize) + 1;
- MemoryMap = AllocatePages (Pages);
-
- //
- // Get System MemoryMap
- //
- Status = gBS->GetMemoryMap (
- &MemoryMapSize,
- MemoryMap,
- &MapKey,
- &DescriptorSize,
- &DescriptorVersion
- );
- }
-
- // Don't do anything between the GetMemoryMap() and ExitBootServices()
- if (!EFI_ERROR (Status)) {
- Status = gBS->ExitBootServices (gImageHandle, MapKey);
- if (EFI_ERROR (Status)) {
- FreePages (MemoryMap, Pages);
- MemoryMap = NULL;
- MemoryMapSize = 0;
- }
- }
- } while (EFI_ERROR (Status));
-
- return Status;
-}
-
-
-STATIC
-EFI_STATUS
PreparePlatformHardware (
VOID
)
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits