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-versal: add support for the Versal Net variant #6738

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

jcorbier
Copy link

@jcorbier jcorbier commented Mar 5, 2024

This series upgrades the AMD/Xilinx port with the following:

  • Add support for a new SoC in the Versal family
  • Add a hardware crypto accelerator driver for this specific SoC
  • Fixes for more recent versions of the Xilinx software environment (PLM APIs have changed in 2023)

@ldts
Copy link
Contributor

ldts commented Mar 6, 2024

thanks @jcorbier

I need to ask that the changes to support the more recent AMD/Xilinx tools maintain backwards compatibility. We should be able to query the ABI at runtime - maybe even propose whatever is needed to AMD/Xilinx https://github.com/Xilinx/embeddedsw .

I'd like to understand as well the level of testing that has been done with this software (just the output of xtest, to check if you encountered any regressions (ie this is the changelog for 4.1.0 #6574 (comment) ).

Thirdly is there anything that you also plan on posting to https://github.com/OP-TEE/optee_docs ?

@jcorbier
Copy link
Author

jcorbier commented Mar 6, 2024

Thanks @ldts for your feedback.

I need to ask that the changes to support the more recent AMD/Xilinx tools maintain backwards compatibility. We should be able to query the ABI at runtime - maybe even propose whatever is needed to AMD/Xilinx https://github.com/Xilinx/embeddedsw .

Noted. Let me see how best we can implement that.

I'd like to understand as well the level of testing that has been done with this software (just the output of xtest, to check if you encountered any regressions (ie this is the changelog for 4.1.0 #6574 (comment) ).

I don't have access to the logs right now but the current state is the same as for Versal in 4.1.0.

Thirdly is there anything that you also plan on posting to https://github.com/OP-TEE/optee_docs ?

Yes, a working version is available here https://github.com/ProvenRun/optee_docs/tree/versal_net_port
It needs some additional work before I create a pull request for it though.

Same thing for build and manifest repositories.

@ldts
Copy link
Contributor

ldts commented Mar 8, 2024

we should split the drivers (rng/nvm) into a different files (versal_net_rng, versal_net_nvm?)

@jcorbier
Copy link
Author

jcorbier commented Mar 8, 2024

we should split the drivers (rng/nvm) into a different files (versal_net_rng, versal_net_nvm?)

Agreed, the initial thinking for the current implementation was to avoid as much code duplication as possible between versal and versal_net but in the end it makes things much more complicated than needed.

@nathan-menhorn
Copy link

Hi @jcorbier any updates on this PR?

@jcorbier
Copy link
Author

Hi @jcorbier any updates on this PR?

Hi @nathan-menhorn, still working out the details of what needs to be done to properly split versal/versal-net code, including the TRNG update. I'll try and push an update to this PR by end of this week.

core/arch/arm/plat-versal/conf.mk Outdated Show resolved Hide resolved
core/arch/arm/plat-versal/conf.mk Outdated Show resolved Hide resolved
core/arch/arm/plat-versal/conf.mk Outdated Show resolved Hide resolved
core/pta/versal/fpga_pta.c Outdated Show resolved Hide resolved
core/pta/versal/fpga_pta.c Outdated Show resolved Hide resolved
core/drivers/versal_mbox.c Outdated Show resolved Hide resolved
core/drivers/crypto/versal/ecc.c Show resolved Hide resolved
core/drivers/crypto/versal/ecc_mbox.c Outdated Show resolved Hide resolved
core/drivers/versal_mbox.c Show resolved Hide resolved
core/drivers/versal_mbox.c Outdated Show resolved Hide resolved
@ldts
Copy link
Contributor

ldts commented Mar 31, 2024

@etienne-lms could you hold your comments until the patchset is updated please?

There are a couple of functional changes that need addressing first

  1. ABI runtime detection (not only to support the older toolchain but also to be covered for changes in the future)
  2. use different files for Versal net instead of conditional macros (since some drivers are radically different).

So I suggest we wait for that before we go into details (ie default configs, coding standards and so on) as some files will change quite a bit

@jcorbier
Copy link
Author

jcorbier commented Apr 2, 2024

@etienne-lms could you hold your comments until the patchset is updated please?

Indeed, I'll be pusing fixup commits in the coming hours/days.

