summaryrefslogtreecommitdiff
path: root/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPoint.h
diff options
context:
space:
mode:
Diffstat (limited to 'Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPoint.h')
-rw-r--r--Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPoint.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPoint.h b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPoint.h
new file mode 100644
index 0000000000..4a7429f569
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointLib/SmmTestPoint.h
@@ -0,0 +1,71 @@
+/** @file
+
+ Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+ This program and the accompanying materials
+ are licensed and made available under the terms and conditions of the BSD License
+ which accompanies this distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef _SMM_TEST_POINT_DXE_H_
+#define _SMM_TEST_POINT_DXE_H_
+
+#include <PiSmm.h>
+#include <PiDxe.h>
+#include <Library/BaseLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/MemoryAllocationLib.h>
+#include <Library/SmmServicesTableLib.h>
+#include <Library/SmmMemLib.h>
+#include <Library/DebugLib.h>
+#include <Library/TestPointLib.h>
+
+#include <Protocol/AdapterInformation.h>
+
+#define TEST_POINT_AIP_PRIVATE_SIGNATURE SIGNATURE_32('T', 'S', 'P', 'T')
+
+typedef struct {
+ UINT32 Signature;
+ EFI_ADAPTER_INFORMATION_PROTOCOL Aip;
+ VOID *TestPoint;
+ UINTN TestPointSize;
+ UINTN TestPointMaxSize;
+} TEST_POINT_AIP_PRIVATE_DATA;
+
+#define TEST_POINT_AIP_PRIVATE_DATA_FROM_THIS(a) \
+ CR (a, \
+ TEST_POINT_AIP_PRIVATE_DATA, \
+ Aip, \
+ TEST_POINT_AIP_PRIVATE_SIGNATURE \
+ )
+
+extern EFI_ADAPTER_INFORMATION_PROTOCOL mAdapterInformationProtocol;
+
+/**
+ Return if input TestPoint data is valid.
+
+ @param TestPointData TestPoint data
+ @param TestPointSize TestPoint size
+
+ @retval TRUE TestPoint data is valid.
+ @retval FALSE TestPoint data is not valid.
+**/
+BOOLEAN
+InternalTestPointIsValidTable (
+ IN VOID *TestPointData,
+ IN UINTN TestPointSize
+ );
+
+/**
+ Register SMM TestPoint handler.
+**/
+VOID
+RegisterSmmTestPointSmiHandler (
+ VOID
+ );
+
+#endif \ No newline at end of file