Skip to content
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

Shared access via access property #164

Open
mbolivar-nordic opened this issue Mar 2, 2023 · 3 comments
Open

Shared access via access property #164

mbolivar-nordic opened this issue Mar 2, 2023 · 3 comments

Comments

@mbolivar-nordic
Copy link
Contributor

As of 4fc81d4, the access property in the
"openamp,domain-v1" binding has the following in its specification:

   Description A list of devices the domain shall have exclusive access to,
               using bus firewalls or other similar technologies.

I can imagine scenarios where a precisely specified subset of the
execution domains in a system, each with a different CPU, needs access
to a resource, not just the default domain, a single domain, or a set
of domains that share a CPU.

Consider a scenario where an application processor needs to share a
peripheral at runtime with a helper core running an RTOS, with mutual
exclusion established at runtime via out-of-band means like an RPMsg
channel. This has 2 cpu clusters, each with their own domain, that
both need access to the peripheral. But absent other mutual exclusion,
in the system we want to prevent access from any other cluster, etc.

There doesn't seem to be a way to describe this in the current binding.

Am I missing something?

@sstabellini
Copy link
Collaborator

We actually talked about resource sharing at length. If a resource is shared among multiple domains, it should be present in the "access" list of all the domains that are sharing the resource. Maybe it should be clarified in the specification.

@mbolivar-nordic
Copy link
Contributor Author

Maybe it should be clarified in the specification.

It sounds like you're saying the spec should say:

shall have access to

instead of

shall have exclusive access to

right?

@sstabellini
Copy link
Collaborator

Yes

mbolivar-nordic added a commit to mbolivar-nordic/lopper that referenced this issue May 10, 2023
Following some discussion, it became clear that the device access
granted by a domain's 'access' property is not intended to be
exclusive. However, the specification currently states that it is.

This is unintended and precludes use cases where two domains need to
share a resource. Fix it by saying access does not imply exclusive
access, as intended but currently not as specified.

Fixes: devicetree-org#164
Signed-off-by: Martí Bolívar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants