summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--EdkModulePkg/Core/Dxe/Event/event.c4
-rw-r--r--EdkModulePkg/Library/EdkGraphicsLib/Graphics.c9
-rw-r--r--MdePkg/Include/Common/StatusCode.h2
-rw-r--r--MdePkg/Library/PeiHobLib/HobLib.c24
4 files changed, 35 insertions, 4 deletions
diff --git a/EdkModulePkg/Core/Dxe/Event/event.c b/EdkModulePkg/Core/Dxe/Event/event.c
index ae6b0a849d..ade810c5c1 100644
--- a/EdkModulePkg/Core/Dxe/Event/event.c
+++ b/EdkModulePkg/Core/Dxe/Event/event.c
@@ -363,7 +363,7 @@ Returns:
static
VOID
EFIAPI
-EventNofitySignalAllNullEvent (
+EventNotifySignalAllNullEvent (
IN EFI_EVENT Event,
IN VOID *Context
)
@@ -426,7 +426,7 @@ Returns:
//
if (Type & EFI_EVENT_NOTIFY_SIGNAL_ALL) {
Type &= ~EFI_EVENT_NOTIFY_SIGNAL_ALL;
- Function = EventNofitySignalAllNullEvent;
+ Function = EventNotifySignalAllNullEvent;
}
//
diff --git a/EdkModulePkg/Library/EdkGraphicsLib/Graphics.c b/EdkModulePkg/Library/EdkGraphicsLib/Graphics.c
index 01c612abd3..52936e3c40 100644
--- a/EdkModulePkg/Library/EdkGraphicsLib/Graphics.c
+++ b/EdkModulePkg/Library/EdkGraphicsLib/Graphics.c
@@ -159,7 +159,8 @@ Returns:
UINTN Height;
UINTN Width;
UINTN ImageIndex;
-
+ BOOLEAN IsAllocated;
+
BmpHeader = (BMP_IMAGE_HEADER *) BmpImage;
if (BmpHeader->CharB != 'B' || BmpHeader->CharM != 'M') {
return EFI_UNSUPPORTED;
@@ -182,12 +183,14 @@ Returns:
ImageHeader = Image;
BltBufferSize = BmpHeader->PixelWidth * BmpHeader->PixelHeight * sizeof (EFI_UGA_PIXEL);
+ IsAllocated = FALSE;
if (*UgaBlt == NULL) {
*UgaBltSize = BltBufferSize;
*UgaBlt = AllocatePool (*UgaBltSize);
if (*UgaBlt == NULL) {
return EFI_OUT_OF_RESOURCES;
}
+ IsAllocated = TRUE;
} else {
if (*UgaBltSize < BltBufferSize) {
*UgaBltSize = BltBufferSize;
@@ -256,6 +259,10 @@ Returns:
break;
default:
+ if (IsAllocated) {
+ gBS->FreePool (*UgaBlt);
+ *UgaBlt = NULL;
+ }
return EFI_UNSUPPORTED;
break;
};
diff --git a/MdePkg/Include/Common/StatusCode.h b/MdePkg/Include/Common/StatusCode.h
index 474ed106f8..03b0cfcc3d 100644
--- a/MdePkg/Include/Common/StatusCode.h
+++ b/MdePkg/Include/Common/StatusCode.h
@@ -595,7 +595,7 @@ typedef struct {
//
#define EFI_SW_PEIM_PC_RECOVERY_BEGIN (EFI_SUBCLASS_SPECIFIC | 0x00000000)
#define EFI_SW_PEIM_PC_CAPSULE_LOAD (EFI_SUBCLASS_SPECIFIC | 0x00000001)
-#define EFI_SW_PEIM_PC_CAPSULE_START (EFI_SUBCLASS_SPECIFIC | 0x00000001)
+#define EFI_SW_PEIM_PC_CAPSULE_START (EFI_SUBCLASS_SPECIFIC | 0x00000002)
#define EFI_SW_PEIM_PC_RECOVERY_USER (EFI_SUBCLASS_SPECIFIC | 0x00000003)
#define EFI_SW_PEIM_PC_RECOVERY_AUTO (EFI_SUBCLASS_SPECIFIC | 0x00000004)
diff --git a/MdePkg/Library/PeiHobLib/HobLib.c b/MdePkg/Library/PeiHobLib/HobLib.c
index ce9f79f82c..60a0e8c5da 100644
--- a/MdePkg/Library/PeiHobLib/HobLib.c
+++ b/MdePkg/Library/PeiHobLib/HobLib.c
@@ -228,6 +228,11 @@ BuildModuleHob (
Hob->MemoryAllocationHeader.MemoryLength = ModuleLength;
Hob->MemoryAllocationHeader.MemoryType = EfiBootServicesCode;
+ //
+ // Zero the reserved space to match HOB spec
+ //
+ ZeroMem (Hob->MemoryAllocationHeader.Reserved, sizeof (Hob->MemoryAllocationHeader.Reserved));
+
CopyGuid (&Hob->ModuleName, ModuleName);
Hob->EntryPoint = EntryPoint;
}
@@ -418,6 +423,11 @@ BuildCpuHob (
Hob->SizeOfMemorySpace = SizeOfMemorySpace;
Hob->SizeOfIoSpace = SizeOfIoSpace;
+
+ //
+ // Zero the reserved space to match HOB spec
+ //
+ ZeroMem (Hob->Reserved, sizeof (Hob->Reserved));
}
/**
@@ -447,6 +457,11 @@ BuildStackHob (
Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;
Hob->AllocDescriptor.MemoryLength = Length;
Hob->AllocDescriptor.MemoryType = EfiConventionalMemory;
+
+ //
+ // Zero the reserved space to match HOB spec
+ //
+ ZeroMem (Hob->AllocDescriptor.Reserved, sizeof (Hob->AllocDescriptor.Reserved));
}
/**
@@ -478,6 +493,11 @@ BuildBspStoreHob (
Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;
Hob->AllocDescriptor.MemoryLength = Length;
Hob->AllocDescriptor.MemoryType = MemoryType;
+
+ //
+ // Zero the reserved space to match HOB spec
+ //
+ ZeroMem (Hob->AllocDescriptor.Reserved, sizeof (Hob->AllocDescriptor.Reserved));
}
/**
@@ -509,4 +529,8 @@ BuildMemoryAllocationHob (
Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;
Hob->AllocDescriptor.MemoryLength = Length;
Hob->AllocDescriptor.MemoryType = MemoryType;
+ //
+ // Zero the reserved space to match HOB spec
+ //
+ ZeroMem (Hob->AllocDescriptor.Reserved, sizeof (Hob->AllocDescriptor.Reserved));
}