Stefan Reinauer has uploaded this change for review. ( https://review.coreboot.org/c/em100/+/48597 )
Change subject: trace: Use dynamic address bytes everywhere we should. ......................................................................
trace: Use dynamic address bytes everywhere we should.
Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org Change-Id: I0614bd39d0b47331ffb96195da3624240ef29ffa --- M trace.c 1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/em100 refs/changes/97/48597/1
diff --git a/trace.c b/trace.c index 22517f9..88265b5 100644 --- a/trace.c +++ b/trace.c @@ -201,6 +201,7 @@ } for (i = 0; i < count; i++) { unsigned int j = additional_pad_bytes; + unsigned int address_bytes = 0; additional_pad_bytes = 0; unsigned char cmd = data[2 + i*8];
@@ -246,7 +247,7 @@ j = 1; /* skip command byte */ } else { /* If address_mode > 1 -> always decode 4 bytes */ - int address_bytes = + address_bytes = (spi_cmd_vals->uses_address == 1) ? address_mode : 4;
if (address_mode == 3) @@ -288,7 +289,7 @@ printf("\n : "); } } - printf("%02x ", data[i * 8 + 4 + j]); + printf("%02x ", data[i * 8 + address_bytes + 1 + j]); outbytes++; if (outbytes == 16) { outbytes = 0;
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/em100/+/48597 )
Change subject: trace: Use dynamic address bytes everywhere we should. ......................................................................
Patch Set 1: Code-Review+2
(2 comments)
https://review.coreboot.org/c/em100/+/48597/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/em100/+/48597/1//COMMIT_MSG@7 PS1, Line 7: we should. nit: Drop this part?
https://review.coreboot.org/c/em100/+/48597/1/trace.c File trace.c:
https://review.coreboot.org/c/em100/+/48597/1/trace.c@235 PS1, Line 235: /* Special commands */ : switch (spi_command) { : case 0xb7: : address_mode = 4; : break; : case 0xe9: : address_mode = 3; : break; : } Huh, this is indented with spaces
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/em100/+/48597 )
Change subject: trace: Use dynamic address bytes everywhere we should. ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/em100/+/48597/1/trace.c File trace.c:
https://review.coreboot.org/c/em100/+/48597/1/trace.c@235 PS1, Line 235: /* Special commands */ : switch (spi_command) { : case 0xb7: : address_mode = 4; : break; : case 0xe9: : address_mode = 3; : break; : }
Huh, this is indented with spaces
Ah, this was added in CB:48553
Stefan Reinauer has posted comments on this change. ( https://review.coreboot.org/c/em100/+/48597 )
Change subject: trace: Use dynamic address bytes everywhere we should. ......................................................................
Patch Set 1: Code-Review-1
This needs more testing. It looks like the address bytes are already added through j
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/em100/+/48597 )
Change subject: trace: Use dynamic address bytes everywhere we should. ......................................................................
Patch Set 1: Code-Review+1
Christian Walter has posted comments on this change. ( https://review.coreboot.org/c/em100/+/48597 )
Change subject: trace: Use dynamic address bytes everywhere we should. ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/em100/+/48597/1/trace.c File trace.c:
https://review.coreboot.org/c/em100/+/48597/1/trace.c@292 PS1, Line 292: printf("%02x ", data[i * 8 + address_bytes + 1 + j]); I think this one can be removed here as it has been added here: j = 1 + address_bytes + spi_cmd_vals->pad_bytes;