40 OUT VOID **InformationBlock,
46 if ((This ==
NULL) || (InformationBlock ==
NULL) || (InformationBlockSize ==
NULL)) {
47 return EFI_INVALID_PARAMETER;
50 if (!
CompareGuid (InformationType, &gAdapterInfoPlatformSecurityGuid)) {
51 return EFI_UNSUPPORTED;
54 HstiAip = HSTI_AIP_PRIVATE_DATA_FROM_THIS (This);
57 if (*InformationBlock ==
NULL) {
58 return EFI_OUT_OF_RESOURCES;
61 *InformationBlockSize = HstiAip->HstiSize;
91 IN VOID *InformationBlock,
98 if ((This ==
NULL) || (InformationBlock ==
NULL)) {
99 return EFI_INVALID_PARAMETER;
102 if (!
CompareGuid (InformationType, &gAdapterInfoPlatformSecurityGuid)) {
103 return EFI_UNSUPPORTED;
107 return EFI_VOLUME_CORRUPTED;
110 HstiAip = HSTI_AIP_PRIVATE_DATA_FROM_THIS (This);
112 if (InformationBlockSize > HstiAip->HstiMaxSize) {
114 if (NewHsti ==
NULL) {
115 return EFI_OUT_OF_RESOURCES;
119 HstiAip->Hsti = NewHsti;
120 HstiAip->HstiSize = 0;
121 HstiAip->HstiMaxSize = InformationBlockSize;
124 CopyMem (HstiAip->Hsti, InformationBlock, InformationBlockSize);
125 HstiAip->HstiSize = InformationBlockSize;
159 if ((This ==
NULL) || (InfoTypesBuffer ==
NULL) || (InfoTypesBufferCount ==
NULL)) {
160 return EFI_INVALID_PARAMETER;
163 *InfoTypesBuffer =
AllocateCopyPool (
sizeof (gAdapterInfoPlatformSecurityGuid), &gAdapterInfoPlatformSecurityGuid);
164 if (*InfoTypesBuffer ==
NULL) {
165 return EFI_OUT_OF_RESOURCES;
168 *InfoTypesBufferCount = 1;
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
BOOLEAN EFIAPI CompareGuid(IN CONST GUID *Guid1, IN CONST GUID *Guid2)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
EFI_STATUS EFIAPI HstiAipGetSupportedTypes(IN EFI_ADAPTER_INFORMATION_PROTOCOL *This, OUT EFI_GUID **InfoTypesBuffer, OUT UINTN *InfoTypesBufferCount)
EFI_STATUS EFIAPI HstiAipGetInfo(IN EFI_ADAPTER_INFORMATION_PROTOCOL *This, IN EFI_GUID *InformationType, OUT VOID **InformationBlock, OUT UINTN *InformationBlockSize)
EFI_STATUS EFIAPI HstiAipSetInfo(IN EFI_ADAPTER_INFORMATION_PROTOCOL *This, IN EFI_GUID *InformationType, IN VOID *InformationBlock, IN UINTN InformationBlockSize)
BOOLEAN InternalHstiIsValidTable(IN VOID *HstiData, IN UINTN HstiSize)