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

Define SDP memory area in embedded DTB #5133

Closed
omasse-linaro opened this issue Jan 21, 2022 · 10 comments
Closed

Define SDP memory area in embedded DTB #5133

omasse-linaro opened this issue Jan 21, 2022 · 10 comments
Labels

Comments

@omasse-linaro
Copy link
Contributor

omasse-linaro commented Jan 21, 2022

As an improvement, could it be possible to define the Secure Data Path memory region in an embedded dtb instead of the scattered array ?
Probably something like that:

	sdp_mem {
		compatible = "optee_sdp";
		region = <0x8C000000 0x02000000>;
	}

This memory region would not rely on a core_mmu_phys_mem structure definition, but a dtb one.

@jenswi-linaro
Copy link
Contributor

Adding stuff to DT takes a bit of consideration. We don't want to define our own standard in secure world.
Is there anything already defined that can be used for this purpose?

@omasse-linaro
Copy link
Contributor Author

omasse-linaro commented Jan 26, 2022

I do not thing that something has already been defined for SDP in DT. But what about reserved memory which could be used to define the SDP memory ?

reserved-memory {
	#address-cells = <1>;
	#size-cells = <1>;

	sdp_mem {
		compatible = "optee-sdp";
		reg = <0xCC000000 0x02000000>;
	};
};

@jforissier
Copy link
Contributor

jforissier commented Jan 26, 2022

@omasse-linaro yes it is done in linaro-swg/linux branch optee, see for instance commit linaro-swg/linux@2a766ee (plus the no-map property is added in a subsequent commit).

Edit: sorry what I mentioned is the reserved shared memory not SDP :-/ but yeah could be similar.

Edit 2
Given that the ION/dmabuf code on which SDP was based has been modified/removed upstream (see discussion here), I'm not sure discussing DT for SDP even makes sense until a proper implementation supported upstream is proposed.

@omasse-linaro omasse-linaro changed the title SDP memory area defined in embedded DTB Define SDP memory area in embedded DTB Jan 26, 2022
@omasse-linaro
Copy link
Contributor Author

omasse-linaro commented Jan 26, 2022

Edit 2 Given that the ION/dmabuf code on which SDP was based has been modified/removed upstream (see discussion here), I'm not sure discussing DT for SDP even makes sense until a proper implementation supported upstream is proposed.

@jforissier you are right, optee-test should now rely on DMA buff heaps to test SDP.
@jbech-linaro confirm us that @ruchi393 has this on the roadmap.

in the meantime, optee-os could use DT to define SDP and will be tested with next version of optee-test.
(cause SDP is still a used feature in optee)

@jbech-linaro
Copy link
Contributor

@jbech-linaro confirm us that @ruchi393 has this on the roadmap.

Yes, fixing SDP is on @ruchi393 roadmap, but it has lower priority for the moment IIRC.

@omasse-linaro
Copy link
Contributor Author

omasse-linaro commented Jan 28, 2022

Please find a first draft of the modifications here #5149

Tested on imx board. Unfortunately I do not have an hickey board.

@jenswi-linaro
Copy link
Contributor

So far we have managed to avoid defining our own bindings in OP-TEE, instead we've been able to reuse already established bindings. With this you're proposing something new. I'm not sure of the best way of doing such a thing. Are we sure there is nothing to reuse?
If not: How should it be reviewed? Who should review it?

@github-actions
Copy link

This issue has been marked as a stale issue because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this issue will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions bot added the Stale label Feb 28, 2022
@omasse-linaro
Copy link
Contributor Author

#5177 tested on hikey.

@github-actions github-actions bot removed the Stale label Mar 1, 2022
@github-actions
Copy link

This issue has been marked as a stale issue because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this issue will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants