Git Product home page Git Product logo

optee_docs's Introduction

OP-TEE documentation

This is official documentation for the OP-TEE project. Before OP-TEE v3.5.0 it used to be spread across all different OP-TEE gits making up the OP-TEE project as well as optee.org. But starting with OP-TEE v3.5.0 we have gathered all documentation at single place (i.e., this git).

Even though GitHub renders *.rst somewhat OK, you are not suppossed to browse the documentation there/here. Instead you should go to optee.readthedocs.io, where you will find the complete documentation rendered using Sphinx.

optee_docs's People

Contributors

37eex9 avatar apalos avatar b49020 avatar clementfaure avatar dependabot[bot] avatar emantor avatar etienne-lms avatar fulcronz avatar glneo avatar igoropaniuk avatar imre-kis-arm avatar jbech-linaro avatar jclsn avatar jenswi-linaro avatar jforissier avatar johndoe31415 avatar ldts avatar mimok avatar nathan-menhorn avatar onetokens avatar prabhakarlad avatar qazwsxedcrfvtg14 avatar raincode avatar ruchi393 avatar rutigl avatar sahilnxp avatar sander-visser avatar silvamatteus avatar stgloorious avatar wamserma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

optee_docs's Issues

Build prerequisites: the Ubuntu 20.04 python3-cryptography doesn't work

In the document: https://optee.readthedocs.io/en/latest/building/prerequisites.html, the python package, cryptography, is documented to be installed from Ubuntu package repository.
But in Ubuntu 20.04, python3-cryptography is too old to build the latest optee_os. The build error is like:

Traceback (most recent call last):
  File "/home/mohits/temp/bseid_5986093/src_release/nvidia-jetson-optee-source/optee/build/t234/export-ta_arm64/scripts/sign_encrypt.py", line 968, in <module>
    main()
  File "/home/mohits/temp/bseid_5986093/src_release/nvidia-jetson-optee-source/optee/build/t234/export-ta_arm64/scripts/sign_encrypt.py", line 964, in main
    args.func(args)
  File "/home/mohits/temp/bseid_5986093/src_release/nvidia-jetson-optee-source/optee/build/t234/export-ta_arm64/scripts/sign_encrypt.py", line 841, in command_sign_enc
    ta_image.add_subkey(args.subkey, args.name)
  File "/home/mohits/temp/bseid_5986093/src_release/nvidia-jetson-optee-source/optee/build/t234/export-ta_arm64/scripts/sign_encrypt.py", line 793, in add_subkey
    sk_image.parse()
  File "/home/mohits/temp/bseid_5986093/src_release/nvidia-jetson-optee-source/optee/build/t234/export-ta_arm64/scripts/sign_encrypt.py", line 562, in parse
    self.subkey_key = rsa.RSAPublicNumbers(e, n).public_key()
TypeError: public_key() missing 1 required positional argument: 'backend'

The solution is to install a newer version cryptography:

sudo apt remove python3-cryptography
pip3 install cryptography

So create this ticket and hope it can be fixed quickly.

TA UUID generation example: output syntax is broken.

Hello everyone,
I just tried to create a first example TA and used the python snippet defined in the documentation to generate a UUID.
The snippet given as "Note" says:

python -c "import uuid; u=uuid.uuid4(); print(u); \
   n = [', 0x'] * 11; \
   n[::2] = ['{:12x}'.format(u.node)[i:i + 2] for i in range(0, 12, 2)]; \
   print('\n' + '#define TA_UUID\n\t{ ' + \
         '0x{:08x}'.format(u.time_low) + ', ' + \
         '0x{:04x}'.format(u.time_mid) + ', ' + \
         '0x{:04x}'.format(u.time_hi_version) + ', \\ \n\n\t\t{ ' + \
         '0x{:02x}'.format(u.clock_seq_hi_variant) + ', ' + \
         '0x{:02x}'.format(u.clock_seq_low) + ', ' + \
         '0x' + ''.join(n) + '} }')"

