From 1a068b0143123300e7b6c26f940c6f3d137144ec Mon Sep 17 00:00:00 2001 From: June Tate-Gans <jtgans@google.com> Date: Tue, 16 Aug 2022 17:34:40 -0500 Subject: [PATCH] kata: Prepend the Google copyright and Apache 2.0 license This includes adding it to TOML files and CAmkES assembly files. Change-Id: I263e7a566df91fccc04f9b2186edab13331290c5 GitOrigin-RevId: 48a35b06ca868a0a4d379f881068cc4dad491669 --- apps/c/fibonacci/Makefile | 14 ++++ apps/c/hello/Makefile | 14 ++++ apps/c/suicide/Makefile | 14 ++++ apps/system/README | 17 ----- .../system/components/DebugConsole/Cargo.toml | 14 ++++ .../kata-debug-console/Cargo.toml | 14 ++++ .../kata-debug-console/src/run.rs | 32 +++++++--- .../DebugConsole/kata-io/Cargo.toml | 14 ++++ .../DebugConsole/kata-io/src/lib.rs | 14 ++++ .../DebugConsole/kata-line-reader/Cargo.toml | 14 ++++ .../DebugConsole/kata-line-reader/src/lib.rs | 14 ++++ .../DebugConsole/kata-shell/build.rs | 14 ++++ .../kata-shell/src/fringe_cmds.rs | 16 ++++- .../DebugConsole/kata-shell/src/rz.rs | 18 +++++- .../kata-shell/src/test_global_allocator.rs | 16 ++++- .../kata-shell/src/test_memory_manager.rs | 16 ++++- .../kata-shell/src/test_ml_coordinator.rs | 16 ++++- .../DebugConsole/kata-shell/src/test_panic.rs | 16 ++++- .../src/test_security_coordinator.rs | 16 ++++- .../kata-shell/src/test_timer_service.rs | 16 ++++- .../DebugConsole/kata-shell/src/test_uart.rs | 16 ++++- .../DebugConsole/kata-uart-client/Cargo.toml | 14 ++++ .../DebugConsole/kata-uart-client/src/lib.rs | 16 ++++- .../components/DebugConsole/zmodem/Cargo.toml | 14 ++++ .../DebugConsole/zmodem/src/consts.rs | 14 ++++ .../components/DebugConsole/zmodem/src/crc.rs | 14 ++++ .../DebugConsole/zmodem/src/frame.rs | 14 ++++ .../components/DebugConsole/zmodem/src/lib.rs | 14 ++++ .../DebugConsole/zmodem/src/proto.rs | 14 ++++ .../DebugConsole/zmodem/src/recv.rs | 14 ++++ .../DebugConsole/zmodem/src/send.rs | 14 ++++ .../DebugConsole/zmodem/tests/lib.rs | 14 ++++ .../components/MailboxDriver/Cargo.toml | 14 ++++ .../MailboxDriver/mailbox-driver/Cargo.toml | 14 ++++ .../MailboxDriver/mailbox-driver/src/lib.rs | 14 ++++ .../components/MemoryManager/Cargo.toml | 14 ++++ .../MemoryManager/MemoryManager.camkes | 14 ++++ .../kata-memory-component/Cargo.toml | 14 ++++ .../kata-memory-component/src/run.rs | 14 ++++ .../kata-memory-interface/Cargo.toml | 14 ++++ .../kata-memory-interface/Makefile | 14 ++++ .../kata-memory-interface/build.rs | 14 ++++ .../kata-memory-interface/cbindgen.toml | 14 ++++ .../kata-memory-interface/src/lib.rs | 14 ++++ .../components/MlCoordinator/Cargo.toml | 14 ++++ .../MlCoordinator/MlCoordinator.camkes | 14 ++++ .../MlCoordinator/fake-vec-core/Cargo.toml | 14 ++++ .../MlCoordinator/fake-vec-core/src/lib.rs | 14 ++++ .../kata-ml-component/Cargo.toml | 14 ++++ .../kata-ml-component/src/run.rs | 14 ++++ .../kata-ml-coordinator/Cargo.toml | 14 ++++ .../kata-ml-coordinator/src/lib.rs | 14 ++++ .../kata-ml-interface/Cargo.toml | 14 ++++ .../MlCoordinator/kata-ml-interface/Makefile | 14 ++++ .../kata-ml-interface/cbindgen.toml | 14 ++++ .../kata-ml-interface/src/lib.rs | 14 ++++ .../MlCoordinator/kata-ml-shared/Cargo.toml | 14 ++++ .../MlCoordinator/kata-ml-shared/src/lib.rs | 14 ++++ .../MlCoordinator/kata-ml-support/Cargo.toml | 14 ++++ .../kata-ml-support/src/image_manager.rs | 64 ++++++++++++------- .../MlCoordinator/kata-ml-support/src/lib.rs | 14 ++++ .../MlCoordinator/kata-vec-core/Cargo.toml | 14 ++++ .../MlCoordinator/kata-vec-core/src/lib.rs | 18 +++++- .../MlCoordinator/kata-vec-core/src/vc_top.rs | 16 ++++- .../components/ProcessManager/Cargo.toml | 14 ++++ .../ProcessManager/ProcessManager.camkes | 14 ++++ .../kata-proc-component/Cargo.toml | 14 ++++ .../kata-proc-component/src/run.rs | 14 ++++ .../kata-proc-interface/Cargo.toml | 14 ++++ .../kata-proc-interface/Makefile | 14 ++++ .../kata-proc-interface/cbindgen.toml | 14 ++++ .../kata-proc-interface/src/bundle_image.rs | 14 ++++ .../kata-proc-interface/src/lib.rs | 14 ++++ .../kata-proc-manager/Cargo.toml | 14 ++++ .../ProcessManager/kata-proc-manager/build.rs | 14 ++++ .../kata-proc-manager/src/lib.rs | 14 ++++ .../kata-proc-manager/src/proc_manager/mod.rs | 14 ++++ .../src/sel4bundle/arch/riscv.rs | 16 ++++- .../src/sel4bundle/arch/riscv32.rs | 16 ++++- .../src/sel4bundle/feature/mcs.rs | 16 ++++- .../src/sel4bundle/feature/no_mcs.rs | 16 ++++- .../src/sel4bundle/feature/no_smp.rs | 16 ++++- .../sel4bundle/feature/no_spill_tcb_args.rs | 18 +++++- .../src/sel4bundle/feature/smp.rs | 16 ++++- .../src/sel4bundle/feature/spill_tcb_args.rs | 20 +++++- .../kata-proc-manager/src/sel4bundle/mod.rs | 14 ++++ .../components/SecurityCoordinator/Cargo.toml | 14 ++++ .../SecurityCoordinator.camkes | 14 ++++ .../kata-security-component/Cargo.toml | 14 ++++ .../kata-security-component/src/run.rs | 14 ++++ .../kata-security-coordinator/Cargo.toml | 14 ++++ .../src/fakeimpl/mod.rs | 14 ++++ .../kata-security-coordinator/src/impl.rs | 14 ++++ .../kata-security-coordinator/src/lib.rs | 14 ++++ .../kata-security-interface/Cargo.toml | 14 ++++ .../kata-security-interface/Makefile | 14 ++++ .../kata-security-interface/cbindgen.toml | 14 ++++ .../kata-security-interface/src/lib.rs | 14 ++++ .../components/StorageManager/Cargo.toml | 14 ++++ .../StorageManager/StorageManager.camkes | 14 ++++ .../kata-storage-component/Cargo.toml | 14 ++++ .../kata-storage-component/src/run.rs | 14 ++++ .../kata-storage-interface/Cargo.toml | 14 ++++ .../kata-storage-interface/Makefile | 14 ++++ .../kata-storage-interface/cbindgen.toml | 14 ++++ .../kata-storage-interface/src/lib.rs | 14 ++++ .../kata-storage-manager/Cargo.toml | 14 ++++ .../kata-storage-manager/src/lib.rs | 14 ++++ .../system/components/TimerService/Cargo.toml | 14 ++++ .../TimerService/TimerService.camkes | 14 ++++ .../kata-timer-component/Cargo.toml | 14 ++++ .../kata-timer-component/src/run.rs | 14 ++++ .../kata-timer-interface/Cargo.toml | 14 ++++ .../kata-timer-interface/Makefile | 14 ++++ .../kata-timer-interface/cbindgen.toml | 14 ++++ .../kata-timer-interface/src/lib.rs | 14 ++++ .../kata-timer-service/Cargo.toml | 14 ++++ .../kata-timer-service/src/lib.rs | 14 ++++ .../TimerService/opentitan-timer/Cargo.toml | 14 ++++ .../TimerService/opentitan-timer/src/lib.rs | 16 ++++- .../opentitan-timer/src/opentitan_timer.rs | 16 ++++- easy-settings.cmake | 14 ++++ rustfmt.toml | 14 ++++ 123 files changed, 1771 insertions(+), 76 deletions(-) delete mode 100644 apps/system/README diff --git a/apps/c/fibonacci/Makefile b/apps/c/fibonacci/Makefile index ef72ca8..30272e8 100644 --- a/apps/c/fibonacci/Makefile +++ b/apps/c/fibonacci/Makefile @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + SRC_LIBSEL4 ?= $(ROOTDIR)/kata/kernel/libsel4 OUT_KATA ?= $(OUT)/kata/riscv32-unknown-elf/release OUT_TMP ?= $(OUT)/tmp/fibonacci diff --git a/apps/c/hello/Makefile b/apps/c/hello/Makefile index 78e32e2..534444c 100644 --- a/apps/c/hello/Makefile +++ b/apps/c/hello/Makefile @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + SRC_LIBSEL4 ?= $(ROOTDIR)/kata/kernel/libsel4 OUT_KATA ?= $(OUT)/kata/riscv32-unknown-elf/release OUT_TMP ?= $(OUT)/tmp/hello diff --git a/apps/c/suicide/Makefile b/apps/c/suicide/Makefile index 15c2430..588868b 100644 --- a/apps/c/suicide/Makefile +++ b/apps/c/suicide/Makefile @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + SRC_LIBSEL4 ?= $(ROOTDIR)/kata/kernel/libsel4 OUT_KATA ?= $(OUT)/kata/riscv32-unknown-elf/release OUT_TMP ?= $(OUT)/tmp/suicide diff --git a/apps/system/README b/apps/system/README deleted file mode 100644 index d832c7a..0000000 --- a/apps/system/README +++ /dev/null @@ -1,17 +0,0 @@ -<!-- - Copyright 2017, Data61 - Commonwealth Scientific and Industrial Research Organisation (CSIRO) - ABN 41 687 119 230. - - This software may be distributed and modified according to the terms of - the BSD 2-Clause license. Note that NO WARRANTY is provided. - See "LICENSE_BSD2.txt" for details. - - @TAG(DATA61_BSD) ---> -# - -UART driver for KZM. - -This is an example of accessing hardware device memory. The device memory -address may vary. diff --git a/apps/system/components/DebugConsole/Cargo.toml b/apps/system/components/DebugConsole/Cargo.toml index abbea12..225fc69 100644 --- a/apps/system/components/DebugConsole/Cargo.toml +++ b/apps/system/components/DebugConsole/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [workspace] members = [ diff --git a/apps/system/components/DebugConsole/kata-debug-console/Cargo.toml b/apps/system/components/DebugConsole/kata-debug-console/Cargo.toml index 95f02f3..ec87e85 100644 --- a/apps/system/components/DebugConsole/kata-debug-console/Cargo.toml +++ b/apps/system/components/DebugConsole/kata-debug-console/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-debug-console" version = "0.1.0" diff --git a/apps/system/components/DebugConsole/kata-debug-console/src/run.rs b/apps/system/components/DebugConsole/kata-debug-console/src/run.rs index be6f495..6ecfb4b 100644 --- a/apps/system/components/DebugConsole/kata-debug-console/src/run.rs +++ b/apps/system/components/DebugConsole/kata-debug-console/src/run.rs @@ -1,13 +1,27 @@ -//! Kata OS command line interface - -// This brief bootstrap of Rust-in-Kata prototypes a minimal modular design -// for the DebugConsole CLI use case. +// Copyright 2022 Google LLC // -// * kata_io Read/Write interface (or move to std::, but that requires alloc) -// * kata_uart_client implementation of the kata_io interface -// * kata_line_reader -// * kata_shell -// * kata_debug_console main entry point fn run() +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Kata OS command line interface +//! +//! This brief bootstrap of Rust-in-Kata prototypes a minimal modular design +//! for the DebugConsole CLI use case. +//! +//! * kata_io Read/Write interface (or move to std::, but that requires alloc) +//! * kata_uart_client implementation of the kata_io interface +//! * kata_line_reader +//! * kata_shell +//! * kata_debug_console main entry point fn run() #![no_std] diff --git a/apps/system/components/DebugConsole/kata-io/Cargo.toml b/apps/system/components/DebugConsole/kata-io/Cargo.toml index cb9ac94..936dd34 100644 --- a/apps/system/components/DebugConsole/kata-io/Cargo.toml +++ b/apps/system/components/DebugConsole/kata-io/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-io" version = "0.1.0" diff --git a/apps/system/components/DebugConsole/kata-io/src/lib.rs b/apps/system/components/DebugConsole/kata-io/src/lib.rs index 351cacb..96691cd 100644 --- a/apps/system/components/DebugConsole/kata-io/src/lib.rs +++ b/apps/system/components/DebugConsole/kata-io/src/lib.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #![no_std] extern crate alloc; diff --git a/apps/system/components/DebugConsole/kata-line-reader/Cargo.toml b/apps/system/components/DebugConsole/kata-line-reader/Cargo.toml index a12c58f..94d539f 100644 --- a/apps/system/components/DebugConsole/kata-line-reader/Cargo.toml +++ b/apps/system/components/DebugConsole/kata-line-reader/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-line-reader" version = "0.1.0" diff --git a/apps/system/components/DebugConsole/kata-line-reader/src/lib.rs b/apps/system/components/DebugConsole/kata-line-reader/src/lib.rs index 9882fec..683c892 100644 --- a/apps/system/components/DebugConsole/kata-line-reader/src/lib.rs +++ b/apps/system/components/DebugConsole/kata-line-reader/src/lib.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #![no_std] use core::fmt; diff --git a/apps/system/components/DebugConsole/kata-shell/build.rs b/apps/system/components/DebugConsole/kata-shell/build.rs index 32dccec..2083524 100644 --- a/apps/system/components/DebugConsole/kata-shell/build.rs +++ b/apps/system/components/DebugConsole/kata-shell/build.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + use std::env; fn main() { diff --git a/apps/system/components/DebugConsole/kata-shell/src/fringe_cmds.rs b/apps/system/components/DebugConsole/kata-shell/src/fringe_cmds.rs index 1be7d38..152447f 100644 --- a/apps/system/components/DebugConsole/kata-shell/src/fringe_cmds.rs +++ b/apps/system/components/DebugConsole/kata-shell/src/fringe_cmds.rs @@ -1,4 +1,18 @@ -// Infrequently used shell commands +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Infrequently used shell commands extern crate alloc; use crate::rz; diff --git a/apps/system/components/DebugConsole/kata-shell/src/rz.rs b/apps/system/components/DebugConsole/kata-shell/src/rz.rs index 205b2fe..6708f9f 100644 --- a/apps/system/components/DebugConsole/kata-shell/src/rz.rs +++ b/apps/system/components/DebugConsole/kata-shell/src/rz.rs @@ -1,5 +1,21 @@ -/// Wrapper types for fully-buffered ZMODEM receives. +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Wrapper types for fully-buffered ZMODEM receives. + // TODO(sleffler): maybe extract the page-at-a-time support to it's own crate + use alloc::vec; use core::cmp; use core::ptr; diff --git a/apps/system/components/DebugConsole/kata-shell/src/test_global_allocator.rs b/apps/system/components/DebugConsole/kata-shell/src/test_global_allocator.rs index cc545cd..b0750d2 100644 --- a/apps/system/components/DebugConsole/kata-shell/src/test_global_allocator.rs +++ b/apps/system/components/DebugConsole/kata-shell/src/test_global_allocator.rs @@ -1,4 +1,18 @@ -// Global allocator shell test commands +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Global allocator shell test commands extern crate alloc; use crate::CmdFn; diff --git a/apps/system/components/DebugConsole/kata-shell/src/test_memory_manager.rs b/apps/system/components/DebugConsole/kata-shell/src/test_memory_manager.rs index 49214d1..6b813c2 100644 --- a/apps/system/components/DebugConsole/kata-shell/src/test_memory_manager.rs +++ b/apps/system/components/DebugConsole/kata-shell/src/test_memory_manager.rs @@ -1,4 +1,18 @@ -// MemoryManager service shell test commands +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! MemoryManager service shell test commands extern crate alloc; use crate::mstats; diff --git a/apps/system/components/DebugConsole/kata-shell/src/test_ml_coordinator.rs b/apps/system/components/DebugConsole/kata-shell/src/test_ml_coordinator.rs index 943dea6..06f8dc4 100644 --- a/apps/system/components/DebugConsole/kata-shell/src/test_ml_coordinator.rs +++ b/apps/system/components/DebugConsole/kata-shell/src/test_ml_coordinator.rs @@ -1,4 +1,18 @@ -// MlCoordinator service shell test commands +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! MlCoordinator service shell test commands use crate::CmdFn; use crate::CommandError; diff --git a/apps/system/components/DebugConsole/kata-shell/src/test_panic.rs b/apps/system/components/DebugConsole/kata-shell/src/test_panic.rs index 3815c18..b07ba2b 100644 --- a/apps/system/components/DebugConsole/kata-shell/src/test_panic.rs +++ b/apps/system/components/DebugConsole/kata-shell/src/test_panic.rs @@ -1,4 +1,18 @@ -// Panic-related shell test commands +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Panic-related shell test commands use crate::CmdFn; use crate::CommandError; diff --git a/apps/system/components/DebugConsole/kata-shell/src/test_security_coordinator.rs b/apps/system/components/DebugConsole/kata-shell/src/test_security_coordinator.rs index d9d7ab3..27c9832 100644 --- a/apps/system/components/DebugConsole/kata-shell/src/test_security_coordinator.rs +++ b/apps/system/components/DebugConsole/kata-shell/src/test_security_coordinator.rs @@ -1,4 +1,18 @@ -// SecurityCoordinator shell test commands +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! SecurityCoordinator shell test commands extern crate alloc; use crate::CmdFn; diff --git a/apps/system/components/DebugConsole/kata-shell/src/test_timer_service.rs b/apps/system/components/DebugConsole/kata-shell/src/test_timer_service.rs index 76542f2..93ca301 100644 --- a/apps/system/components/DebugConsole/kata-shell/src/test_timer_service.rs +++ b/apps/system/components/DebugConsole/kata-shell/src/test_timer_service.rs @@ -1,4 +1,18 @@ -// TimerService shell test commands +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! TimerService shell test commands use crate::CmdFn; use crate::CommandError; diff --git a/apps/system/components/DebugConsole/kata-shell/src/test_uart.rs b/apps/system/components/DebugConsole/kata-shell/src/test_uart.rs index ed3c881..acfcfc3 100644 --- a/apps/system/components/DebugConsole/kata-shell/src/test_uart.rs +++ b/apps/system/components/DebugConsole/kata-shell/src/test_uart.rs @@ -1,4 +1,18 @@ -// UART driver shell test commands +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! UART driver shell test commands use crate::CmdFn; use crate::CommandError; diff --git a/apps/system/components/DebugConsole/kata-uart-client/Cargo.toml b/apps/system/components/DebugConsole/kata-uart-client/Cargo.toml index 1a9c7a8..4dbc5d7 100644 --- a/apps/system/components/DebugConsole/kata-uart-client/Cargo.toml +++ b/apps/system/components/DebugConsole/kata-uart-client/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-uart-client" version = "0.1.0" diff --git a/apps/system/components/DebugConsole/kata-uart-client/src/lib.rs b/apps/system/components/DebugConsole/kata-uart-client/src/lib.rs index 7504823..b5b9036 100644 --- a/apps/system/components/DebugConsole/kata-uart-client/src/lib.rs +++ b/apps/system/components/DebugConsole/kata-uart-client/src/lib.rs @@ -1,10 +1,24 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #![no_std] use core::fmt::Write; use cstr_core::CStr; use kata_io as io; -// Console logging interface. +/// Console logging interface. #[no_mangle] #[allow(clippy::missing_safety_doc)] pub unsafe extern "C" fn logger_log(level: u8, msg: *const cstr_core::c_char) { diff --git a/apps/system/components/DebugConsole/zmodem/Cargo.toml b/apps/system/components/DebugConsole/zmodem/Cargo.toml index 32e7e7c..f9d1795 100644 --- a/apps/system/components/DebugConsole/zmodem/Cargo.toml +++ b/apps/system/components/DebugConsole/zmodem/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] authors = ["aarbuzov"] name = "zmodem" diff --git a/apps/system/components/DebugConsole/zmodem/src/consts.rs b/apps/system/components/DebugConsole/zmodem/src/consts.rs index 08bb960..0fdc223 100644 --- a/apps/system/components/DebugConsole/zmodem/src/consts.rs +++ b/apps/system/components/DebugConsole/zmodem/src/consts.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + pub const ZPAD: u8 = b'*'; pub const ZLDE: u8 = 0x18; pub const ZLDEE: u8 = 0x58; diff --git a/apps/system/components/DebugConsole/zmodem/src/crc.rs b/apps/system/components/DebugConsole/zmodem/src/crc.rs index 715d0de..87d6006 100644 --- a/apps/system/components/DebugConsole/zmodem/src/crc.rs +++ b/apps/system/components/DebugConsole/zmodem/src/crc.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + use crc32::crc32; use crc32::crc32::update; use crc32::crc32::IEEE_TABLE; diff --git a/apps/system/components/DebugConsole/zmodem/src/frame.rs b/apps/system/components/DebugConsole/zmodem/src/frame.rs index 3c17440..c6bedde 100644 --- a/apps/system/components/DebugConsole/zmodem/src/frame.rs +++ b/apps/system/components/DebugConsole/zmodem/src/frame.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + use alloc::string::String; use alloc::vec; use alloc::vec::Vec; diff --git a/apps/system/components/DebugConsole/zmodem/src/lib.rs b/apps/system/components/DebugConsole/zmodem/src/lib.rs index 7458e85..a4f4ad9 100644 --- a/apps/system/components/DebugConsole/zmodem/src/lib.rs +++ b/apps/system/components/DebugConsole/zmodem/src/lib.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #![no_std] extern crate alloc; diff --git a/apps/system/components/DebugConsole/zmodem/src/proto.rs b/apps/system/components/DebugConsole/zmodem/src/proto.rs index 285a035..2d7c33a 100644 --- a/apps/system/components/DebugConsole/zmodem/src/proto.rs +++ b/apps/system/components/DebugConsole/zmodem/src/proto.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + use alloc::string::ToString; use alloc::vec::Vec; use alloc::{format, vec}; diff --git a/apps/system/components/DebugConsole/zmodem/src/recv.rs b/apps/system/components/DebugConsole/zmodem/src/recv.rs index 66e09ce..d5055c6 100644 --- a/apps/system/components/DebugConsole/zmodem/src/recv.rs +++ b/apps/system/components/DebugConsole/zmodem/src/recv.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + use alloc::vec::Vec; use core::str::from_utf8; diff --git a/apps/system/components/DebugConsole/zmodem/src/send.rs b/apps/system/components/DebugConsole/zmodem/src/send.rs index f8f42d0..c6515dd 100644 --- a/apps/system/components/DebugConsole/zmodem/src/send.rs +++ b/apps/system/components/DebugConsole/zmodem/src/send.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + use kata_io as io; use consts::*; diff --git a/apps/system/components/DebugConsole/zmodem/tests/lib.rs b/apps/system/components/DebugConsole/zmodem/tests/lib.rs index 78fc187..d7d60d0 100644 --- a/apps/system/components/DebugConsole/zmodem/tests/lib.rs +++ b/apps/system/components/DebugConsole/zmodem/tests/lib.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + extern crate env_logger; extern crate log; extern crate zmodem; diff --git a/apps/system/components/MailboxDriver/Cargo.toml b/apps/system/components/MailboxDriver/Cargo.toml index b4e965d..2c76b46 100644 --- a/apps/system/components/MailboxDriver/Cargo.toml +++ b/apps/system/components/MailboxDriver/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [workspace] members = [ diff --git a/apps/system/components/MailboxDriver/mailbox-driver/Cargo.toml b/apps/system/components/MailboxDriver/mailbox-driver/Cargo.toml index 2ffd596..08e4f4b 100644 --- a/apps/system/components/MailboxDriver/mailbox-driver/Cargo.toml +++ b/apps/system/components/MailboxDriver/mailbox-driver/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "mailbox-driver" version = "0.1.0" diff --git a/apps/system/components/MailboxDriver/mailbox-driver/src/lib.rs b/apps/system/components/MailboxDriver/mailbox-driver/src/lib.rs index eeda8cc..a309b43 100644 --- a/apps/system/components/MailboxDriver/mailbox-driver/src/lib.rs +++ b/apps/system/components/MailboxDriver/mailbox-driver/src/lib.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #![no_std] // We want to keep all mailbox constants here even if they're currently unused. #![allow(dead_code)] diff --git a/apps/system/components/MemoryManager/Cargo.toml b/apps/system/components/MemoryManager/Cargo.toml index 2e53248..6260935 100644 --- a/apps/system/components/MemoryManager/Cargo.toml +++ b/apps/system/components/MemoryManager/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [workspace] members = [ diff --git a/apps/system/components/MemoryManager/MemoryManager.camkes b/apps/system/components/MemoryManager/MemoryManager.camkes index 02e7390..51b0391 100644 --- a/apps/system/components/MemoryManager/MemoryManager.camkes +++ b/apps/system/components/MemoryManager/MemoryManager.camkes @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Kata OS MemoryManager service. import <LoggerInterface.camkes>; diff --git a/apps/system/components/MemoryManager/kata-memory-component/Cargo.toml b/apps/system/components/MemoryManager/kata-memory-component/Cargo.toml index 1898343..4e02adc 100644 --- a/apps/system/components/MemoryManager/kata-memory-component/Cargo.toml +++ b/apps/system/components/MemoryManager/kata-memory-component/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-memory-component" version = "0.1.0" diff --git a/apps/system/components/MemoryManager/kata-memory-component/src/run.rs b/apps/system/components/MemoryManager/kata-memory-component/src/run.rs index 4ea41f5..9d49dae 100644 --- a/apps/system/components/MemoryManager/kata-memory-component/src/run.rs +++ b/apps/system/components/MemoryManager/kata-memory-component/src/run.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Kata OS MemoryManager component support. // Code here binds the camkes component to the rust code. diff --git a/apps/system/components/MemoryManager/kata-memory-interface/Cargo.toml b/apps/system/components/MemoryManager/kata-memory-interface/Cargo.toml index 0e1bdb1..54e9a80 100644 --- a/apps/system/components/MemoryManager/kata-memory-interface/Cargo.toml +++ b/apps/system/components/MemoryManager/kata-memory-interface/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-memory-interface" version = "0.1.0" diff --git a/apps/system/components/MemoryManager/kata-memory-interface/Makefile b/apps/system/components/MemoryManager/kata-memory-interface/Makefile index b25bf13..7e30c0a 100644 --- a/apps/system/components/MemoryManager/kata-memory-interface/Makefile +++ b/apps/system/components/MemoryManager/kata-memory-interface/Makefile @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + INTERFACES=${OUT}/kata/components ${INTERFACES}/MemoryManagerBindings.h: src/lib.rs cbindgen.toml diff --git a/apps/system/components/MemoryManager/kata-memory-interface/build.rs b/apps/system/components/MemoryManager/kata-memory-interface/build.rs index 32dccec..2083524 100644 --- a/apps/system/components/MemoryManager/kata-memory-interface/build.rs +++ b/apps/system/components/MemoryManager/kata-memory-interface/build.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + use std::env; fn main() { diff --git a/apps/system/components/MemoryManager/kata-memory-interface/cbindgen.toml b/apps/system/components/MemoryManager/kata-memory-interface/cbindgen.toml index dc5bcb8..5d9c570 100644 --- a/apps/system/components/MemoryManager/kata-memory-interface/cbindgen.toml +++ b/apps/system/components/MemoryManager/kata-memory-interface/cbindgen.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + language = "C" include_guard = "__MEMORY_MANAGER_BINDINGS_H__" autogen_warning = "/* Warning, this file is autogenerated by cbindgen. Don't modify this manually.\n */" diff --git a/apps/system/components/MemoryManager/kata-memory-interface/src/lib.rs b/apps/system/components/MemoryManager/kata-memory-interface/src/lib.rs index c4a2c17..7025ba8 100644 --- a/apps/system/components/MemoryManager/kata-memory-interface/src/lib.rs +++ b/apps/system/components/MemoryManager/kata-memory-interface/src/lib.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Kata OS memory management support #![cfg_attr(not(test), no_std)] diff --git a/apps/system/components/MlCoordinator/Cargo.toml b/apps/system/components/MlCoordinator/Cargo.toml index 05bef8c..4ab8994 100644 --- a/apps/system/components/MlCoordinator/Cargo.toml +++ b/apps/system/components/MlCoordinator/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [workspace] members = [ diff --git a/apps/system/components/MlCoordinator/MlCoordinator.camkes b/apps/system/components/MlCoordinator/MlCoordinator.camkes index f06a5b8..24bfe0f 100644 --- a/apps/system/components/MlCoordinator/MlCoordinator.camkes +++ b/apps/system/components/MlCoordinator/MlCoordinator.camkes @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import <LoggerInterface.camkes>; import <MemoryInterface.camkes>; import <MlCoordinatorInterface.camkes>; diff --git a/apps/system/components/MlCoordinator/fake-vec-core/Cargo.toml b/apps/system/components/MlCoordinator/fake-vec-core/Cargo.toml index b25f988..1b3a85a 100644 --- a/apps/system/components/MlCoordinator/fake-vec-core/Cargo.toml +++ b/apps/system/components/MlCoordinator/fake-vec-core/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "fake-vec-core" version = "0.1.0" diff --git a/apps/system/components/MlCoordinator/fake-vec-core/src/lib.rs b/apps/system/components/MlCoordinator/fake-vec-core/src/lib.rs index cd66bd0..6b9465c 100644 --- a/apps/system/components/MlCoordinator/fake-vec-core/src/lib.rs +++ b/apps/system/components/MlCoordinator/fake-vec-core/src/lib.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #![no_std] // fake-vec-core is a stubbed out version of kata-vec-core. diff --git a/apps/system/components/MlCoordinator/kata-ml-component/Cargo.toml b/apps/system/components/MlCoordinator/kata-ml-component/Cargo.toml index fe8a39b..1268bbd 100644 --- a/apps/system/components/MlCoordinator/kata-ml-component/Cargo.toml +++ b/apps/system/components/MlCoordinator/kata-ml-component/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-ml-component" version = "0.1.0" diff --git a/apps/system/components/MlCoordinator/kata-ml-component/src/run.rs b/apps/system/components/MlCoordinator/kata-ml-component/src/run.rs index fd3a854..ea9b54d 100644 --- a/apps/system/components/MlCoordinator/kata-ml-component/src/run.rs +++ b/apps/system/components/MlCoordinator/kata-ml-component/src/run.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #![no_std] #![allow(clippy::missing_safety_doc)] diff --git a/apps/system/components/MlCoordinator/kata-ml-coordinator/Cargo.toml b/apps/system/components/MlCoordinator/kata-ml-coordinator/Cargo.toml index b924867..4ec1131 100644 --- a/apps/system/components/MlCoordinator/kata-ml-coordinator/Cargo.toml +++ b/apps/system/components/MlCoordinator/kata-ml-coordinator/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-ml-coordinator" version = "0.1.0" diff --git a/apps/system/components/MlCoordinator/kata-ml-coordinator/src/lib.rs b/apps/system/components/MlCoordinator/kata-ml-coordinator/src/lib.rs index ef12ffb..9bb8db2 100644 --- a/apps/system/components/MlCoordinator/kata-ml-coordinator/src/lib.rs +++ b/apps/system/components/MlCoordinator/kata-ml-coordinator/src/lib.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #![no_std] // ML Coordinator Design Doc: go/sparrow-ml-doc diff --git a/apps/system/components/MlCoordinator/kata-ml-interface/Cargo.toml b/apps/system/components/MlCoordinator/kata-ml-interface/Cargo.toml index 724eb99..702e115 100644 --- a/apps/system/components/MlCoordinator/kata-ml-interface/Cargo.toml +++ b/apps/system/components/MlCoordinator/kata-ml-interface/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-ml-interface" version = "0.1.0" diff --git a/apps/system/components/MlCoordinator/kata-ml-interface/Makefile b/apps/system/components/MlCoordinator/kata-ml-interface/Makefile index 28cb2a3..9c10492 100644 --- a/apps/system/components/MlCoordinator/kata-ml-interface/Makefile +++ b/apps/system/components/MlCoordinator/kata-ml-interface/Makefile @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + INTERFACES=${OUT}/kata/components ${INTERFACES}/MlCoordBindings.h: src/lib.rs cbindgen.toml diff --git a/apps/system/components/MlCoordinator/kata-ml-interface/cbindgen.toml b/apps/system/components/MlCoordinator/kata-ml-interface/cbindgen.toml index f98b70e..3aa5649 100644 --- a/apps/system/components/MlCoordinator/kata-ml-interface/cbindgen.toml +++ b/apps/system/components/MlCoordinator/kata-ml-interface/cbindgen.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + language = "C" include_guard = "__ML_COORDINATOR_BINDINGS_H__" autogen_warning = "/* Warning, this file is autogenerated by cbindgen. Don't modify this manually.\n */" diff --git a/apps/system/components/MlCoordinator/kata-ml-interface/src/lib.rs b/apps/system/components/MlCoordinator/kata-ml-interface/src/lib.rs index f1ee585..b5397b2 100644 --- a/apps/system/components/MlCoordinator/kata-ml-interface/src/lib.rs +++ b/apps/system/components/MlCoordinator/kata-ml-interface/src/lib.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #![no_std] use cstr_core::CString; diff --git a/apps/system/components/MlCoordinator/kata-ml-shared/Cargo.toml b/apps/system/components/MlCoordinator/kata-ml-shared/Cargo.toml index e5b7ba2..e4a6679 100644 --- a/apps/system/components/MlCoordinator/kata-ml-shared/Cargo.toml +++ b/apps/system/components/MlCoordinator/kata-ml-shared/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-ml-shared" version = "0.1.0" diff --git a/apps/system/components/MlCoordinator/kata-ml-shared/src/lib.rs b/apps/system/components/MlCoordinator/kata-ml-shared/src/lib.rs index 6a6de6a..9ab1e1d 100644 --- a/apps/system/components/MlCoordinator/kata-ml-shared/src/lib.rs +++ b/apps/system/components/MlCoordinator/kata-ml-shared/src/lib.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #![no_std] // Data structures used throughout the Kata ML implementation that do not diff --git a/apps/system/components/MlCoordinator/kata-ml-support/Cargo.toml b/apps/system/components/MlCoordinator/kata-ml-support/Cargo.toml index 7545aba..617d4ac 100644 --- a/apps/system/components/MlCoordinator/kata-ml-support/Cargo.toml +++ b/apps/system/components/MlCoordinator/kata-ml-support/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-ml-support" version = "0.1.0" diff --git a/apps/system/components/MlCoordinator/kata-ml-support/src/image_manager.rs b/apps/system/components/MlCoordinator/kata-ml-support/src/image_manager.rs index ac00eb5..d58cbc7 100644 --- a/apps/system/components/MlCoordinator/kata-ml-support/src/image_manager.rs +++ b/apps/system/components/MlCoordinator/kata-ml-support/src/image_manager.rs @@ -1,28 +1,44 @@ -// The Image Manager is responsible for loading and unloading multiple images -// into the Vector Core's tightly coupled memory. It tracks which image section -// is where and evicts images on the core when necessary. +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -// Design doc: go/sparrow-vc-memory. - -// The memory is divided into "top" and "bottom" regions. -// The bottom region is shared between each model. It contains uninitialized -// values and the stack and heap. This space is shared in order to fit more -// models in memory. (This requires us to clear the memory between -// models from different applications.) -// The top region contains the sensor frames and the segments of each -// image. On system initialization the Sensor Manager requests an allocation, -// meaning the top of the memory will always contain those frames. Applications -// then request models to be loaded. These are allocated downward in a linear -// fashion. Images contain 6 different sections, of which 4 are loaded -// contiguously together (text, constant_data, model_output, static_data). -// All sections are described in go/sparrow-vc-memory. - -// The expected most common usage patterns are: -// * There is only one model resident in memory. -// * There are two models resident in memory. -// * There are two models and each are too large to fit into memory together, -// so they're unloaded and loaded on demand. -// Based on these expectations eviction is done on a FILO basis. +/*! + * The Image Manager is responsible for loading and unloading multiple images + * into the Vector Core's tightly coupled memory. It tracks which image section + * is where and evicts images on the core when necessary. + * + * Design doc: go/sparrow-vc-memory. + * + * The memory is divided into "top" and "bottom" regions. + * The bottom region is shared between each model. It contains uninitialized + * values and the stack and heap. This space is shared in order to fit more + * models in memory. (This requires us to clear the memory between + * models from different applications.) + * The top region contains the sensor frames and the segments of each + * image. On system initialization the Sensor Manager requests an allocation, + * meaning the top of the memory will always contain those frames. Applications + * then request models to be loaded. These are allocated downward in a linear + * fashion. Images contain 6 different sections, of which 4 are loaded + * contiguously together (text, constant_data, model_output, static_data). + * All sections are described in go/sparrow-vc-memory. + * + * The expected most common usage patterns are: + * There is only one model resident in memory. + * There are two models resident in memory. + * There are two models and each are too large to fit into memory together, + * so they're unloaded and loaded on demand. + * Based on these expectations eviction is done on a FILO basis. + */ extern crate alloc; diff --git a/apps/system/components/MlCoordinator/kata-ml-support/src/lib.rs b/apps/system/components/MlCoordinator/kata-ml-support/src/lib.rs index 5219687..f213139 100644 --- a/apps/system/components/MlCoordinator/kata-ml-support/src/lib.rs +++ b/apps/system/components/MlCoordinator/kata-ml-support/src/lib.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #![no_std] pub mod image_manager; diff --git a/apps/system/components/MlCoordinator/kata-vec-core/Cargo.toml b/apps/system/components/MlCoordinator/kata-vec-core/Cargo.toml index f26dd30..59608c9 100644 --- a/apps/system/components/MlCoordinator/kata-vec-core/Cargo.toml +++ b/apps/system/components/MlCoordinator/kata-vec-core/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-vec-core" version = "0.1.0" diff --git a/apps/system/components/MlCoordinator/kata-vec-core/src/lib.rs b/apps/system/components/MlCoordinator/kata-vec-core/src/lib.rs index 7748b31..32aa714 100644 --- a/apps/system/components/MlCoordinator/kata-vec-core/src/lib.rs +++ b/apps/system/components/MlCoordinator/kata-vec-core/src/lib.rs @@ -1,7 +1,21 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #![no_std] -// kata-vec-core is the vector core driver. It is responsible for providing -// convenient methods for interacting with the hardware. +//! kata-vec-core is the vector core driver. It is responsible for providing +//! convenient methods for interacting with the hardware. extern crate alloc; diff --git a/apps/system/components/MlCoordinator/kata-vec-core/src/vc_top.rs b/apps/system/components/MlCoordinator/kata-vec-core/src/vc_top.rs index 43fc33d..8a1a5f6 100644 --- a/apps/system/components/MlCoordinator/kata-vec-core/src/vc_top.rs +++ b/apps/system/components/MlCoordinator/kata-vec-core/src/vc_top.rs @@ -1,6 +1,20 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #![allow(unused)] -// Setters and getters for the Vector Core CSRs. +//! Setters and getters for the Vector Core CSRs. use core::ptr; use kata_ml_shared::Permission; diff --git a/apps/system/components/ProcessManager/Cargo.toml b/apps/system/components/ProcessManager/Cargo.toml index e9d0f53..6d7afcc 100644 --- a/apps/system/components/ProcessManager/Cargo.toml +++ b/apps/system/components/ProcessManager/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [workspace] members = [ diff --git a/apps/system/components/ProcessManager/ProcessManager.camkes b/apps/system/components/ProcessManager/ProcessManager.camkes index 12d6906..288efa4 100644 --- a/apps/system/components/ProcessManager/ProcessManager.camkes +++ b/apps/system/components/ProcessManager/ProcessManager.camkes @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Kata OS ProcessManager services. import <LoggerInterface.camkes>; diff --git a/apps/system/components/ProcessManager/kata-proc-component/Cargo.toml b/apps/system/components/ProcessManager/kata-proc-component/Cargo.toml index 83752ac..25ef10a 100644 --- a/apps/system/components/ProcessManager/kata-proc-component/Cargo.toml +++ b/apps/system/components/ProcessManager/kata-proc-component/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-proc-component" version = "0.1.0" diff --git a/apps/system/components/ProcessManager/kata-proc-component/src/run.rs b/apps/system/components/ProcessManager/kata-proc-component/src/run.rs index a0f728b..e144aed 100644 --- a/apps/system/components/ProcessManager/kata-proc-component/src/run.rs +++ b/apps/system/components/ProcessManager/kata-proc-component/src/run.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Kata OS ProcessManager component support. // Code here binds the camkes component to the rust code. diff --git a/apps/system/components/ProcessManager/kata-proc-interface/Cargo.toml b/apps/system/components/ProcessManager/kata-proc-interface/Cargo.toml index ebe9ecf..ce1fd64 100644 --- a/apps/system/components/ProcessManager/kata-proc-interface/Cargo.toml +++ b/apps/system/components/ProcessManager/kata-proc-interface/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-proc-interface" version = "0.1.0" diff --git a/apps/system/components/ProcessManager/kata-proc-interface/Makefile b/apps/system/components/ProcessManager/kata-proc-interface/Makefile index 7c5343f..8e317aa 100644 --- a/apps/system/components/ProcessManager/kata-proc-interface/Makefile +++ b/apps/system/components/ProcessManager/kata-proc-interface/Makefile @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + INTERFACES=${OUT}/kata/components ${INTERFACES}/ProcessManagerBindings.h: src/lib.rs cbindgen.toml diff --git a/apps/system/components/ProcessManager/kata-proc-interface/cbindgen.toml b/apps/system/components/ProcessManager/kata-proc-interface/cbindgen.toml index 95427f0..ea82f03 100644 --- a/apps/system/components/ProcessManager/kata-proc-interface/cbindgen.toml +++ b/apps/system/components/ProcessManager/kata-proc-interface/cbindgen.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + language = "C" include_guard = "__PROCESS_MANAGER_BINDINGS_H__" autogen_warning = "/* Warning, this file is autogenerated by cbindgen. Don't modify this manually.\n */" diff --git a/apps/system/components/ProcessManager/kata-proc-interface/src/bundle_image.rs b/apps/system/components/ProcessManager/kata-proc-interface/src/bundle_image.rs index 03f948d..1d2e0c2 100644 --- a/apps/system/components/ProcessManager/kata-proc-interface/src/bundle_image.rs +++ b/apps/system/components/ProcessManager/kata-proc-interface/src/bundle_image.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Kata OS Bundle image loader. use core::cmp; diff --git a/apps/system/components/ProcessManager/kata-proc-interface/src/lib.rs b/apps/system/components/ProcessManager/kata-proc-interface/src/lib.rs index 355f144..298a756 100644 --- a/apps/system/components/ProcessManager/kata-proc-interface/src/lib.rs +++ b/apps/system/components/ProcessManager/kata-proc-interface/src/lib.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Kata OS process management support #![cfg_attr(not(test), no_std)] diff --git a/apps/system/components/ProcessManager/kata-proc-manager/Cargo.toml b/apps/system/components/ProcessManager/kata-proc-manager/Cargo.toml index 2774e18..5b6b9d6 100644 --- a/apps/system/components/ProcessManager/kata-proc-manager/Cargo.toml +++ b/apps/system/components/ProcessManager/kata-proc-manager/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-proc-manager" version = "0.1.0" diff --git a/apps/system/components/ProcessManager/kata-proc-manager/build.rs b/apps/system/components/ProcessManager/kata-proc-manager/build.rs index d637d08..69753b1 100644 --- a/apps/system/components/ProcessManager/kata-proc-manager/build.rs +++ b/apps/system/components/ProcessManager/kata-proc-manager/build.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + extern crate sel4_config; use std::env; diff --git a/apps/system/components/ProcessManager/kata-proc-manager/src/lib.rs b/apps/system/components/ProcessManager/kata-proc-manager/src/lib.rs index e239fad..9fed300 100644 --- a/apps/system/components/ProcessManager/kata-proc-manager/src/lib.rs +++ b/apps/system/components/ProcessManager/kata-proc-manager/src/lib.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Kata OS process management support #![cfg_attr(not(test), no_std)] diff --git a/apps/system/components/ProcessManager/kata-proc-manager/src/proc_manager/mod.rs b/apps/system/components/ProcessManager/kata-proc-manager/src/proc_manager/mod.rs index d97751d..04e4019 100644 --- a/apps/system/components/ProcessManager/kata-proc-manager/src/proc_manager/mod.rs +++ b/apps/system/components/ProcessManager/kata-proc-manager/src/proc_manager/mod.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Kata OS process management support extern crate alloc; diff --git a/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/arch/riscv.rs b/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/arch/riscv.rs index fe6c6a4..d299481 100644 --- a/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/arch/riscv.rs +++ b/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/arch/riscv.rs @@ -1,4 +1,18 @@ -// RISC-V common target support. +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! RISC-V common target support. #![allow(non_camel_case_types)] #![allow(dead_code)] diff --git a/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/arch/riscv32.rs b/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/arch/riscv32.rs index b80acac..eda33f8 100644 --- a/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/arch/riscv32.rs +++ b/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/arch/riscv32.rs @@ -1,4 +1,18 @@ -// RISC-V 32-bit target support. +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! RISC-V 32-bit target support. #![allow(non_camel_case_types)] diff --git a/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/mcs.rs b/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/mcs.rs index e6f1548..0621aa0 100644 --- a/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/mcs.rs +++ b/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/mcs.rs @@ -1,4 +1,18 @@ -// MCS Kernel Support. +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! MCS Kernel Support. use super::sel4_sys; diff --git a/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/no_mcs.rs b/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/no_mcs.rs index e3035c0..b195fb5 100644 --- a/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/no_mcs.rs +++ b/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/no_mcs.rs @@ -1,4 +1,18 @@ -// No MCS Kernel Support. +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! No MCS Kernel Support. use super::sel4_sys; diff --git a/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/no_smp.rs b/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/no_smp.rs index 0008463..a300ee7 100644 --- a/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/no_smp.rs +++ b/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/no_smp.rs @@ -1,4 +1,18 @@ -// No SMP support. +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! No SMP support. // TODO(sleffler): maybe merge into arch code use super::sel4_sys; diff --git a/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/no_spill_tcb_args.rs b/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/no_spill_tcb_args.rs index adc07f4..0af9eb5 100644 --- a/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/no_spill_tcb_args.rs +++ b/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/no_spill_tcb_args.rs @@ -1,5 +1,19 @@ -// Register Calling Convention. -// Max 4 arguments are passed to threads using registers. +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Register Calling Convention. +//! Max 4 arguments are passed to threads using registers. use super::sel4_sys; use crate::arch::REG_ARGS; diff --git a/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/smp.rs b/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/smp.rs index 2eb2c8c..dbcf7d0 100644 --- a/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/smp.rs +++ b/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/smp.rs @@ -1,4 +1,18 @@ -// SMP support. +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! SMP support. // TODO(sleffler): maybe merge into arch code use super::sel4_sys; diff --git a/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/spill_tcb_args.rs b/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/spill_tcb_args.rs index f130c11..0cd8b4e 100644 --- a/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/spill_tcb_args.rs +++ b/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/feature/spill_tcb_args.rs @@ -1,6 +1,20 @@ -// Spill-to-stack Calling Convention. -// The first REG_ARGS arguments are passed to threads using registers; -// any more arguments are written to the stack. +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Spill-to-stack Calling Convention. +//! The first REG_ARGS arguments are passed to threads using registers; +//! any more arguments are written to the stack. use super::sel4_sys; use super::CopyRegion; diff --git a/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/mod.rs b/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/mod.rs index 3799641..983fb79 100644 --- a/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/mod.rs +++ b/apps/system/components/ProcessManager/kata-proc-manager/src/sel4bundle/mod.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Kata OS seL4 bundle support #![allow(non_upper_case_globals)] diff --git a/apps/system/components/SecurityCoordinator/Cargo.toml b/apps/system/components/SecurityCoordinator/Cargo.toml index 98f9bac..63b2492 100644 --- a/apps/system/components/SecurityCoordinator/Cargo.toml +++ b/apps/system/components/SecurityCoordinator/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [workspace] members = [ diff --git a/apps/system/components/SecurityCoordinator/SecurityCoordinator.camkes b/apps/system/components/SecurityCoordinator/SecurityCoordinator.camkes index c690f2d..9937705 100644 --- a/apps/system/components/SecurityCoordinator/SecurityCoordinator.camkes +++ b/apps/system/components/SecurityCoordinator/SecurityCoordinator.camkes @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Kata OS SecurityCoordinator services. import <LoggerInterface.camkes>; diff --git a/apps/system/components/SecurityCoordinator/kata-security-component/Cargo.toml b/apps/system/components/SecurityCoordinator/kata-security-component/Cargo.toml index 7ab7cd2..470f4fb 100644 --- a/apps/system/components/SecurityCoordinator/kata-security-component/Cargo.toml +++ b/apps/system/components/SecurityCoordinator/kata-security-component/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-security-component" version = "0.1.0" diff --git a/apps/system/components/SecurityCoordinator/kata-security-component/src/run.rs b/apps/system/components/SecurityCoordinator/kata-security-component/src/run.rs index 8492af2..0bfa447 100644 --- a/apps/system/components/SecurityCoordinator/kata-security-component/src/run.rs +++ b/apps/system/components/SecurityCoordinator/kata-security-component/src/run.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Kata OS Security Coordinator component support. // Code here binds the camkes component to the rust code. diff --git a/apps/system/components/SecurityCoordinator/kata-security-coordinator/Cargo.toml b/apps/system/components/SecurityCoordinator/kata-security-coordinator/Cargo.toml index 720faa8..51adc07 100644 --- a/apps/system/components/SecurityCoordinator/kata-security-coordinator/Cargo.toml +++ b/apps/system/components/SecurityCoordinator/kata-security-coordinator/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-security-coordinator" version = "0.1.0" diff --git a/apps/system/components/SecurityCoordinator/kata-security-coordinator/src/fakeimpl/mod.rs b/apps/system/components/SecurityCoordinator/kata-security-coordinator/src/fakeimpl/mod.rs index 5cc02a4..cf2042a 100644 --- a/apps/system/components/SecurityCoordinator/kata-security-coordinator/src/fakeimpl/mod.rs +++ b/apps/system/components/SecurityCoordinator/kata-security-coordinator/src/fakeimpl/mod.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Kata OS security coordinator fake support extern crate alloc; diff --git a/apps/system/components/SecurityCoordinator/kata-security-coordinator/src/impl.rs b/apps/system/components/SecurityCoordinator/kata-security-coordinator/src/impl.rs index 42aa8c5..c5f7e7c 100644 --- a/apps/system/components/SecurityCoordinator/kata-security-coordinator/src/impl.rs +++ b/apps/system/components/SecurityCoordinator/kata-security-coordinator/src/impl.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Kata OS security coordinator seL4 support use kata_security_interface::DeleteKeyRequest; diff --git a/apps/system/components/SecurityCoordinator/kata-security-coordinator/src/lib.rs b/apps/system/components/SecurityCoordinator/kata-security-coordinator/src/lib.rs index edbb031..262a67f 100644 --- a/apps/system/components/SecurityCoordinator/kata-security-coordinator/src/lib.rs +++ b/apps/system/components/SecurityCoordinator/kata-security-coordinator/src/lib.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Kata OS security coordinator support #![cfg_attr(not(test), no_std)] diff --git a/apps/system/components/SecurityCoordinator/kata-security-interface/Cargo.toml b/apps/system/components/SecurityCoordinator/kata-security-interface/Cargo.toml index b0b5af7..783e96c 100644 --- a/apps/system/components/SecurityCoordinator/kata-security-interface/Cargo.toml +++ b/apps/system/components/SecurityCoordinator/kata-security-interface/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-security-interface" version = "0.1.0" diff --git a/apps/system/components/SecurityCoordinator/kata-security-interface/Makefile b/apps/system/components/SecurityCoordinator/kata-security-interface/Makefile index 4a3136e..72d9d4e 100644 --- a/apps/system/components/SecurityCoordinator/kata-security-interface/Makefile +++ b/apps/system/components/SecurityCoordinator/kata-security-interface/Makefile @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + INTERFACES=${OUT}/kata/components ${INTERFACES}/SecurityCoordinatorBindings.h: src/lib.rs cbindgen.toml diff --git a/apps/system/components/SecurityCoordinator/kata-security-interface/cbindgen.toml b/apps/system/components/SecurityCoordinator/kata-security-interface/cbindgen.toml index 1b81da7..c4e3a9c 100644 --- a/apps/system/components/SecurityCoordinator/kata-security-interface/cbindgen.toml +++ b/apps/system/components/SecurityCoordinator/kata-security-interface/cbindgen.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + language = "C" include_guard = "__SECURITY_COORDINATOR_BINDINGS_H__" autogen_warning = "/* Warning, this file is autogenerated by cbindgen. Don't modify this manually.\n */" diff --git a/apps/system/components/SecurityCoordinator/kata-security-interface/src/lib.rs b/apps/system/components/SecurityCoordinator/kata-security-interface/src/lib.rs index 0c172c4..a2d1aaa 100644 --- a/apps/system/components/SecurityCoordinator/kata-security-interface/src/lib.rs +++ b/apps/system/components/SecurityCoordinator/kata-security-interface/src/lib.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Kata OS Security Coordinator support #![cfg_attr(not(test), no_std)] diff --git a/apps/system/components/StorageManager/Cargo.toml b/apps/system/components/StorageManager/Cargo.toml index 0b66971..5f429ae 100644 --- a/apps/system/components/StorageManager/Cargo.toml +++ b/apps/system/components/StorageManager/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [workspace] members = [ diff --git a/apps/system/components/StorageManager/StorageManager.camkes b/apps/system/components/StorageManager/StorageManager.camkes index ce4f8e1..c519aa9 100644 --- a/apps/system/components/StorageManager/StorageManager.camkes +++ b/apps/system/components/StorageManager/StorageManager.camkes @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Kata OS StorageManager services. import <LoggerInterface.camkes>; diff --git a/apps/system/components/StorageManager/kata-storage-component/Cargo.toml b/apps/system/components/StorageManager/kata-storage-component/Cargo.toml index d26c89a..630622d 100644 --- a/apps/system/components/StorageManager/kata-storage-component/Cargo.toml +++ b/apps/system/components/StorageManager/kata-storage-component/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-storage-component" version = "0.1.0" diff --git a/apps/system/components/StorageManager/kata-storage-component/src/run.rs b/apps/system/components/StorageManager/kata-storage-component/src/run.rs index 6a39aac..4ec8bd6 100644 --- a/apps/system/components/StorageManager/kata-storage-component/src/run.rs +++ b/apps/system/components/StorageManager/kata-storage-component/src/run.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Kata OS StorageManager component support. // Code here binds the camkes component to the rust code. diff --git a/apps/system/components/StorageManager/kata-storage-interface/Cargo.toml b/apps/system/components/StorageManager/kata-storage-interface/Cargo.toml index b926e01..7b6e882 100644 --- a/apps/system/components/StorageManager/kata-storage-interface/Cargo.toml +++ b/apps/system/components/StorageManager/kata-storage-interface/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-storage-interface" version = "0.1.0" diff --git a/apps/system/components/StorageManager/kata-storage-interface/Makefile b/apps/system/components/StorageManager/kata-storage-interface/Makefile index bce624d..544851b 100644 --- a/apps/system/components/StorageManager/kata-storage-interface/Makefile +++ b/apps/system/components/StorageManager/kata-storage-interface/Makefile @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + INTERFACES=${OUT}/kata/components ${INTERFACES}/StorageManagerBindings.h: src/lib.rs cbindgen.toml diff --git a/apps/system/components/StorageManager/kata-storage-interface/cbindgen.toml b/apps/system/components/StorageManager/kata-storage-interface/cbindgen.toml index 7563117..9c4d469 100644 --- a/apps/system/components/StorageManager/kata-storage-interface/cbindgen.toml +++ b/apps/system/components/StorageManager/kata-storage-interface/cbindgen.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + language = "C" include_guard = "__STORAGE_MANAGER_BINDINGS_H__" autogen_warning = "/* Warning, this file is autogenerated by cbindgen. Don't modify this manually.\n */" diff --git a/apps/system/components/StorageManager/kata-storage-interface/src/lib.rs b/apps/system/components/StorageManager/kata-storage-interface/src/lib.rs index c113e4d..1ffb478 100644 --- a/apps/system/components/StorageManager/kata-storage-interface/src/lib.rs +++ b/apps/system/components/StorageManager/kata-storage-interface/src/lib.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Kata OS storage management support #![cfg_attr(not(test), no_std)] diff --git a/apps/system/components/StorageManager/kata-storage-manager/Cargo.toml b/apps/system/components/StorageManager/kata-storage-manager/Cargo.toml index 419516e..28df2f2 100644 --- a/apps/system/components/StorageManager/kata-storage-manager/Cargo.toml +++ b/apps/system/components/StorageManager/kata-storage-manager/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-storage-manager" version = "0.1.0" diff --git a/apps/system/components/StorageManager/kata-storage-manager/src/lib.rs b/apps/system/components/StorageManager/kata-storage-manager/src/lib.rs index 658515d..5a75362 100644 --- a/apps/system/components/StorageManager/kata-storage-manager/src/lib.rs +++ b/apps/system/components/StorageManager/kata-storage-manager/src/lib.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! Kata OS storage management support #![cfg_attr(not(test), no_std)] diff --git a/apps/system/components/TimerService/Cargo.toml b/apps/system/components/TimerService/Cargo.toml index 4fbb544..6d15585 100644 --- a/apps/system/components/TimerService/Cargo.toml +++ b/apps/system/components/TimerService/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [workspace] members = [ diff --git a/apps/system/components/TimerService/TimerService.camkes b/apps/system/components/TimerService/TimerService.camkes index d768f2f..edb97ba 100644 --- a/apps/system/components/TimerService/TimerService.camkes +++ b/apps/system/components/TimerService/TimerService.camkes @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + import <TimerServiceInterface.camkes>; component TimerService { diff --git a/apps/system/components/TimerService/kata-timer-component/Cargo.toml b/apps/system/components/TimerService/kata-timer-component/Cargo.toml index def276f..8cd6898 100644 --- a/apps/system/components/TimerService/kata-timer-component/Cargo.toml +++ b/apps/system/components/TimerService/kata-timer-component/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-timer-component" version = "0.1.0" diff --git a/apps/system/components/TimerService/kata-timer-component/src/run.rs b/apps/system/components/TimerService/kata-timer-component/src/run.rs index ba86f26..5a77325 100644 --- a/apps/system/components/TimerService/kata-timer-component/src/run.rs +++ b/apps/system/components/TimerService/kata-timer-component/src/run.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! The Timer Service provides multiplexed access to a hardware timer. #![no_std] #![allow(clippy::missing_safety_doc)] diff --git a/apps/system/components/TimerService/kata-timer-interface/Cargo.toml b/apps/system/components/TimerService/kata-timer-interface/Cargo.toml index 0b87a61..866026d 100644 --- a/apps/system/components/TimerService/kata-timer-interface/Cargo.toml +++ b/apps/system/components/TimerService/kata-timer-interface/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-timer-interface" version = "0.1.0" diff --git a/apps/system/components/TimerService/kata-timer-interface/Makefile b/apps/system/components/TimerService/kata-timer-interface/Makefile index 6492aee..3ffbb74 100644 --- a/apps/system/components/TimerService/kata-timer-interface/Makefile +++ b/apps/system/components/TimerService/kata-timer-interface/Makefile @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + INTERFACES=${OUT}/kata/components ${INTERFACES}/TimerServiceBindings.h: src/lib.rs cbindgen.toml diff --git a/apps/system/components/TimerService/kata-timer-interface/cbindgen.toml b/apps/system/components/TimerService/kata-timer-interface/cbindgen.toml index 1767d7c..7e14280 100644 --- a/apps/system/components/TimerService/kata-timer-interface/cbindgen.toml +++ b/apps/system/components/TimerService/kata-timer-interface/cbindgen.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + language = "C" include_guard = "__TIMER_SERVICE_BINDINGS_H__" autogen_warning = "/* Warning, this file is autogenerated by cbindgen. Don't modify this manually.\n */" diff --git a/apps/system/components/TimerService/kata-timer-interface/src/lib.rs b/apps/system/components/TimerService/kata-timer-interface/src/lib.rs index 78f99ba..ca18543 100644 --- a/apps/system/components/TimerService/kata-timer-interface/src/lib.rs +++ b/apps/system/components/TimerService/kata-timer-interface/src/lib.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #![no_std] use core::time::Duration; diff --git a/apps/system/components/TimerService/kata-timer-service/Cargo.toml b/apps/system/components/TimerService/kata-timer-service/Cargo.toml index a4e4131..c89d5aa 100644 --- a/apps/system/components/TimerService/kata-timer-service/Cargo.toml +++ b/apps/system/components/TimerService/kata-timer-service/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "kata-timer-service" version = "0.1.0" diff --git a/apps/system/components/TimerService/kata-timer-service/src/lib.rs b/apps/system/components/TimerService/kata-timer-service/src/lib.rs index fbe8a00..093797c 100644 --- a/apps/system/components/TimerService/kata-timer-service/src/lib.rs +++ b/apps/system/components/TimerService/kata-timer-service/src/lib.rs @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + #![no_std] #![feature(map_first_last)] #![feature(const_btree_new)] diff --git a/apps/system/components/TimerService/opentitan-timer/Cargo.toml b/apps/system/components/TimerService/opentitan-timer/Cargo.toml index a92e6e8..601a118 100644 --- a/apps/system/components/TimerService/opentitan-timer/Cargo.toml +++ b/apps/system/components/TimerService/opentitan-timer/Cargo.toml @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + [package] name = "opentitan-timer" version = "0.1.0" diff --git a/apps/system/components/TimerService/opentitan-timer/src/lib.rs b/apps/system/components/TimerService/opentitan-timer/src/lib.rs index 45133a3..d586782 100644 --- a/apps/system/components/TimerService/opentitan-timer/src/lib.rs +++ b/apps/system/components/TimerService/opentitan-timer/src/lib.rs @@ -1,5 +1,19 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //! This crate provides access to an OpenTitan timer that satisfies the -// HardwareTimer interface. +//! HardwareTimer interface. #![no_std] mod opentitan_timer; diff --git a/apps/system/components/TimerService/opentitan-timer/src/opentitan_timer.rs b/apps/system/components/TimerService/opentitan-timer/src/opentitan_timer.rs index 329c5a4..68c550d 100644 --- a/apps/system/components/TimerService/opentitan-timer/src/opentitan_timer.rs +++ b/apps/system/components/TimerService/opentitan-timer/src/opentitan_timer.rs @@ -1,4 +1,18 @@ -// Hardware structs for OpenTitan timers. +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Hardware structs for OpenTitan timers. // https://docs.opentitan.org/hw/ip/rv_timer/doc/ #![allow(unused)] diff --git a/easy-settings.cmake b/easy-settings.cmake index 780ac86..7290023 100644 --- a/easy-settings.cmake +++ b/easy-settings.cmake @@ -1,3 +1,17 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + set(CAMKES_APP "system" CACHE STRING "The one and only CAmkES application in this project") #set(CAPDL_LOADER_APP "capdl-loader-app" CACHE STRING "") set(CAPDL_LOADER_APP "kata-os-rootserver" CACHE STRING "") diff --git a/rustfmt.toml b/rustfmt.toml index 6ae54d5..6221425 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,2 +1,16 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + fn_call_width = 70 fn_single_line = true