blob: 84b30d512861c56487e6314cfaafb4e5a8143e0f [file] [log] [blame]
AlexeiFedorov9f2de632024-09-10 11:48:22 +01001/*
2 * Copyright (c) 2024, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include "doe_helpers.h"
Soby Mathew5929bfe2024-11-28 12:28:00 +00008#include <pcie_doe.h>
AlexeiFedorov9f2de632024-09-10 11:48:22 +01009#include <test_helpers.h>
10
AlexeiFedorov9f2de632024-09-10 11:48:22 +010011test_result_t doe_discovery_test(void)
12{
13 uint32_t bdf, doe_cap_base;
14 int ret;
15
Soby Mathew5929bfe2024-11-28 12:28:00 +000016 SKIP_TEST_IF_DOE_NOT_SUPPORTED(bdf, doe_cap_base);
AlexeiFedorov9f2de632024-09-10 11:48:22 +010017
18 ret = doe_discovery(bdf, doe_cap_base);
19 if (ret != 0) {
20 return TEST_RESULT_FAIL;
21 }
22
23 return TEST_RESULT_SUCCESS;
24}
25
26test_result_t spdm_version_test(void)
27{
28 uint32_t bdf, doe_cap_base;
29 int ret;
30
Soby Mathew5929bfe2024-11-28 12:28:00 +000031 SKIP_TEST_IF_DOE_NOT_SUPPORTED(bdf, doe_cap_base);
AlexeiFedorov9f2de632024-09-10 11:48:22 +010032
33 ret = get_spdm_version(bdf, doe_cap_base);
34 if (ret != 0) {
35 return TEST_RESULT_FAIL;
36 }
37
38 return TEST_RESULT_SUCCESS;
39}