But in the output there is one newline ("\n") and one [space] (" ") too much. I suggest changing this line '0x{:04x}'.format(u.time_hi_version) + ', \\ \n\n\t\t{ ' + \ to '0x{:04x}'.format(u.time_hi_version) + ', \x5c\n\t\t{ ' + \.

Thanks for all the great work and the good documentation.

proposal to move AOSP in the build article layout

Could we change the ordering in build & doc article?
It currently goes this way:


Build and run

(some text)

  • AOSP
    • Prerequisites
    • Build instructions
    • Flashing the image
    • Partial flashing
    • Experimental prebuilts
    • Running xtest
    • Running VTS Gtest unit for Gatekeeper and Keymaster (Optional)
    • Enable adb over USB
    • Known issues
  • Device specific information
    • DeveloperBox
    • FVP
    • HiKey 620
    • ...

And one hardly goes first clearing to the generic entry point: device ways and the prerequisites/toolchain parts.

I suggest we change to:


Build and run

(still the same text...)

  • Prerequisites
  • Toolchains
    • Download/install
    • Export PATH
    • LLVM / Clang
  • Device specific information
    • DeveloperBox
    • FVP
    • HiKey 620
    • ...
  • AOSP
    • Prerequisites
    • Build instructions
    • Flashing the image
    • ...
  • Linux kernel TEE framework
  • OP-TEE gits
    • ...
  • Trusted Applications
    • ...

What do you think about it?

Question: How work a Opensession call just before we execute TA entry point

[edit]: sorry, bad git repository

Hi,
I'm trying to debug a TA which crashes during Opensession. I get the following error messages.
NOTE: I haven't the latest version of OPTEE-OS, I'm running with version 3.9.0 (from ST Microelectronics).

E/TC:? 0
E/TC:? 0 User TA data-abort at address 0x4002c088 (write permission fault)
E/TC:? 0 fsr 0x00000a0f ttbr0 0x2ffd5020 ttbr1 0x00000000 cidr 0x0
E/TC:? 0 cpu #1 cpsr 0x60000130
E/TC:? 0 r0 0x00000017 r4 0x4000cf68 r8 0x00000001 r12 0x00000017
E/TC:? 0 r1 0x00010088 r5 0x00000003 r9 0x0000000a sp 0x40003f50
E/TC:? 0 r2 0x400332fc r6 0x40037040 r10 0x00000028 lr 0x4002c088
E/TC:? 0 r3 0x4001c000 r7 0x400340cc r11 0x400340fc pc 0x40006398
E/TC:? 0 region 0: va 0x40000000 pa 0x2ffc0000 size 0x001000 flags ---R-X
E/TC:? 0 region 1: va 0x40002000 pa 0x00000000 size 0x002000 flags rw-RW-
E/TC:? 0 region 2: va 0x40004000 pa 0x00000000 size 0x005000 flags r-x---
E/TC:? 0 region 3: va 0x40009000 pa 0x00000000 size 0x001000 flags rw-RW-
E/TC:? 0 region 4: va 0x4000a000 pa 0x00000000 size 0x003000 flags rw-RW-
E/TC:? 0 region 5: va 0x4000d000 pa 0x00000000 size 0x001000 flags r--R--
E/TC:? 0 region 6: va 0x4000e000 pa 0x00000000 size 0x001000 flags rw-RW-
E/TC:? 0 region 7: va 0x4001c000 pa 0x00000000 size 0x001000 flags r--R--
E/TC:? 0 region 8: va 0x4002c000 pa 0x00000000 size 0x009000 flags r-xR--
E/TC:? 0 region 9: va 0x40035000 pa 0x00000000 size 0x018000 flags rw-RW-
E/TC:? 0 init_with_ldelf:235 ldelf panicked
E/TC:? 0 tee_ta_open_session:728 Failed. Return error 0xffff0000
simple_test: TEEC_Opensession failed with code 0xffff0000 origin 0x3

I think the problem comes from the ELF file of my TA which is badly defined because I don't get the ELF file in classical way. I'm trying to debug that, but I don't understand what is done, and where is this code (which source code file if there is one), between the first moment when it switches in user-mode (TEE side) and when the TA entry point (__ta_entry) is executed.

