summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/DxeHstiLib/HstiAip.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/DxeHstiLib/HstiAip.c')
-rw-r--r--MdePkg/Library/DxeHstiLib/HstiAip.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/MdePkg/Library/DxeHstiLib/HstiAip.c b/MdePkg/Library/DxeHstiLib/HstiAip.c
index 1a3dfc148d..a2454ffeaa 100644
--- a/MdePkg/Library/DxeHstiLib/HstiAip.c
+++ b/MdePkg/Library/DxeHstiLib/HstiAip.c
@@ -43,16 +43,18 @@ HstiAipGetInfo (
if ((This == NULL) || (InformationBlock == NULL) || (InformationBlockSize == NULL)) {
return EFI_INVALID_PARAMETER;
}
+
if (!CompareGuid (InformationType, &gAdapterInfoPlatformSecurityGuid)) {
return EFI_UNSUPPORTED;
}
- HstiAip = HSTI_AIP_PRIVATE_DATA_FROM_THIS(This);
+ HstiAip = HSTI_AIP_PRIVATE_DATA_FROM_THIS (This);
*InformationBlock = AllocateCopyPool (HstiAip->HstiSize, HstiAip->Hsti);
if (*InformationBlock == NULL) {
return EFI_OUT_OF_RESOURCES;
}
+
*InformationBlockSize = HstiAip->HstiSize;
return EFI_SUCCESS;
}
@@ -93,6 +95,7 @@ HstiAipSetInfo (
if ((This == NULL) || (InformationBlock == NULL)) {
return EFI_INVALID_PARAMETER;
}
+
if (!CompareGuid (InformationType, &gAdapterInfoPlatformSecurityGuid)) {
return EFI_UNSUPPORTED;
}
@@ -101,16 +104,17 @@ HstiAipSetInfo (
return EFI_VOLUME_CORRUPTED;
}
- HstiAip = HSTI_AIP_PRIVATE_DATA_FROM_THIS(This);
+ HstiAip = HSTI_AIP_PRIVATE_DATA_FROM_THIS (This);
if (InformationBlockSize > HstiAip->HstiMaxSize) {
NewHsti = AllocateZeroPool (InformationBlockSize);
if (NewHsti == NULL) {
return EFI_OUT_OF_RESOURCES;
}
+
FreePool (HstiAip->Hsti);
- HstiAip->Hsti = NewHsti;
- HstiAip->HstiSize = 0;
+ HstiAip->Hsti = NewHsti;
+ HstiAip->HstiSize = 0;
HstiAip->HstiMaxSize = InformationBlockSize;
}
@@ -153,16 +157,17 @@ HstiAipGetSupportedTypes (
return EFI_INVALID_PARAMETER;
}
- *InfoTypesBuffer = AllocateCopyPool (sizeof(gAdapterInfoPlatformSecurityGuid), &gAdapterInfoPlatformSecurityGuid);
+ *InfoTypesBuffer = AllocateCopyPool (sizeof (gAdapterInfoPlatformSecurityGuid), &gAdapterInfoPlatformSecurityGuid);
if (*InfoTypesBuffer == NULL) {
return EFI_OUT_OF_RESOURCES;
}
+
*InfoTypesBufferCount = 1;
return EFI_SUCCESS;
}
-EFI_ADAPTER_INFORMATION_PROTOCOL mAdapterInformationProtocol = {
+EFI_ADAPTER_INFORMATION_PROTOCOL mAdapterInformationProtocol = {
HstiAipGetInfo,
HstiAipSetInfo,
HstiAipGetSupportedTypes,