| Age | Commit message (Collapse) | Author |
|
The usage of the common.h include file is deprecated [1], and has already
been removed from several files.
Get rid of all inclusions in the "drivers/tee" directory, and replace it
with required include files directly where needed.
[1] doc/develop/codingstyle.rst
Reviewed-by: Ilias Apalodimas <[email protected]>
Signed-off-by: Igor Opaniuk <[email protected]>
Reviewed-by: Sam Protsenko <[email protected]>
Signed-off-by: Ilias Apalodimas <[email protected]>
|
|
Change optee driver service enumeration to not enumerate (and
allocate a zero sized shared memory buffer) when OP-TEE
reports that there is no service to enumerate.
This change fixes an existing issue that occurs when the such zero
sized shared memory buffer allocated from malloc() has a physical
address of offset 0 of a physical 4kB page. In such case, OP-TEE
secure world refuses to register the zero-sized shared memory
area and makes U-Boot optee service enumeration to fail.
Fixes: 94ccfb78a4d6 ("drivers: tee: optee: discover OP-TEE services")
Signed-off-by: Etienne Carriere <[email protected]>
Reviewed-by: Patrice Chotard <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
|
|
Change optee probe function to only warn when service enumeration
sequence fails instead of reporting an optee driver probe failure.
Indeed U-Boot can still use OP-TEE even if some OP-TEE services are
not discovered.
Fixes: 94ccfb78a4d6 ("drivers: tee: optee: discover OP-TEE services")
Signed-off-by: Etienne Carriere <[email protected]>
Reviewed-by: Patrice Chotard <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
|
|
When comparing UUIDs for discovered services we only compare up to the
ptr size instead of the entire UUID
Fixes: 94ccfb78a4d61 ("drivers: tee: optee: discover OP-TEE services")
Signed-off-by: Ilias Apalodimas <[email protected]>
Reviewed-by: Etienne Carriere <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
|
|
If we fail to probe the optee-rng device, we print a wrong message
referring to the firmware tpm.
Fixes: 476a3d58dfeb ("tee: optee: don't fail probe because of optee-rng")
Reviewed-by: Patrick Delaunay <[email protected]>
Reviewed-by: Etienne Carriere <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
Signed-off-by: Ilias Apalodimas <[email protected]>
|
|
In U-Boot driver model the devices can be referenced by
phandle in the U-Boot configuration nodes.
Without a valid node provided during the bind, the driver
associated to OP-TEE TA can't be referenced.
For example to force the sequence number with alias
(.flags = DM_UC_FLAG_SEQ_ALIAS)
aliases {
rng0 = &optee;
};
or other configuration:
board-sysinfo {
compatible = "vendor,sysinfo-board";
ramdom = <&optee>;
}
With this patch all drivers bound from OP-TEE service
discovery are now associated are associated to OP-TEE
node, allowing to identify by phandle the driver
provided by the TA for one UCLASS without modifying
device tree.
Signed-off-by: Patrick Delaunay <[email protected]>
Reviewed-by: Patrice Chotard <[email protected]>
|
|
Makes OP-TEE to enumerate also services depending on tee-supplicant
support in U-Boot. This change allows OP-TEE services like fTPM TA
to be discovered and get a TPM device registered in U-Boot.
Signed-off-by: Etienne Carriere <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
Signed-off-by: Ilias Apalodimas <[email protected]>
|
|
Fixes optee-rng driver bind sequence in optee driver to print a warning
message but not report an error status when a optee-rng service driver
fails to be bound as the optee driver itself is still fully functional.
Signed-off-by: Etienne Carriere <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
Signed-off-by: Ilias Apalodimas <[email protected]>
|
|
This change defines resources for OP-TEE service drivers to register
themselves for being bound to when OP-TEE firmware reports the related
service is supported. OP-TEE services are discovered during optee
driver probe sequence which mandates optee driver is always probe once
bound.
Discovery of optee services and binding to related U-Boot drivers is
embedded upon configuration switch CONFIG_OPTEE_SERVICE_DISCOVERY.
Cc: Jens Wiklander <[email protected]>
Cc: Patrick Delaunay <[email protected]>
Signed-off-by: Etienne Carriere <[email protected]>
Reviewed-by: Patrick Delaunay <[email protected]>
|
|
Removes local variable child in optee_probe() that is not used.
Cc: Patrick Delaunay <[email protected]>
Reviewed-by: Patrick Delaunay <[email protected]>
Signed-off-by: Etienne Carriere <[email protected]>
|
|
In U-Boot, the discovery of TA based on its UUID on the TEE bus is
not supported.
This patch only binds the driver associated to the new supported
OP-TEE TA = TA_HWRNG when this driver is enable.
Signed-off-by: Patrick Delaunay <[email protected]>
|
|
This change ensures both U-Boot and OP-TEE see the same content
from shared memory when OP-TEE is invoked prior U-Boot relocation.
This change is required since U-Boot may execute with data cache off
while OP-TEE always enables cache on memory shared with U-Boot.
Signed-off-by: Etienne Carriere <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
Acked-by: Ilias Apalodimas <[email protected]>
|
|
Right now the error messages when optee has a version mismatch or shared
memory is not configured are done with a debug().
That's not very convenient since you have to enable debugging to figure
out what's going on, although this is an actual error.
So let's switch the debug() -> dev_err() and report those explicitly.
Signed-off-by: Ilias Apalodimas <[email protected]>
Reviewed-by: Patrick Delaunay <[email protected]>
|
|
At present ofnode is present in the device even if it is never used. With
of-platdata this field is not used, so can be removed. In preparation for
this, change the access to go through inline functions.
Signed-off-by: Simon Glass <[email protected]>
|
|
This name is far too long. Rename it to remove the 'data' bits. This makes
it consistent with the platdata->plat rename.
Signed-off-by: Simon Glass <[email protected]>
|
|
Rename this to be consistent with the change from 'platdata'.
Signed-off-by: Simon Glass <[email protected]>
|
|
We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).
Rename some of the latter variables to end with 'plat' for consistency.
Signed-off-by: Simon Glass <[email protected]>
|
|
This construct is quite long-winded. In earlier days it made some sense
since auto-allocation was a strange concept. But with driver model now
used pretty universally, we can shorten this to 'auto'. This reduces
verbosity and makes it easier to read.
Coincidentally it also ensures that every declaration is on one line,
thus making dtoc's job easier.
Signed-off-by: Simon Glass <[email protected]>
|
|
Necessary for dev_xxx.
Signed-off-by: Sean Anderson <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Display TEE version at information level; this patch replaces
debug() call to dev_info() in print_os_revision() function.
Signed-off-by: Patrick Delaunay <[email protected]>
Acked-by: Jens Wiklander <[email protected]>
|
|
At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.
Move the compatibility features into a separate header file.
Signed-off-by: Simon Glass <[email protected]>
|
|
At present devres.h is included in all files that include dm.h but few
make use of it. Also this pulls in linux/compat which adds several more
headers. Drop the automatic inclusion and require files to include devres
themselves. This provides a good indication of which files use devres.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Anatolij Gustschin <[email protected]>
|
|
Adds support in optee supplicant to route signed (MACed) RPMB frames
from OP-TEE Secure OS to MMC and vice versa to manipulate the RPMB
partition.
Tested-by: Igor Opaniuk <[email protected]>
Signed-off-by: Jens Wiklander <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Adds a OP-TEE driver.
* Targets ARM and ARM64
* Supports using any U-Boot memory as shared memory
* Probes OP-TEE version using SMCs
* Uses OPTEE message protocol version 2 to communicate with secure world
Reviewed-by: Simon Glass <[email protected]>
Tested-by: Igor Opaniuk <[email protected]>
Signed-off-by: Jens Wiklander <[email protected]>
|