Especially after this following code (after the instruction bx r1):
https://github.com/OP-TEE/optee_os/blob/845ecd82d575c1bc486e4f9ef9bca65fa6a58025/core/arch/arm/kernel/thread_a32.S#L811

eret_to_user_mode:
	write_tpidrprw r0
#if defined(CFG_CORE_UNMAP_CORE_AT_EL0) || defined(CFG_WITH_LPAE)
	write_tpidruro r1
#endif

#ifdef CFG_CORE_UNMAP_CORE_AT_EL0
	ldr	r0, =thread_user_kcode_offset
	ldr	r0, [r0]
	read_vbar r1
	sub	r1, r1, r0
	write_vbar r1
	isb

	/* Jump into the reduced mapping before the full mapping is removed */
	ldr	r1, =1f
	sub	r1, r1, r0
	bx	r1

Thanks !

Using url for internal links

Is it possible to use the full url rather than :ref:`page_name` for internal links as well in a page, specifically for aosp.rst, like this? This is to enhance portability, i.e. be able to use the page (.rst doc) as-is at a different location, e.g. github.com, etc.

A specific use case is when making an aosp release. The main release page (e.g. here) has a copy of aosp.rst (renamed as readme.rst) to capture the build instructions at the time. We don't/can't just point/link directly to aosp.rst itself since it's a moving target, i.e. updated to always reflects the current/latest build instructions.

If we use the page as-is right now, it would show up like here, i.e. the internal links using :ref:`page_name` show up literally and don't work.

Outdated platform support list

It looks like https://optee.readthedocs.io/general/platforms.html hasn't been updated with latest platform support added in OP-TEE like i.MX8MQ/MM etc.

Shouldn't we ask platform authors to update this file also whenever a new platform support is added in OP-TEE? As it looks like a common location for people to search if a particular platform is supported in OP-TEE.

-Sumit

Offline signing of Trusted Applications section is partially incorrect

There are some issues with this section:

  • For the sign_encrypt.py digest and sign_encrypt.py stitch commands the public key and not the private key should be used. Although passing the private key here is possible, it is misleading for the case where an HSM is used.
  • The Nitrokey HSM signing part does not execute in bash

Error when building for Raspberry Pi 3

I get this:

  HOSTLD  scripts/dtc/dtc
/usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status

GCC:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d --with-isl --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-install-libiberty --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-libunwind-exceptions --disable-werror gdc_include_dir=/usr/include/dlang/gdc
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.0 (GCC) 

Build steps from ~/.bash_history (up until failing):

  532  repo init -u https://github.com/OP-TEE/manifest.git -m  rpi3.xml
  533  repo sync -j4 --no-clone-bundle
  534  cd build
  535  make -j2 toolchains
  536  make 

linkfile invalid, aarch64-linux-gnu-gdb: bad component

I follow the build instruction but got an error error.ManifestInvalidPathError: <linkfile> invalid "src": ../toolchains/aarch64/bin/aarch64-linux-gnu-gdb: bad component: ..

The environment is Ubuntu 18.04 and the Prerequisites are already installed.

$ repo init -u https://github.com/OP-TEE/manifest.git -m qemu_v8.xml -b 3.4.0
gpg: key 16530D5E920F5C65: "Repo Maintainer <[email protected]>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

Get https://gerrit.googlesource.com/git-repo/clone.bundle
Get https://gerrit.googlesource.com/git-repo
remote: Counting objects: 43, done
remote: Finding sources: 100% (660/660)
remote: Total 660 (delta 182), reused 660 (delta 182)
Receiving objects: 100% (660/660), 1.38 MiB | 687.00 KiB/s, done.
Resolving deltas: 100% (182/182), completed with 23 local objects.
From https://gerrit.googlesource.com/git-repo
   eceeb1b..d92076d  maint      -> origin/maint
   1e01a74..8c268c0  master     -> origin/master
 * [new branch]      repo-1     -> origin/repo-1
   34bc571..0b57eed  stable     -> origin/stable
 * [new tag]         v1.13.10   -> v1.13.10
 * [new tag]         v1.13.11   -> v1.13.11
 * [new tag]         v1.13.9    -> v1.13.9
 * [new tag]         v1.13.9.1  -> v1.13.9.1
 * [new tag]         v1.13.9.2  -> v1.13.9.2
 * [new tag]         v1.13.9.3  -> v1.13.9.3
 * [new tag]         v1.13.9.4  -> v1.13.9.4
 * [new tag]         v2.0       -> v2.0
 * [new tag]         v2.1       -> v2.1
 * [new tag]         v2.1.1     -> v2.1.1
 * [new tag]         v2.2       -> v2.2
 * [new tag]         v2.3       -> v2.3
