Skip to content

Commit

Permalink
Update to GP 1.3.1 (#105)
Browse files Browse the repository at this point in the history
* Update interfaces for GP 1.3.1
* Temporarily disable our CI until the OP-TEE 3.21.0 is released
* Fix supp_plugin panic
  • Loading branch information
DemesneGH authored Mar 15, 2023
1 parent ae006b2 commit 4031e72
Show file tree
Hide file tree
Showing 12 changed files with 224 additions and 182 deletions.
58 changes: 29 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,34 @@ defaults:
shell: bash

jobs:
build-and-run-examples:
runs-on: ubuntu-20.04
container: teaclave/teaclave-trustzone-sdk-build:0.3.0
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setting up $HOME
run: |
cp /root/.bashrc $HOME/.bashrc &&
ln -sf /root/.rustup ~/.rustup &&
ln -sf /root/.cargo ~/.cargo
- name: Building
run: |
apt update && apt install libslirp-dev -y
export CARGO_NET_GIT_FETCH_WITH_CLI=true &&
./setup.sh &&
source environment &&
make optee &&
. ~/.cargo/env &&
rustup component add rust-src &&
rustup target install aarch64-unknown-linux-gnu arm-unknown-linux-gnueabihf &&
rustup default nightly-2021-09-20 &&
make examples
- name: Run tests and examples
run: |
cd ci && ./ci.sh
# build-and-run-examples:
# runs-on: ubuntu-20.04
# container: teaclave/teaclave-trustzone-sdk-build:0.3.0
# steps:
# - name: Checkout repository
# uses: actions/checkout@v2
# with:
# submodules: recursive
# - name: Setting up $HOME
# run: |
# cp /root/.bashrc $HOME/.bashrc &&
# ln -sf /root/.rustup ~/.rustup &&
# ln -sf /root/.cargo ~/.cargo
# - name: Building
# run: |
# apt update && apt install libslirp-dev -y
# export CARGO_NET_GIT_FETCH_WITH_CLI=true &&
# ./setup.sh &&
# source environment &&
# make optee &&
# . ~/.cargo/env &&
# rustup component add rust-src &&
# rustup target install aarch64-unknown-linux-gnu arm-unknown-linux-gnueabihf &&
# rustup default nightly-2021-09-20 &&
# make examples
# - name: Run tests and examples
# run: |
# cd ci && ./ci.sh
build-utee-teec:
runs-on: ubuntu-20.04
container: teaclave/teaclave-trustzone-sdk-build:0.3.0
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
curl https://storage.googleapis.com/git-repo-downloads/repo-1 > ~/bin/repo && chmod a+x ~/bin/repo
export PATH=~/bin:$PATH
mkdir -p ~/optee-qemuv8 && cd ~/optee-qemuv8 &&
repo init -u https://github.com/OP-TEE/manifest.git -m qemu_v8.xml -b 3.20.0 &&
repo init -u https://github.com/OP-TEE/manifest.git -m qemu_v8.xml &&
repo sync -j4 --no-clone-bundle
- name: Build images and run tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion examples/serde-rs/ta/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fn invoke_command(cmd_id: u32, params: &mut Parameters) -> Result<()> {
let len = buffer.write(serialized.as_bytes()).unwrap();

// update size of output buffer
unsafe { (*p.raw()).size = len as u32 };
unsafe { (*p.raw()).size = len};

// Prints serialized = {"x":1,"y":2}
trace_println!("serialized = {}", serialized);
Expand Down
3 changes: 2 additions & 1 deletion examples/supp_plugin-rs/ta/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ fn destroy() {
fn invoke_command(cmd_id: u32, params: &mut Parameters) -> Result<()> {
trace_println!("[+] TA invoke command");
let mut p0 = unsafe { params.0.as_memref().unwrap() };
let mut inbuf = p0.buffer().to_vec();
trace_println!("[+] TA received value {:?} then send to plugin", p0.buffer());
let uuid = Uuid::parse_str(PLUGIN_UUID).unwrap();

Expand All @@ -59,7 +60,7 @@ fn invoke_command(cmd_id: u32, params: &mut Parameters) -> Result<()> {
let outbuf = plugin.invoke(
PluginCommand::Print as u32,
PLUGIN_SUBCMD_NULL,
p0.buffer()
&inbuf
).unwrap();

trace_println!("[+] TA received out value {:?} outlen {:?}", outbuf, outbuf.len());
Expand Down
Loading

0 comments on commit 4031e72

Please sign in to comment.