Home
last modified time | relevance | path

Searched hist:"65 a1d74f5d8e17348e718e5bb02e533f67ed67fe" (Results 1 – 1 of 1) sorted by relevance

/optee_os/core/drivers/
H A Dplic.c65a1d74f5d8e17348e718e5bb02e533f67ed67fe Wed Aug 02 10:13:49 UTC 2023 Alvin Chang <alvinga@andestech.com> 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>