Supporting local memory trap_info - #88
Conversation
596efb4 to
ee21d06
Compare
Bryan Bayerdorffer (bryanb-h2)
left a comment
There was a problem hiding this comment.
Actually wait. We need to make some changes here.
| u32_t local_mem_base; | ||
| u32_t local_mem_size; |
There was a problem hiding this comment.
We should try to be consistent and keep everything in 4K pages. Even though these are currently uninterpreted values that we just give back to the user, eventually we will take these from devtree and there we will want to store them >>12 so that we can fit larger addresses.
| BOOTER_PRINTF(" --noc <master int> <slave int>\n\tSet NOC master and slave widget offsets from TCM base.\n"); | ||
|
|
||
| BOOTER_PRINTF(" --local_mem <base address> <size>\n\tSet local memory base address and size.\n"); | ||
|
|
There was a problem hiding this comment.
Add "(4K pages)"
| BOOTER_PRINTF("\t\tNOC master LUT base: 0x%08x\n", tcm_base + h2_info(INFO_NOC_MBASE)); | ||
| BOOTER_PRINTF("\t\tNOC slave LUT base: 0x%08x\n", tcm_base + h2_info(INFO_NOC_SBASE)); | ||
| BOOTER_PRINTF("\tCore local memory base address: 0x%08x\n", h2_info(INFO_LOCAL_MEM_BASE)); | ||
| BOOTER_PRINTF("\tCore local memory size: 0x%08x\n", h2_info(INFO_LOCAL_MEM_SIZE)); |
There was a problem hiding this comment.
Add "(4K pages)"
Bryan Bayerdorffer (bryanb-h2)
left a comment
There was a problem hiding this comment.
need fixes.
| } | ||
| argc -= 3; argv += 3; | ||
| continue; | ||
| } else if (0 == strcmp(argv[0], "--local_mem")) { |
There was a problem hiding this comment.
Need to add a 3rd param for the stride (distance between base addresses for each core). ldram regions are not guaranteed to be contiguous.
| } | ||
|
|
||
| u32_t H2K_trap_config_local_mem(u32_t unused, u32_t base, u32_t size, u32_t unused3, u32_t unused4, H2K_thread_context *me) { | ||
| H2K_gp->local_mem_base = base; |
There was a problem hiding this comment.
This should be
base + (stride * core_id)
So that each core gets the address of its own ldram.
Done. |
Signed-off-by: Zeev Belinsky <zbelinsk@qti.qualcomm.com>
…t calculation. Updates booter, config trap, and globals to support configurable memory stride across cores. Signed-off-by: Zeev Belinsky <zbelinsk@qti.qualcomm.com>
…r-core memory offset calculation. Signed-off-by: Zeev Belinsky <zbelinsk@qti.qualcomm.com>
06ff68b to
102d0ab
Compare
Adding support for info_trap, to retrieve local memory size and address.