Add some ldm/vldm optimized CopyMem routines. Add performance macros to BDS

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10388 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
andrewfish
2010-04-21 22:04:35 +00:00
parent d02b28d736
commit d39eb83cc5
47 changed files with 3962 additions and 2 deletions

View File

@@ -74,6 +74,10 @@ BdsEntry (
EFI_DEVICE_PATH_PROTOCOL *LoadImageDevicePath;
EFI_DEVICE_PATH_PROTOCOL *FileSystemDevicePath;
PERF_END (NULL, "DXE", NULL, 0);
PERF_START (NULL, "BDS", NULL, 0);
//
// Now do the EFI stuff
//

View File

@@ -30,6 +30,7 @@
#include <Library/PcdLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/PrintLib.h>
#include <Library/PerformanceLib.h>
#include <Protocol/Bds.h>
#include <Protocol/SerialIo.h>

View File

@@ -141,6 +141,7 @@ LoadPeCoffSectionFromFv (
Status = gBS->LoadImage (TRUE, gImageHandle, DevicePath, NULL, 0, &ImageHandle);
if (!EFI_ERROR (Status)) {
PERF_END (NULL, "BDS", NULL, 0);
Status = gBS->StartImage (ImageHandle, NULL, NULL);
}

View File

@@ -43,7 +43,7 @@
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
BaseMemoryLib|ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf
EfiResetSystemLib|BeagleBoardPkg/Library/ResetSystemLib/ResetSystemLib.inf
@@ -122,6 +122,9 @@
PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
PerformanceLib|MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf
# 1/123 faster than Stm or Vstm version
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
[LibraryClasses.common.PEI_CORE]
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf

View File

@@ -156,15 +156,27 @@ ImageHandleToPdbFileName (
{
EFI_STATUS Status;
EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
CHAR8 *Pdb;
CHAR8 *StripLeading;
Status = gBS->HandleProtocol (Handle, &gEfiLoadedImageProtocolGuid, (VOID **)&LoadedImage);
if (EFI_ERROR (Status)) {
return "";
}
return PeCoffLoaderGetPdbPointer (LoadedImage->ImageBase);
Pdb = PeCoffLoaderGetPdbPointer (LoadedImage->ImageBase);
StripLeading = AsciiStrStr (Pdb, "\\ARM\\");
if (StripLeading == NULL) {
StripLeading = AsciiStrStr (Pdb, "/ARM/");
if (StripLeading == NULL) {
return Pdb;
}
}
// Hopefully we hacked off the unneeded part
return (StripLeading + 5);
}
CHAR8 *mTokenList[] = {
"SEC",
"PEI",