Xlnx add trace buf and update address space#98
Conversation
f6a6178 to
833a6b4
Compare
833a6b4 to
b59ecf4
Compare
| collect (APP_INC_DIRS "${CMAKE_CURRENT_SOURCE_DIR}") | ||
|
|
||
| if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_SYSTEM}/gic_init.c") | ||
| collect (APP_COMMON_SOURCES ${PROJECT_SYSTEM}/gic_init.c) |
There was a problem hiding this comment.
s/exampples/examples/ in commit message
That said you can remove examples: as done for other patches
| int32_t len; | ||
| va_list args; | ||
|
|
||
|
|
|
|
||
| #define NUM_TABLE_ENTRIES 1 | ||
| #define NUM_TABLE_ENTRIES 2 | ||
| #define RSC_TRACE_SZ (4*1024) |
There was a problem hiding this comment.
nitpicking. The trace contain char, why not just just
| #define RSC_TRACE_SZ (4*1024) | |
| #define RSC_TRACE_SZ 4096 |
b59ecf4 to
1e20941
Compare
|
Hi @arnopo, I found bug in this patch series when using internal tools, please do not merge it until next update. Thanks, |
1e20941 to
6796ba0
Compare
|
@arnopo, @edmooring this change is ready for review. |
platform_info.h was changed to platform_info_common.h, replace it accordingly for echo demo. Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
fix following compiler warning:
warning: passing argument 1 of 'rpmsg_matrix_app' fr
om incompatible pointer type [-Wincompatible-pointer-types]
47 | rpmsg_matrix_app(rpdev, platform);
| ^~~~~
Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
As per latest SDT standard AMD-xilinx EDF yocto is released with fixed memory regions for each core to use. Update the default address for cluster-A core0 to use as per this standard. Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
trace buffer is a circular buffer to store logs. Linux remoteproc subsystem creates a debugfs file that can be used to print these logs on linux side. Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
6796ba0 to
9456f3e
Compare
edmooring
left a comment
There was a problem hiding this comment.
This comes down to two questions:
Which is the correct size for the TCM lockstep region, 0x40000 or 0x 60000?
Why is the log level escalated for levels above "debug"?
| MEMORY | ||
| { | ||
| psu_ddr_S_AXI_BASEADDR : ORIGIN = 0x3ED00000, LENGTH = 0x00040000 | ||
| psu_ddr_S_AXI_BASEADDR : ORIGIN = 0x9800000, LENGTH = 0x00060000 |
There was a problem hiding this comment.
This now conflicts with the comment in line 18 above, Size has changed from 0x40000 to 0x60000 without changing the comment. Which is correct?
There was a problem hiding this comment.
@edmooring, actually the memory modified here is not TCM, but DDR. So the firmware code can be split and some sections can be loaded into TCM, and some are loaded in the DDR.
The TCM memory is represented here with: psu_r5_tcm_ram_0_S_AXI_BASEADDR
Which I think is 64KB. I agree that the comment should be modified, as the TCM is 64-KB chunks. I will update comment.
| MEMORY | ||
| { | ||
| psu_ddr_S_AXI_BASEADDR : ORIGIN = 0x3ED00000, LENGTH = 0x00040000 | ||
| psu_ddr_S_AXI_BASEADDR : ORIGIN = 0x9800000, LENGTH = 0x00060000 |
There was a problem hiding this comment.
Same as above. Either the comment in line 18 is wrong or the code in line 21 is wrong.
There was a problem hiding this comment.
Same explanation as above.
| #ifndef SHARED_MEM_PA | ||
| #if XPAR_CPU_ID == 0 | ||
| #define SHARED_MEM_PA 0x3ED40000UL | ||
| #define SHARED_MEM_PA 0x9860000UL |
There was a problem hiding this comment.
Again, why the size change from 0x40000 to 0x60000? This also applies to line 106 below.
There was a problem hiding this comment.
This SHARED_MEM_PA is different region than mentioned in the linker script.
This is where vring buffers are located. This address is moved in the new spec.
| } circ; | ||
|
|
||
| static void rsc_trace_putchar(char c) | ||
| { |
There was a problem hiding this comment.
A very small nit:
The circular buffer will be left in a logically inconsistent state after c_len calls to rsc_trace_puchar(), where c_pos actually points past the end of the buffer. This might cause problems for readers of the buffer. Switching the order so the put to the buffer is done first, and then the check for the end of the buffer would keep the state of the buffer logically consistent between calls to rsc_trace_putchar().
| int32_t len; | ||
| va_list args; | ||
|
|
||
| if (level > METAL_LOG_DEBUG) |
There was a problem hiding this comment.
This needs an explanatory comment. Why are we escalating the warning level?
Uh oh!
There was an error while loading. Please reload this page.