-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Benchmark: can't create mobj for timestamp buffer #16
Comments
I sounds like some patches are missing from the kernel. |
@jbech-linaro thanks for the quick response..Yes, i am using the instructions from the link you provided... I did not specify a specific branch while checking out in repo init command though... |
What's the output when the kernel boots, something like:
Note the line with "dynamic shared memory is enabled". |
@jenswi-linaro a quick grep on kernel output gives me this:
Grep on dmesg:
It has the line you are looking for.. |
Looks OK. It seems it could be a configuration error or even bitrot on the secure side with regards to |
We have an x86 based OPTEE and want to port this framework to x86 for our use-cases. Looks like even after porting to x86, we might end up in the same issue. |
As far as I know nothing has changed here during the last year so |
Does it make sense to tag this issue as an enhancement so that the issue doesn't get auto-closed ? |
@Sadiq1811 tag added. If the "benchmark" framework is useful to you, feel free to send fixes and/or improvements. I can review and test such patches. |
FYI, I confirm I get the same issue in this environment: I fixed the build by adding this line in build/common.mk: when running benchmark, I get the following error (similar error as previously reported): [NW] [SW] I believe the benchmarked TA is not yet involved at this stage because even non-existant TA report same log/error..
|
The benchmark code in the Linux driver was dropped with OP-TEE release 3.16.0 because it was too difficult to rebase onto newer kernels. see linaro-swg/linux#98. The latest tag with benchmark support in linaro-swg/linux is https://github.com/linaro-swg/linux/commits/optee-3.15.0 (see commit linaro-swg/linux@d9b0331). |
Hi Jerome, thanks for clarifying. |
@th0ma5b do u have met the problem “[Benchmark: can't create mobj for timestamp buffer” when u use optee_benchmark on optee_os 3.15.0? |
Hi,
I am trying to benchmark op-tee on hikey 620. Firstly, I faced some build issues. Just using the command-line option CFG_TEE_BENCHMARK=y results in buildroot not being able to find the optee-benchmark folder. Upon further investigation, it looks like the source site (BR2_PACKAGE_OPTEE_BENCHMARK_EXT_SITE) is not defined properly in the makefile. Setting the source site on the command line resolves the build issue, however the benchmarking app results in a missing TA error. To overcome this I updated the makefile instead.
After fixing the missing ta and build issue. I see the following error while benchmarking my target app:
I have tried increasing the memory by increasing both PGT_CACHE_SIZE and the configurable heap size option. Furthermore, instead of the intended app, I have tried using a helloworld TA with minimum stack and heap requirements (1K in total). However, I still see the same issue, which hinted that it might not be an overall memory constraint issue, so I skimmed through the code to see the reason.
Going through the code, the error is triggered when the PTA makes an RPC call to the op-tee driver which fails. The exact failing line is in handle_rpc_func_cmd_shm_alloc:
Here both the pages and page_num are zero or null. The driver call stack in the driver looks like this: handle_rpc_func_cmd_shm_alloc-> tee_shm_alloc->pool_op_alloc->optee_shm_register. Going through the functions I don't see any code updating the pages or page_num field so it was bound to fail. It is possible that I might be missing something here. However, adding a print shows that this kind of allocation (OPTEE_MSG_RPC_SHM_TYPE_GLOBAL) only happens once when I use the benchmark app so quite possible that this code is missing.
Based on my findings I have a couple of questions:
Also, I wasn't sure if this is the right place for this issue so please let me know if this is not the case. I can move it to the relevant project...
The text was updated successfully, but these errors were encountered: