-
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
Qemu virt smp #1820
Qemu virt smp #1820
Conversation
Due to #1821 the CI status is incorrect. There is a compile-time assert with |
Update |
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.
Acked-by: Jerome Forissier <[email protected]>
core/arch/arm/plat-vexpress/main.c
Outdated
@@ -180,3 +188,36 @@ static TEE_Result init_tzc400(void) | |||
|
|||
service_init(init_tzc400); | |||
#endif /*CFG_TZC400*/ | |||
|
|||
#if defined(PLATFORM_FLAVOR_qemu_virt) | |||
int psci_cpu_on(uint32_t core_idx, uint32_t entry, uint32_t context_id __unused) |
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: I suggest cpu_id
rather than core_idx
because this is not an index (I know this name is used in some platform code, but the common code uses cpu_id
which IMO is better).
|
||
sec_entry_addrs[pos] = CFG_TEE_RAM_START; | ||
dsb_ishst(); | ||
sev(); |
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.
Would it work with a single call to dsb_ishst()
? I mean:
ns_entry_addrs[pos] = entry;
sec_entry_addrs[pos] = CFG_TEE_RAM_START;
dsb_ishst();
sev();
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 guess it would but it's more correct to make sure that the updated value of sec_entry_addrs[pos]
can't be read before ns_entry_addrs[pos]
.
The second write will release core from the loop at https://github.com/linaro-swg/bios_qemu_tz_arm/blob/master/bios/entry.S#L139
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.
OK I see.
Update |
As I wrote above: |
reset_secondary() and dependencies has to be unpaged as most of it is executed before the core has been properly configured to use the pager. Acked-by: Jerome Forissier <[email protected]> Signed-off-by: Jens Wiklander <[email protected]>
Initialize GIC on secondary cores if not configured with ARM-TF. Acked-by: Jerome Forissier <[email protected]> Signed-off-by: Jens Wiklander <[email protected]>
Changes number of supported cores for variant qemu_virt to 4. Acked-by: Jerome Forissier <[email protected]> Signed-off-by: Jens Wiklander <[email protected]>
If configured with device tree and PSCI update the FDT with PSCI nodes and other information needed by the kernel to start up the secondary cores. Acked-by: Jerome Forissier <[email protected]> Signed-off-by: Jens Wiklander <[email protected]>
Enables SMP boot of the plat-vexpress qemu_virt flavor. This includes PSCI support and coherent memory shared with bios. Acked-by: Jerome Forissier <[email protected]> Tested-by: Jens Wiklander <[email protected]> Signed-off-by: Jens Wiklander <[email protected]>
8a68655
to
e4279a4
Compare
Tag applied |
Enables SMP for QEMU virt.
To be able to start qemu with
-smp 4
https://github.com/jenswi-linaro/bios_qemu_tz_arm/tree/smp is needed. This however depends on some patches in linaro-swg/bios_qemu_tz_arm#13. I'll create another bios PR once linaro-swg/bios_qemu_tz_arm#13 is merged. In the meantime, please review this.