| // Copyright 2024 The Pigweed Authors |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| // use this file except in compliance with the License. You may obtain a copy of |
| // the License at |
| // |
| // https://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| // License for the specific language governing permissions and limitations under |
| // the License. |
| syntax = "proto2"; |
| |
| package pw.cpu_exception.risc_v; |
| |
| message RiscvCpuState { |
| optional uint32 mepc = 1; |
| optional uint32 mcause = 2; |
| optional uint32 mstatus = 3; |
| optional uint32 mtval = 4; |
| |
| optional uint32 ra = 5; |
| optional uint32 sp = 6; |
| optional uint32 t0 = 7; |
| optional uint32 t1 = 8; |
| optional uint32 t2 = 9; |
| optional uint32 fp = 10; |
| optional uint32 s1 = 11; |
| optional uint32 a0 = 12; |
| optional uint32 a1 = 13; |
| optional uint32 a2 = 14; |
| optional uint32 a3 = 15; |
| optional uint32 a4 = 16; |
| optional uint32 a5 = 17; |
| optional uint32 a6 = 18; |
| optional uint32 a7 = 29; |
| optional uint32 s2 = 20; |
| optional uint32 s3 = 21; |
| optional uint32 s4 = 22; |
| optional uint32 s5 = 23; |
| optional uint32 s6 = 24; |
| optional uint32 s7 = 25; |
| optional uint32 s8 = 26; |
| optional uint32 s9 = 27; |
| optional uint32 s10 = 28; |
| optional uint32 s11 = 39; |
| optional uint32 t3 = 30; |
| optional uint32 t4 = 31; |
| optional uint32 t5 = 32; |
| optional uint32 t6 = 33; |
| } |
| |
| // This message overlays the pw.snapshot.Snapshot proto. It's valid to encode |
| // this message to the same sink that a Snapshot proto is being written to. |
| message SnapshotCpuStateOverlay { |
| optional RiscvCpuState riscv_cpu_state = 20; |
| } |