core/drivers/crypto/versal/ecc.c Outdated Show resolved Hide resolved
core/drivers/crypto/versal/ecc.c Outdated Show resolved Hide resolved
core/drivers/crypto/versal/ecc.c Outdated Show resolved Hide resolved
core/drivers/crypto/versal/ecc_mbox.c Outdated Show resolved Hide resolved
core/pta/versal/fpga_pta.c Outdated Show resolved Hide resolved
core/drivers/versal_net_nvm.c Outdated Show resolved Hide resolved
core/drivers/versal_net_nvm.c Outdated Show resolved Hide resolved
core/drivers/versal_net_nvm.c Outdated Show resolved Hide resolved
#define VERSAL_PM_MAJOR 0
#define VERSAL_PM_MINOR 1
#define VERSAL_PM_MAJOR 1
#define VERSAL_PM_MINOR 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Deserves a specific commit IMHO.

core/drivers/crypto/versal/authenc.c Show resolved Hide resolved
@nathan-menhorn
Copy link

Hi @jcorbier what's the current status of this PR? Thanks.

@nathan-menhorn
Copy link

Hi @jcorbier any updates on this PR? Are patches to address all the comments in the PR still estimated to come by the end of the month? Thanks.

return do_write_efuses_value(EFUSE_WRITE_MISC1_CTRL_BITS, val);
}

TEE_Result versal_efuse_write_offchip_ids(uint32_t id)
Copy link
Contributor

Choose a reason for hiding this comment

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

this function is incorrect, there are total 8 offchip_revoke_id, and we use the api to update values for certain id, the parameters is lacking of the values going into that offchip id.
Please refer to the implementation in versal_nvm.c

Copy link
Author

Choose a reason for hiding this comment

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

Hi @wangjudyw,

Thanks for your feedback. This implementation is a direct mapping of the API offered by the xilnvm service:

https://github.com/Xilinx/embeddedsw/blob/86a272bd9cd412bf1e5214f6098aefff301e58f0/lib/sw_services/xilnvm/src/versal_net/server/xnvm_efuse_cdohandler.c#L229

As you can see, it only expects an uint32_t for the ID to be written in the fuses (and a flag that is set by default by the do_write_efuses_value() helper function). Could you elaborate what you mean?

Thanks!

Copy link
Contributor

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

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

mainly coding style issues

core/drivers/crypto/versal/ecc.c Outdated Show resolved Hide resolved
core/drivers/crypto/versal/ecc.c Show resolved Hide resolved
core/drivers/crypto/versal/ecc.c Outdated Show resolved Hide resolved
core/drivers/crypto/versal/ecc_mbox.c Outdated Show resolved Hide resolved
core/drivers/crypto/versal/ecc_mbox.c Outdated Show resolved Hide resolved
core/drivers/versal_mbox.c Outdated Show resolved Hide resolved
core/drivers/versal_mbox.c Outdated Show resolved Hide resolved
core/drivers/versal_net_nvm.c Show resolved Hide resolved
core/drivers/versal_trng.c Outdated Show resolved Hide resolved
lib/libutee/include/pta_versal_fpga.h Outdated Show resolved Hide resolved
Copy link

This pull request has been marked as a stale pull request because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this pull request will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.

@github-actions github-actions bot added the Stale label Jul 29, 2024
@nathan-menhorn
Copy link

Hi @jcorbier what's the status of this PR? Last we discussed updates were supposed to be pushed a few weeks ago? Thanks.

@github-actions github-actions bot removed the Stale label Jul 30, 2024
core/arch/arm/plat-versal/conf.mk Outdated Show resolved Hide resolved
core/drivers/crypto/versal/authenc.c Outdated Show resolved Hide resolved
core/drivers/crypto/versal/ecc.c Show resolved Hide resolved
core/drivers/crypto/versal/ecc.c Outdated Show resolved Hide resolved
core/drivers/crypto/versal/ecc_mbox.c Show resolved Hide resolved
core/drivers/versal_puf.c Outdated Show resolved Hide resolved
core/drivers/versal_puf.c Outdated Show resolved Hide resolved
core/include/drivers/versal_mbox.h Show resolved Hide resolved
core/include/drivers/versal_trng.h Show resolved Hide resolved
core/pta/versal/fpga_pta.c Show resolved Hide resolved
@ldts
Copy link
Contributor

