-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Accessing Normal World Memory Space from TA #1706
Comments
|
Is there a possibilty to access normal world address space from TA during runtime? |
Only what's supplied as memory parameters. |
@jenswi-linaro I have the same problem, what about considering it in the mainline?
|
@prime-zeng |
@jenswi-linaro I know this patch, it can solve some problems, but it's limited to memory parameters, and the mapping is passive from the TA view of point, the life cycle for this type of mapping is limited to this invoke_cmd call. Sometimes active mapping is needed for a TA, I mean the TA owns the memory handle physic address of the memory(or sglist of the non-contiguous physic memory) , and do the mapping through a syscall. |
To help me better understand what's needed, can you provide an example use case? I'd like to understand when a memory parameter isn't sufficient. |
My use case is, that I have a host program (NW) that sends two addresses, like a start address of a function and the end (return) address of the function. The TA should read the two values (this actually works fine!) and all values of the addresses in between this start end address. |
@xNado Why can't this be done with a memory reference in a parameter to the TA? |
I tried to do this with a memory reference. I actually get zeros in between. The value of the first address is the same as the value of the normal world. My Output is:
... and so on My main.c code:
My TA code:
|
Looks like expected result. |
Yes, the |
Thank you for your help @jenswi-linaro! |
Hi, But when I upgrade to TEE OS v2.5, I found that does not work anymore. My use case is that I got about 200M byte encrypt data , and I need TEE OS to do decryption to the secure memory. I can not do any memory copy. what should I do? |
|
Hi @etienne-lms |
@LisShen Could you please tell us how you added a mapping of NW memory for userspace TA? Thanks, |
Hey,
I am trying to access the memory address space of the normal world from the trusted application. I found similar issues but I think I miss something.
This is my code for mapping the virtual addresses into physical addresses:
register_phys_mem(MEM_AREA_RAM_NSEC, 0x10d8d, 0x01);
I access the struct from TA with:
_phys_mem_0x10d8d.addr
I get the address but I cant access to the value. This is the error if I try to:
DMSG("[TA] ADDRESS VALUE: %i\n", *(uint32_t *)__phys_mem_0x10d8d.addr);
So my question is: Am I missing something to access the value of this address?
Your help is much appreciated. Thank you!
The text was updated successfully, but these errors were encountered: