From 8d8daecb5435d879c1b1244d51876f37359759a3 Mon Sep 17 00:00:00 2001 From: lgao4 Date: Thu, 5 Apr 2007 09:00:46 +0000 Subject: [PATCH] Clean up the following module msa files, they are edkmodule package ftwlit, Crc32SectionExtract, NullMemoryTest, PeiMemoryTest, MonotonicCounter modules. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2542 6f19259b-4bc3-4df7-8a09-765794883524 --- EdkModulePkg/EdkModulePkg.fpd | 820 ++++++++++++++---- .../FaultTolerantWriteLite/Dxe/FtwLite.c | 26 +- .../FaultTolerantWriteLite/Dxe/FtwLite.msa | 21 +- .../FaultTolerantWriteLite/Dxe/FtwMisc.c | 22 +- .../FaultTolerantWriteLite/Dxe/FtwWorkSpace.c | 36 +- .../Dxe/Ia32/Ia32FtwMisc.c | 26 +- .../Dxe/Crc32SectionExtract.c | 13 +- .../Dxe/Crc32SectionExtract.h | 5 +- .../Dxe/Crc32SectionExtract.msa | 19 +- .../Crc32SectionExtract/Dxe/GuidedSection.c | 21 +- .../Crc32SectionExtract/Dxe/GuidedSection.h | 5 +- .../GenericMemoryTest/Dxe/NullMemoryTest.c | 4 +- .../GenericMemoryTest/Dxe/NullMemoryTest.msa | 13 +- .../GenericMemoryTest/Pei/BaseMemoryTest.c | 5 +- .../GenericMemoryTest/Pei/BaseMemoryTest.h | 4 +- .../GenericMemoryTest/Pei/BaseMemoryTest.msa | 9 +- .../RuntimeDxe/MonotonicCounter.c | 16 +- .../RuntimeDxe/MonotonicCounter.msa | 20 +- EdkNt32Pkg/Nt32.fpd | 2 + EdkUnixPkg/Unix.fpd | 2 + 20 files changed, 751 insertions(+), 338 deletions(-) diff --git a/EdkModulePkg/EdkModulePkg.fpd b/EdkModulePkg/EdkModulePkg.fpd index 3dfed1183e..71db2f38c6 100644 --- a/EdkModulePkg/EdkModulePkg.fpd +++ b/EdkModulePkg/EdkModulePkg.fpd @@ -5804,186 +5804,6 @@ BS_DRIVER - - - - - - - - - - - - - - - - - - - - - - - - PcdStatusCodeUseHardSerial - 0x00010027 - gEfiEdkModulePkgTokenSpaceGuid - BOOLEAN - 1 - FALSE - - - PcdStatusCodeUseEfiSerial - 0x00010026 - gEfiEdkModulePkgTokenSpaceGuid - BOOLEAN - 1 - FALSE - - - PcdStatusCodeUseRuntimeMemory - 0x00010028 - gEfiEdkModulePkgTokenSpaceGuid - BOOLEAN - 1 - FALSE - - - PcdStatusCodeUseDataHub - 0x00010029 - gEfiEdkModulePkgTokenSpaceGuid - BOOLEAN - 1 - FALSE - - - PcdStatusCodeUseOEM - 0x00010024 - gEfiEdkModulePkgTokenSpaceGuid - BOOLEAN - 1 - FALSE - - - PcdStatusCodeReplayInSerial - 0x0001002a - gEfiEdkModulePkgTokenSpaceGuid - BOOLEAN - 1 - FALSE - - - PcdStatusCodeReplayInDataHub - 0x0001002c - gEfiEdkModulePkgTokenSpaceGuid - BOOLEAN - 1 - FALSE - - - PcdStatusCodeReplayInRuntimeMemory - 0x0001002b - gEfiEdkModulePkgTokenSpaceGuid - BOOLEAN - 1 - FALSE - - - PcdStatusCodeReplayInOEM - 0x0001002d - gEfiEdkModulePkgTokenSpaceGuid - BOOLEAN - 1 - FALSE - - - PcdStatusCodeRuntimeMemorySize - 0x0001002e - gEfiEdkModulePkgTokenSpaceGuid - UINT16 - 2 - 4 - - - PcdDebugPropertyMask - 0x00000005 - gEfiMdePkgTokenSpaceGuid - UINT8 - 1 - 0x0f - - - PcdDebugClearMemoryValue - 0x00000008 - gEfiMdePkgTokenSpaceGuid - UINT8 - 1 - 0xAF - - - PcdDebugPrintErrorLevel - 0x00000006 - gEfiMdePkgTokenSpaceGuid - UINT32 - 4 - 0x80000000 - - - PcdMaximumUnicodeStringLength - 0x00000001 - gEfiMdePkgTokenSpaceGuid - UINT32 - 4 - 1000000 - - - PcdMaximumAsciiStringLength - 0x00000002 - gEfiMdePkgTokenSpaceGuid - UINT32 - 4 - 1000000 - - - PcdMaximumLinkedListLength - 0x00000003 - gEfiMdePkgTokenSpaceGuid - UINT32 - 4 - 1000000 - - - PcdSpinLockTimeout - 0x00000004 - gEfiMdePkgTokenSpaceGuid - UINT32 - 4 - 10000000 - - - PcdReportStatusCodePropertyMask - 0x00000007 - gEfiMdePkgTokenSpaceGuid - UINT8 - 1 - 0x06 - - - PcdUefiLibMaxPrintBufferSize - 0x101 - gEfiMdePkgTokenSpaceGuid - UINT32 - 4 - 320 - - - - NULL - BS_DRIVER - - @@ -21305,6 +21125,646 @@ BS_DRIVER + + + + + + + + + + + + + + + + + + + + + PcdDebugPropertyMask + 0x00000005 + gEfiMdePkgTokenSpaceGuid + UINT8 + 1 + 0x0f + + + PcdDebugClearMemoryValue + 0x00000008 + gEfiMdePkgTokenSpaceGuid + UINT8 + 1 + 0xAF + + + PcdDebugPrintErrorLevel + 0x00000006 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 0x80000000 + + + PcdReportStatusCodePropertyMask + 0x00000007 + gEfiMdePkgTokenSpaceGuid + UINT8 + 1 + 0x06 + + + PcdMaximumUnicodeStringLength + 0x00000001 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 1000000 + + + PcdMaximumAsciiStringLength + 0x00000002 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 1000000 + + + PcdMaximumLinkedListLength + 0x00000003 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 1000000 + + + PcdSpinLockTimeout + 0x00000004 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 10000000 + + + + NULL + BS_DRIVER + + + + + + + + + + + + + + + + + + + + + + + PcdMaximumUnicodeStringLength + 0x00000001 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 1000000 + + + PcdMaximumAsciiStringLength + 0x00000002 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 1000000 + + + PcdMaximumLinkedListLength + 0x00000003 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 1000000 + + + PcdSpinLockTimeout + 0x00000004 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 10000000 + + + PcdDebugPropertyMask + 0x00000005 + gEfiMdePkgTokenSpaceGuid + UINT8 + 1 + 0x0f + + + PcdDebugClearMemoryValue + 0x00000008 + gEfiMdePkgTokenSpaceGuid + UINT8 + 1 + 0xAF + + + PcdDebugPrintErrorLevel + 0x00000006 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 0x80000000 + + + PcdReportStatusCodePropertyMask + 0x00000007 + gEfiMdePkgTokenSpaceGuid + UINT8 + 1 + 0x06 + + + + NULL + BS_DRIVER + + + + + + + + + + + + + + + + + + + + + + + PcdMaximumUnicodeStringLength + 0x00000001 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 1000000 + + + PcdMaximumAsciiStringLength + 0x00000002 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 1000000 + + + PcdMaximumLinkedListLength + 0x00000003 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 1000000 + + + PcdSpinLockTimeout + 0x00000004 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 10000000 + + + PcdDebugPropertyMask + 0x00000005 + gEfiMdePkgTokenSpaceGuid + UINT8 + 1 + 0x0f + + + PcdDebugClearMemoryValue + 0x00000008 + gEfiMdePkgTokenSpaceGuid + UINT8 + 1 + 0xAF + + + PcdDebugPrintErrorLevel + 0x00000006 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 0x80000000 + + + PcdReportStatusCodePropertyMask + 0x00000007 + gEfiMdePkgTokenSpaceGuid + UINT8 + 1 + 0x06 + + + + NULL + BS_DRIVER + + + + + + + + + + + + + + + + + + + + + + + PcdDebugPropertyMask + 0x00000005 + gEfiMdePkgTokenSpaceGuid + UINT8 + 1 + 0x0f + + + PcdDebugClearMemoryValue + 0x00000008 + gEfiMdePkgTokenSpaceGuid + UINT8 + 1 + 0xAF + + + PcdDebugPrintErrorLevel + 0x00000006 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 0x80000000 + + + PcdReportStatusCodePropertyMask + 0x00000007 + gEfiMdePkgTokenSpaceGuid + UINT8 + 1 + 0x06 + + + PcdMaximumUnicodeStringLength + 0x00000001 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 1000000 + + + PcdMaximumAsciiStringLength + 0x00000002 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 1000000 + + + PcdMaximumLinkedListLength + 0x00000003 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 1000000 + + + PcdSpinLockTimeout + 0x00000004 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 10000000 + + + + NULL + BS_DRIVER + + + + + + + + + + + + + + + + + + + + + + + + + PcdMaximumUnicodeStringLength + 0x00000001 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 1000000 + + + PcdMaximumAsciiStringLength + 0x00000002 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 1000000 + + + PcdMaximumLinkedListLength + 0x00000003 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 1000000 + + + PcdSpinLockTimeout + 0x00000004 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 10000000 + + + PcdDebugPropertyMask + 0x00000005 + gEfiMdePkgTokenSpaceGuid + UINT8 + 1 + 0x0f + + + PcdDebugClearMemoryValue + 0x00000008 + gEfiMdePkgTokenSpaceGuid + UINT8 + 1 + 0xAF + + + PcdDebugPrintErrorLevel + 0x00000006 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 0x80000000 + + + PcdReportStatusCodePropertyMask + 0x00000007 + gEfiMdePkgTokenSpaceGuid + UINT8 + 1 + 0x06 + + + + NULL + BS_DRIVER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PcdStatusCodeUseHardSerial + 0x00010027 + gEfiEdkModulePkgTokenSpaceGuid + BOOLEAN + 1 + FALSE + + + PcdStatusCodeUseEfiSerial + 0x00010026 + gEfiEdkModulePkgTokenSpaceGuid + BOOLEAN + 1 + FALSE + + + PcdStatusCodeUseRuntimeMemory + 0x00010028 + gEfiEdkModulePkgTokenSpaceGuid + BOOLEAN + 1 + FALSE + + + PcdStatusCodeUseDataHub + 0x00010029 + gEfiEdkModulePkgTokenSpaceGuid + BOOLEAN + 1 + FALSE + + + PcdStatusCodeUseOEM + 0x00010024 + gEfiEdkModulePkgTokenSpaceGuid + BOOLEAN + 1 + FALSE + + + PcdStatusCodeReplayInSerial + 0x0001002a + gEfiEdkModulePkgTokenSpaceGuid + BOOLEAN + 1 + FALSE + + + PcdStatusCodeReplayInDataHub + 0x0001002c + gEfiEdkModulePkgTokenSpaceGuid + BOOLEAN + 1 + FALSE + + + PcdStatusCodeReplayInRuntimeMemory + 0x0001002b + gEfiEdkModulePkgTokenSpaceGuid + BOOLEAN + 1 + FALSE + + + PcdStatusCodeReplayInOEM + 0x0001002d + gEfiEdkModulePkgTokenSpaceGuid + BOOLEAN + 1 + FALSE + + + PcdStatusCodeRuntimeMemorySize + 0x0001002e + gEfiEdkModulePkgTokenSpaceGuid + UINT16 + 2 + 4 + + + PcdUefiLibMaxPrintBufferSize + 0x101 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 320 + + + PcdMaximumUnicodeStringLength + 0x00000001 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 1000000 + + + PcdMaximumAsciiStringLength + 0x00000002 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 1000000 + + + PcdMaximumLinkedListLength + 0x00000003 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 1000000 + + + PcdSpinLockTimeout + 0x00000004 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 10000000 + + + PcdReportStatusCodePropertyMask + 0x00000007 + gEfiMdePkgTokenSpaceGuid + UINT8 + 1 + 0x06 + + + PcdDebugPropertyMask + 0x00000005 + gEfiMdePkgTokenSpaceGuid + UINT8 + 1 + 0x0f + + + PcdDebugClearMemoryValue + 0x00000008 + gEfiMdePkgTokenSpaceGuid + UINT8 + 1 + 0xAF + + + PcdDebugPrintErrorLevel + 0x00000006 + gEfiMdePkgTokenSpaceGuid + UINT32 + 4 + 0x80000000 + + + + NULL + BS_DRIVER + + diff --git a/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/FtwLite.c b/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/FtwLite.c index f4c7e9199c..a120c7f3dd 100644 --- a/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/FtwLite.c +++ b/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/FtwLite.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -236,7 +236,7 @@ Returns: Ptr ); if (EFI_ERROR (Status)) { - gBS->FreePool (MyBuffer); + FreePool (MyBuffer); return EFI_ABORTED; } @@ -256,7 +256,7 @@ Returns: MyLength = FtwLiteDevice->SizeOfSpareBlock; Status = Fvb->Read (Fvb, Lba + Index, 0, &MyLength, Ptr); if (EFI_ERROR (Status)) { - gBS->FreePool (MyBuffer); + FreePool (MyBuffer); return EFI_ABORTED; } @@ -276,7 +276,7 @@ Returns: SpareBufferSize = FtwLiteDevice->SpareAreaLength; SpareBuffer = AllocatePool (SpareBufferSize); if (SpareBuffer == NULL) { - gBS->FreePool (MyBuffer); + FreePool (MyBuffer); return EFI_OUT_OF_RESOURCES; } @@ -291,8 +291,8 @@ Returns: Ptr ); if (EFI_ERROR (Status)) { - gBS->FreePool (MyBuffer); - gBS->FreePool (SpareBuffer); + FreePool (MyBuffer); + FreePool (SpareBuffer); return EFI_ABORTED; } @@ -314,8 +314,8 @@ Returns: Ptr ); if (EFI_ERROR (Status)) { - gBS->FreePool (MyBuffer); - gBS->FreePool (SpareBuffer); + FreePool (MyBuffer); + FreePool (SpareBuffer); return EFI_ABORTED; } @@ -324,7 +324,7 @@ Returns: // // Free MyBuffer // - gBS->FreePool (MyBuffer); + FreePool (MyBuffer); // // Set the SpareCompleteD in the FTW record, @@ -337,7 +337,7 @@ Returns: SPARE_COMPLETED ); if (EFI_ERROR (Status)) { - gBS->FreePool (SpareBuffer); + FreePool (SpareBuffer); return EFI_ABORTED; } @@ -349,7 +349,7 @@ Returns: // Status = FtwWriteRecord (FtwLiteDevice, Fvb); if (EFI_ERROR (Status)) { - gBS->FreePool (SpareBuffer); + FreePool (SpareBuffer); return EFI_ABORTED; } @@ -371,7 +371,7 @@ Returns: Ptr ); if (EFI_ERROR (Status)) { - gBS->FreePool (SpareBuffer); + FreePool (SpareBuffer); return EFI_ABORTED; } @@ -380,7 +380,7 @@ Returns: // // All success. // - gBS->FreePool (SpareBuffer); + FreePool (SpareBuffer); DEBUG ( (EFI_D_FTW_LITE, diff --git a/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/FtwLite.msa b/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/FtwLite.msa index 4e6dd26ba7..e2419a419a 100644 --- a/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/FtwLite.msa +++ b/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/FtwLite.msa @@ -7,7 +7,7 @@ 1.0 Component description file for FtwLite module. This driver provides fault tolerant write capability for block devices. - Copyright (c) 2006, Intel Corporation + Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -24,22 +24,14 @@ PcdLib - - + + DebugLib + Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg. UefiDriverEntryPoint - - UefiLib - - - BaseLib - - - HobLib - BaseMemoryLib @@ -69,7 +61,7 @@ gEfiFaultTolerantWriteLiteProtocolGuid - + gEfiPciRootBridgeIoProtocolGuid @@ -77,9 +69,6 @@ - - gEfiFlashMapHobGuid - gEfiSystemNvDataFvGuid diff --git a/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/FtwMisc.c b/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/FtwMisc.c index 025ec33f7b..eb334eaedd 100644 --- a/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/FtwMisc.c +++ b/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/FtwMisc.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -229,7 +229,7 @@ Returns: } } - gBS->FreePool (HandleBuffer); + FreePool (HandleBuffer); return Status; } @@ -329,7 +329,7 @@ Returns: Ptr ); if (EFI_ERROR (Status)) { - gBS->FreePool (Buffer); + FreePool (Buffer); return Status; } @@ -340,7 +340,7 @@ Returns: // Status = FtwEraseBlock (FtwLiteDevice, FvBlock, Lba); if (EFI_ERROR (Status)) { - gBS->FreePool (Buffer); + FreePool (Buffer); return EFI_ABORTED; } // @@ -352,14 +352,14 @@ Returns: Status = FvBlock->Write (FvBlock, Lba + Index, 0, &Count, Ptr); if (EFI_ERROR (Status)) { DEBUG ((EFI_D_FTW_LITE, "FtwLite: FVB Write block - %r\n", Status)); - gBS->FreePool (Buffer); + FreePool (Buffer); return Status; } Ptr += Count; } - gBS->FreePool (Buffer); + FreePool (Buffer); return Status; } @@ -433,7 +433,7 @@ Notes: Ptr ); if (EFI_ERROR (Status)) { - gBS->FreePool (Buffer); + FreePool (Buffer); return Status; } @@ -463,7 +463,7 @@ Notes: WORKING_BLOCK_INVALID ); if (EFI_ERROR (Status)) { - gBS->FreePool (Buffer); + FreePool (Buffer); return EFI_ABORTED; } @@ -478,7 +478,7 @@ Notes: FtwLiteDevice->FtwWorkBlockLba ); if (EFI_ERROR (Status)) { - gBS->FreePool (Buffer); + FreePool (Buffer); return EFI_ABORTED; } // @@ -496,7 +496,7 @@ Notes: ); if (EFI_ERROR (Status)) { DEBUG ((EFI_D_FTW_LITE, "FtwLite: FVB Write block - %r\n", Status)); - gBS->FreePool (Buffer); + FreePool (Buffer); return Status; } @@ -505,7 +505,7 @@ Notes: // // Since the memory buffer will not be used, free memory Buffer. // - gBS->FreePool (Buffer); + FreePool (Buffer); // // Update the VALID of the working block diff --git a/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/FtwWorkSpace.c b/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/FtwWorkSpace.c index 40e56ad1fb..00d7d8e912 100644 --- a/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/FtwWorkSpace.c +++ b/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/FtwWorkSpace.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -417,17 +417,11 @@ Returns: // Read all original data from working block to a memory buffer // TempBufferSize = FtwLiteDevice->SpareAreaLength; - Status = gBS->AllocatePool ( - EfiBootServicesData, - TempBufferSize, - (VOID **) &TempBuffer - ); - if (EFI_ERROR (Status)) { + TempBuffer = AllocateZeroPool (TempBufferSize); + if (TempBuffer != NULL) { return EFI_OUT_OF_RESOURCES; } - ZeroMem (TempBuffer, TempBufferSize); - Ptr = TempBuffer; for (Index = 0; Index < FtwLiteDevice->NumberOfSpareBlock; Index += 1) { Length = FtwLiteDevice->SizeOfSpareBlock; @@ -439,7 +433,7 @@ Returns: Ptr ); if (EFI_ERROR (Status)) { - gBS->FreePool (TempBuffer); + FreePool (TempBuffer); return EFI_ABORTED; } @@ -450,8 +444,8 @@ Returns: // Ptr = TempBuffer + ((UINTN) (FtwLiteDevice->FtwWorkSpaceLba - FtwLiteDevice->FtwWorkBlockLba)) * - FtwLiteDevice->SizeOfSpareBlock + - FtwLiteDevice->FtwWorkSpaceBase; + FtwLiteDevice->SizeOfSpareBlock + FtwLiteDevice->FtwWorkSpaceBase; + Status = CleanupWorkSpace ( FtwLiteDevice, Ptr, @@ -480,7 +474,7 @@ Returns: SpareBufferSize = FtwLiteDevice->SpareAreaLength; SpareBuffer = AllocatePool (SpareBufferSize); if (SpareBuffer == NULL) { - gBS->FreePool (TempBuffer); + FreePool (TempBuffer); return EFI_OUT_OF_RESOURCES; } @@ -495,8 +489,8 @@ Returns: Ptr ); if (EFI_ERROR (Status)) { - gBS->FreePool (TempBuffer); - gBS->FreePool (SpareBuffer); + FreePool (TempBuffer); + FreePool (SpareBuffer); return EFI_ABORTED; } @@ -517,8 +511,8 @@ Returns: Ptr ); if (EFI_ERROR (Status)) { - gBS->FreePool (TempBuffer); - gBS->FreePool (SpareBuffer); + FreePool (TempBuffer); + FreePool (SpareBuffer); return EFI_ABORTED; } @@ -527,14 +521,14 @@ Returns: // // Free TempBuffer // - gBS->FreePool (TempBuffer); + FreePool (TempBuffer); // // Write the spare block to working block // Status = FlushSpareBlockToWorkingBlock (FtwLiteDevice); if (EFI_ERROR (Status)) { - gBS->FreePool (SpareBuffer); + FreePool (SpareBuffer); return Status; } // @@ -552,14 +546,14 @@ Returns: Ptr ); if (EFI_ERROR (Status)) { - gBS->FreePool (SpareBuffer); + FreePool (SpareBuffer); return EFI_ABORTED; } Ptr += Length; } - gBS->FreePool (SpareBuffer); + FreePool (SpareBuffer); DEBUG ((EFI_D_FTW_LITE, "FtwLite: reclaim work space success\n")); diff --git a/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/Ia32/Ia32FtwMisc.c b/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/Ia32/Ia32FtwMisc.c index 85fa60e348..6425f29b2c 100644 --- a/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/Ia32/Ia32FtwMisc.c +++ b/EdkModulePkg/Universal/FirmwareVolume/FaultTolerantWriteLite/Dxe/Ia32/Ia32FtwMisc.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -76,10 +76,12 @@ Returns: Status = PciRootBridgeIo->Pci.Read ( PciRootBridgeIo, EfiPciWidthUint32, - EFI_PCI_ADDRESS (LPC_BUS_NUMBER, - LPC_DEVICE_NUMBER, - LPC_IF, - Offset), + EFI_PCI_ADDRESS ( + LPC_BUS_NUMBER, + LPC_DEVICE_NUMBER, + LPC_IF, + Offset + ), 1, &Value ); @@ -295,7 +297,7 @@ Notes: Status = GetSwapState (FtwLiteDevice, &TopSwap); if (EFI_ERROR (Status)) { DEBUG ((EFI_D_ERROR, "FtwLite: Get Top Swapped status - %r\n", Status)); - gBS->FreePool (Buffer); + FreePool (Buffer); return EFI_ABORTED; } @@ -305,7 +307,7 @@ Notes: // Status = GetFvbByAddress (FtwLiteDevice->SpareAreaAddress + FTW_BLOCK_SIZE, &BootFvb); if (EFI_ERROR (Status)) { - gBS->FreePool (Buffer); + FreePool (Buffer); return Status; } // @@ -323,7 +325,7 @@ Notes: Ptr ); if (EFI_ERROR (Status)) { - gBS->FreePool (Buffer); + FreePool (Buffer); return Status; } @@ -345,7 +347,7 @@ Notes: Ptr ); if (EFI_ERROR (Status)) { - gBS->FreePool (Buffer); + FreePool (Buffer); return Status; } @@ -363,7 +365,7 @@ Notes: // Status = FtwEraseSpareBlock (FtwLiteDevice); if (EFI_ERROR (Status)) { - gBS->FreePool (Buffer); + FreePool (Buffer); return EFI_ABORTED; } // @@ -381,14 +383,14 @@ Notes: ); if (EFI_ERROR (Status)) { DEBUG ((EFI_D_FTW_LITE, "FtwLite: FVB Write boot block - %r\n", Status)); - gBS->FreePool (Buffer); + FreePool (Buffer); return Status; } Ptr += Count; } - gBS->FreePool (Buffer); + FreePool (Buffer); // // Clear TopSwap bit diff --git a/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c b/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c index 7e196d6453..de9ba8372f 100644 --- a/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c +++ b/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -18,8 +18,7 @@ Abstract: Implements GUIDed section extraction protocol interface with a specific GUID: CRC32. - Please refer to the Tiano File Image Format Specification, - FV spec 0.3.6 + Please refer to the Framewokr Firmware Volume Specification 0.9. --*/ @@ -68,7 +67,7 @@ Returns: ); if (EFI_ERROR (Status)) { if (Crc32GuidedSep != NULL) { - gBS->FreePool (Crc32GuidedSep); + FreePool (Crc32GuidedSep); } return Status; @@ -84,7 +83,7 @@ Returns: Crc32GuidedSep ); if (EFI_ERROR (Status)) { - gBS->FreePool (Crc32GuidedSep); + FreePool (Crc32GuidedSep); return EFI_LOAD_ERROR; } @@ -199,8 +198,8 @@ Crc32ExtractSection ( Image = (UINT8 *) InputSection + (UINT32) (GuidedSectionHeader->DataOffset); *OutputSize = GetSectionLength ((EFI_COMMON_SECTION_HEADER *) InputSection) - (UINT32) GuidedSectionHeader->DataOffset; - Status = gBS->AllocatePool (EfiBootServicesData, *OutputSize, OutputBuffer); - if (EFI_ERROR (Status)) { + *OutputBuffer = AllocatePool (*OutputSize); + if (*OutputBuffer == NULL) { return EFI_OUT_OF_RESOURCES; } // diff --git a/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.h b/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.h index 387e637cd0..979c41de94 100644 --- a/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.h +++ b/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.h @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -16,8 +16,7 @@ Module Name: Abstract: Header file for Crc32SectionExtract.c - Please refer to Tiano File Image Format specification - FV spec 0.3.6 + Please refer to the Framewokr Firmware Volume Specification 0.9. --*/ diff --git a/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.msa b/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.msa index e12ca140bc..c12474f58b 100644 --- a/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.msa +++ b/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/Crc32SectionExtract.msa @@ -6,8 +6,8 @@ 51C9F40C-5243-4473-B265-B3C8FFAFF9FA 1.0 Component description file for Crc32SectionExtract module. - This driver implements GUIDed section extraction protocol interface with a specific GUID: CRC32. - Copyright (c) 2006, Intel Corporation + This driver implements CRC32 GUIDed section extraction protocol interface. + Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -22,24 +22,22 @@ Crc32SectionExtract - + DebugLib + Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg. UefiDriverEntryPoint - - UefiLib - - - BaseLib - BaseMemoryLib UefiBootServicesTableLib + + MemoryAllocationLib + Crc32SectionExtract.c @@ -50,10 +48,9 @@ - - + gEfiSecurityPolicyProtocolGuid diff --git a/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.c b/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.c index f6af017f77..87605cc055 100644 --- a/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.c +++ b/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -20,17 +20,9 @@ Abstract: extraction protocol. GUID specific implementation of each GUIDed section extraction protocol can be found in other files under the same directory. - - Please refer to the Tiano File Image Format Specification, - FV spec 0.3.6 - - Acronyms used Meaning - --*/ - -#include "Common/FirmwareFileSystem.h" #include "GuidedSection.h" EFI_STATUS @@ -58,15 +50,8 @@ Returns: // TODO: ExtractSection - add argument and description to function comment // TODO: EFI_OUT_OF_RESOURCES - add return value to function comment { - EFI_STATUS Status; - - *GuidedSep = NULL; - Status = gBS->AllocatePool ( - EfiBootServicesData, - sizeof (EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL), - (VOID **) GuidedSep - ); - if (EFI_ERROR (Status)) { + *GuidedSep = AllocatePool (sizeof (EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL)); + if (*GuidedSep == NULL) { return EFI_OUT_OF_RESOURCES; } diff --git a/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.h b/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.h index 1399edf4f6..885b05a013 100644 --- a/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.h +++ b/EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.h @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -16,8 +16,7 @@ Module Name: Abstract: Header file for GuidedSection.c - Please refer to Tiano File Image Format specification - FV spec 0.3.6 + Please refer to the Framewokr Firmware Volume Specification 0.9. --*/ diff --git a/EdkModulePkg/Universal/GenericMemoryTest/Dxe/NullMemoryTest.c b/EdkModulePkg/Universal/GenericMemoryTest/Dxe/NullMemoryTest.c index 7bad347f24..7a20a41312 100644 --- a/EdkModulePkg/Universal/GenericMemoryTest/Dxe/NullMemoryTest.c +++ b/EdkModulePkg/Universal/GenericMemoryTest/Dxe/NullMemoryTest.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -129,7 +129,7 @@ Returns: } } - gBS->FreePool (MemorySpaceMap); + FreePool (MemorySpaceMap); *RequireSoftECCInit = FALSE; return EFI_SUCCESS; diff --git a/EdkModulePkg/Universal/GenericMemoryTest/Dxe/NullMemoryTest.msa b/EdkModulePkg/Universal/GenericMemoryTest/Dxe/NullMemoryTest.msa index 3b746a5d3d..29fb2bb46a 100644 --- a/EdkModulePkg/Universal/GenericMemoryTest/Dxe/NullMemoryTest.msa +++ b/EdkModulePkg/Universal/GenericMemoryTest/Dxe/NullMemoryTest.msa @@ -6,8 +6,9 @@ 96B5C032-DF4C-4b6e-8232-438DCF448D0E 1.0 Component description file for NullMemoryTest module. - This driver installs EFI_GENERIC_MEMORY_TEST_PROTOCOL to provide generic memory test functions. - Copyright (c) 2006, Intel Corporation + This driver installs EFI_GENERIC_MEMORY_TEST_PROTOCOL to + provide simple generic memory test functions. + Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -22,8 +23,9 @@ NullMemoryTest - + DebugLib + Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg. UefiDriverEntryPoint @@ -32,14 +34,11 @@ DxeServicesTableLib - BaseLib + UefiBootServicesTableLib MemoryAllocationLib - - UefiBootServicesTableLib - Common.h diff --git a/EdkModulePkg/Universal/GenericMemoryTest/Pei/BaseMemoryTest.c b/EdkModulePkg/Universal/GenericMemoryTest/Pei/BaseMemoryTest.c index 48ed607961..4cf51f4f0c 100644 --- a/EdkModulePkg/Universal/GenericMemoryTest/Pei/BaseMemoryTest.c +++ b/EdkModulePkg/Universal/GenericMemoryTest/Pei/BaseMemoryTest.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -20,7 +20,6 @@ Abstract: --*/ #include -#include static PEI_BASE_MEMORY_TEST_PPI mPeiBaseMemoryTestPpi = { BaseMemoryTest }; @@ -105,7 +104,7 @@ Returns: // // Make sure we don't try and test anything above the max physical address range // - ASSERT_EFI_ERROR (BeginAddress + MemoryLength < EFI_MAX_ADDRESS); + ASSERT (BeginAddress + MemoryLength < EFI_MAX_ADDRESS); switch (Operation) { case Extensive: diff --git a/EdkModulePkg/Universal/GenericMemoryTest/Pei/BaseMemoryTest.h b/EdkModulePkg/Universal/GenericMemoryTest/Pei/BaseMemoryTest.h index 15d6c61bd4..791a66c54c 100644 --- a/EdkModulePkg/Universal/GenericMemoryTest/Pei/BaseMemoryTest.h +++ b/EdkModulePkg/Universal/GenericMemoryTest/Pei/BaseMemoryTest.h @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -22,8 +22,6 @@ Abstract: #ifndef _PEI_BASE_MEMORY_TEST_H_ #define _PEI_BASE_MEMORY_TEST_H_ -#include - // // Some global define // diff --git a/EdkModulePkg/Universal/GenericMemoryTest/Pei/BaseMemoryTest.msa b/EdkModulePkg/Universal/GenericMemoryTest/Pei/BaseMemoryTest.msa index 09245a3393..95c5c274b4 100644 --- a/EdkModulePkg/Universal/GenericMemoryTest/Pei/BaseMemoryTest.msa +++ b/EdkModulePkg/Universal/GenericMemoryTest/Pei/BaseMemoryTest.msa @@ -6,8 +6,8 @@ 736EB068-8C01-47c5-964B-1C57BD5D4D64 1.0 Component description file for PeiBaseMemoryTestInit module. - This driver supports memory test in Pei Phase - Copyright (c) 2006, Intel Corporation + This driver provides memory test ppi for memory test in Pei Phase. + Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -22,14 +22,15 @@ PeiBaseMemoryTestInit - + DebugLib + Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg. PeimEntryPoint - PeiServicesLib + ReportStatusCodeLib diff --git a/EdkModulePkg/Universal/MonotonicCounter/RuntimeDxe/MonotonicCounter.c b/EdkModulePkg/Universal/MonotonicCounter/RuntimeDxe/MonotonicCounter.c index 478729ea82..da76b55e45 100644 --- a/EdkModulePkg/Universal/MonotonicCounter/RuntimeDxe/MonotonicCounter.c +++ b/EdkModulePkg/Universal/MonotonicCounter/RuntimeDxe/MonotonicCounter.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006, Intel Corporation +Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -256,13 +256,13 @@ Returns: // Read the last high part // BufferSize = sizeof (UINT32); - Status = gRT->GetVariable ( - mEfiMtcName, - &mEfiMtcGuid, - NULL, - &BufferSize, - &HighCount - ); + Status = EfiGetVariable ( + mEfiMtcName, + &mEfiMtcGuid, + NULL, + &BufferSize, + &HighCount + ); if (EFI_ERROR (Status)) { HighCount = 0; } diff --git a/EdkModulePkg/Universal/MonotonicCounter/RuntimeDxe/MonotonicCounter.msa b/EdkModulePkg/Universal/MonotonicCounter/RuntimeDxe/MonotonicCounter.msa index 375a9feb2d..291f2ea680 100644 --- a/EdkModulePkg/Universal/MonotonicCounter/RuntimeDxe/MonotonicCounter.msa +++ b/EdkModulePkg/Universal/MonotonicCounter/RuntimeDxe/MonotonicCounter.msa @@ -6,8 +6,8 @@ AD608272-D07F-4964-801E-7BD3B7888652 1.0 Component description file for MonotonicCounter module. - This module Produced the Monotonic Counter Services as defined in the DXE CIS. - Copyright (c) 2006, Intel Corporation + This module produces UEFI Monotonic Counter Boot and Runtime Services. + Copyright (c) 2006 - 2007, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -25,20 +25,15 @@ BaseLib - - UefiLib - UefiDriverEntryPoint UefiRuntimeLib - + DebugLib - - - MemoryAllocationLib + Recommended libary Instance is PeiDxeDebugLibReportStatusCode instance in MdePkg. UefiBootServicesTableLib @@ -54,19 +49,12 @@ - gEfiMonotonicCounterArchProtocolGuid - - - 0x004D 0x0054 0x0043 - gMTCGuid - - EFI_SPECIFICATION_VERSION 0x00020000 EDK_RELEASE_VERSION 0x00020000 diff --git a/EdkNt32Pkg/Nt32.fpd b/EdkNt32Pkg/Nt32.fpd index f9b0c58ecc..efc30cdb93 100644 --- a/EdkNt32Pkg/Nt32.fpd +++ b/EdkNt32Pkg/Nt32.fpd @@ -1531,6 +1531,8 @@ + + diff --git a/EdkUnixPkg/Unix.fpd b/EdkUnixPkg/Unix.fpd index 372a368ad1..463eddeadd 100644 --- a/EdkUnixPkg/Unix.fpd +++ b/EdkUnixPkg/Unix.fpd @@ -1529,6 +1529,8 @@ + + -- 2.39.2