Bohdan Kovalchuk | 7725652 | 2020-04-15 18:03:43 +0300 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2020 Arm Limited. |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #include "bootutil/security_cnt.h" |
| 18 | #include <stdint.h> |
| 19 | |
Tamas Ban | 4e8d838 | 2020-09-30 08:01:58 +0100 | [diff] [blame] | 20 | fih_int |
Bohdan Kovalchuk | 7725652 | 2020-04-15 18:03:43 +0300 | [diff] [blame] | 21 | boot_nv_security_counter_init(void) |
| 22 | { |
| 23 | /* Do nothing. */ |
| 24 | return 0; |
| 25 | } |
| 26 | |
Tamas Ban | 4e8d838 | 2020-09-30 08:01:58 +0100 | [diff] [blame] | 27 | fih_int |
| 28 | boot_nv_security_counter_get(uint32_t image_id, fih_int *security_cnt) |
Bohdan Kovalchuk | 7725652 | 2020-04-15 18:03:43 +0300 | [diff] [blame] | 29 | { |
| 30 | (void)image_id; |
| 31 | *security_cnt = 30; |
| 32 | |
| 33 | return 0; |
| 34 | } |
| 35 | |
| 36 | int32_t |
| 37 | boot_nv_security_counter_update(uint32_t image_id, uint32_t img_security_cnt) |
| 38 | { |
| 39 | (void)image_id; |
| 40 | (void)img_security_cnt; |
| 41 | |
| 42 | /* Do nothing. */ |
| 43 | return 0; |
| 44 | } |