]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. In event.c, a function's name is not spelled correctly, a typo.
authormikewuping <mikewuping@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 30 Oct 2006 07:47:44 +0000 (07:47 +0000)
committermikewuping <mikewuping@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 30 Oct 2006 07:47:44 +0000 (07:47 +0000)
2. In Graphics.c, Memory Leak in Graphics Library, ConvertBmpToUgaBlt().
3. In HobLib.c, PeiBuildHobModule and three other functions do not zero hob reserved data area according to HOB spec v0.9.
4. In statuscode.h, the number of definition of EFI_SW_PEIM_PC_CAPSULE_START is equal to EFI_SW_PEIM_PC_CAPSULE_LOAD.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1861 6f19259b-4bc3-4df7-8a09-765794883524

EdkModulePkg/Core/Dxe/Event/event.c
EdkModulePkg/Library/EdkGraphicsLib/Graphics.c
MdePkg/Include/Common/StatusCode.h
MdePkg/Library/PeiHobLib/HobLib.c

index ae6b0a849d297c7270e5e46e6f0e742ced7f1a0d..ade810c5c18f57731c56e485657570f274bb34a7 100644 (file)
@@ -363,7 +363,7 @@ Returns:
 static\r
 VOID\r
 EFIAPI\r
-EventNofitySignalAllNullEvent (\r
+EventNotifySignalAllNullEvent (\r
   IN EFI_EVENT                Event,\r
   IN VOID                     *Context\r
   )\r
@@ -426,7 +426,7 @@ Returns:
   //\r
   if (Type & EFI_EVENT_NOTIFY_SIGNAL_ALL) {\r
     Type &= ~EFI_EVENT_NOTIFY_SIGNAL_ALL;\r
-    Function = EventNofitySignalAllNullEvent;\r
+    Function = EventNotifySignalAllNullEvent;\r
   }\r
 \r
   //\r
index 01c612abd339bfc258e85c6070324ddf1be64b75..52936e3c40ae29de34b17362baacd7789f78f75c 100644 (file)
@@ -159,7 +159,8 @@ Returns:
   UINTN             Height;\r
   UINTN             Width;\r
   UINTN             ImageIndex;\r
-\r
+  BOOLEAN           IsAllocated;\r
+  \r
   BmpHeader = (BMP_IMAGE_HEADER *) BmpImage;\r
   if (BmpHeader->CharB != 'B' || BmpHeader->CharM != 'M') {\r
     return EFI_UNSUPPORTED;\r
@@ -182,12 +183,14 @@ Returns:
   ImageHeader   = Image;\r
 \r
   BltBufferSize = BmpHeader->PixelWidth * BmpHeader->PixelHeight * sizeof (EFI_UGA_PIXEL);\r
+  IsAllocated   = FALSE;\r
   if (*UgaBlt == NULL) {\r
     *UgaBltSize = BltBufferSize;\r
     *UgaBlt     = AllocatePool (*UgaBltSize);\r
     if (*UgaBlt == NULL) {\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
+    IsAllocated = TRUE;\r
   } else {\r
     if (*UgaBltSize < BltBufferSize) {\r
       *UgaBltSize = BltBufferSize;\r
@@ -256,6 +259,10 @@ Returns:
         break;\r
 \r
       default:\r
+        if (IsAllocated) {\r
+          gBS->FreePool (*UgaBlt);\r
+          *UgaBlt = NULL;\r
+        }\r
         return EFI_UNSUPPORTED;\r
         break;\r
       };\r
index 474ed106f8ebb773fab9f983491e9cf9352c3cac..03b0cfcc3d77db9015960c197732045a16002aeb 100644 (file)
@@ -595,7 +595,7 @@ typedef struct {
 //\r
 #define EFI_SW_PEIM_PC_RECOVERY_BEGIN (EFI_SUBCLASS_SPECIFIC | 0x00000000)\r
 #define EFI_SW_PEIM_PC_CAPSULE_LOAD   (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
-#define EFI_SW_PEIM_PC_CAPSULE_START  (EFI_SUBCLASS_SPECIFIC | 0x00000001)\r
+#define EFI_SW_PEIM_PC_CAPSULE_START  (EFI_SUBCLASS_SPECIFIC | 0x00000002)\r
 #define EFI_SW_PEIM_PC_RECOVERY_USER  (EFI_SUBCLASS_SPECIFIC | 0x00000003)\r
 #define EFI_SW_PEIM_PC_RECOVERY_AUTO  (EFI_SUBCLASS_SPECIFIC | 0x00000004)\r
 \r
index ce9f79f82c1f4ec38cd37d85855f65ccabc4bc36..60a0e8c5da6951a64526a96f3168c463a10ee663 100644 (file)
@@ -228,6 +228,11 @@ BuildModuleHob (
   Hob->MemoryAllocationHeader.MemoryLength      = ModuleLength;\r
   Hob->MemoryAllocationHeader.MemoryType        = EfiBootServicesCode;\r
 \r
+  //\r
+  // Zero the reserved space to match HOB spec\r
+  //\r
+  ZeroMem (Hob->MemoryAllocationHeader.Reserved, sizeof (Hob->MemoryAllocationHeader.Reserved));\r
+  \r
   CopyGuid (&Hob->ModuleName, ModuleName);\r
   Hob->EntryPoint = EntryPoint;\r
 }\r
@@ -418,6 +423,11 @@ BuildCpuHob (
 \r
   Hob->SizeOfMemorySpace = SizeOfMemorySpace;\r
   Hob->SizeOfIoSpace     = SizeOfIoSpace;\r
+\r
+  //\r
+  // Zero the reserved space to match HOB spec\r
+  //\r
+  ZeroMem (Hob->Reserved, sizeof (Hob->Reserved)); \r
 }\r
 \r
 /**\r
@@ -447,6 +457,11 @@ BuildStackHob (
   Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;\r
   Hob->AllocDescriptor.MemoryLength      = Length;\r
   Hob->AllocDescriptor.MemoryType        = EfiConventionalMemory;\r
+\r
+  //\r
+  // Zero the reserved space to match HOB spec\r
+  //\r
+  ZeroMem (Hob->AllocDescriptor.Reserved, sizeof (Hob->AllocDescriptor.Reserved));\r
 }\r
 \r
 /**\r
@@ -478,6 +493,11 @@ BuildBspStoreHob (
   Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;\r
   Hob->AllocDescriptor.MemoryLength      = Length;\r
   Hob->AllocDescriptor.MemoryType        = MemoryType;\r
+\r
+  //\r
+  // Zero the reserved space to match HOB spec\r
+  //\r
+  ZeroMem (Hob->AllocDescriptor.Reserved, sizeof (Hob->AllocDescriptor.Reserved));\r
 }\r
 \r
 /**\r
@@ -509,4 +529,8 @@ BuildMemoryAllocationHob (
   Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;\r
   Hob->AllocDescriptor.MemoryLength      = Length;\r
   Hob->AllocDescriptor.MemoryType        = MemoryType;\r
+  //\r
+  // Zero the reserved space to match HOB spec\r
+  //\r
+  ZeroMem (Hob->AllocDescriptor.Reserved, sizeof (Hob->AllocDescriptor.Reserved));\r
 }\r