-
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
init support for VxWorks-7 on Freescale i.MX6 #936
Conversation
@yanyan-wrs the "close" and "re-open" buttons are working, there is no need to test them so often ;) |
@jforissier sorry, first time doing this. I thought I need to "close" the pull request to add new staffs. By the way, i noticed there has been no comment or action taken for this pull request, so, what's the holding up, am I doing something the wrong way? |
@yanyan-wrs no problem ;) |
@@ -425,6 +445,9 @@ UNWIND( .cantunwind) | |||
|
|||
bl plat_cpu_reset_late | |||
|
|||
/* this core just comes out of reset, discard undefined l1 contents */ |
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.
Minor issue of indentation of comment.
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.
accepted and fixed
|
@NightEugene I tested with both SabreLite and SabreSD board, everything is fine. 1 Update the latest git code, and build OP-TEE with following confgurations:
2 Pretend the tee as an Linux uImage. This is to let u-boot pass r0-r2 as if it is booting a Linux, and with the CFG_TEE_GDB_BOOT option above, OP-TEE will pass r0-r3 to the real Rich OS Linux.
3 Modify the SMP boot code of Linux, in linux/arch/arm/mach-imx/platsmp.c:
4 change the
5 You may also need to change the NS L2 initialization code, if not fixed already, as you pointed out before. 6 u-boot command, for sabresd:
for sabrelite:
|
734b207
to
2ffd2f8
Compare
Hi everyone, sorry for the repeated changes here. I had intended to support VxWorks only, however, with help from @NightEugene, Linux Rich OS is also supported, with the existing u-boot setup and some patches to the Linux kernel regarding Non-Secure executing.
With this added request, both Linux and VxWorks Rich OSes can ask for OP-TEE to release the secondary cores thus enter SMP execution. |
bd7c9a8
to
2bc86a6
Compare
* Call register usage: | ||
* a0 SMC Function ID, OPTEE_SMC_BOOT_SECONDARY | ||
* a1 smp cpu index | ||
* a2 NS entry address low |
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.
To harmonize better with the other descriptions please rephrase as:
a2 Upper 32-bits of 64-bit NS entry address
a3 Lower 32-bits of 64-bit NS entry address
Any particular reason the lower bits was first?
Please add a comment about what can be expected of CPSR also.
@yanyan-wrs For my i.MX6Q SabreAuto board I maked few changes:
|
/* get ns entry from ns_entry_addrs array */ | ||
bl get_core_pos | ||
ldr r1, =ns_entry_addrs | ||
add r1, r1, r0, lsl #2 /* paddr_t is 4 bytes in 32-bit system */ |
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.
The size of paddr_t
is not guaranteed to be 4 bytes on a 32-bit system. It would be better to use the uint32_t
type instead for ns_entry_addrs[]
as anything larger than that doesn't make sense on a 32-bit system.
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.
Please update this comment too.
22c654e
to
e0f073d
Compare
I'm OK with this now. @MrVan, do you have more comments? |
@jenswi-linaro Sorry for late reply. I am ok with it. |
|
|
Reviewed-by: Peng Fan peng.fan@nxp.com |
Should I rebase and squash the changes before merge? |
@yanyan-wrs yes, please squash the commits, add the 'Reviewed-by:' tags, and rebase on top of optee_os master. Thanks! |
@yanyan-wrs ping! I can tag the commits and rebase + merge myself, if you prefer, but then the PR will show up as "closed" rather than "merged" which is not so good. |
e0f073d
to
e9615fb
Compare
Sorry for the delay, I encountered some issue in the final testing (turned out to be issue #1071). Now the PR is ready. |
Signed-off-by: Yan Yan <yan.yan@windriver.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Peng Fan <peng.fan@nxp.com>
e9615fb
to
6d96f20
Compare
@yanyan-wrs @MrVan thanks for your contribution. |
Add changes to work with VxWorks as Rich OS: