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_peripherals.h" |
| 19 | #include "pal_interfaces.h" |
jk-arm | 957cfea | 2021-06-18 15:52:12 +0530 | [diff] [blame] | 20 | |
| 21 | /* Global */ |
| 22 | uint32_t is_logger_init_done = 0; |
| 23 | |
| 24 | /* |
| 25 | @brief - Initialize UART. |
| 26 | This is client interface API of secure partition UART INIT API. |
| 27 | @param - None |
| 28 | @return - val_status_t |
| 29 | */ |
| 30 | val_status_t val_logger_init(void) |
| 31 | { |
| 32 | is_logger_init_done = 1; |
| 33 | return VAL_STATUS_SUCCESS; |
| 34 | } |
| 35 | |
| 36 | /** |
| 37 | @brief - Print module. This is client interface API of secure partition |
| 38 | val_print_sf API for nspe world |
| 39 | @param - verbosity: Print verbosity level |
| 40 | - string : Input string |
| 41 | - data : Value for format specifier |
| 42 | @return - val_status_t |
| 43 | **/ |
| 44 | val_status_t val_print(print_verbosity_t verbosity, const char *string, int32_t data) |
| 45 | { |
| 46 | if ((is_logger_init_done == 0) && (verbosity < VERBOSE)) |
| 47 | { |
| 48 | return VAL_STATUS_SUCCESS; |
| 49 | } |
| 50 | return pal_print(string, data); |
| 51 | } |
| 52 | |
| 53 | |
| 54 | |