diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7307e05dd..42aac5c06 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,10 +3,18 @@ name: Build on: push: branches: - - '*' + - "*" pull_request: jobs: + reuse_check: + name: "REUSE Compliance Check" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: REUSE Compliance Check + uses: fsfe/reuse-action@v4 + check_formatting: name: "Check Formatting" runs-on: ubuntu-latest @@ -22,14 +30,14 @@ jobs: strategy: matrix: features: [ - "", - "noserial", - "qemu", - "noserial,qemu", - "jtag", - "noserial,jtag", - # jtag and qemu together don't make much sense - ] + "", + "noserial", + "qemu", + "noserial,qemu", + "jtag", + "noserial,jtag", + # jtag and qemu together don't make much sense + ] runs-on: ubuntu-latest timeout-minutes: 10 steps: @@ -46,97 +54,93 @@ jobs: strategy: matrix: - platform: [ - ubuntu-latest, - macos-latest, - windows-latest - ] + platform: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.platform }} timeout-minutes: 30 steps: - - name: "Checkout Repository" - uses: actions/checkout@v1 - - - name: Install Rustup (macOS) - run: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - echo "$HOME/.cargo/bin" >> $GITHUB_PATH - if: runner.os == 'macOS' - - - name: Set Rustup profile to minimal - run: rustup set profile minimal - - - name: "Switch to Rust nightly" - run: rustup default nightly - - - name: "Print Rust Version" - run: | - rustc -Vv - cargo -Vv - - - name: "Install build tools" - run: cargo install cargo-make cargo-binutils - - - name: "Install dev libraries (Linux)" - run: sudo apt install libudev-dev - if: runner.os == 'Linux' - - - name: "Validate rust-lld" - run: | - which rust-lld || echo "Not found" - otool -L ~/.cargo/bin/rust-lld - if: runner.os == 'macOS' - - - name: "Print Tools Version" - run: | - cargo make --version - cargo objcopy --version - - - name: "Deny Warnings" - run: cargo make build - env: - RUSTFLAGS: "-D warnings" - - - name: Install QEMU (Linux) - run: | - sudo apt-get update - sudo apt-get install --fix-missing qemu-system-aarch64 - if: runner.os == 'Linux' - - - name: Install QEMU (macOS) - run: brew install qemu - if: runner.os == 'macOS' - env: - HOMEBREW_NO_AUTO_UPDATE: 1 - HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: 1 - HOMEBREW_NO_INSTALL_CLEANUP: 1 - - - name: Install Scoop (Windows) - run: | - iwr -useb get.scoop.sh -outfile 'install.ps1' - .\install.ps1 -RunAsAdmin - echo "$HOME\scoop\shims" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - if: runner.os == 'Windows' - shell: pwsh - - - name: Add custom Scoop bucket for QEMU (Windows) - run: | - scoop bucket add scoop-for-ci https://github.com/metta-systems/scoop-for-ci - if: runner.os == 'Windows' - shell: pwsh - - - name: Install QEMU (Windows) - run: scoop install qemu-810 - if: runner.os == 'Windows' - shell: pwsh - - - name: "Print QEMU Version" - run: qemu-system-aarch64 --version - - - name: 'Build kernel' - run: cargo make build - - - name: 'Run tests' - run: cargo make test + - name: "Checkout Repository" + uses: actions/checkout@v1 + + - name: Install Rustup (macOS) + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + if: runner.os == 'macOS' + + - name: Set Rustup profile to minimal + run: rustup set profile minimal + + - name: "Switch to Rust nightly" + run: rustup default nightly + + - name: "Print Rust Version" + run: | + rustc -Vv + cargo -Vv + + - name: "Install build tools" + run: cargo install cargo-make cargo-binutils + + - name: "Install dev libraries (Linux)" + run: sudo apt install libudev-dev + if: runner.os == 'Linux' + + - name: "Validate rust-lld" + run: | + which rust-lld || echo "Not found" + otool -L ~/.cargo/bin/rust-lld + if: runner.os == 'macOS' + + - name: "Print Tools Version" + run: | + cargo make --version + cargo objcopy --version + + - name: "Deny Warnings" + run: cargo make build + env: + RUSTFLAGS: "-D warnings" + + - name: Install QEMU (Linux) + run: | + sudo apt-get update + sudo apt-get install --fix-missing qemu-system-aarch64 + if: runner.os == 'Linux' + + - name: Install QEMU (macOS) + run: brew install qemu + if: runner.os == 'macOS' + env: + HOMEBREW_NO_AUTO_UPDATE: 1 + HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: 1 + HOMEBREW_NO_INSTALL_CLEANUP: 1 + + - name: Install Scoop (Windows) + run: | + iwr -useb get.scoop.sh -outfile 'install.ps1' + .\install.ps1 -RunAsAdmin + echo "$HOME\scoop\shims" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + if: runner.os == 'Windows' + shell: pwsh + + - name: Add custom Scoop bucket for QEMU (Windows) + run: | + scoop bucket add scoop-for-ci https://github.com/metta-systems/scoop-for-ci + if: runner.os == 'Windows' + shell: pwsh + + - name: Install QEMU (Windows) + run: scoop install qemu-810 + if: runner.os == 'Windows' + shell: pwsh + + - name: "Print QEMU Version" + run: qemu-system-aarch64 --version + + - name: "Build kernel" + run: cargo make build + + - name: "Run tests" + run: cargo make test diff --git a/Justfile b/Justfile index 9af0d2a3e..6e10f51fc 100644 --- a/Justfile +++ b/Justfile @@ -177,3 +177,9 @@ setup-local-dev: commit-emoji -i # Run local shortened clippy before pushing to remote cp .hooks/pre-push .git/hooks/pre-push + +license-reuse: + pipx run reuse lint + +apply-license dir: + pipx run reuse annotate {{ dir }} --contributor "Berkus" --copyright "Metta Systems OÜ" --recursive diff --git a/LICENSES/Apache-2.0.txt b/LICENSES/Apache-2.0.txt new file mode 100644 index 000000000..860f1ba9f --- /dev/null +++ b/LICENSES/Apache-2.0.txt @@ -0,0 +1,73 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright 2001 - 2024, Metta Systems OÜ + +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 + +http://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. diff --git a/LICENSE.BlueOak-1.0.0.md b/LICENSES/BlueOak-1.0.0.txt similarity index 51% rename from LICENSE.BlueOak-1.0.0.md rename to LICENSES/BlueOak-1.0.0.txt index 56a77ab97..c5402b957 100644 --- a/LICENSE.BlueOak-1.0.0.md +++ b/LICENSES/BlueOak-1.0.0.txt @@ -53,34 +53,3 @@ No contributor can revoke this license. without any warranty or condition, and no contributor will be liable to anyone for any damages related to this software or this license, under any kind of legal claim.*** - ---- - -[Addtional restrictions](https://blog.yossarian.net/2020/06/03/You-may-not-use-my-projects-in-a-military-or-law-enforcement-context): - -The following terms additionally apply and override any above terms for -applicable parties: - -You may not use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software in a military or law enforcement context, -defined as follows: - -1. A military context is a professional context where the intended application -of the Software is integration or use with or by military software, tools -(software or hardware), or personnel. This includes contractors and -subcontractors as well as research affiliates of any military organization. - -2. A law enforcement context is a professional context where the intended -application of the Software is integration or use with or by law enforcement -software, tools (software or hardware), or personnel. This includes -contractors and subcontractors as well as research affiliates of any law -enforcement organization. - -Entities that sell or license to military or law enforcement organizations -may use the Software under the original terms, but only in contexts that do -not assist or supplement the sold or licensed product. - -Students and academics who are affiliated with research institutions may use -the Software under the original terms, but only in contexts that do not assist -or supplement collaboration or affiliation with any military or law -enforcement organization. diff --git a/LICENSES/LicenseRef-NonMilitary.txt b/LICENSES/LicenseRef-NonMilitary.txt new file mode 100644 index 000000000..1a623cce7 --- /dev/null +++ b/LICENSES/LicenseRef-NonMilitary.txt @@ -0,0 +1,28 @@ +[Addtional restrictions](https://blog.yossarian.net/2020/06/03/You-may-not-use-my-projects-in-a-military-or-law-enforcement-context): + +The following terms additionally apply and override any above terms for +applicable parties: + +You may not use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software in a military or law enforcement context, +defined as follows: + +1. A military context is a professional context where the intended application +of the Software is integration or use with or by military software, tools +(software or hardware), or personnel. This includes contractors and +subcontractors as well as research affiliates of any military organization. + +2. A law enforcement context is a professional context where the intended +application of the Software is integration or use with or by law enforcement +software, tools (software or hardware), or personnel. This includes +contractors and subcontractors as well as research affiliates of any law +enforcement organization. + +Entities that sell or license to military or law enforcement organizations +may use the Software under the original terms, but only in contexts that do +not assist or supplement the sold or licensed product. + +Students and academics who are affiliated with research institutions may use +the Software under the original terms, but only in contexts that do not assist +or supplement collaboration or affiliation with any military or law +enforcement organization. diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 000000000..0954f1b88 --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2001 - 2024, Metta Systems OÜ + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/bin/chainboot/Cargo.toml b/bin/chainboot/Cargo.toml index 777363eda..b125f86dc 100644 --- a/bin/chainboot/Cargo.toml +++ b/bin/chainboot/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2024 Metta Systems OÜ +# SPDX-FileContributor: Berkus + [package] name = "chainboot" description = "Chain boot loader" diff --git a/bin/chainboot/Makefile.toml b/bin/chainboot/Makefile.toml index e243ecc5e..96741e0ad 100644 --- a/bin/chainboot/Makefile.toml +++ b/bin/chainboot/Makefile.toml @@ -1,7 +1,7 @@ # # SPDX-License-Identifier: BlueOak-1.0.0 -# -# Copyright (c) Berkus Decker +# SPDX-FileCopyrightText: 2024 Metta Systems OÜ +# SPDX-FileContributor: Berkus # # Build chainboot binary # diff --git a/bin/chainboot/build.rs b/bin/chainboot/build.rs index 6d7fcad66..eb968ac7f 100644 --- a/bin/chainboot/build.rs +++ b/bin/chainboot/build.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + //! This build script is used to create chainboot binary. const LINKER_SCRIPT: &str = "bin/chainboot/src/link.ld"; diff --git a/bin/chainboot/src/boot.rs b/bin/chainboot/src/boot.rs index 689e834e6..a23ff8011 100644 --- a/bin/chainboot/src/boot.rs +++ b/bin/chainboot/src/boot.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + core::arch::global_asm!( include_str!("boot.s"), CONST_BOOT_CORE_ID = const 0, diff --git a/bin/chainboot/src/link.ld b/bin/chainboot/src/link.ld index 1525ab500..578de4f5a 100644 --- a/bin/chainboot/src/link.ld +++ b/bin/chainboot/src/link.ld @@ -1,8 +1,9 @@ -/* SPDX-License-Identifier: MIT OR Apache-2.0 - * - * Copyright (c) 2018-2021 Andre Richter - * Copyright (c) 2021- Berkus - */ +// Copyright (c) 2018-2021 Andre Richter +// Copyright (c) 2021- Berkus +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 /* * Information from: diff --git a/bin/chainboot/src/main.rs b/bin/chainboot/src/main.rs index 3375d7e56..b34e7933d 100644 --- a/bin/chainboot/src/main.rs +++ b/bin/chainboot/src/main.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + // Based on miniload by @andre-richter #![feature(format_args_nl)] #![feature(custom_test_frameworks)] diff --git a/bin/chainofcommand/Cargo.toml b/bin/chainofcommand/Cargo.toml index 4c01d6e24..8f60d3e16 100644 --- a/bin/chainofcommand/Cargo.toml +++ b/bin/chainofcommand/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2024 Metta Systems OÜ +# SPDX-FileContributor: Berkus + [package] name = "chainofcommand" description = "Host server for chainboot" diff --git a/bin/chainofcommand/Makefile.toml b/bin/chainofcommand/Makefile.toml index 5b925bed0..e4c8e4ea6 100644 --- a/bin/chainofcommand/Makefile.toml +++ b/bin/chainofcommand/Makefile.toml @@ -1,7 +1,7 @@ # # SPDX-License-Identifier: BlueOak-1.0.0 -# -# Copyright (c) Berkus Decker +# SPDX-FileCopyrightText: 2024 Metta Systems OÜ +# SPDX-FileContributor: Berkus # # Build chainofcommand tool # diff --git a/bin/chainofcommand/src/main.rs b/bin/chainofcommand/src/main.rs index 511e793fd..c66181bf6 100644 --- a/bin/chainofcommand/src/main.rs +++ b/bin/chainofcommand/src/main.rs @@ -1,5 +1,8 @@ #![feature(trait_alias)] +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + use { anyhow::{Result, anyhow}, bytes::Bytes, diff --git a/machine/Cargo.toml b/machine/Cargo.toml index c4d54713d..2fea87406 100644 --- a/machine/Cargo.toml +++ b/machine/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2024 Metta Systems OÜ +# SPDX-FileContributor: Berkus + [package] name = "machine" description = "Vesper nanokernel shared code library, useful also for the chainboot loader." diff --git a/machine/Makefile.toml b/machine/Makefile.toml index 313e0b247..e8cfc44d7 100644 --- a/machine/Makefile.toml +++ b/machine/Makefile.toml @@ -1,7 +1,7 @@ # # SPDX-License-Identifier: BlueOak-1.0.0 -# -# Copyright (c) Berkus Decker +# SPDX-FileCopyrightText: 2024 Metta Systems OÜ +# SPDX-FileContributor: Berkus # # Build nucleus library (machine) # diff --git a/machine/build.rs b/machine/build.rs index de149972b..8cad53940 100644 --- a/machine/build.rs +++ b/machine/build.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + //! This build script is used to create lib tests. const LINKER_SCRIPT: &str = "machine/src/platform/raspberrypi/linker/kernel.ld"; diff --git a/machine/src/arch/README.md b/machine/src/arch/README.md index 35061c55f..277685e4d 100644 --- a/machine/src/arch/README.md +++ b/machine/src/arch/README.md @@ -1,3 +1,8 @@ + + # Architecture-specific code This directory contains code specific to a certain architecture. diff --git a/machine/src/arch/aarch64/cpu/boot.rs b/machine/src/arch/aarch64/cpu/boot.rs index cf43d691b..a2497258c 100644 --- a/machine/src/arch/aarch64/cpu/boot.rs +++ b/machine/src/arch/aarch64/cpu/boot.rs @@ -1,9 +1,8 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - * - * Based on ideas from Jorge Aparicio, Andre Richter, Phil Oppenheimer, Sergio Benitez. - * Copyright (c) Berkus Decker - */ +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 //! Low-level boot of the ARMv8-A processor. //! diff --git a/machine/src/arch/aarch64/cpu/mod.rs b/machine/src/arch/aarch64/cpu/mod.rs index a64afd36f..fe55e39b7 100644 --- a/machine/src/arch/aarch64/cpu/mod.rs +++ b/machine/src/arch/aarch64/cpu/mod.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + use aarch64_cpu::asm; #[cfg(not(feature = "no_boot"))] // Move this to nucleus?? diff --git a/machine/src/arch/aarch64/cpu/smp.rs b/machine/src/arch/aarch64/cpu/smp.rs index 7d989c2c2..0d949496b 100644 --- a/machine/src/arch/aarch64/cpu/smp.rs +++ b/machine/src/arch/aarch64/cpu/smp.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + #[inline(always)] pub fn core_id() -> u64 { use aarch64_cpu::registers::{MPIDR_EL1, Readable}; diff --git a/machine/src/arch/aarch64/exception/asynchronous.rs b/machine/src/arch/aarch64/exception/asynchronous.rs index ba0793b47..e00a96976 100644 --- a/machine/src/arch/aarch64/exception/asynchronous.rs +++ b/machine/src/arch/aarch64/exception/asynchronous.rs @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// // Copyright (c) 2018-2022 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 //! Architectural asynchronous exception handling. diff --git a/machine/src/arch/aarch64/exception/mod.rs b/machine/src/arch/aarch64/exception/mod.rs index 5cce2c0ba..753356985 100644 --- a/machine/src/arch/aarch64/exception/mod.rs +++ b/machine/src/arch/aarch64/exception/mod.rs @@ -1,7 +1,8 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - * Copyright (c) Berkus Decker - */ +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 //! Interrupt handling //! diff --git a/machine/src/arch/aarch64/exception/vectors.S b/machine/src/arch/aarch64/exception/vectors.S index 4d8959559..c69457b4c 100644 --- a/machine/src/arch/aarch64/exception/vectors.S +++ b/machine/src/arch/aarch64/exception/vectors.S @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2024 Metta Systems OÜ +# SPDX-FileContributor: Berkus + /* * SPDX-License-Identifier: MIT OR BlueOak-1.0.0 * Copyright (c) 2018-2019 Andre Richter diff --git a/machine/src/arch/aarch64/linker/aarch64-exceptions.ld b/machine/src/arch/aarch64/linker/aarch64-exceptions.ld index c0e02c887..a416b49ba 100644 --- a/machine/src/arch/aarch64/linker/aarch64-exceptions.ld +++ b/machine/src/arch/aarch64/linker/aarch64-exceptions.ld @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + PROVIDE(current_el0_synchronous = current_el0_synchronous); PROVIDE(current_el0_irq = current_el0_irq); PROVIDE(current_el0_fiq = default_exception_handler); diff --git a/machine/src/arch/aarch64/memory/README.md b/machine/src/arch/aarch64/memory/README.md index 1e4943b11..d557ff96f 100644 --- a/machine/src/arch/aarch64/memory/README.md +++ b/machine/src/arch/aarch64/memory/README.md @@ -1,3 +1,8 @@ + + # Memory Configuration The types VirtAddr and PhysAddr are representing the addresses before and after the mapping in the MMU. diff --git a/machine/src/arch/aarch64/memory/addr/asid.rs b/machine/src/arch/aarch64/memory/addr/asid.rs index c27f2fa64..23e9bfece 100644 --- a/machine/src/arch/aarch64/memory/addr/asid.rs +++ b/machine/src/arch/aarch64/memory/addr/asid.rs @@ -1,7 +1,8 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - * Copyright (c) Berkus Decker - */ +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 #[allow(dead_code)] pub type ASID = u16; diff --git a/machine/src/arch/aarch64/memory/addr/mod.rs b/machine/src/arch/aarch64/memory/addr/mod.rs index ef1ecda00..eb9d6e62a 100644 --- a/machine/src/arch/aarch64/memory/addr/mod.rs +++ b/machine/src/arch/aarch64/memory/addr/mod.rs @@ -1,7 +1,8 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - * Copyright (c) Berkus Decker - */ +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 mod asid; diff --git a/machine/src/arch/aarch64/memory/mmu/mod.rs b/machine/src/arch/aarch64/memory/mmu/mod.rs index ceeab75fb..7bb4cea35 100644 --- a/machine/src/arch/aarch64/memory/mmu/mod.rs +++ b/machine/src/arch/aarch64/memory/mmu/mod.rs @@ -1,9 +1,9 @@ -/* - * SPDX-License-Identifier: MIT OR BlueOak-1.0.0 - * Copyright (c) 2018-2019 Andre Richter - * Copyright (c) Berkus Decker - * Original code distributed under MIT, additional changes are under BlueOak-1.0.0 - */ +// Copyright (c) 2018-2019 Andre Richter +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR BlueOak-1.0.0 //! MMU initialisation. //! diff --git a/machine/src/arch/aarch64/memory/mmu/translation_table.rs b/machine/src/arch/aarch64/memory/mmu/translation_table.rs index 685162a8c..197516a77 100644 --- a/machine/src/arch/aarch64/memory/mmu/translation_table.rs +++ b/machine/src/arch/aarch64/memory/mmu/translation_table.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + use { super::{Granule64KiB, Granule512MiB, mair}, crate::{ diff --git a/machine/src/arch/aarch64/memory/mod.rs b/machine/src/arch/aarch64/memory/mod.rs index 8d551f9d9..f0256b716 100644 --- a/machine/src/arch/aarch64/memory/mod.rs +++ b/machine/src/arch/aarch64/memory/mod.rs @@ -1,7 +1,8 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - * Copyright (c) Berkus Decker - */ +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 //! Memory management functions for aarch64. diff --git a/machine/src/arch/aarch64/mod.rs b/machine/src/arch/aarch64/mod.rs index e42bff858..49328cb3d 100644 --- a/machine/src/arch/aarch64/mod.rs +++ b/machine/src/arch/aarch64/mod.rs @@ -1,7 +1,8 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - * Copyright (c) Berkus Decker - */ +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 //! Implementation of aarch64 kernel functions. diff --git a/machine/src/arch/aarch64/time.rs b/machine/src/arch/aarch64/time.rs index f862953e4..067686f9a 100644 --- a/machine/src/arch/aarch64/time.rs +++ b/machine/src/arch/aarch64/time.rs @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// // Copyright (c) 2018-2022 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 //! Architectural timer primitives. //! diff --git a/machine/src/arch/aarch64/traps.rs b/machine/src/arch/aarch64/traps.rs index 727125e81..df8cf8ee5 100644 --- a/machine/src/arch/aarch64/traps.rs +++ b/machine/src/arch/aarch64/traps.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + // @todo this file must be moved to exception/mod.rs // @todo finish porting the exception printing part... diff --git a/machine/src/arch/mod.rs b/machine/src/arch/mod.rs index ad4dcec0c..04dd0e8df 100644 --- a/machine/src/arch/mod.rs +++ b/machine/src/arch/mod.rs @@ -1,7 +1,8 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - * Copyright (c) Berkus Decker - */ +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 #[cfg(target_arch = "aarch64")] #[macro_use] diff --git a/machine/src/console/mod.rs b/machine/src/console/mod.rs index e76129f73..100faf1e1 100644 --- a/machine/src/console/mod.rs +++ b/machine/src/console/mod.rs @@ -1,6 +1,7 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - */ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 #![allow(dead_code)] diff --git a/machine/src/console/null_console.rs b/machine/src/console/null_console.rs index 92ffc36dc..4a9530788 100644 --- a/machine/src/console/null_console.rs +++ b/machine/src/console/null_console.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + use crate::{console::interface, devices::serial::SerialOps}; //-------------------------------------------------------------------------------------------------- diff --git a/machine/src/cpu/boot.rs b/machine/src/cpu/boot.rs index ecd5ef846..d4e002d8a 100644 --- a/machine/src/cpu/boot.rs +++ b/machine/src/cpu/boot.rs @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// // Copyright (c) 2021-2022 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 //! Boot code. diff --git a/machine/src/cpu/mod.rs b/machine/src/cpu/mod.rs index 74ea5c8ea..312086a6a 100644 --- a/machine/src/cpu/mod.rs +++ b/machine/src/cpu/mod.rs @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// // Copyright (c) 2020-2022 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 //! Processor code. diff --git a/machine/src/cpu/smp.rs b/machine/src/cpu/smp.rs index fa40e1f46..9a6afe9aa 100644 --- a/machine/src/cpu/smp.rs +++ b/machine/src/cpu/smp.rs @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// // Copyright (c) 2018-2022 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 //! Symmetric multiprocessing. diff --git a/machine/src/debug/jtag.rs b/machine/src/debug/jtag.rs index fcb59d817..c7eea74b2 100644 --- a/machine/src/debug/jtag.rs +++ b/machine/src/debug/jtag.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + //! JTAG helper functions. use { diff --git a/machine/src/debug/mod.rs b/machine/src/debug/mod.rs index f7ecc6fe3..9747583c0 100644 --- a/machine/src/debug/mod.rs +++ b/machine/src/debug/mod.rs @@ -1,2 +1,5 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + #[cfg(feature = "jtag")] pub mod jtag; diff --git a/machine/src/devices/console.rs b/machine/src/devices/console.rs index c908928ef..e0318bb3e 100644 --- a/machine/src/devices/console.rs +++ b/machine/src/devices/console.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + // use { // crate::{ // console::{interface, null_console::NullConsole}, diff --git a/machine/src/devices/mod.rs b/machine/src/devices/mod.rs index a5c0a0c41..abd979305 100644 --- a/machine/src/devices/mod.rs +++ b/machine/src/devices/mod.rs @@ -1,6 +1,7 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - */ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 pub mod console; pub mod serial; diff --git a/machine/src/devices/serial.rs b/machine/src/devices/serial.rs index 82c4a99ee..379f106b9 100644 --- a/machine/src/devices/serial.rs +++ b/machine/src/devices/serial.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + pub trait SerialOps { /// Read one byte from serial without translation. fn read_byte(&self) -> u8; diff --git a/machine/src/drivers.rs b/machine/src/drivers.rs index a884fa1aa..48b635563 100644 --- a/machine/src/drivers.rs +++ b/machine/src/drivers.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + use crate::{ exception, println, synchronization::{IRQSafeNullLock, InitStateLock, interface::ReadWriteEx}, diff --git a/machine/src/exception/asynchronous/mod.rs b/machine/src/exception/asynchronous/mod.rs index 6dd1bc962..cca3c14d8 100644 --- a/machine/src/exception/asynchronous/mod.rs +++ b/machine/src/exception/asynchronous/mod.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + #[cfg(target_arch = "aarch64")] use crate::arch::aarch64::exception::asynchronous as arch_asynchronous; diff --git a/machine/src/exception/asynchronous/null_irq_manager.rs b/machine/src/exception/asynchronous/null_irq_manager.rs index 4cb999fd1..6d3e61f8f 100644 --- a/machine/src/exception/asynchronous/null_irq_manager.rs +++ b/machine/src/exception/asynchronous/null_irq_manager.rs @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// // Copyright (c) 2022 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 //! Null IRQ Manager. diff --git a/machine/src/exception/mod.rs b/machine/src/exception/mod.rs index 118a6b317..1798fc6c9 100644 --- a/machine/src/exception/mod.rs +++ b/machine/src/exception/mod.rs @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// // Copyright (c) 2020-2022 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 //! Synchronous and asynchronous exception handling. diff --git a/machine/src/lib.rs b/machine/src/lib.rs index 3432f77a0..7550d6458 100644 --- a/machine/src/lib.rs +++ b/machine/src/lib.rs @@ -25,6 +25,9 @@ #![feature(core_intrinsics)] #![feature(ptr_internals)] +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + #[cfg(not(target_arch = "aarch64"))] use architecture_not_supported_sorry; diff --git a/machine/src/macros.rs b/machine/src/macros.rs index b92f1176a..61d21ab56 100644 --- a/machine/src/macros.rs +++ b/machine/src/macros.rs @@ -1,7 +1,8 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - * Copyright (c) Berkus Decker - */ +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 /// Macro similar to [std](https://doc.rust-lang.org/src/std/macros.rs.html) /// but for writing into kernel-specific output (UART or QEMU console). diff --git a/machine/src/memory/mmu/mapping_record.rs b/machine/src/memory/mmu/mapping_record.rs index 1dfa8ef26..526da464f 100644 --- a/machine/src/memory/mmu/mapping_record.rs +++ b/machine/src/memory/mmu/mapping_record.rs @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// // Copyright (c) 2020-2022 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 //! A record of mapped pages. diff --git a/machine/src/memory/mmu/mod.rs b/machine/src/memory/mmu/mod.rs index 41690fedf..b91adcb5d 100644 --- a/machine/src/memory/mmu/mod.rs +++ b/machine/src/memory/mmu/mod.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + use { crate::{ memory::{Address, Physical, Virtual}, diff --git a/machine/src/memory/mmu/page_alloc.rs b/machine/src/memory/mmu/page_alloc.rs index b536b4e1a..0033fd9a1 100644 --- a/machine/src/memory/mmu/page_alloc.rs +++ b/machine/src/memory/mmu/page_alloc.rs @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// // Copyright (c) 2021-2022 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 //! Page allocation. diff --git a/machine/src/memory/mmu/translation_table.rs b/machine/src/memory/mmu/translation_table.rs index fc14c59e6..e04cc9938 100644 --- a/machine/src/memory/mmu/translation_table.rs +++ b/machine/src/memory/mmu/translation_table.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + //! Translation table. #[cfg(target_arch = "aarch64")] diff --git a/machine/src/memory/mmu/types.rs b/machine/src/memory/mmu/types.rs index 61b6a8214..d88d869c3 100644 --- a/machine/src/memory/mmu/types.rs +++ b/machine/src/memory/mmu/types.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + //-------------------------------------------------------------------------------------------------- // Public Definitions //-------------------------------------------------------------------------------------------------- diff --git a/machine/src/memory/mmu/unused.rs b/machine/src/memory/mmu/unused.rs index 897c0796f..457c9c807 100644 --- a/machine/src/memory/mmu/unused.rs +++ b/machine/src/memory/mmu/unused.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + //-------------------------------------------------------------------------------------------------- // Laterrrr //-------------------------------------------------------------------------------------------------- diff --git a/machine/src/memory/mod.rs b/machine/src/memory/mod.rs index f19eb6c57..65ec95d15 100644 --- a/machine/src/memory/mod.rs +++ b/machine/src/memory/mod.rs @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// // Copyright (c) 2018-2022 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 //! Memory Management. diff --git a/machine/src/memory/phys_addr.rs b/machine/src/memory/phys_addr.rs index 0be7fd95c..7555c844b 100644 --- a/machine/src/memory/phys_addr.rs +++ b/machine/src/memory/phys_addr.rs @@ -1,7 +1,8 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - * Copyright (c) Berkus Decker - */ +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 use { crate::mm::{align_down, align_up}, diff --git a/machine/src/memory/virt_addr.rs b/machine/src/memory/virt_addr.rs index 7ea4066ad..15ac67e45 100644 --- a/machine/src/memory/virt_addr.rs +++ b/machine/src/memory/virt_addr.rs @@ -1,7 +1,8 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - * Copyright (c) Berkus Decker - */ +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 use { crate::mm::{align_down, align_up}, diff --git a/machine/src/mm/bump_allocator.rs b/machine/src/mm/bump_allocator.rs index af2260c23..f87067c42 100644 --- a/machine/src/mm/bump_allocator.rs +++ b/machine/src/mm/bump_allocator.rs @@ -1,7 +1,8 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - * Copyright (c) Berkus Decker - */ +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 // @todo Use alloc-fmt crate for logging in allocators diff --git a/machine/src/mm/mod.rs b/machine/src/mm/mod.rs index a1e232d41..3c89eade9 100644 --- a/machine/src/mm/mod.rs +++ b/machine/src/mm/mod.rs @@ -1,7 +1,8 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - * Copyright (c) Berkus Decker - */ +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 mod bump_allocator; pub use bump_allocator::BumpAllocator; diff --git a/machine/src/panic.rs b/machine/src/panic.rs index 71d107997..5a6deaabb 100644 --- a/machine/src/panic.rs +++ b/machine/src/panic.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + //! A panic handler for hardware and for QEMU. use core::panic::PanicInfo; diff --git a/machine/src/platform/README.md b/machine/src/platform/README.md index 39247568b..48d90bde0 100644 --- a/machine/src/platform/README.md +++ b/machine/src/platform/README.md @@ -1,3 +1,8 @@ + + # Board Support Packages This directory contains support for specific Boards like RaspberryPi3 etc. diff --git a/machine/src/platform/mod.rs b/machine/src/platform/mod.rs index 510d107bc..28b6a2a04 100644 --- a/machine/src/platform/mod.rs +++ b/machine/src/platform/mod.rs @@ -1,7 +1,8 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - * Copyright (c) Berkus Decker - */ +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 #[cfg(any(feature = "rpi3", feature = "rpi4"))] pub mod raspberrypi; diff --git a/machine/src/platform/raspberrypi/cpu.rs b/machine/src/platform/raspberrypi/cpu.rs index 484d013eb..3f56685d0 100644 --- a/machine/src/platform/raspberrypi/cpu.rs +++ b/machine/src/platform/raspberrypi/cpu.rs @@ -1 +1,4 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + pub const BOOT_CORE_ID: u64 = 0; diff --git a/machine/src/platform/raspberrypi/device_driver/arm/gicv2/gicc.rs b/machine/src/platform/raspberrypi/device_driver/arm/gicv2/gicc.rs index fc1673621..3b094a663 100644 --- a/machine/src/platform/raspberrypi/device_driver/arm/gicv2/gicc.rs +++ b/machine/src/platform/raspberrypi/device_driver/arm/gicv2/gicc.rs @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// // Copyright (c) 2020-2022 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 //! GICC Driver - GIC CPU interface. diff --git a/machine/src/platform/raspberrypi/device_driver/arm/gicv2/gicd.rs b/machine/src/platform/raspberrypi/device_driver/arm/gicv2/gicd.rs index c673fd5db..d32e7c3c2 100644 --- a/machine/src/platform/raspberrypi/device_driver/arm/gicv2/gicd.rs +++ b/machine/src/platform/raspberrypi/device_driver/arm/gicv2/gicd.rs @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// // Copyright (c) 2020-2022 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 //! GICD Driver - GIC Distributor. //! diff --git a/machine/src/platform/raspberrypi/device_driver/arm/gicv2/mod.rs b/machine/src/platform/raspberrypi/device_driver/arm/gicv2/mod.rs index 1b1c7c6f0..4f564d004 100644 --- a/machine/src/platform/raspberrypi/device_driver/arm/gicv2/mod.rs +++ b/machine/src/platform/raspberrypi/device_driver/arm/gicv2/mod.rs @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// // Copyright (c) 2020-2022 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 //! GICv2 Driver - ARM Generic Interrupt Controller v2. //! diff --git a/machine/src/platform/raspberrypi/device_driver/arm/mod.rs b/machine/src/platform/raspberrypi/device_driver/arm/mod.rs index e83e24c92..00c63ec81 100644 --- a/machine/src/platform/raspberrypi/device_driver/arm/mod.rs +++ b/machine/src/platform/raspberrypi/device_driver/arm/mod.rs @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// // Copyright (c) 2020-2022 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 //! ARM driver top level. diff --git a/machine/src/platform/raspberrypi/device_driver/bcm/gpio.rs b/machine/src/platform/raspberrypi/device_driver/bcm/gpio.rs index 39c15a04c..ecaf07d4d 100644 --- a/machine/src/platform/raspberrypi/device_driver/bcm/gpio.rs +++ b/machine/src/platform/raspberrypi/device_driver/bcm/gpio.rs @@ -1,9 +1,9 @@ -/* - * SPDX-License-Identifier: MIT OR BlueOak-1.0.0 - * Copyright (c) 2018-2019 Andre Richter - * Copyright (c) Berkus Decker - * Original code distributed under MIT, additional changes are under BlueOak-1.0.0 - */ +// Copyright (c) 2018-2019 Andre Richter +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR BlueOak-1.0.0 use { crate::{ diff --git a/machine/src/platform/raspberrypi/device_driver/bcm/interrupt_controller/mod.rs b/machine/src/platform/raspberrypi/device_driver/bcm/interrupt_controller/mod.rs index 3b4f60099..e941d8859 100644 --- a/machine/src/platform/raspberrypi/device_driver/bcm/interrupt_controller/mod.rs +++ b/machine/src/platform/raspberrypi/device_driver/bcm/interrupt_controller/mod.rs @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// // Copyright (c) 2020-2022 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 //! Interrupt Controller Driver. diff --git a/machine/src/platform/raspberrypi/device_driver/bcm/interrupt_controller/peripheral_ic.rs b/machine/src/platform/raspberrypi/device_driver/bcm/interrupt_controller/peripheral_ic.rs index 05bf93084..b315c7e6e 100644 --- a/machine/src/platform/raspberrypi/device_driver/bcm/interrupt_controller/peripheral_ic.rs +++ b/machine/src/platform/raspberrypi/device_driver/bcm/interrupt_controller/peripheral_ic.rs @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// // Copyright (c) 2020-2022 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 //! Peripheral Interrupt Controller Driver. //! diff --git a/machine/src/platform/raspberrypi/device_driver/bcm/mailbox.rs b/machine/src/platform/raspberrypi/device_driver/bcm/mailbox.rs index a2dfee48b..9143dce0e 100644 --- a/machine/src/platform/raspberrypi/device_driver/bcm/mailbox.rs +++ b/machine/src/platform/raspberrypi/device_driver/bcm/mailbox.rs @@ -1,10 +1,8 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - * Copyright (c) Berkus Decker - * - * Based on https://github.com/rust-embedded/rust-raspi3-tutorial/blob/master/04_mailboxes/src/mbox.rs - * by Andre Richter of Tock OS. - */ +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 //! Broadcom mailbox interface between the VideoCore and the ARM Core. //! Mailbox is controlled by two parts: a MAILBOX driver that drives the MMIO registers and diff --git a/machine/src/platform/raspberrypi/device_driver/bcm/mini_uart.rs b/machine/src/platform/raspberrypi/device_driver/bcm/mini_uart.rs index 179f25682..de09ddde8 100644 --- a/machine/src/platform/raspberrypi/device_driver/bcm/mini_uart.rs +++ b/machine/src/platform/raspberrypi/device_driver/bcm/mini_uart.rs @@ -1,9 +1,9 @@ -/* - * SPDX-License-Identifier: MIT OR BlueOak-1.0.0 - * Copyright (c) 2018-2019 Andre Richter - * Copyright (c) Berkus Decker - * Original code distributed under MIT, additional changes are under BlueOak-1.0.0 - */ +// Copyright (c) 2018-2019 Andre Richter +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR BlueOak-1.0.0 #[cfg(not(feature = "noserial"))] use tock_registers::interfaces::{Readable, Writeable}; diff --git a/machine/src/platform/raspberrypi/device_driver/bcm/mod.rs b/machine/src/platform/raspberrypi/device_driver/bcm/mod.rs index f9d377d3a..6e92b2041 100644 --- a/machine/src/platform/raspberrypi/device_driver/bcm/mod.rs +++ b/machine/src/platform/raspberrypi/device_driver/bcm/mod.rs @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// // Copyright (c) 2018-2022 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 //! BCM driver top level. diff --git a/machine/src/platform/raspberrypi/device_driver/bcm/pl011_uart.rs b/machine/src/platform/raspberrypi/device_driver/bcm/pl011_uart.rs index 95b4c0153..fa11255f6 100644 --- a/machine/src/platform/raspberrypi/device_driver/bcm/pl011_uart.rs +++ b/machine/src/platform/raspberrypi/device_driver/bcm/pl011_uart.rs @@ -1,12 +1,9 @@ -/* - * SPDX-License-Identifier: MIT OR BlueOak-1.0.0 - * Copyright (c) 2018-2019 Andre Richter - * Copyright (c) Berkus Decker - * Original code distributed under MIT, additional changes are under BlueOak-1.0.0 - * - * http://infocenter.arm.com/help/topic/com.arm.doc.ddi0183g/DDI0183G_uart_pl011_r1p5_trm.pdf - * https://docs.rs/embedded-serial/0.5.0/embedded_serial/ - */ +// Copyright (c) 2018-2019 Andre Richter +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR BlueOak-1.0.0 use { crate::{ diff --git a/machine/src/platform/raspberrypi/device_driver/bcm/power.rs b/machine/src/platform/raspberrypi/device_driver/bcm/power.rs index e2fbded0e..d04523de2 100644 --- a/machine/src/platform/raspberrypi/device_driver/bcm/power.rs +++ b/machine/src/platform/raspberrypi/device_driver/bcm/power.rs @@ -1,9 +1,9 @@ -/* - * SPDX-License-Identifier: MIT OR BlueOak-1.0.0 - * Copyright (c) 2018-2019 Andre Richter - * Copyright (c) Berkus Decker - * Original code distributed under MIT, additional changes are under BlueOak-1.0.0 - */ +// Copyright (c) 2018-2019 Andre Richter +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR BlueOak-1.0.0 use { super::{ diff --git a/machine/src/platform/raspberrypi/device_driver/common.rs b/machine/src/platform/raspberrypi/device_driver/common.rs index b023b4c37..4e8781637 100644 --- a/machine/src/platform/raspberrypi/device_driver/common.rs +++ b/machine/src/platform/raspberrypi/device_driver/common.rs @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// // Copyright (c) 2020-2022 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 //! Common device driver code. diff --git a/machine/src/platform/raspberrypi/device_driver/mod.rs b/machine/src/platform/raspberrypi/device_driver/mod.rs index 92677aed4..cdd7ba34c 100644 --- a/machine/src/platform/raspberrypi/device_driver/mod.rs +++ b/machine/src/platform/raspberrypi/device_driver/mod.rs @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// // Copyright (c) 2018-2022 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 //! Device driver. diff --git a/machine/src/platform/raspberrypi/display.rs b/machine/src/platform/raspberrypi/display.rs index 5ead8d81e..ef222fbeb 100644 --- a/machine/src/platform/raspberrypi/display.rs +++ b/machine/src/platform/raspberrypi/display.rs @@ -1,7 +1,9 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - * Copyright (c) Berkus Decker - */ +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 + use snafu::Snafu; /* Character cells are 8x8 */ diff --git a/machine/src/platform/raspberrypi/drivers.rs b/machine/src/platform/raspberrypi/drivers.rs index 972203700..c5847d219 100644 --- a/machine/src/platform/raspberrypi/drivers.rs +++ b/machine/src/platform/raspberrypi/drivers.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + use { super::exception, crate::{ diff --git a/machine/src/platform/raspberrypi/exception/asynchronous.rs b/machine/src/platform/raspberrypi/exception/asynchronous.rs index 24e6945da..47c046be7 100644 --- a/machine/src/platform/raspberrypi/exception/asynchronous.rs +++ b/machine/src/platform/raspberrypi/exception/asynchronous.rs @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// // Copyright (c) 2020-2022 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 //! Platform asynchronous exception handling. diff --git a/machine/src/platform/raspberrypi/exception/mod.rs b/machine/src/platform/raspberrypi/exception/mod.rs index 077326ce4..55561961d 100644 --- a/machine/src/platform/raspberrypi/exception/mod.rs +++ b/machine/src/platform/raspberrypi/exception/mod.rs @@ -1 +1,4 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + pub mod asynchronous; diff --git a/machine/src/platform/raspberrypi/fb.rs b/machine/src/platform/raspberrypi/fb.rs index 56627de9f..7e889ed03 100644 --- a/machine/src/platform/raspberrypi/fb.rs +++ b/machine/src/platform/raspberrypi/fb.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + use { super::mailbox::{self, LocalMailboxStorage, Mailbox, MailboxError, MailboxOps}, crate::memory::{Address, Virtual}, diff --git a/machine/src/platform/raspberrypi/linker/kernel.ld b/machine/src/platform/raspberrypi/linker/kernel.ld index d349bcb21..5a73610ac 100644 --- a/machine/src/platform/raspberrypi/linker/kernel.ld +++ b/machine/src/platform/raspberrypi/linker/kernel.ld @@ -1,9 +1,9 @@ -/* - * SPDX-License-Identifier: MIT OR BlueOak-1.0.0 - * Copyright (c) 2018 Andre Richter - * Copyright (c) Berkus Decker - * Original code distributed under MIT, additional changes are under BlueOak-1.0.0 - */ +// Copyright (c) 2018 Andre Richter +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR BlueOak-1.0.0 PAGE_SIZE = 64K; PAGE_MASK = PAGE_SIZE - 1; diff --git a/machine/src/platform/raspberrypi/memory/mmu.rs b/machine/src/platform/raspberrypi/memory/mmu.rs index 6d8dcd6c1..7aeb13035 100644 --- a/machine/src/platform/raspberrypi/memory/mmu.rs +++ b/machine/src/platform/raspberrypi/memory/mmu.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + //! Platform memory management unit. use crate::{ diff --git a/machine/src/platform/raspberrypi/memory/mod.rs b/machine/src/platform/raspberrypi/memory/mod.rs index e112a6b58..ff571d643 100644 --- a/machine/src/platform/raspberrypi/memory/mod.rs +++ b/machine/src/platform/raspberrypi/memory/mod.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + //! Platform memory Management. //! //! The physical memory layout. diff --git a/machine/src/platform/raspberrypi/mod.rs b/machine/src/platform/raspberrypi/mod.rs index 9ff4141c7..85d6d1aa0 100644 --- a/machine/src/platform/raspberrypi/mod.rs +++ b/machine/src/platform/raspberrypi/mod.rs @@ -1,7 +1,8 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - * Copyright (c) Berkus Decker - */ +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 #![allow(dead_code)] diff --git a/machine/src/platform/raspberrypi/vc.rs b/machine/src/platform/raspberrypi/vc.rs index fc2fddb9d..208489521 100644 --- a/machine/src/platform/raspberrypi/vc.rs +++ b/machine/src/platform/raspberrypi/vc.rs @@ -1,7 +1,9 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - * Copyright (c) Berkus Decker - */ +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 + use { super::{ display::{Display, PixelOrder, CHARSIZE_X, CHARSIZE_Y}, diff --git a/machine/src/qemu.rs b/machine/src/qemu.rs index 2aff30ba5..11565f54e 100644 --- a/machine/src/qemu.rs +++ b/machine/src/qemu.rs @@ -1,7 +1,9 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - * Copyright (c) Berkus Decker - */ +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 + pub mod semihosting { pub fn exit_success() -> ! { use qemu_exit::QEMUExit; diff --git a/machine/src/state.rs b/machine/src/state.rs index 278840f61..a852b4cba 100644 --- a/machine/src/state.rs +++ b/machine/src/state.rs @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// // Copyright (c) 2020-2022 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 //! State information about the kernel itself. diff --git a/machine/src/synchronization.rs b/machine/src/synchronization.rs index bfa2c0604..a855d83b2 100644 --- a/machine/src/synchronization.rs +++ b/machine/src/synchronization.rs @@ -1,8 +1,8 @@ -/* - * SPDX-License-Identifier: MIT OR BlueOak-1.0.0 - * Copyright (c) 2019 Andre Richter - * Original code distributed under MIT, additional changes are under BlueOak-1.0.0 - */ +// Copyright (c) 2019 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR BlueOak-1.0.0 use core::cell::UnsafeCell; diff --git a/machine/src/tests.rs b/machine/src/tests.rs index 52df0bfb0..7dc547a0c 100644 --- a/machine/src/tests.rs +++ b/machine/src/tests.rs @@ -1,7 +1,9 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - * Copyright (c) Berkus Decker - */ +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 + //============================================================================ // Testing environment //============================================================================ diff --git a/machine/src/time.rs b/machine/src/time.rs index a60e12042..5a2191a5c 100644 --- a/machine/src/time.rs +++ b/machine/src/time.rs @@ -1,6 +1,8 @@ -// SPDX-License-Identifier: MIT OR Apache-2.0 -// // Copyright (c) 2020-2022 Andre Richter +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: MIT OR Apache-2.0 //! Timer primitives. diff --git a/machine/src/write_to.rs b/machine/src/write_to.rs index 2272fac47..bd36e38ca 100644 --- a/machine/src/write_to.rs +++ b/machine/src/write_to.rs @@ -1,7 +1,8 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - * Copyright (c) Berkus Decker - */ +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 /// No-alloc write!() implementation from https://stackoverflow.com/a/50201632/145434 /// Requires you to allocate a buffer somewhere manually. diff --git a/nucleus/Cargo.toml b/nucleus/Cargo.toml index ade1bc749..5a61c86ab 100644 --- a/nucleus/Cargo.toml +++ b/nucleus/Cargo.toml @@ -1,3 +1,6 @@ +# SPDX-FileCopyrightText: 2024 Metta Systems OÜ +# SPDX-FileContributor: Berkus + [package] name = "nucleus" description = "Vesper nanokernel binary" diff --git a/nucleus/Makefile.toml b/nucleus/Makefile.toml index 0a0ac68cc..c7716486a 100644 --- a/nucleus/Makefile.toml +++ b/nucleus/Makefile.toml @@ -1,7 +1,7 @@ # # SPDX-License-Identifier: BlueOak-1.0.0 -# -# Copyright (c) Berkus Decker +# SPDX-FileCopyrightText: 2024 Metta Systems OÜ +# SPDX-FileContributor: Berkus # # Build nucleus # diff --git a/nucleus/build.rs b/nucleus/build.rs index 6b2c24d48..bf4f7a698 100644 --- a/nucleus/build.rs +++ b/nucleus/build.rs @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus + //! This build script is used to link main kernel binary. const LINKER_SCRIPT: &str = "machine/src/platform/raspberrypi/linker/kernel.ld"; diff --git a/nucleus/src/main.rs b/nucleus/src/main.rs index 5fc426359..110a7808f 100644 --- a/nucleus/src/main.rs +++ b/nucleus/src/main.rs @@ -1,7 +1,8 @@ -/* - * SPDX-License-Identifier: BlueOak-1.0.0 - * Copyright (c) Berkus Decker - */ +// Copyright (c) Berkus Decker +// SPDX-FileCopyrightText: 2024 Metta Systems OÜ +// SPDX-FileContributor: Berkus +// +// SPDX-License-Identifier: BlueOak-1.0.0 //! Vesper single-address-space nanokernel. //!