rpmsg: reserve 0-1023 for predefined services in rpmsg_create_ept#209
Conversation
|
caller can still pass the fixed address from 0 to 1023, but rpmsg_create_ept allocate the dynamic address from 1024. |
|
I think here it is important that we are aligned first on the Linux implementation. So here the main point here is to understand what is a predefined service Now let's have look at __rpmsg_create_ept to understand how RPMSG_RESERVED_ADDRESSES is used Regarding this code a predefined service is a service with a fixed address. And as this function can be called through rpmsg_create_ept API, any user can define a "predefined" service by specifying the chinfo.src address.
Did i miss something? |
|
Yes, your understand is correct. This patch align OpenAMP implementation with Linux kernel. The only difference is we trust that caller don't pass the duplicated address inside 0-1023 and then bypass the check to simplify the implemntation. |
|
This version seems to me a good compromise that would match with Linux implementation, while keeping compatibility with existing implementation:
I just need to do few more test on my side before approving it. Then the title of this patch would need to be reworked as rpmsg_create_ept can allocated reserved address. @edmooring: could you review it and give your opinion please? |
and allocate the dynamic address from 1024 like Linux kernel Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
518e507 to
da354dc
Compare
@arnopo done. |
edmooring
left a comment
There was a problem hiding this comment.
Aside from my comments, looks good to go.
and allocate the dynamic address from 1024 like Linux kernel
Signed-off-by: Xiang Xiao xiaoxiang@xiaomi.com