blob: 46f7171664ddc3ab6fd46f9a5102366391520f4b [file] [log] [blame]
Kevin Peng62a87112020-07-07 15:07:46 +08001/*
Raef Colese1a8c9f2021-06-09 14:11:34 +01002 * Copyright (c) 2017-2021, Arm Limited. All rights reserved.
Kevin Peng62a87112020-07-07 15:07:46 +08003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 *
6 */
7
8#include "test_framework_helpers.h"
9
10#include <stdio.h>
11
12const char *asset_perms_to_str(uint8_t permissions)
13{
14 switch (permissions) {
15 case 0:
16 return "No permissions";
17 case 1:
18 return "SECURE_ASSET_REFERENCE";
19 case 2:
20 return "SECURE_ASSET_WRITE";
21 case 3:
22 return "SECURE_ASSET_REFERENCE | SECURE_ASSET_WRITE";
23 case 4:
24 return "SECURE_ASSET_READ";
25 case 5:
26 return "SECURE_ASSET_REFERENCE | SECURE_ASSET_READ";
27 case 6:
28 return "SECURE_ASSET_WRITE | SECURE_ASSET_READ";
29 case 7:
30 return "SECURE_ASSET_REFERENCE | SECURE_ASSET_WRITE | "
31 "SECURE_ASSET_READ";
32 default:
33 return "Unknown permissions";
34 }
35}
36
37void printf_set_color(enum serial_color_t color_id)
38{
Raef Colese1a8c9f2021-06-09 14:11:34 +010039 TEST_LOG("\33[%dm", color_id);
Kevin Peng62a87112020-07-07 15:07:46 +080040}