blob: 5341058639d8803fdb9fa21f151474255f927bdc [file] [log] [blame]
Kevin Peng62a87112020-07-07 15:07:46 +08001/*
2 * Copyright (c) 2017-2020, Arm Limited. All rights reserved.
3 *
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{
39 TEST_LOG("\33[3%dm", color_id);
40}