diff options
author | Mitchel Humpherys <mitchelh@codeaurora.org> | 2015-07-30 19:24:15 -0700 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:04:49 -0700 |
commit | 8a9d07bc986c6b562e56a0b28395574bb52e4846 (patch) | |
tree | d758bf2047017fd8ac868bbd01d0d16ce88bd809 /drivers/soc | |
parent | a04defd9b7e777351bb4b36c5eec4a5749d8229e (diff) |
msm: secure_buffer: Add helper function to convert VMIDs into strings
It can be useful to convert secure VMID values into strings. Provide a
helper function to do so.
Change-Id: If907a0bac92c5d164154c0e5dfe67933115163c8
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/qcom/secure_buffer.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/drivers/soc/qcom/secure_buffer.c b/drivers/soc/qcom/secure_buffer.c index 3aa83b0eac98..be674b035afe 100644 --- a/drivers/soc/qcom/secure_buffer.c +++ b/drivers/soc/qcom/secure_buffer.c @@ -347,6 +347,38 @@ err1: return ret; } +const char *msm_secure_vmid_to_string(int secure_vmid) +{ + switch (secure_vmid) { + case VMID_HLOS: + return "VMID_HLOS"; + case VMID_CP_TOUCH: + return "VMID_CP_TOUCH"; + case VMID_CP_BITSTREAM: + return "VMID_CP_BITSTREAM"; + case VMID_CP_PIXEL: + return "VMID_CP_PIXEL"; + case VMID_CP_NON_PIXEL: + return "VMID_CP_NON_PIXEL"; + case VMID_CP_CAMERA: + return "VMID_CP_CAMERA"; + case VMID_HLOS_FREE: + return "VMID_HLOS_FREE"; + case VMID_MSS_MSA: + return "VMID_MSS_MSA"; + case VMID_MSS_NONMSA: + return "VMID_MSS_NONMSA"; + case VMID_CP_SEC_DISPLAY: + return "VMID_CP_SEC_DISPLAY"; + case VMID_CP_APP: + return "VMID_CP_APP"; + case VMID_INVAL: + return "VMID_INVAL"; + default: + return "Unknown VMID"; + } +} + #define MAKE_CP_VERSION(major, minor, patch) \ (((major & 0x3FF) << 22) | ((minor & 0x3FF) << 12) | (patch & 0xFFF)) |