jk-arm | 957cfea | 2021-06-18 15:52:12 +0530 | [diff] [blame^] | 1 | /** @file |
| 2 | * Copyright (c) 2021 Arm Limited or its affiliates. All rights reserved. |
| 3 | * SPDX-License-Identifier : Apache-2.0 |
| 4 | * |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | **/ |
| 17 | |
| 18 | #include "val_entry.h" |
| 19 | #include "val_framework.h" |
| 20 | #include "val_peripherals.h" |
| 21 | #include "val_dispatcher.h" |
| 22 | |
| 23 | int32_t val_entry(void); |
| 24 | |
| 25 | /** |
| 26 | @brief - PSA C main function, does VAL init and calls test dispatcher |
| 27 | @param - None |
| 28 | @return - status - error code |
| 29 | **/ |
| 30 | int32_t val_entry(void) |
| 31 | { |
| 32 | test_id_t test_id = VAL_INVALID_TEST_ID; |
| 33 | int32_t status; |
| 34 | |
| 35 | status = val_logger_init(); |
| 36 | if (VAL_ERROR(status)) |
| 37 | { |
| 38 | goto exit; |
| 39 | } |
| 40 | |
| 41 | /* Compliance header print */ |
| 42 | if (test_id == VAL_INVALID_TEST_ID) |
| 43 | { |
| 44 | val_print(PRINT_ALWAYS, "\n***** PSA Architecture Test Suite - Version %d.", |
| 45 | PSA_ACS_MAJOR_VER); |
| 46 | val_print(PRINT_ALWAYS, "%d *****\n", PSA_ACS_MINOR_VER); |
| 47 | } |
| 48 | |
| 49 | /* Call dispatcher routine*/ |
| 50 | status = val_dispatcher(test_id); |
| 51 | |
| 52 | exit: |
| 53 | val_print(PRINT_ALWAYS, "\nEntering standby.. \n", 0); |
| 54 | |
| 55 | pal_terminate_simulation(); |
| 56 | |
| 57 | return status; |
| 58 | } |
| 59 | |
| 60 | //int main() |
| 61 | //{ |
| 62 | // val_entry(); |
| 63 | // return 0; |
| 64 | //} |