From 5d5fcf0460832edbf049f17be0486099cde4b74b Mon Sep 17 00:00:00 2001 From: Andrey Gusakov Date: Sun, 25 Feb 2024 15:22:12 +0300 Subject: [PATCH] ts: print scatter list on tsinfo command --- firmware/console/binary/tunerstudio.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/firmware/console/binary/tunerstudio.cpp b/firmware/console/binary/tunerstudio.cpp index f117bed005..1709b61342 100644 --- a/firmware/console/binary/tunerstudio.cpp +++ b/firmware/console/binary/tunerstudio.cpp @@ -99,6 +99,21 @@ static void printErrorCounters() { tsState.writeChunkCommandCounter, tsState.pageCommandCounter); } +static void printScatterList() { + efiPrintf("Scatter list (global)"); + for (int i = 0; i < HIGH_SPEED_COUNT; i++) { + uint16_t packed = engineConfiguration->highSpeedOffsets[i]; + uint16_t type = packed >> 13; + uint16_t offset = packed & 0x1FFF; + + if (type == 0) + continue; + size_t size = 1 << (type - 1); + + efiPrintf("%02d offset 0x%04x size %d", i, offset, size); + } +} + /* 1S */ #define TS_COMMUNICATION_TIMEOUT TIME_MS2I(1000) /* 10mS when receiving byte by byte */ @@ -119,6 +134,8 @@ static void printTsStats(void) { #endif // EFI_USB_SERIAL printErrorCounters(); + + printScatterList(); } static void setTsSpeed(int value) {