summaryrefslogtreecommitdiffstats
path: root/include/iotrace.h
Commit message (Collapse)AuthorAgeFilesLines
* trace: Remove the const from write functionsSimon Glass2019-10-111-7/+6
| | | | | | | | The write functions do actually change the contents of memory so it is not correct to use 'const'. Remove it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* iotrace: fix behaviour when buffer is fullRamon Fried2018-06-181-2/+3
| | | | | | | | | | | Don't continue updating the offset when buffer is full. When the buffer size exhausts and there's no space left to write warn the user and update only the needed size and not both the offset and needed size. Add needed buffer size information in the iotrace command. Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
* iotrace: move record definitons to header fileRamon Fried2018-06-181-0/+28
| | | | | | | | The header definitions are needed for reading record information in cmd/iotrace.c Signed-off-by: Ramon Fried <ramon.fried@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* iotrace: add IO region limitRamon Fried2018-06-071-0/+24
| | | | | | | | | | | | When dealing with a lot of IO regions, sometimes it makes sense only to trace a specific one. This patch adds support for region limits. If region is not set, the iotrace works the same as it was. If region is set, the iotrace only logs io operation that falls in the defined region. Signed-off-by: Ramon Fried <ramon.fried@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini2018-05-071-2/+1
| | | | | | | | | | | | | | | | | | | | When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
* Allow iotrace byte access to use an address of any sizeSimon Glass2016-05-171-2/+3
| | | | | | | | If an address is used with readb() and writeb() which is smaller than the expected size (e.g. 32-bit value on a machine with 64-bit addresses), a warning results. Fix this by adding a cast. Signed-off-by: Simon Glass <sjg@chromium.org>
* Add an I/O tracing featureSimon Glass2014-06-201-0/+104
When debugging drivers it is useful to see what I/O accesses were done and in what order. Even if the individual accesses are of little interest it can be useful to verify that the access pattern is consistent each time an operation is performed. In this case a checksum can be used to characterise the operation of a driver. The checksum can be compared across different runs of the operation to verify that the driver is working properly. In particular, when performing major refactoring of the driver, where the access pattern should not change, the checksum provides assurance that the refactoring work has not broken the driver. Add an I/O tracing feature and associated commands to provide this facility. It works by sneaking into the io.h heder for an architecture and redirecting I/O accesses through its tracing mechanism. For now no commands are provided to examine the trace buffer. The format is fairly simple, so 'md' is a reasonable substitute. Note: The checksum feature is only useful for I/O regions where the contents do not change outside of software control. Where this is not suitable you can fall back to manually comparing the addresses. It might be useful to enhance tracing to only checksum the accesses and not the data read/written. Signed-off-by: Simon Glass <sjg@chromium.org>