Re: [PATCH v3] cpukit/aarch64: Add ESR register decoding

2021-03-23 Thread Gedare Bloom
On Mon, Mar 22, 2021 at 11:35 PM Sebastian Huber wrote: > > On 22/03/2021 21:43, Alex White wrote: > > >>> +static void _binary_sprintf( > >>> + char *s, > >>> + size_t maxlen, > >>> + uint32_t num_bits, > >>> + uint32_t value > >>> +) > >>> +{ > >>> + string_context sctx = { > >>> +.s =

Re: [PATCH v3] cpukit/aarch64: Add ESR register decoding

2021-03-22 Thread Sebastian Huber
On 22/03/2021 21:43, Alex White wrote: +static void _binary_sprintf( +  char *s, +  size_t maxlen, +  uint32_t num_bits, +  uint32_t value +) +{ +  string_context sctx = { +    .s = s, +    .n = maxlen +  }; +  uint32_t mask = 1<<(num_bits-1); +  int cx = 0; + +  while ( mask != 0 ) { +    cx

RE: [PATCH v3] cpukit/aarch64: Add ESR register decoding

2021-03-22 Thread Alex White
On Mon, Mar 22, 2021 at 2:33 PM Joel Sherrill wrote: >> +static const char* _exception_class_to_string( uint16_t exception_class ) >> +{ >> +  switch (exception_class) >> +  { >> +  case 0b01: return "Trapped WFI or WFE instruction"; >> +  case 0b11: return "Trapped MCR or MRC access with

Re: [PATCH v3] cpukit/aarch64: Add ESR register decoding

2021-03-22 Thread Joel Sherrill
On Mon, Mar 22, 2021 at 12:53 PM Alex White wrote: > --- > .../aarch64/aarch64-exception-frame-print.c | 106 +- > 1 file changed, 102 insertions(+), 4 deletions(-) > > diff --git a/cpukit/score/cpu/aarch64/aarch64-exception-frame-print.c >