]>
Commit | Line | Data |
---|---|---|
83b9662f MK |
1 | /** @file\r |
2 | Implement TPM1.2 NV Self Test related commands.\r | |
3 | \r | |
4 | Copyright (c) 2016, Intel Corporation. All rights reserved. <BR>\r | |
fd338d8b | 5 | (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r |
83b9662f MK |
6 | This program and the accompanying materials\r |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | \r | |
16 | #include <PiPei.h>\r | |
17 | #include <Library/Tpm12CommandLib.h>\r | |
18 | #include <Library/BaseLib.h>\r | |
19 | #include <Library/Tpm12DeviceLib.h>\r | |
20 | \r | |
21 | /**\r | |
22 | Send TPM_ContinueSelfTest command to TPM.\r | |
23 | \r | |
24 | @retval EFI_SUCCESS Operation completed successfully.\r | |
25 | @retval EFI_TIMEOUT The register can't run into the expected status in time.\r | |
26 | @retval EFI_BUFFER_TOO_SMALL Response data buffer is too small.\r | |
27 | @retval EFI_DEVICE_ERROR Unexpected device behavior.\r | |
28 | \r | |
29 | **/\r | |
30 | EFI_STATUS\r | |
31 | EFIAPI\r | |
32 | Tpm12ContinueSelfTest (\r | |
33 | VOID\r | |
34 | )\r | |
35 | {\r | |
36 | TPM_RQU_COMMAND_HDR Command;\r | |
37 | TPM_RSP_COMMAND_HDR Response;\r | |
38 | UINT32 Length;\r | |
39 | \r | |
40 | //\r | |
41 | // send Tpm command TPM_ORD_ContinueSelfTest\r | |
42 | //\r | |
43 | Command.tag = SwapBytes16 (TPM_TAG_RQU_COMMAND);\r | |
44 | Command.paramSize = SwapBytes32 (sizeof (Command));\r | |
45 | Command.ordinal = SwapBytes32 (TPM_ORD_ContinueSelfTest);\r | |
fd338d8b | 46 | Length = sizeof (Response);\r |
83b9662f MK |
47 | return Tpm12SubmitCommand (sizeof (Command), (UINT8 *)&Command, &Length, (UINT8 *)&Response);\r |
48 | }\r |