AlexeiFedorov | 9f2de63 | 2024-09-10 11:48:22 +0100 | [diff] [blame] | 1 | /* |
| 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 Mathew | 5929bfe | 2024-11-28 12:28:00 +0000 | [diff] [blame] | 8 | #include <pcie_doe.h> |
AlexeiFedorov | 9f2de63 | 2024-09-10 11:48:22 +0100 | [diff] [blame] | 9 | #include <test_helpers.h> |
| 10 | |
AlexeiFedorov | 9f2de63 | 2024-09-10 11:48:22 +0100 | [diff] [blame] | 11 | test_result_t doe_discovery_test(void) |
| 12 | { |
| 13 | uint32_t bdf, doe_cap_base; |
| 14 | int ret; |
| 15 | |
Soby Mathew | 5929bfe | 2024-11-28 12:28:00 +0000 | [diff] [blame] | 16 | SKIP_TEST_IF_DOE_NOT_SUPPORTED(bdf, doe_cap_base); |
AlexeiFedorov | 9f2de63 | 2024-09-10 11:48:22 +0100 | [diff] [blame] | 17 | |
| 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 | |
| 26 | test_result_t spdm_version_test(void) |
| 27 | { |
| 28 | uint32_t bdf, doe_cap_base; |
| 29 | int ret; |
| 30 | |
Soby Mathew | 5929bfe | 2024-11-28 12:28:00 +0000 | [diff] [blame] | 31 | SKIP_TEST_IF_DOE_NOT_SUPPORTED(bdf, doe_cap_base); |
AlexeiFedorov | 9f2de63 | 2024-09-10 11:48:22 +0100 | [diff] [blame] | 32 | |
| 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 | } |