forked from OP-TEE/optee_os
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: plic: Refine interrupt targets from hartid to context
The PLIC specification says the interrupt targets are usually hart contexts, where a hart context is a given privilege mode on a given hart. Therefore, PLIC driver should not only consider the HART ID, but also current privilege mode. Refine it by introducing the function called plic_get_context(), which translates the current HART ID into the PLIC context ID. We assume that each hart has M-mode and S-mode, therefore M-mode occupies even-numbered context ID, while S-mode occupies odd-numbered context ID. The translation can be extended by parsing device tree, submitted in future commits. Signed-off-by: Alvin Chang <alvinga@andestech.com> Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com>
- Loading branch information
Showing
1 changed file
with
44 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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