-
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
plat-ti: Configure and enable Secure Data Path by default #1815
Conversation
Note: could capitalize first letter of comment sentence: s/default/Default/. |
The checkpatch error should be easy to fix. |
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. |
There was a problem hiding this 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 */ |
There was a problem hiding this comment.
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
.
?
There was a problem hiding this comment.
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, \ |
There was a problem hiding this comment.
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>
There was a problem hiding this comment.
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>
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