ldts commented Aug 22, 2024

@jcorbier do you plan on folding the commits as per the initial patch-set for further review? I can then have a a better look - last time I checked I found a simple regression (easy to fix).

Also I was testing the Xen hypervisor with the tip of OP-TEE on the vck190 evaluation kit and I found it to be broken. I was wondering if this is a configuration (optee+xen on Versal) that you have tested? I believe probably nobody has yet (@nathan-menhorn ?)

@nathan-menhorn
Copy link

Hi @ldts no testing has been performed on Xen+optee yet as there haven't been any customers requests.

@nathan-menhorn
Copy link

@jcorbier @ldts @etienne-lms just keeping this PR alive. We should be expecting some input from @jcorbier soon.

@jcorbier
Copy link
Author

@jcorbier do you plan on folding the commits as per the initial patch-set for further review? I can then have a a better look - last time I checked I found a simple regression (easy to fix).

Yes, there a couple more things I want to fix then I'll force push a clean patchset to clean up the current fixup commits mess.

@@ -994,8 +1010,16 @@ TEE_Result versal_efuse_write_revoke_ppk(enum versal_nvm_ppk_type type)
return versal_efuse_write_misc(&misc_ctrl);
}

/*
* versal_efuse_write_revoke_id expects an efuse identifier between
* 1 and 256.

Choose a reason for hiding this comment

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

@jcorbier 0 to 255

TEE_Result versal_efuse_write_revoke_id(uint32_t id)
{
if ((id < VERSAL_NET_REVOKE_EFUSE_MIN) ||

Choose a reason for hiding this comment

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

@jcorbier check should be between 0 and 255.

I'm not sure why the AMD software was implemented this way as this is very confusing and it doesn't match the OFFCHIP_REVOKE function, which expects values from 1 - 256, but this function expects values from 0 to 255

See the error handling of
https://github.com/Xilinx/embeddedsw/blob/master/lib/sw_services/xilnvm/src/versal_net/server/xnvm_efuse.c#L615C21-L617
compared to
https://github.com/Xilinx/embeddedsw/blob/master/lib/sw_services/xilnvm/src/versal_net/server/xnvm_efuse.c#L701-L703

@@ -1012,12 +1014,12 @@ TEE_Result versal_efuse_write_revoke_ppk(enum versal_nvm_ppk_type type)

/*
* versal_efuse_write_revoke_id expects an efuse identifier between
* 1 and 256.
* 1 and 256.

Choose a reason for hiding this comment

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

0 - 255

Choose a reason for hiding this comment

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

@jcorbier please fix.

Comment on lines +1021 to +1024
if (id < VERSAL_NET_REVOKE_EFUSE_MIN ||
id > VERSAL_NET_REVOKE_EFUSE_MAX)

Choose a reason for hiding this comment

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

@jcorbier checks needs to be between 0 and 255 for this function.

Choose a reason for hiding this comment

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

@jcorbier please fix.

@ldts
Copy link
Contributor

ldts commented Sep 23, 2024

@jcorbier @nathan-menhorn I am not seeing the separate commit that updates versal to the new PLM - I dont think this should be introduced just as part of the versal_net platform.
having said that, if we want to drop the support for the previous toolchain (@nathan-menhorn?) then I suppose we could.

Re: is this all that is needed or something else coming (this breaks versal last time I tested it)
9267cb6

@nathan-menhorn
Copy link

@jcorbier @nathan-menhorn I am not seeing the separate commit that updates versal to the new PLM - I dont think this should be introduced just as part of the versal_net platform. having said that, if we want to drop the support for the previous toolchain (@nathan-menhorn?) then I suppose we could.

Re: is this all that is needed or something else coming (this breaks versal last time I tested it) 9267cb6

Hi @ldts we still need Versal support as customers are actively using the Versal version. If this (your link above) breaks your original port supported for the 2022.1 and 2022.2 Versal BSPs then this isn't good.

@ldts
Copy link
Contributor

ldts commented Sep 27, 2024

Hi @ldts we still need Versal support as customers are actively using the Versal version. If this (your link above) breaks your original port supported for the 2022.1 and 2022.2 Versal BSPs then this isn't good.

ok. I'll wait for the commits being fold, then validate and review the partitioning/integration - @etienne-lms has already done the heavy lifting.

do you know if anyone is looking into the xen support? as I said it broken but I dont think it should be much work to get it right

@nathan-menhorn
Copy link

Thanks @ldts. No one is looking into Xen + OP-TEE support. We don't have any customer requests and we don't have the resources to investigate this at this time.

@ldts
Copy link
Contributor

ldts commented Sep 30, 2024

Thanks @ldts. No one is looking into Xen + OP-TEE support. We don't have any customer requests and we don't have the resources to investigate this at this time.

um, that is a pity. Over the summer I did some prototyping - integrated OP-TEE on meta-xilinx booted xen and started debugging op-tee but then had to drop it.

Maybe I'll continue with it since I still have your board - need to check with my employer first if they allow me work on this on my spare time. will let you know

@nathan-menhorn
Copy link

Thanks @ldts. Feel free to give me an update offline through email.

@jcorbier
Copy link
Author

jcorbier commented Jan 30, 2025 via email

@jenswi-linaro
Copy link
Contributor

Please rebase the patches to resolve the conflicts.

@jcorbier
Copy link
Author

Please rebase the patches to resolve the conflicts.

@jenswi-linaro Will do, thanks. I'll be pushing more updates today.

Versal Net is a new SoC flavor based on the Versal architecture. This
commit introduces it in versal platform code.

Signed-off-by: Jeremie Corbier <[email protected]>
@jcorbier jcorbier force-pushed the versal_net_port_upstreaming branch from 8e21b82 to 0ab9785 Compare January 31, 2025 16:04
@jcorbier
Copy link
Author

@nathan-menhorn Just pushed a rebased version of the port with support for TRNG v2. I'll be pushing all other repositories on Monday morning after more testing but everything is pretty close to being complete.

Copy link
Contributor

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

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

For commit "drivers: versal: fix RSA driver": add tag Fixes: cef8ce12fcab ("crypto: versal: RSA driver")

.rmt = IPI_ID_PMC,
.lcl = IPI_ID_3,
.lcl = IPI_ID_5,
Copy link
Contributor

Choose a reason for hiding this comment

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

(commit "plat-versal: add support for Versal Net variant")
Changes versal-generic config. Is that right?
That said, these field of ipi are initialized from versal_mbox_init() so is this change really needed?

#define IPI_REG_BASE(I) (versal_ipi_table[I].ipi_reg_base)
#define IPI_BIT_MASK(I) (versal_ipi_table[I].ipi_bit_mask)
#define IPI_BUF_BASE(I) (versal_ipi_table[I].ipi_buf_base)
#define IPI_REMOTE_OFFSET(I) (versal_ipi_table[I].ipi_remote_offset)
Copy link
Contributor

Choose a reason for hiding this comment

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

Prefer lower case of arguments: s/I/i/

@@ -302,99 +427,113 @@ TEE_Result versal_mbox_alloc(size_t len, const void *init,
return TEE_SUCCESS;
}

TEE_Result versal_mbox_notify(struct versal_ipi_cmd *cmd,
TEE_Result versal_mbox_free(struct versal_mbox_mem *mem)
Copy link
Contributor

Choose a reason for hiding this comment

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

All callers of versal_mbox_free() do not check the return value.
I think the best way would be to have the function returning void, allow mem == NULL, maybe add and assertion on mem != NULL` to address unexpected case when building in debug mode.

#define SEC_MODULE_SHIFT 8
#define SEC_MODULE_ID 5

#define CRYPTO_API_ID(__x) ((SEC_MODULE_ID << SEC_MODULE_SHIFT) | (__x))
Copy link
Contributor

Choose a reason for hiding this comment

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

Prefer `(SHIFT_U32(SEC_MODULE_ID, SEC_MODULE_SHIFT) | (__x))

if (!buf)
return TEE_ERROR_OUT_OF_MEMORY;

memcpy(buf, params[0].memref.buffer, bufsize);
Copy link
Contributor

Choose a reason for hiding this comment

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

This will copy more bytes that those provided in params[0].memref.buffer. Is this expected? Should the buffer by padded this 0s instead?

Copy link
Author

Choose a reason for hiding this comment

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

Indeed, fixed.

@@ -113,6 +117,7 @@ CFG_VERSAL_SHA3_384 ?= y
CFG_VERSAL_PUF ?= y

# Enable Hardware Unique Key driver
CFG_VERSAL_DUMMY_DNA ?= n
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe force n also if CFG_INSECURE is disabled.

#define EFUSE_CACHE_PLM_IV_RANGE0_OFFSET 0x1DC
#define EFUSE_CACHE_DATA_PARTITION_IV_RANGE0_OFFSET 0x1E8
#define EFUSE_CACHE_USER0_OFFSET 0x240
#define EFUSE_CACHE_PUF_SYN0_OFFSET 0x300
Copy link
Contributor

Choose a reason for hiding this comment

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

Prefer macro definitions at top of the source file.

reg_pair_from_64(virt_to_phys(p.buf), &b, &a);

cmd.data[0] = NVM_API_ID(id);
cmd.data[1] = (type << 16) | EFUSE_ENV_DIS_FLAG;
Copy link
Contributor

Choose a reason for hiding this comment

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

SHIFT_U32()

keys->aes_key, EFUSE_AES_KEY_LEN);
if (res2) {
DMSG("Error programming AES key (0x%" PRIx32 ")", res2);
res = TEE_ERROR_GENERIC;
Copy link
Contributor

Choose a reason for hiding this comment

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

Still attempt to program other fuses if this failed? Maybe return straight?

Copy link
Author

Choose a reason for hiding this comment

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

We might have weird scenarios where one key has already been burnt and locked and the other ones not yet and we don't want the other writes to fail.

#if defined(CFG_VERSAL_RNG_DRV_V2)
if (trng->cfg.version == TRNG_V2)
trng_clrset32(trng->cfg.addr, TRNG_CTRL_3, TRNG_CTRL_3_DLEN_MASK,
TRNG_CTRL_3_DLEN_DEFVAL);
Copy link
Contributor

Choose a reason for hiding this comment

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

indentation

Make it more generic and still provide a default IPI channel to the PMC
for the other drivers.

Signed-off-by: Jeremie Corbier <[email protected]>
@jcorbier jcorbier force-pushed the versal_net_port_upstreaming branch from 0ab9785 to 9835f1f Compare February 3, 2025 16:03
@jcorbier
Copy link
Author

jcorbier commented Feb 3, 2025

@etienne-lms Thanks for the review once more. I'll be taking that into account in another round of commits.

Copy link

@nathan-menhorn nathan-menhorn left a comment

Choose a reason for hiding this comment

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

Comments on TRNG self-check

@@ -963,6 +991,10 @@ static TEE_Result trng_kat_test(struct versal_trng *trng)
if (!trng)
return TEE_ERROR_GENERIC;

/* Self-tests are performed in HW */
if (trng->cfg.version == TRNG_V2)
return TEE_SUCCESS;

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