Get https://github.com/OP-TEE/manifest.git
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:06 --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found
Server does not provide clone.bundle; ignoring.
remote: Enumerating objects: 59, done.        
remote: Counting objects: 100% (59/59), done.        
remote: Compressing objects: 100% (43/43), done.        
remote: Total 980 (delta 45), reused 24 (delta 16), pack-reused 921        
Receiving objects: 100% (980/980), 212.61 KiB | 275.00 KiB/s, done.
Resolving deltas: 100% (716/716), done.
From https://github.com/OP-TEE/manifest
 * [new branch]      2.5.0      -> origin/2.5.0
 * [new branch]      2.5.0-rc1  -> origin/2.5.0-rc1
 * [new branch]      2.5.0-rc2  -> origin/2.5.0-rc2
 * [new branch]      2.6.0      -> origin/2.6.0
 * [new branch]      3.1.0      -> origin/3.1.0
 * [new branch]      3.2.0      -> origin/3.2.0
 * [new branch]      3.3.0      -> origin/3.3.0
 * [new branch]      3.4.0      -> origin/3.4.0
 * [new branch]      3.5.0      -> origin/3.5.0
 * [new branch]      3.6.0      -> origin/3.6.0
 * [new branch]      3.7.0      -> origin/3.7.0
 * [new branch]      3.8.0      -> origin/3.8.0
 * [new branch]      master     -> origin/master
 * [new tag]         1.0.0      -> 1.0.0
 * [new tag]         1.0.0-rc1  -> 1.0.0-rc1
 * [new tag]         1.0.0-rc2  -> 1.0.0-rc2
 * [new tag]         1.0.1      -> 1.0.1
 * [new tag]         1.1.0      -> 1.1.0
 * [new tag]         2.0.0      -> 2.0.0
 * [new tag]         2.1.0      -> 2.1.0
 * [new tag]         2.2.0      -> 2.2.0
 * [new tag]         2.3.0      -> 2.3.0
 * [new tag]         2.4.0      -> 2.4.0
 * [new tag]         2.5.0      -> 2.5.0
 * [new tag]         2.6.0      -> 2.6.0
 * [new tag]         3.0.0      -> 3.0.0
 * [new tag]         3.1.0      -> 3.1.0
 * [new tag]         3.2.0      -> 3.2.0
 * [new tag]         3.3.0      -> 3.3.0
 * [new tag]         3.4.0      -> 3.4.0
 * [new tag]         3.5.0      -> 3.5.0
 * [new tag]         3.6.0      -> 3.6.0
 * [new tag]         3.7.0      -> 3.7.0
 * [new tag]         3.7.0-rc1  -> 3.7.0-rc1
 * [new tag]         3.8.0      -> 3.8.0
