Hi Tf-a-tests team,
We have a query regarding TF-A test especially hot-plug request on a CPU with invalid entry-point address, where zero is passed as invalid address. Could you please let us know why address 0x0 is invalid address here ? Please refer to below code path for reference.
https://review.trustedfirmware.org/plugins/gitiles/TF-A/tf-a-tests/+/refs/he...
Regards, Maheedhar.
Hi Maheedhar,
Could you please let us know why address 0x0 is invalid address here?
You could have a look at plat/arm/common/arm_pm.c:arm_validate_ns_entrypoint() in tf-a. Like the comment says, 0 isn't particularly special, but on arm platforms we can be pretty confident that it will be outside of DRAM and therefore invalid to return to. I suppose if there was a platform where this wasn't true then the test won't be correct. Is this causing issues?
Cheers, Boyan
Hi Boyan,
There are other platforms which return SUCCESS for all address ranges in the *_validate_ns_entrypoint API. Are these implementations incorrect ?
For reference: https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+... https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+...
Regards, Maheedhar.
-----Original Message----- From: Boyan Karatotev via TF-A-Tests tf-a-tests@lists.trustedfirmware.org Sent: Wednesday, January 22, 2025 7:09 PM To: tf-a-tests@lists.trustedfirmware.org Subject: [Tf-a-tests] Re: Invalid entry point in cpu hotplug
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
Hi Maheedhar,
Could you please let us know why address 0x0 is invalid address here?
You could have a look at plat/arm/common/arm_pm.c:arm_validate_ns_entrypoint() in tf-a. Like the comment says, 0 isn't particularly special, but on arm platforms we can be pretty confident that it will be outside of DRAM and therefore invalid to return to. I suppose if there was a platform where this wasn't true then the test won't be correct. Is this causing issues?
Cheers, Boyan -- TF-A-Tests mailing list -- tf-a-tests@lists.trustedfirmware.org To unsubscribe send an email to tf-a-tests-leave@lists.trustedfirmware.org
Hi Maheedhar,
There are other platforms which return SUCCESS for all address ranges in the *_validate_ns_entrypoint API. Are these implementations incorrect ?
I suppose they are, yes. Presumably, if the supplied address on these platforms was out of range, we'd panic the core. It probably doesn't matter much in practice though as Linux won't usually do that.
Cheers, Boyan
Hi Boyan,
-----Original Message----- From: Boyan Karatotev boyan.karatotev@arm.com Sent: Friday, January 24, 2025 2:00 PM To: Bollapalli, Maheedhar Sai MaheedharSai.Bollapalli@amd.com; tf-a- tests@lists.trustedfirmware.org Subject: Re: [Tf-a-tests] Re: Invalid entry point in cpu hotplug
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
Hi Maheedhar,
There are other platforms which return SUCCESS for all address ranges in the
*_validate_ns_entrypoint API. Are these implementations incorrect ?
I suppose they are, yes. Presumably, if the supplied address on these platforms was out of range, we'd panic the core. It probably doesn't matter much in practice though as Linux won't usually do that.
Yes, there can be other platforms which will treat 0x0 as valid address. Considering this the tf-a-tests infrastructure for validating the entry point should be implemented in a way so that it can comply for all platforms.
Regards, Maheedhar.
Hi Maheedhar,
There are other platforms which return SUCCESS for all address ranges in the
*_validate_ns_entrypoint API. Are these implementations incorrect ?
I suppose they are, yes. Presumably, if the supplied address on these platforms was out of range, we'd panic the core. It probably doesn't matter much in practice though as Linux won't usually do that.
Yes, there can be other platforms which will treat 0x0 as valid address. Considering this the tf-a-tests infrastructure for validating the entry point should be implemented in a way so that it can comply for all platforms.
That's true, but it must not have came up this far with the existing platforms tftf supports. I don't see why it can't it be done, so if you have an idea for an implementation me or someone else on the team would be happy to review it.
Cheers, Boyan
tf-a-tests@lists.trustedfirmware.org