Hello Duncan Laurie,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/em100/+/48592
to review the following change.
Change subject: EM100 changes ......................................................................
EM100 changes
Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org Signed-off-by: Duncan Laurie dlaurie@google.com Change-Id: I0c9ba505ed59bb06f681423a98ccc58cfb99efdf --- M trace.c 1 file changed, 17 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/em100 refs/changes/92/48592/1
diff --git a/trace.c b/trace.c index 22517f9..4d6a26c 100644 --- a/trace.c +++ b/trace.c @@ -262,6 +262,7 @@ j = MAX_TRACE_BLOCKLENGTH; } } +#if 0 printf("\nTime: %06lld.%08lld", (timestamp - start_timestamp) / 100000000, @@ -270,10 +271,22 @@ printf(" command # %-6d : 0x%02x - %s", ++counter, spi_command, spi_cmd_vals->cmd_name); +#else + if (start_timestamp) + start_timestamp = 0; +#endif + if (spi_cmd_vals->uses_address) + printf("0x%02x @ 0x%08x (%s)\n", + spi_command, address, spi_cmd_vals->cmd_name); + else + printf("0x%02x (%s)\n", + spi_command, spi_cmd_vals->cmd_name); + curpos = 0; outbytes = 0; }
+#if 0 /* this exploits 8bit wrap around in curpos */ unsigned char blocklen = (data[2 + i*8 + 1] - curpos); blocklen /= 8; @@ -296,6 +309,10 @@ address += 16; } } +#else + if (outbytes) + outbytes++; +#endif // this is because the em100 counts funny curpos = data[2 + i*8 + 1] + 0x10; fflush(stdout);
Stefan Reinauer has abandoned this change. ( https://review.coreboot.org/c/em100/+/48592 )
Change subject: Add Duncan's output format as an option ......................................................................
Abandoned