Traceback (most recent call last):
  File "/home/dydxh/mytee/.repo/repo/main.py", line 568, in <module>
    _Main(sys.argv[1:])
  File "/home/dydxh/mytee/.repo/repo/main.py", line 542, in _Main
    result = run()
  File "/home/dydxh/mytee/.repo/repo/main.py", line 535, in <lambda>
    run = lambda: repo._Run(name, gopts, argv) or 0
  File "/home/dydxh/mytee/.repo/repo/main.py", line 213, in _Run
    result = cmd.Execute(copts, cargs)
  File "/home/dydxh/mytee/.repo/repo/subcmds/init.py", line 463, in Execute
    self._LinkManifest(opt.manifest_name)
  File "/home/dydxh/mytee/.repo/repo/subcmds/init.py", line 315, in _LinkManifest
    self.manifest.Link(name)
  File "/home/dydxh/mytee/.repo/repo/manifest_xml.py", line 184, in Link
    self.Override(name)
  File "/home/dydxh/mytee/.repo/repo/manifest_xml.py", line 177, in Override
    self._Load()
  File "/home/dydxh/mytee/.repo/repo/manifest_xml.py", line 483, in _Load
    self._ParseManifest(nodes)
  File "/home/dydxh/mytee/.repo/repo/manifest_xml.py", line 591, in _ParseManifest
    project = self._ParseProject(node)
  File "/home/dydxh/mytee/.repo/repo/manifest_xml.py", line 912, in _ParseProject
    self._ParseLinkFile(project, n)
  File "/home/dydxh/mytee/.repo/repo/manifest_xml.py", line 1047, in _ParseLinkFile
    self._ValidateFilePaths('linkfile', src, dest)
  File "/home/dydxh/mytee/.repo/repo/manifest_xml.py", line 1028, in _ValidateFilePaths
    '<%s> invalid "src": %s: %s' % (element, src, msg))
error.ManifestInvalidPathError: <linkfile> invalid "src": ../toolchains/aarch64/bin/aarch64-linux-gnu-gdb: bad component: ..

Seems an linking error but I don't understand the meaning of bad component.

After adding some debug info, I found it tries to link two file

src: ../toolchains/aarch64/bin/aarch64-linux-gnu-gdb
dest: build/gdb
===========================
abs src: /home/dydxh/toolchains/aarch64/bin/aarch64-linux-gnu-gdb
abs dest: /home/dydxh/mytee/build/gdb

