-
Notifications
You must be signed in to change notification settings - Fork 47
FROMLIST: Enable command descriptor support #115
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
Merged
shashim-quic
merged 8 commits into
qualcomm-linux:tech/security/crypto
from
uditqcom:tech/security/crypto
Jul 23, 2025
Merged
FROMLIST: Enable command descriptor support #115
shashim-quic
merged 8 commits into
qualcomm-linux:tech/security/crypto
from
uditqcom:tech/security/crypto
Jul 23, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add FROMLIST: prefix to commit subject |
Please add FROMLIST to each commit. |
Add lock and unlock flags for the command descriptor. With the former set in the requester pipe, the bam controller will lock all other pipes and process the request only from requester pipe. Unlocking can only be performed from the same pipe. Setting the DMA_PREP_LOCK/DMA_PREP_UNLOCK flags in the command descriptor means, the caller requests the BAM controller to be locked for the duration of the transaction. In this case the BAM driver must set the LOCK/UNLOCK bits in the HW descriptor respectively. Only BAM IPs version 1.4.0 and above support the LOCK/UNLOCK feature. Signed-off-by: Md Sadre Alam <[email protected]> [Bartosz: reworked the commit message] Signed-off-by: Bartosz Golaszewski <[email protected]> Link: https://lore.kernel.org/r/[email protected]
…data In preparation for supporting the pipe locking feature flag, extend the amount of information we can carry in device match data: create a separate structure and make the register information one of its fields. This way, in subsequent patches, it will be just a matter of adding a new field to the device data. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Extend the device match data with a flag indicating whether the IP supports the BAM lock/unlock feature. Set it to true on BAM IP versions 1.4.0 and above. Co-developed-by: Md Sadre Alam <[email protected]> Signed-off-by: Md Sadre Alam <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Switch to devm_kmalloc for allocating the result_buf. This allows us to drop two labels and make the devm action callback for DMA channels smaller. Signed-off-by: Bartosz Golaszewski <[email protected]> Link: https://lore.kernel.org/r/[email protected]
In preparation for supporting command descriptors, map the crypto memory range for DMA. Signed-off-by: Md Sadre Alam <[email protected]> [Bartosz: add kerneldocs, fix DMA mapping leak, rework commit message] Co-developed-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Add BAM/DMA support infrastructure. These interfaces will allow us to port the algorithm implementations to use DMA for transaction with BAM locking. [Bartosz: remove unused code, rework coding style, shuffle code around for better readability, simplify resource management, many other tweaks] Signed-off-by: Md Sadre Alam <[email protected]> Co-developed-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Replace the qce_write() implementation with one that uses DMA. Convert all algorithm implementations to use command descriptors. This makes the driver use BAM DMA exclusively instead of register read/writes. Co-developed-by: Md Sadre Alam <[email protected]> Signed-off-by: Md Sadre Alam <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Link: https://lore.kernel.org/r/[email protected]
The BAM driver now supports command descriptor locking. Add helper functions that perform the dummy writes and acquire/release the lock and use them across the supported algos. With this: if mutliple execution environments (e.g.: a trusted app and linux) try to access the same crypto engine, we can serialize their accesses. [Bartosz: rework the coding style, naming convention, commit message and ifdef logic] Signed-off-by: Md Sadre Alam <[email protected]> Co-developed-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]> Link: https://lore.kernel.org/r/[email protected]
267711e
to
82e8607
Compare
shashim-quic
approved these changes
Jul 23, 2025
edc9f8a
into
qualcomm-linux:tech/security/crypto
1 check passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Enable command descriptor support .