1 /** @file 2 3 Copyright (c) 2015, Intel Corporation. All rights reserved.<BR> 4 This program and the accompanying materials 5 are licensed and made available under the terms and conditions of the BSD License 6 which accompanies this distribution. The full text of the license may be found at 7 http://opensource.org/licenses/bsd-license.php 8 9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 11 12 **/ 13 14 #ifndef _HSTI_DXE_H_ 15 #define _HSTI_DXE_H_ 16 17 #include <PiDxe.h> 18 #include <Library/BaseLib.h> 19 #include <Library/BaseMemoryLib.h> 20 #include <Library/MemoryAllocationLib.h> 21 #include <Library/UefiBootServicesTableLib.h> 22 #include <Library/DebugLib.h> 23 24 #include <IndustryStandard/Hsti.h> 25 26 #include <Protocol/AdapterInformation.h> 27 28 #define HSTI_AIP_PRIVATE_SIGNATURE SIGNATURE_32('H', 'S', 'T', 'I') 29 30 typedef struct { 31 UINT32 Signature; 32 LIST_ENTRY Link; 33 EFI_ADAPTER_INFORMATION_PROTOCOL Aip; 34 VOID *Hsti; 35 UINTN HstiSize; 36 UINTN HstiMaxSize; 37 } HSTI_AIP_PRIVATE_DATA; 38 39 #define HSTI_AIP_PRIVATE_DATA_FROM_THIS(a) \ 40 CR (a, \ 41 HSTI_AIP_PRIVATE_DATA, \ 42 Aip, \ 43 HSTI_AIP_PRIVATE_SIGNATURE \ 44 ) 45 46 #define HSTI_DEFAULT_ERROR_STRING_LEN 255 47 48 extern EFI_ADAPTER_INFORMATION_PROTOCOL mAdapterInformationProtocol; 49 50 /** 51 Return if input HSTI data follows HSTI specification. 52 53 @param HstiData HSTI data 54 @param HstiSize HSTI size 55 56 @retval TRUE HSTI data follows HSTI specification. 57 @retval FALSE HSTI data does not follow HSTI specification. 58 **/ 59 BOOLEAN 60 InternalHstiIsValidTable ( 61 IN VOID *HstiData, 62 IN UINTN HstiSize 63 ); 64 65 #endif