So I prepare the aarch64-linux-gnu-gdb in the directory above and re-run. Unfortunatly, the same error occur :(

Minor query regarding Raspberry Pi documentation

Hello,

Thank you for the wonderful work you've done in maintaining and documenting this project - it's been of great help to me.

I just had a minor query where I got a bit confused. The documentation says:

Below is a table of supported hardware in our OP-TEE developer builds. We have only used the Raspberry Pi 3 Model B, i.e., the first RPi 3 device that was released. But we know that people have successfully been able to use it with both RPi 2’s as well as the newer RPi 3 B+. But as long as we in the core team doesn’t have those at hands we cannot guarantee anything, therefore we simply say “No” below.

From what I understand, this means that you've only checked the build on Raspberry Pi 3B. But down below, you also mention that

Raspberry Pi 3 Model B | Yes
Raspberry Pi 3+ Model B | Yes

implying that Raspberry Pi 3B+ is also officially supported.

Could you please confirm once whether 3B+ is supported or not either? (I asked because I've ordered Raspberry Pi 3B+ and want to be sure that OP-TEE will run it, else I might have to return it)

Also, pardon me for my naive question, but what OS should I flash my microSD card with to use on the Raspberry Pi3B+ that would be most compatible with OP-TEE? I couldn't find anything regarding that in the documentation. Would Ubuntu Server 20.04.3 LTS work well with OP-TEE? Or should I use Raspbian or something similar?

[hikey960] failed to flash and recovery

Hi,

To flash OPTEE on a Hikey 960, I followed uart-adapter-board and bought a 96 board UART. But seems my computer cannot connect Hikey board.

For sudo make flash, it stays at waiting for device.
For sudo make recovery, it stays at download adress 0x200000.

The UART message did not show Android Fastboot mode, and it only showed boot mode is 4.

Do I need to have another usb cable, i.e. with a Type-C OTG on the original board, in order to flash the OPTEE?

Thank you very much!

Building for simulation on Ubuntu 20.04

(This is not really an issue per se, more of experience sharing.)

Based on the instruction:
https://optee.readthedocs.io/en/latest/building/devices/qemu.html#qemu-v7

I was able to prepare the simulation with no major issues. I was actually impressed how smooth it went.

The packages which were needed:

sudo apt install build-essential git bison flex libssl-dev libglib2.0-dev libpixman-1-dev
sudo apt install python3-pip python3-pycryptodome python3-pyelftools
sudo pip3 install ninja

The issues I faced - let me know if you think I should create separate tickets for them:

1. U-boot does not get configured

The make run command does not seem to select board config for u-boot. I had to do it manually; not sure what the intended config was, but I used:

cd u-boot
make qemu_arm_defconfig ARCH=arm CROSS_COMPILE=arm-none-eabi-

.. and the build worked after that.

2. All python3 except one python

During build, whenever python is needed, python3 binary is used. Except that one place which for some reason calls python.
Some distros no longer have python symlink at all, as python3 and the obsolete python2 are now used everywhere.

With this patch, everything builds with python3 access only:

diff --git a/common.mk b/common.mk
index dad0539..4e67de0 100644
--- a/common.mk
+++ b/common.mk
@@ -292,3 +292,3 @@ buildroot: optee-os
        @$(call append-br2-vars,../out-br/extra.conf)
-       @(cd .. && python build/br-ext/scripts/make_def_config.py \
+       @(cd .. && python3 build/br-ext/scripts/make_def_config.py \
                --br buildroot --out out-br --br-ext build/br-ext \

(I can make a PR if it's suitable)

3. Assuming my architecture

If the system is i386, the make toolchains command will still download 64-bit prebuilds.
(for this I already created a separate issue)

4. Successful build confusion

The last messages when make all ended with success were:

  GIT     ui/keycodemapdb tests/fp/berkeley-testfloat-3 tests/fp/berkeley-softfloat-3 meson dtc capstone slirp
[1/49] Generating qemu-version.h with a meson_exe.py custom command
fatal: No names found, cannot describe anything.
[2/33] Generating QAPI test (include) with a custom command
make[2]: Leaving directory '/op-tee-simulation/qemu/build'
make[1]: Leaving directory '/op-tee-simulation/qemu'
make -C /op-tee-simulation/build/../soc_term
make[1]: Entering directory '/op-tee-simulation/soc_term'
cc     soc_term.c   -o soc_term
make[1]: Leaving directory '/op-tee-simulation/soc_term'
$

As you can imagine, fatal: No names found, cannot describe anything. does not cause optimism in someone trying to look into logs to figure out whether everything is ok.

[Query] : Documenting new board

Hi

In platforms.rst file what does "Publicly available" mean here. What is the criteria for the board to be marked as YES/NO.

Cheers,
Prabhakar

Secure Storage in Raspberry Pi.

Hi,

I've wrote a TA that stores random generated keys into the secure storage, following the examples available, able to read it out as well within the same TA.
However, if I were to write another application to act as a "server" listening for request to retrieve a key in secure storage, when given the appropriate ID of the key stored. I'm unable to do so, receiving the following error.
read_raw_object:79 Failed to open persistent object, res=0xffff0008
So I guess my question is, is it possible to read into secure storage via another TA, and not the initial TA that wrote into the secure storage, if so I'm probably doing something wrong.

Sorry, for creating an issue here, I'm not sure if there's any forum that I could ask in regards to OP-TEE other than here.

Thanks in advance!

Assuming x86_64 architecture

Following the instructions:
https://optee.readthedocs.io/en/latest/building/devices/qemu.html

When I run:

make toolchains

The tool just assumes I'm on 64-bit Linux under x86 arch. Shouldn't there at least be a check to confirm that?

Running on i686 kernel causes a message about bad executable format when make tries to execute the tools.
(though target devs for this project should be able to figure out the cause quickly, so this is low priority issue)

Support for platform specific documentation

Hi,

I'd like to document the current state of the imx platform within OP-TEE, but I don't know where it fits into the current documentation structure:

  • It could be placed under architecture, under a new subheading
  • We could add a new platform specific Heading.
  • Platform Support under getting started probably doesn't fit.

Crash on QEMUv7 with Clang 12 and pager enabled

Bisected to commit 4107d2f93e3e ("core: add a4 and a5 to thread_alloc_and_run()").

I/TC: OP-TEE version: 3.13.0-9-g4107d2f9 (clang version 12.0.0) #1 Tue May 18 10:40:22 UTC 2021 arm
I/TC: Primary CPU initializing
I/TC: Primary CPU switching to normal world boot
I/TC: Secondary CPU 1 initializing
I/TC: Secondary CPU 1 switching to normal world boot
E/TC:0 0
E/TC:0 0 Core data-abort at address 0x6ee66004 (translation fault)
E/TC:0 0  fsr 0x00000007  ttbr0 0x0e12006a  ttbr1 0x0e12006a  cidr 0x0
E/TC:0 0  cpu #0          cpsr 0x000001b3
E/TC:0 0  r0 0x32000004      r4 0x00000000    r8 0x00000000   r12 0x00000000
E/TC:0 0  r1 0x00000000      r5 0x00000000    r9 0x00000000    sp 0x6ee65fe0
E/TC:0 0  r2 0x801a3000      r6 0x00000000   r10 0x00000000    lr 0x6edcd0a4
E/TC:0 0  r3 0x00000000      r7 0x6ee65ff8   r11 0x00000000    pc 0x6ee2152e
E/TC:0 0 TEE load address @ 0x6edca000
E/TC:0 0 Call stack:
E/TC:0 0  0x6ee2152e __thread_std_smc_entry at optee_os/core/arch/arm/kernel/thread_optee_smc.c:209
E/TC:0 0  0x6edcd0a4 thread_std_smc_entry at ??:?
E/TC:0 0 Panic 'unhandled pageable abort' at core/arch/arm/kernel/abort.c:553 <abort_handler>
E/TC:0 0 TEE load address @ 0x6edca000
E/TC:0 0 Call stack:
E/TC:0 0  0x6edcec2d print_kernel_stack at optee_os/core/arch/arm/kernel/unwind_arm32.c:109
E/TC:0 0  0x6edd67df __do_panic at optee_os/core/kernel/panic.c:31
E/TC:0 0  0x6edcd507 abort_handler at optee_os/core/arch/arm/kernel/abort.c:553
E/TC:0 0  0x6edcab7c __thread_abort_common at spin_lock_debug.c:?

How to run optee_example?

I have made the build of optee according to the steps on https://optee.readthedocs.io/building/gits/build.html.
But for step 8, I was not sure where to execute. If I run it in the optee/build directory, I get:

xxx:~/xxx/optee/build$ ps aux | grep tee-supplicant
christi+ 10629  0.0  0.0  14432  1076 pts/4    S+   10:25   0:00 grep --color=auto tee-supplicant
xxx:~/xxx/optee/build$ tee-supplicant -d
tee-supplicant: command not found

In the optee/build directory I have then run
xhost +
sudo make all run

I have entered c in the qemu console.
Then in the normal world console, I can run the xtest succesfully:

24045 subtests of which 0 failed
93 test cases of which 0 failed
0 test cases were skipped
TEE test application done!

But if I run hello_world in the normal world console, I get
-sh: hello_world: not found

If I run c make all in the optee_examples/hello_world directory, I get the following error:

make -C host CROSS_COMPILE="" --no-builtin-variables
make[1]: Entering directory '/home/christina/master-thesis/optee/optee_examples/hello_world/host'
gcc -Wall -I../ta/include -I/include -I./include -c main.c -o main.o
main.c:33:10: fatal error: tee_client_api.h: No such file or directory
 #include <tee_client_api.h>
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:28: recipe for target 'main.o' failed
make[1]: *** [main.o] Error 1
make[1]: Leaving directory '/home/christina/master-thesis/optee/optee_examples/hello_world/host'
Makefile:9: recipe for target 'all' failed
make: *** [all] Error 2

How can I correctly load the tee-supplicant?
And how can I make the hello_world example run?

Thanks for help & correct me if this issue is in the wrong place!

Building optee on zcu104

I am currently building optee using this method on the zcu104 development board, but I do not understand how to operate Boot Firmware in this step. If only from Build instructions, the results are not correct and will not generate BOOT.bin and. ub files. How should this problem be solved? What should I do in the step of Boot Firmware?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.