1/* 2 * Copyright (C) 2022 The Android Open Source Project 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 17syntax = "proto2"; 18 19option optimize_for = CODE_SIZE; 20option java_package = "com.android.os"; 21option java_outer_classname = "AtomsProto"; 22 23message Atom { 24 oneof pushed { 25 TrustyAppCrashed trusty_app_crashed = 100072; 26 TrustyError trusty_error = 100145; 27 TrustyStorageError trusty_storage_error = 100146; 28 } 29} 30 31enum TrustyErrorType { 32 TRUSTY_ERROR_UNKNOWN = 0; 33 TRUSTY_ERROR_HEAP_OOM = 1; 34 TRUSTY_ERROR_HEAP_THRESHOLD_90 = 2; 35 TRUSTY_ERROR_KERNEL_EVENT_DROP = 3; 36} 37 38message TrustyError { 39 optional string reverse_domain_name = 1; 40 optional TrustyErrorType error_code = 2; 41 optional string app_id = 3; 42 optional string client_app_id = 4; 43} 44 45enum TrustyStorageErrorType { 46 TRUSTY_STORAGE_ERROR_UNKNOWN = 0; 47 TRUSTY_STORAGE_ERROR_SUPERBLOCK_INVALID = 1; 48 TRUSTY_STORAGE_ERROR_BLOCK_MAC_MISMATCH = 2; 49 TRUSTY_STORAGE_ERROR_BLOCK_HEADER_INVALID = 3; 50 TRUSTY_STORAGE_ERROR_RPMB_COUNTER_MISMATCH = 4; 51 TRUSTY_STORAGE_ERROR_RPMB_COUNTER_MISMATCH_RECOVERED = 5; 52 TRUSTY_STORAGE_ERROR_RPMB_COUNTER_READ_FAILURE = 6; 53 TRUSTY_STORAGE_ERROR_RPMB_MAC_MISMATCH = 7; 54 TRUSTY_STORAGE_ERROR_RPMB_ADDR_MISMATCH = 8; 55 TRUSTY_STORAGE_ERROR_RPMB_FAILURE_RESPONSE = 9; 56 TRUSTY_STORAGE_ERROR_RPMB_UNKNOWN = 10; 57 TRUSTY_STORAGE_ERROR_RPMB_SCSI_ERROR = 11; 58 TRUSTY_STORAGE_ERROR_IO_ERROR = 12; 59 TRUSTY_STORAGE_ERROR_PROXY_COMMUNICATION_FAILURE = 13; 60} 61 62enum TrustyFileSystem { 63 TRUSTY_FS_UNKNOWN = 0; 64 TRUSTY_FS_TP = 1; 65 TRUSTY_FS_TD = 2; 66 TRUSTY_FS_TDP = 3; 67 TRUSTY_FS_TDEA = 4; 68 TRUSTY_FS_NSP = 5; 69} 70 71enum TrustyBlockType { 72 TRUSTY_BLOCKTYPE_UNKNOWN = 0; 73 TRUSTY_BLOCKTYPE_FILES_ROOT = 1; 74 TRUSTY_BLOCKTYPE_FREE_ROOT = 2; 75 TRUSTY_BLOCKTYPE_FILES_INTERNAL = 3; 76 TRUSTY_BLOCKTYPE_FREE_INTERNAL = 4; 77 TRUSTY_BLOCKTYPE_FILE_ENTRY = 5; 78 TRUSTY_BLOCKTYPE_FILE_BLOCK_MAP = 6; 79 TRUSTY_BLOCKTYPE_FILE_DATA = 7; 80 TRUSTY_BLOCKTYPE_CHECKPOINT_ROOT = 8; 81 TRUSTY_BLOCKTYPE_CHECKPOINT_FILES_ROOT = 9; 82 TRUSTY_BLOCKTYPE_CHECKPOINT_FREE_ROOT = 10; 83} 84 85message TrustyStorageError { 86 optional string reverse_domain_name = 1; 87 optional TrustyStorageErrorType error = 2; 88 optional string app_id = 3; 89 optional string client_app_id = 4; 90 optional int32 write = 5; 91 optional TrustyFileSystem file_system = 6; 92 optional int64 file_path_hash = 7; 93 optional TrustyBlockType block_type = 8; 94 optional int64 repair_counter = 9; 95} 96 97message TrustyAppCrashed { 98 optional string reverse_domain_name = 1; 99 optional string app_id = 2; 100 optional int32 crash_reason = 3; 101} 102