@ldts
Copy link
Contributor

ldts commented Feb 7, 2025

@jcorbier the commit "versal rework mailbox driver" should be split into multiple commits indicating what is being addressed and what new functionality is being added (ie, I think the timeout feature while waiting for an acknowledgement deserves one)

@ldts
Copy link
Contributor

ldts commented Feb 7, 2025

@jcorbier it would have been cleaner to keep separate ecc and kpi drivers instead of splitting ecc - more over since ecc.c has a conditional macro for kpi. would it be too much work to keep them separate? It would be great if you could do that please.

@ldts
Copy link
Contributor

ldts commented Feb 7, 2025

@jcorbier could you keep the foundries.io copyright in versal_trng.h? AFAICS is a verbatim copy/paste from versal_trng.c?

Copy link
Contributor

@ldts ldts left a comment

Choose a reason for hiding this comment

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

Replacing the HUK is going to break systems using RPMB if they take this upgrade.

Could you make HKDF derivation a configuration option please disabled by default?

Copy link
Contributor

@ldts ldts left a comment

Choose a reason for hiding this comment

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

WRT to the RSA driver "fix", the code was correct for 2022.1. I think the title will confuse projects that regularly cherry-pick security fixes.

This commit should be named update to 2022.2 or something similar instead (not tagged at as a a generic fix for the RSA driver)

