Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/em100/+/48553 )
Change subject: Support 4-byte address mode in SPI traces ......................................................................
Patch Set 1: Code-Review+1
(2 comments)
https://review.coreboot.org/c/em100/+/48553/1/trace.c File trace.c:
https://review.coreboot.org/c/em100/+/48553/1/trace.c@210 PS1, Line 210: /* Special commands */ : switch (spi_command) { : case 0xb7: : address_mode = 4; : break; : case 0xe9: : address_mode = 3; : break; : } Huh, this part is indented with spaces
https://review.coreboot.org/c/em100/+/48553/1/trace.c@224 PS1, Line 224: if (address_mode == 3) : address = (data[i * 8 + 5] << 16) + (data[i * 8 + 6] << 8) + data[i * 8 + 7]; : else : address = (data[i * 8 + 5] << 24) + (data[i * 8 + 6] << 16) + (data[i * 8 + 7] << 8) + data[i * 8 + 8]; How about:
address = 0; for (int n = 0; n < address_mode; n++) { address <<= 8; address |= data[i * 8 + 4 + n]; }