aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-09-21 10:51:58 -0400
committerTom Rini <trini@konsulko.com>2023-09-21 10:51:58 -0400
commit5d2fae79c7d60eaf7f50322e4ec125d2f58544e9 (patch)
treee1afcf0f540ca40908a835cca26e2d61fc098304 /tools
parentbcfde74974e2c399e414e8c55665bfed2612da5d (diff)
parenta3ade3dae4d93f9b5282ddb4885d69161729ec6d (diff)
downloadu-boot-5d2fae79c7d60eaf7f50322e4ec125d2f58544e9.zip
u-boot-5d2fae79c7d60eaf7f50322e4ec125d2f58544e9.tar.gz
u-boot-5d2fae79c7d60eaf7f50322e4ec125d2f58544e9.tar.bz2
Merge tag 'xilinx-for-v2024.01-rc1-v2' of https://source.denx.de/u-boot/custodians/u-boot-microblaze into nextWIP/21Sep2023-next
Xilinx changes for v2024.01-rc1 clk: - Dont return error when assigned-clocks is empty or missing dm: - Support reading a single indexed u64 value - Add support for reading bootscript address/flash address from DT cmd: - Fix flash_is_unlocked API fpga: - Define fpga_load() for debug build global: - U-Boot project name cleanup (next2) net: - zynq_gem: Use generic_phy_valid() helper - axienet: Convert to ofnode functions - gmii2rgmii: Read bridge address from DT pytest: - skip tpm2_startup when env__tpm_device_test_skip=True spi-nor: - Add mx25u25635f support - zynqmp_qspi: Tune cache behavior trace: - Fix flyrecord alignment issue xilinx: - Move scriptaddr to DT as bootscr-address - Pick script_offset_f/script_size_f from DT as bootscr-flash-offset/size - Do not generate distro boot variables if disabled versal: - Extend memory ranges to cover HBM - Enable TPM, sha1sum and KASLRSEED - Fix distroboot prioritization in connection to available devices - Clean mini targets bootcommand - Fix clock driver versal-net: - Enable TPM, sha1sum and KASLRSEED - Fix distroboot prioritization in connection to available devices zynqmp; - Allow AES to run from SPL - Enable CMD_KASLRSEED - Add proper dependencies for USB and remove ZYNQMP_USB - Fix user si570 default frequency for zcu* boards - Cover SOM rev2 revision - Various DT changes - Add firmware and pinctrl support for tristate configuration (high impedance/output enable) - Add output-enable pins to SOMs - Fix distroboot prioritization in connection to available devices - Read bootscript address/flash address from DT - Fix pcap_prog address
Diffstat (limited to 'tools')
-rw-r--r--tools/proftool.c39
1 files changed, 34 insertions, 5 deletions
diff --git a/tools/proftool.c b/tools/proftool.c
index 101bcb6..fca45e4 100644
--- a/tools/proftool.c
+++ b/tools/proftool.c
@@ -1493,14 +1493,43 @@ static int write_pages(struct twriter *tw, enum out_format_t out_format,
static int write_flyrecord(struct twriter *tw, enum out_format_t out_format,
int *missing_countp, int *skip_countp)
{
- int start, ret, len;
+ unsigned long long start, start_ofs, len;
+ int ret;
FILE *fout = tw->fout;
char str[200];
+ /* Record start pointer */
+ start_ofs = tw->ptr;
+ debug("Start of flyrecord header at: 0x%llx\n", start_ofs);
+
tw->ptr += fprintf(fout, "flyrecord%c", 0);
+ /* flyrecord\0 - allocated 10 bytes */
+ start_ofs += 10;
+
+ /*
+ * 8 bytes that are a 64-bit word containing the offset into the file
+ * that holds the data for the CPU.
+ *
+ * 8 bytes that are a 64-bit word containing the size of the CPU
+ * data at that offset.
+ */
+ start_ofs += 16;
+
+ snprintf(str, sizeof(str),
+ "[local] global counter uptime perf mono mono_raw boot x86-tsc\n");
+ len = strlen(str);
+
+ /* trace clock length - 8 bytes */
+ start_ofs += 8;
+ /* trace clock data */
+ start_ofs += len;
+
+ debug("Calculated flyrecord header end at: 0x%llx, trace clock len: 0x%llx\n",
+ start_ofs, len);
+
/* trace data */
- start = ALIGN(tw->ptr + 16, TRACE_PAGE_SIZE);
+ start = ALIGN(start_ofs, TRACE_PAGE_SIZE);
tw->ptr += tputq(fout, start);
/* use a placeholder for the size */
@@ -1509,12 +1538,12 @@ static int write_flyrecord(struct twriter *tw, enum out_format_t out_format,
return -1;
tw->ptr += ret;
- snprintf(str, sizeof(str),
- "[local] global counter uptime perf mono mono_raw boot x86-tsc\n");
- len = strlen(str);
tw->ptr += tputq(fout, len);
tw->ptr += tputs(fout, str);
+ debug("End of flyrecord header at: 0x%x, offset: 0x%llx\n",
+ tw->ptr, start);
+
debug("trace text base %lx, map file %lx\n", text_base, text_offset);
ret = write_pages(tw, out_format, missing_countp, skip_countp);