PLM HWRNG driver cannot provide more than 32 bytes of entropy at a time.
Split bigger requests into 32 bytes chunks.

Signed-off-by: Jeremie Corbier <[email protected]>
The Versal Net variant comes with a dedicated PKI engine. This driver
makes use of the engine for ECDSA P-256, P-384, and P-521 sign, verify
and key generation operations.

Signed-off-by: Jeremie Corbier <[email protected]>
The original HUK driver generated the HUK using SHA-256. This commit
replaces this mechanism with the more robust HKDF-SHA256.

Signed-off-by: Jeremie Corbier <[email protected]>
Add simple PTA allowing to dynamically load data in the Versal PL.

Signed-off-by: Jeremie Corbier <[email protected]>
 - update crypto API IDs
 - update calls to the KAT subsystem

Signed-off-by: Jeremie Corbier <[email protected]>
The XilNvm API has heavily changed between Versal and Versal
Net. This commit adds support for the Net variant.

Signed-off-by: Jeremie Corbier <[email protected]>
XilSecure has been updated to pack the public exponent right after the
modulus rather than at a fixed 512 bytes (RSA 4096 key size) offset. See
commit below for more details:

Xilinx/embeddedsw@c2dd2eb

Fixes: cef8ce1 ("crypto: versal: RSA driver")
Signed-off-by: Jeremie Corbier <[email protected]>
Versal Net TRNG is very close to Versal but includes hardware DF. This
patch adds support for this.

