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

plat-ti: Configure and enable Secure Data Path by default #1815

Merged
merged 1 commit into from
Sep 29, 2017

Conversation

glneo
Copy link
Contributor

@glneo glneo commented Sep 14, 2017

Enable SDP by default on TI platforms and reserve 4 MiB from the end of
the TZDRAM area that is already reserved for OP-TEE and firewalled.

Signed-off-by: Andrew F. Davis afd@ti.com

@etienne-lms
Copy link
Contributor

Acked-by: Etienne Carriere <etienne.carriere@linaro.org>

Note: could capitalize first letter of comment sentence: s/default/Default/.

@jforissier
Copy link
Contributor

The checkpatch error should be easy to fix.

@glneo
Copy link
Contributor Author

glneo commented Sep 27, 2017

I believe the checkpatch warning should be ignored, this is more readable as the whole expression inside () is not easy to follow across newlines, also this warning existed before this patch here.

Copy link
Contributor

@jforissier jforissier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment. OK about checkpatch, not a big deal.


#else /* CFG_SECURE_DATA_PATH */
#define CFG_TEE_SDP_MEM_SIZE 0
#endif /* CFG_SECURE_DATA_PATH */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, I'd like all CFG_ variables to be configurable from makefiles or the command line, not set in .h files (for simplicity and flexibility). I know this is not currently not done consistently, but how about doing just:

#if defined(CFG_SECURE_DATA_PATH)
#define CFG_TEE_SDP_MEM_BASE	(TZDRAM_BASE + \
				TZDRAM_SIZE - \
				CFG_TEE_SDP_MEM_SIZE)
#endif

(because this computation it cannot be done practically in the makefiles)
And set CFG_TEE_SDP_MEM_SIZE ?= 0x00400000 in plat-ti/conf.mk.

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me, updated.

#define CFG_TA_RAM_SIZE ROUNDDOWN((TZDRAM_SIZE - CFG_TEE_RAM_VA_SIZE), \

#define CFG_TA_RAM_SIZE ROUNDDOWN((TZDRAM_SIZE - CFG_TEE_RAM_VA_SIZE) - \
CFG_TEE_SDP_MEM_SIZE, \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I missed something in my previous comment. You probably want CFG_TEE_SDP_MEM_SIZE set to 0x0 when CFG_SECURE_DATA_PATH != y? If so, plat-ti/conf.mk should contain:

ifeq ($(CFG_SECURE_DATA_PATH),y)
CFG_TEE_SDP_MEM_SIZE ?= 0x00400000
else
CFG_TEE_SDP_MEM_SIZE ?= 0x0
endif

Anyway:
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that, updated.

Enable SDP by default on TI platforms and reserve 4 MiB from the end of
the TZDRAM area that is already reserved for OP-TEE and firewalled.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
@jforissier jforissier merged commit 3bc5a8d into OP-TEE:master Sep 29, 2017
@glneo glneo deleted the ti-sdp branch September 30, 2017 14:46
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

Successfully merging this pull request may close these issues.

3 participants