]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/DxeHstiLib/HstiDxe.h
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / DxeHstiLib / HstiDxe.h
1 /** @file
2
3 Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
4 SPDX-License-Identifier: BSD-2-Clause-Patent
5
6 **/
7
8 #ifndef _HSTI_DXE_H_
9 #define _HSTI_DXE_H_
10
11 #include <PiDxe.h>
12 #include <Library/BaseLib.h>
13 #include <Library/BaseMemoryLib.h>
14 #include <Library/MemoryAllocationLib.h>
15 #include <Library/UefiBootServicesTableLib.h>
16 #include <Library/DebugLib.h>
17
18 #include <IndustryStandard/Hsti.h>
19
20 #include <Protocol/AdapterInformation.h>
21
22 #define HSTI_AIP_PRIVATE_SIGNATURE SIGNATURE_32('H', 'S', 'T', 'I')
23
24 typedef struct {
25 UINT32 Signature;
26 LIST_ENTRY Link;
27 EFI_ADAPTER_INFORMATION_PROTOCOL Aip;
28 VOID *Hsti;
29 UINTN HstiSize;
30 UINTN HstiMaxSize;
31 } HSTI_AIP_PRIVATE_DATA;
32
33 #define HSTI_AIP_PRIVATE_DATA_FROM_THIS(a) \
34 CR (a, \
35 HSTI_AIP_PRIVATE_DATA, \
36 Aip, \
37 HSTI_AIP_PRIVATE_SIGNATURE \
38 )
39
40 #define HSTI_DEFAULT_ERROR_STRING_LEN 255
41
42 extern EFI_ADAPTER_INFORMATION_PROTOCOL mAdapterInformationProtocol;
43
44 /**
45 Return if input HSTI data follows HSTI specification.
46
47 @param HstiData HSTI data
48 @param HstiSize HSTI size
49
50 @retval TRUE HSTI data follows HSTI specification.
51 @retval FALSE HSTI data does not follow HSTI specification.
52 **/
53 BOOLEAN
54 InternalHstiIsValidTable (
55 IN VOID *HstiData,
56 IN UINTN HstiSize
57 );
58
59 #endif