Signed-off-by: Jeremie Corbier <[email protected]>
@jcorbier jcorbier force-pushed the versal_net_port_upstreaming branch from 9835f1f to 2ee731c Compare February 7, 2025 17:45
@nathan-menhorn
Copy link

Hi @etienne-lms @jenswi-linaro just curious what else you need to get this merged into main. Thanks.

@jenswi-linaro
Copy link
Contributor

@nathan-menhorn have you addressed all the comments from @ldts?
This is a rather large pull request, more than 4000 LOC to review so it's extra important to be clear about what's updated so we don't need to check the same thing repeatedly. Overlooking comments or questions will cause further delays. If you don't agree with something be clear about that so it can be discussed.

@nathan-menhorn
Copy link

Hi @jenswi-linaro although @ldts provided excellent feedback, the Versal OP-TEE port is no longer maintained and only works with 2022.1 and 2022.2 AMD bsps. Additionally, the customer has been awaiting this OP-TEE OS port for over 2 years so this upstream effort will need to be prioritized over requests from @ldts.

cc: @jcorbier

@ldts
Copy link
Contributor

ldts commented Feb 12, 2025

Hi @jenswi-linaro although @ldts provided excellent feedback, the Versal OP-TEE port is no longer maintained and only works with 2022.1 and 2022.2 AMD bsps. Additionally, the customer has been awaiting this OP-TEE OS port for over 2 years so this upstream effort will need to be prioritized over requests from @ldts.

cc: @jcorbier

The first thing I suggested on this pull request was separating the commit that updates the Versal port to a more recent PLM.

If I recall correctly, this primarily involved ABI detection and a minor protocol adjustment in one of the drivers due to changes in the PLM call identifiers. Updating the current Versal support to a recent BSP—if still relevant—shouldn’t be a major effort, likely just a few days of work.

I’m not entirely satisfied with how this port has been structured, and it’s unfortunate that addressing the syntactic review—though necessary—has taken so long. As a result, we’ve run out of time to ensure a clear separation between Versal and Versal Net.

That said, we are where we are, so moving forward: from your comment, it sounds like the current upstream Versal port is now obsolete (no users). If that’s the case, it may be time to consider dropping it entirely. @nathan-menhorn, do you know who will be maintaining Versal Net? Perhaps that team could also take over maintainership of Versal and its drivers and handle the necessary cleanup?

@jenswi-linaro
Copy link
Contributor

Additionally, the customer has been awaiting this OP-TEE OS port for over 2 years

This is all the more reason to be keen to answer on review feedback from someone who knows the code. Upstreaming takes time, especially when it's in large chunks like this. @ldts has spent time to review this PR and his requests are in line with what you should expect when upstreaming.

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.

7 participants