summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ba73bc0)
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
-EventNofitySignalAllNullEvent (\r
+EventNotifySignalAllNullEvent (\r
IN EFI_EVENT Event,\r
IN VOID *Context\r
)\r
IN EFI_EVENT Event,\r
IN VOID *Context\r
)\r
//\r
if (Type & EFI_EVENT_NOTIFY_SIGNAL_ALL) {\r
Type &= ~EFI_EVENT_NOTIFY_SIGNAL_ALL;\r
//\r
if (Type & EFI_EVENT_NOTIFY_SIGNAL_ALL) {\r
Type &= ~EFI_EVENT_NOTIFY_SIGNAL_ALL;\r
- Function = EventNofitySignalAllNullEvent;\r
+ Function = EventNotifySignalAllNullEvent;\r
UINTN Height;\r
UINTN Width;\r
UINTN ImageIndex;\r
UINTN Height;\r
UINTN Width;\r
UINTN ImageIndex;\r
+ BOOLEAN IsAllocated;\r
+ \r
BmpHeader = (BMP_IMAGE_HEADER *) BmpImage;\r
if (BmpHeader->CharB != 'B' || BmpHeader->CharM != 'M') {\r
return EFI_UNSUPPORTED;\r
BmpHeader = (BMP_IMAGE_HEADER *) BmpImage;\r
if (BmpHeader->CharB != 'B' || BmpHeader->CharM != 'M') {\r
return EFI_UNSUPPORTED;\r
ImageHeader = Image;\r
\r
BltBufferSize = BmpHeader->PixelWidth * BmpHeader->PixelHeight * sizeof (EFI_UGA_PIXEL);\r
ImageHeader = Image;\r
\r
BltBufferSize = BmpHeader->PixelWidth * BmpHeader->PixelHeight * sizeof (EFI_UGA_PIXEL);\r
if (*UgaBlt == NULL) {\r
*UgaBltSize = BltBufferSize;\r
*UgaBlt = AllocatePool (*UgaBltSize);\r
if (*UgaBlt == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
if (*UgaBlt == NULL) {\r
*UgaBltSize = BltBufferSize;\r
*UgaBlt = AllocatePool (*UgaBltSize);\r
if (*UgaBlt == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
} else {\r
if (*UgaBltSize < BltBufferSize) {\r
*UgaBltSize = BltBufferSize;\r
} else {\r
if (*UgaBltSize < BltBufferSize) {\r
*UgaBltSize = BltBufferSize;\r
+ if (IsAllocated) {\r
+ gBS->FreePool (*UgaBlt);\r
+ *UgaBlt = NULL;\r
+ }\r
return EFI_UNSUPPORTED;\r
break;\r
};\r
return EFI_UNSUPPORTED;\r
break;\r
};\r
//\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
//\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
#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
Hob->MemoryAllocationHeader.MemoryLength = ModuleLength;\r
Hob->MemoryAllocationHeader.MemoryType = EfiBootServicesCode;\r
\r
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
CopyGuid (&Hob->ModuleName, ModuleName);\r
Hob->EntryPoint = EntryPoint;\r
}\r
\r
Hob->SizeOfMemorySpace = SizeOfMemorySpace;\r
Hob->SizeOfIoSpace = SizeOfIoSpace;\r
\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
Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;\r
Hob->AllocDescriptor.MemoryLength = Length;\r
Hob->AllocDescriptor.MemoryType = EfiConventionalMemory;\r
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
Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;\r
Hob->AllocDescriptor.MemoryLength = Length;\r
Hob->AllocDescriptor.MemoryType = MemoryType;\r
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
Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;\r
Hob->AllocDescriptor.MemoryLength = Length;\r
Hob->AllocDescriptor.MemoryType = MemoryType;\r
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