|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC 2/4] arm: add generic TEE mediator framework
On 17/10/17 18:22, Volodymyr Babchuk wrote: Hi Julien, On Tue, Oct 17, 2017 at 05:39:29PM +0100, Julien Grall wrote: Excuse me, looks like you skipped my thoughts about how to detect TEE if we are not sure, that we are running on SMCCC-capable platform. How do you think, is it appropriate to rely on DT? I didn't have any opinion as long as it covers most of the TEE and does not make any assumption on the platform other than written in the ARM ARM. I have no idea how Linux is doing the detection, it might be worth for you to have a look there. [...] I would expect TEE to not be enabled by default for guests. This would be user configurable. So if it requests TEE and it is not possible to instantiate one, then the domain creation should failed. [...]diff --git a/xen/arch/arm/tee/tee.c b/xen/arch/arm/tee/tee.c new file mode 100644 index 0000000..7f7a846 --- /dev/null +++ b/xen/arch/arm/tee/tee.c @@ -0,0 +1,134 @@ +/* + * xen/arch/arm/tee/tee.c + * + * Generic part of TEE mediator subsystem + * + * Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx> + * Copyright (c) 2017 EPAM Systems. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <xen/types.h> +#include <asm/smccc.h> +#include <asm/tee.h> + +/* + * According to ARM SMCCC (ARM DEN 0028B, page 17), service owner + * for generic TEE queries is 63. + */ +#define TRUSTED_OS_GENERIC_API_OWNER 63 + +#define ARM_SMCCC_FUNC_GET_TEE_UID \ + ARM_SMCCC_CALL_VAL(ARM_SMCCC_FAST_CALL, \ + ARM_SMCCC_CONV_32, \ + TRUSTED_OS_GENERIC_API_OWNER, \ + ARM_SMCCC_FUNC_CALL_UID)This likely needs to be defined in smccc as AFAIU it is part of the SMCCC.It only used there. I'm not sure if I should define it globally.Maybe ARM_SMCCC_FUNC_GET_TEE_UID, but definitely TRUSTED_OS_GENERIC_API_OWNER should stick with the rest of the subsystem definition in smccc.h.Yes, will do in this way.[...] Well, if you are going to do a different probe than via SMCCC, then this discussion is not necessary as the printk would likely disappear. + tee_uid.a[4 ], tee_uid.a[5 ], tee_uid.a[6 ], tee_uid.a[7 ], + tee_uid.a[8 ], tee_uid.a[9 ], tee_uid.a[10], tee_uid.a[11], + tee_uid.a[12], tee_uid.a[13], tee_uid.a[14], tee_uid.a[15]); + + for ( desc = _steemediator; desc != _eteemediator; desc++ ) -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |