From a705b790ff2bf4abff3dac7c4f43834f28a44ddd Mon Sep 17 00:00:00 2001 From: Hugo McNally Date: Fri, 23 Aug 2024 20:11:57 +0100 Subject: [PATCH] Added license lint --- .gitattributes | 3 ++ .github/workflows/ci.yml | 3 ++ .github/workflows/site.yml | 3 ++ .gitignore | 3 ++ .reuse/dep5 | 47 +++++++++++++++++++++++ book.toml | 4 ++ flake.nix | 4 ++ rtl/ip/spi/dv/verilator/.gitignore | 1 - rtl/ip/spi/dv/verilator/spi_core_tb.sv | 5 +++ rtl/ip/spi/dv/verilator/spi_recv.sv | 5 +++ rtl/ip/spi/dv/verilator/spi_trans.sv | 5 +++ sw/cheri/CMakeLists.txt | 4 ++ sw/cheri/boot/CMakeLists.txt | 4 ++ sw/cheri/boot/boot.S | 4 ++ sw/cheri/boot/boot_loader.cc | 5 +++ sw/cheri/boot/elf.h | 5 +++ sw/cheri/checks/CMakeLists.txt | 3 ++ sw/cheri/checks/cheri_sanity.cc | 5 +++ sw/cheri/checks/gpio_check.cc | 5 +++ sw/cheri/checks/hyperram_test.cc | 5 +++ sw/cheri/checks/revocation_test.cc | 5 +++ sw/cheri/checks/spi_test.cc | 5 +++ sw/cheri/checks/tag_test.S | 4 ++ sw/cheri/checks/uart_check.cc | 6 +++ sw/cheri/cheriot_toolchain.cmake | 4 ++ sw/cheri/common/boot.S | 3 ++ sw/cheri/common/flash-utils.hh | 6 +++ sw/cheri/common/hyperram_exec_test.S | 3 ++ sw/cheri/common/sonata-peripherals.hh | 6 +++ sw/cheri/common/timer-utils.hh | 6 +++ sw/cheri/common/uart-utils.hh | 6 +++ sw/cheri/error_leds/CMakeLists.txt | 4 ++ sw/cheri/error_leds/error.S | 3 ++ sw/cheri/link.ld | 5 +++ sw/cheri/sim_boot_stub/Makefile | 3 ++ sw/cheri/sim_boot_stub/boot.S | 3 ++ sw/cheri/sim_boot_stub/link.ld | 5 +++ sw/cheri/tests/CMakeLists.txt | 3 ++ sw/cheri/tests/boot.S | 29 ++++++++++++++ sw/cheri/tests/test_runner.hh | 5 +++ sw/common/defs.h | 6 +++ sw/legacy/.clang-format | 4 ++ sw/legacy/CMakeLists.txt | 3 ++ sw/legacy/blank/CMakeLists.txt | 3 ++ sw/legacy/common/CMakeLists.txt | 4 ++ sw/legacy/demo/CMakeLists.txt | 4 ++ sw/legacy/demo/ethernet/CMakeLists.txt | 4 ++ sw/legacy/demo/hello_usb/CMakeLists.txt | 4 ++ sw/legacy/demo/hello_world/CMakeLists.txt | 4 ++ sw/legacy/demo/i2c_hat_id/CMakeLists.txt | 4 ++ sw/legacy/demo/lcd_st7735/CMakeLists.txt | 4 ++ sw/legacy/gcc_toolchain.cmake | 4 ++ sw/legacy/test/CMakeLists.txt | 4 ++ sw/legacy/test/spi_test.c | 6 +++ sw/legacy/timer_test/CMakeLists.txt | 4 ++ util/generate_xbar.sh | 4 ++ 56 files changed, 302 insertions(+), 1 deletion(-) create mode 100644 .reuse/dep5 delete mode 100644 rtl/ip/spi/dv/verilator/.gitignore create mode 100644 sw/cheri/tests/boot.S diff --git a/.gitattributes b/.gitattributes index 187a3ab78..42c6a3938 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,6 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 rtl/bus/tl_main_pkg.sv linguist-generated=true rtl/bus/tl_ifetch_pkg.sv linguist-generated=true rtl/bus/xbar_main.sv linguist-generated=true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fe0d49c06..538de72f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,6 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 name: CI on: diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml index a6fe98ee5..df892fb81 100644 --- a/.github/workflows/site.yml +++ b/.github/workflows/site.yml @@ -1,3 +1,6 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 name: Deploy to GitHub Pages # Deploy on pushes to the main branch diff --git a/.gitignore b/.gitignore index a10e36667..cff184949 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 target/ # FuseSoC and Sofware builds are placed in build diff --git a/.reuse/dep5 b/.reuse/dep5 new file mode 100644 index 000000000..e93af7b9f --- /dev/null +++ b/.reuse/dep5 @@ -0,0 +1,47 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: README.md + *.lock + *.md + data/* + doc/* + sw/cheri/sim_boot_stub/sim_boot_stub + vendor/lowrisc_ip/* + vendor/lowrisc_ibex/* + vendor/patches/* +Copyright: lowRISC contributors +License: Apache-2.0 + +Files: vendor/display_drivers/* +Copyright: 2022 Douglas Reis +License: Apache-2.0 + +Files: vendor/cheriot_safe/* +Copyright: Microsoft Corporation +License: Apache-2.0 + +Files: vendor/pulp_riscv_dbg/* +Copyright: 2020 ETH Zurich and University of Bologna +License: SHL-0.51 + +Files: vendor/open_hbmc/* +Copyright: © 2020-2022, Vaagn Oganesyan +License: Apache-2.0 + +Files: vendor/newae/crypto/tiny-AES128-C/* +Copyright: tiny-AES-c contributors +License: Unlicense + +Files: vendor/newae/simpleserial* + vendor/newae/hal/hal.h + vendor/newae/basic-passwdcheck/basic-passwdcheck.c +Copyright: 2012-2017 NewAE Technology Inc +License: GPL-3.0-or-later + +Files: vendor/newae/crypto/aes-independant.* +Copyright: 2012 Colin O'Flynn +License: GPL-3.0-or-later + +Files: sw/legacy/demo/lcd_st7735/coremark/ee_printf.c +Copyright: 2018 Embedded Microprocessor Benchmark Consortium (EEMBC) +License: Apache-2.0 diff --git a/book.toml b/book.toml index d19e16c93..f49493786 100644 --- a/book.toml +++ b/book.toml @@ -1,3 +1,7 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + [book] language = "en" multilingual = false diff --git a/flake.nix b/flake.nix index eaeea9bfe..249112b60 100644 --- a/flake.nix +++ b/flake.nix @@ -1,3 +1,6 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 { description = "Sonata System"; inputs = { @@ -78,6 +81,7 @@ }; lint-all = pkgs.writers.writeBashBin "lint-all" '' + ${getExe pkgs.reuse} --suppress-deprecation lint ${getExe lint-markdown} ${getExe lint-python} ''; diff --git a/rtl/ip/spi/dv/verilator/.gitignore b/rtl/ip/spi/dv/verilator/.gitignore deleted file mode 100644 index e204dd36d..000000000 --- a/rtl/ip/spi/dv/verilator/.gitignore +++ /dev/null @@ -1 +0,0 @@ -obj_dir diff --git a/rtl/ip/spi/dv/verilator/spi_core_tb.sv b/rtl/ip/spi/dv/verilator/spi_core_tb.sv index 9621803f5..fcd0c550c 100644 --- a/rtl/ip/spi/dv/verilator/spi_core_tb.sv +++ b/rtl/ip/spi/dv/verilator/spi_core_tb.sv @@ -1,3 +1,8 @@ +/** + * Copyright lowRISC contributors. + * Licensed under the Apache License, Version 2.0, see LICENSE for details. + * SPDX-License-Identifier: Apache-2.0 + */ module spi_core_tb; logic clk, rst_n; diff --git a/rtl/ip/spi/dv/verilator/spi_recv.sv b/rtl/ip/spi/dv/verilator/spi_recv.sv index f56ef52e9..5bf8f44c2 100644 --- a/rtl/ip/spi/dv/verilator/spi_recv.sv +++ b/rtl/ip/spi/dv/verilator/spi_recv.sv @@ -1,3 +1,8 @@ +/** + * Copyright lowRISC contributors. + * Licensed under the Apache License, Version 2.0, see LICENSE for details. + * SPDX-License-Identifier: Apache-2.0 + */ module spi_recv #(parameter bit CPHA = 1'b0) ( input spi_clk, input spi_copi_i diff --git a/rtl/ip/spi/dv/verilator/spi_trans.sv b/rtl/ip/spi/dv/verilator/spi_trans.sv index b2c17a1b4..4066d1423 100644 --- a/rtl/ip/spi/dv/verilator/spi_trans.sv +++ b/rtl/ip/spi/dv/verilator/spi_trans.sv @@ -1,3 +1,8 @@ +/** + * Copyright lowRISC contributors. + * Licensed under the Apache License, Version 2.0, see LICENSE for details. + * SPDX-License-Identifier: Apache-2.0 + */ module spi_trans #(parameter bit CPHA = 1'b0) ( input rst_ni, input spi_clk, diff --git a/sw/cheri/CMakeLists.txt b/sw/cheri/CMakeLists.txt index f3aa54d5b..b38727e7c 100644 --- a/sw/cheri/CMakeLists.txt +++ b/sw/cheri/CMakeLists.txt @@ -1,3 +1,7 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + cmake_minimum_required(VERSION 3.13) include(FetchContent) diff --git a/sw/cheri/boot/CMakeLists.txt b/sw/cheri/boot/CMakeLists.txt index d402971b7..87dce805f 100644 --- a/sw/cheri/boot/CMakeLists.txt +++ b/sw/cheri/boot/CMakeLists.txt @@ -1,3 +1,7 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + set(TEST boot_loader.cc) get_filename_component(NAME ${TEST} NAME_WE) diff --git a/sw/cheri/boot/boot.S b/sw/cheri/boot/boot.S index f2d923611..3405d520f 100644 --- a/sw/cheri/boot/boot.S +++ b/sw/cheri/boot/boot.S @@ -1,3 +1,7 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + .include "assembly-helpers.s" .section .text.start, "ax", @progbits diff --git a/sw/cheri/boot/boot_loader.cc b/sw/cheri/boot/boot_loader.cc index 574fed1f9..1899411dc 100644 --- a/sw/cheri/boot/boot_loader.cc +++ b/sw/cheri/boot/boot_loader.cc @@ -1,3 +1,8 @@ +/** + * Copyright lowRISC contributors. + * Licensed under the Apache License, Version 2.0, see LICENSE for details. + * SPDX-License-Identifier: Apache-2.0 + */ #define CHERIOT_NO_AMBIENT_MALLOC #define CHERIOT_NO_NEW_DELETE #define CHERIOT_PLATFORM_CUSTOM_UART diff --git a/sw/cheri/boot/elf.h b/sw/cheri/boot/elf.h index fe0cd28e0..51a09f5c8 100644 --- a/sw/cheri/boot/elf.h +++ b/sw/cheri/boot/elf.h @@ -1,3 +1,8 @@ +/** + * Copyright lowRISC contributors. + * Licensed under the Apache License, Version 2.0, see LICENSE for details. + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once #include diff --git a/sw/cheri/checks/CMakeLists.txt b/sw/cheri/checks/CMakeLists.txt index d6e1f701d..b5668ecaa 100644 --- a/sw/cheri/checks/CMakeLists.txt +++ b/sw/cheri/checks/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 set(CHECKS cheri_sanity.cc gpio_check.cc diff --git a/sw/cheri/checks/cheri_sanity.cc b/sw/cheri/checks/cheri_sanity.cc index 77104054b..acb92a9bf 100644 --- a/sw/cheri/checks/cheri_sanity.cc +++ b/sw/cheri/checks/cheri_sanity.cc @@ -1,3 +1,8 @@ +/** + * Copyright lowRISC contributors. + * Licensed under the Apache License, Version 2.0, see LICENSE for details. + * SPDX-License-Identifier: Apache-2.0 + */ #define CHERIOT_NO_AMBIENT_MALLOC #define CHERIOT_NO_NEW_DELETE diff --git a/sw/cheri/checks/gpio_check.cc b/sw/cheri/checks/gpio_check.cc index 697a8e7cf..69b8b4feb 100644 --- a/sw/cheri/checks/gpio_check.cc +++ b/sw/cheri/checks/gpio_check.cc @@ -1,3 +1,8 @@ +/** + * Copyright lowRISC contributors. + * Licensed under the Apache License, Version 2.0, see LICENSE for details. + * SPDX-License-Identifier: Apache-2.0 + */ #define CHERIOT_NO_AMBIENT_MALLOC #define CHERIOT_NO_NEW_DELETE diff --git a/sw/cheri/checks/hyperram_test.cc b/sw/cheri/checks/hyperram_test.cc index a3377d4ca..d3cead2b9 100644 --- a/sw/cheri/checks/hyperram_test.cc +++ b/sw/cheri/checks/hyperram_test.cc @@ -1,3 +1,8 @@ +/** + * Copyright lowRISC contributors. + * Licensed under the Apache License, Version 2.0, see LICENSE for details. + * SPDX-License-Identifier: Apache-2.0 + */ #define CHERIOT_NO_AMBIENT_MALLOC #define CHERIOT_NO_NEW_DELETE #define CHERIOT_PLATFORM_CUSTOM_UART diff --git a/sw/cheri/checks/revocation_test.cc b/sw/cheri/checks/revocation_test.cc index d12930752..0f438c080 100644 --- a/sw/cheri/checks/revocation_test.cc +++ b/sw/cheri/checks/revocation_test.cc @@ -1,3 +1,8 @@ +/** + * Copyright lowRISC contributors. + * Licensed under the Apache License, Version 2.0, see LICENSE for details. + * SPDX-License-Identifier: Apache-2.0 + */ #define CHERIOT_NO_AMBIENT_MALLOC #define CHERIOT_NO_NEW_DELETE #define CHERIOT_PLATFORM_CUSTOM_UART diff --git a/sw/cheri/checks/spi_test.cc b/sw/cheri/checks/spi_test.cc index 318504085..c439d21d4 100644 --- a/sw/cheri/checks/spi_test.cc +++ b/sw/cheri/checks/spi_test.cc @@ -1,3 +1,8 @@ +/** + * Copyright lowRISC contributors. + * Licensed under the Apache License, Version 2.0, see LICENSE for details. + * SPDX-License-Identifier: Apache-2.0 + */ #define CHERIOT_NO_AMBIENT_MALLOC #define CHERIOT_NO_NEW_DELETE #define CHERIOT_PLATFORM_CUSTOM_UART diff --git a/sw/cheri/checks/tag_test.S b/sw/cheri/checks/tag_test.S index a6fe76ac9..e20554ac5 100644 --- a/sw/cheri/checks/tag_test.S +++ b/sw/cheri/checks/tag_test.S @@ -1,3 +1,7 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + .include "assembly-helpers.s" .section .text.start, "ax", @progbits diff --git a/sw/cheri/checks/uart_check.cc b/sw/cheri/checks/uart_check.cc index ccc3d7ac5..99071cc86 100644 --- a/sw/cheri/checks/uart_check.cc +++ b/sw/cheri/checks/uart_check.cc @@ -1,3 +1,9 @@ +/** + * Copyright lowRISC contributors. + * Licensed under the Apache License, Version 2.0, see LICENSE for details. + * SPDX-License-Identifier: Apache-2.0 + */ + #define CHERIOT_NO_AMBIENT_MALLOC #define CHERIOT_NO_NEW_DELETE #define CHERIOT_PLATFORM_CUSTOM_UART diff --git a/sw/cheri/cheriot_toolchain.cmake b/sw/cheri/cheriot_toolchain.cmake index e59ed275b..df270267e 100644 --- a/sw/cheri/cheriot_toolchain.cmake +++ b/sw/cheri/cheriot_toolchain.cmake @@ -1,3 +1,7 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + set(LINKER_SCRIPT "${CMAKE_CURRENT_LIST_DIR}/link.ld") set(CMAKE_SYSTEM_NAME Generic) diff --git a/sw/cheri/common/boot.S b/sw/cheri/common/boot.S index 86dbb3409..3eb22e81a 100644 --- a/sw/cheri/common/boot.S +++ b/sw/cheri/common/boot.S @@ -1,3 +1,6 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 .include "assembly-helpers.s" .section .text.start, "ax", @progbits diff --git a/sw/cheri/common/flash-utils.hh b/sw/cheri/common/flash-utils.hh index 9d7259f25..e911ef600 100644 --- a/sw/cheri/common/flash-utils.hh +++ b/sw/cheri/common/flash-utils.hh @@ -1,3 +1,9 @@ +/** + * Copyright lowRISC contributors. + * Licensed under the Apache License, Version 2.0, see LICENSE for details. + * SPDX-License-Identifier: Apache-2.0 + */ + #pragma once #include "timer-utils.hh" #include diff --git a/sw/cheri/common/hyperram_exec_test.S b/sw/cheri/common/hyperram_exec_test.S index 95b8b016c..2b9d3e11c 100644 --- a/sw/cheri/common/hyperram_exec_test.S +++ b/sw/cheri/common/hyperram_exec_test.S @@ -1,3 +1,6 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 .include "assembly-helpers.s" .section .text, "ax", @progbits diff --git a/sw/cheri/common/sonata-peripherals.hh b/sw/cheri/common/sonata-peripherals.hh index 4aba1c0c9..2b32a4bab 100644 --- a/sw/cheri/common/sonata-peripherals.hh +++ b/sw/cheri/common/sonata-peripherals.hh @@ -1,3 +1,9 @@ +/** + * Copyright lowRISC contributors. + * Licensed under the Apache License, Version 2.0, see LICENSE for details. + * SPDX-License-Identifier: Apache-2.0 + */ + #pragma once #include "../../common/defs.h" #include diff --git a/sw/cheri/common/timer-utils.hh b/sw/cheri/common/timer-utils.hh index f84305b2d..08fdb90d5 100644 --- a/sw/cheri/common/timer-utils.hh +++ b/sw/cheri/common/timer-utils.hh @@ -1,3 +1,9 @@ +/** + * Copyright lowRISC contributors. + * Licensed under the Apache License, Version 2.0, see LICENSE for details. + * SPDX-License-Identifier: Apache-2.0 + */ + #pragma once #include diff --git a/sw/cheri/common/uart-utils.hh b/sw/cheri/common/uart-utils.hh index 81c54823d..70db4ff26 100644 --- a/sw/cheri/common/uart-utils.hh +++ b/sw/cheri/common/uart-utils.hh @@ -1,3 +1,9 @@ +/** + * Copyright lowRISC contributors. + * Licensed under the Apache License, Version 2.0, see LICENSE for details. + * SPDX-License-Identifier: Apache-2.0 + */ + #pragma once #include "../../common/defs.h" #include diff --git a/sw/cheri/error_leds/CMakeLists.txt b/sw/cheri/error_leds/CMakeLists.txt index d7dd7c80d..8f1fe2f10 100644 --- a/sw/cheri/error_leds/CMakeLists.txt +++ b/sw/cheri/error_leds/CMakeLists.txt @@ -1,3 +1,7 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + set(NAME error_leds) add_executable(${NAME} "error.S") diff --git a/sw/cheri/error_leds/error.S b/sw/cheri/error_leds/error.S index b6967bbfc..28bcdf37b 100644 --- a/sw/cheri/error_leds/error.S +++ b/sw/cheri/error_leds/error.S @@ -1,3 +1,6 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 .include "assembly-helpers.s" .section .text.start, "ax", @progbits diff --git a/sw/cheri/link.ld b/sw/cheri/link.ld index 8f5eb9f81..ecfd5156b 100644 --- a/sw/cheri/link.ld +++ b/sw/cheri/link.ld @@ -1,3 +1,8 @@ +/** + * Copyright lowRISC contributors. + * Licensed under the Apache License, Version 2.0, see LICENSE for details. + * SPDX-License-Identifier: Apache-2.0 + */ SECTIONS { . = 0x00100000; diff --git a/sw/cheri/sim_boot_stub/Makefile b/sw/cheri/sim_boot_stub/Makefile index e98c0ca5b..bc0ce6beb 100644 --- a/sw/cheri/sim_boot_stub/Makefile +++ b/sw/cheri/sim_boot_stub/Makefile @@ -1,3 +1,6 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 CFLAGS=-target riscv32-unknown-unknown -mcpu=cheriot -mabi=cheriot \ -mxcheri-rvc -mrelax -fshort-wchar -nodefaultlibs diff --git a/sw/cheri/sim_boot_stub/boot.S b/sw/cheri/sim_boot_stub/boot.S index a9e170f6b..c8a814673 100644 --- a/sw/cheri/sim_boot_stub/boot.S +++ b/sw/cheri/sim_boot_stub/boot.S @@ -1,3 +1,6 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 .section .text.start, "ax", @progbits .zero 0x80 diff --git a/sw/cheri/sim_boot_stub/link.ld b/sw/cheri/sim_boot_stub/link.ld index a33bacdf3..2be93b436 100644 --- a/sw/cheri/sim_boot_stub/link.ld +++ b/sw/cheri/sim_boot_stub/link.ld @@ -1,3 +1,8 @@ +/** + * Copyright lowRISC contributors. + * Licensed under the Apache License, Version 2.0, see LICENSE for details. + * SPDX-License-Identifier: Apache-2.0 + */ SECTIONS { . = 0x00100000; diff --git a/sw/cheri/tests/CMakeLists.txt b/sw/cheri/tests/CMakeLists.txt index ad968e352..959e76d1d 100644 --- a/sw/cheri/tests/CMakeLists.txt +++ b/sw/cheri/tests/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 set(TESTS test_runner.cc ) diff --git a/sw/cheri/tests/boot.S b/sw/cheri/tests/boot.S new file mode 100644 index 000000000..86c6dda8b --- /dev/null +++ b/sw/cheri/tests/boot.S @@ -0,0 +1,29 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 +.include "assembly-helpers.s" + + .section .text.start, "ax", @progbits +.zero 0x80 + + .globl start + .p2align 2 + .type start,@function +start: + // ca0 (first argument) contains the read-write root + cspecialr ca0, mtdc + + // No bounds on stack, grows down from the end + li sp, 0x0010E000 + csetaddr csp, ca0, sp + auipcc cra, 0 + // Call the C++ entry point + la_abs t0, entry_point + csetaddr cra, cra, t0 + // Store capability to stack + csc cra, 0(csp) + // Load capability from stack + clc cra, 0(csp) + // Clear capability from stack + csc cnull, 0(csp) + cjalr cra diff --git a/sw/cheri/tests/test_runner.hh b/sw/cheri/tests/test_runner.hh index a42899869..3f5025b50 100644 --- a/sw/cheri/tests/test_runner.hh +++ b/sw/cheri/tests/test_runner.hh @@ -1,3 +1,8 @@ +/** + * Copyright lowRISC contributors. + * Licensed under the Apache License, Version 2.0, see LICENSE for details. + * SPDX-License-Identifier: Apache-2.0 + */ #pragma once #include "../common/sonata-peripherals.hh" #include "../common/uart-utils.hh" diff --git a/sw/common/defs.h b/sw/common/defs.h index a55a99c26..cf7b10a00 100644 --- a/sw/common/defs.h +++ b/sw/common/defs.h @@ -1,3 +1,9 @@ +/** + * Copyright lowRISC contributors. + * Licensed under the Apache License, Version 2.0, see LICENSE for details. + * SPDX-License-Identifier: Apache-2.0 + */ + #pragma once #define CPU_TIMER_HZ (30'000'000) diff --git a/sw/legacy/.clang-format b/sw/legacy/.clang-format index 8296d8c52..11a1e14ad 100644 --- a/sw/legacy/.clang-format +++ b/sw/legacy/.clang-format @@ -1,3 +1,7 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + # Documentation for this configuration is here: # https://releases.llvm.org/6.0.0/tools/clang/docs/ClangFormatStyleOptions.html diff --git a/sw/legacy/CMakeLists.txt b/sw/legacy/CMakeLists.txt index d98208b36..23ed6f659 100644 --- a/sw/legacy/CMakeLists.txt +++ b/sw/legacy/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.12) if(NOT DEFINED CMAKE_TOOLCHAIN_FILE) diff --git a/sw/legacy/blank/CMakeLists.txt b/sw/legacy/blank/CMakeLists.txt index e98ddceaf..01c282fc5 100644 --- a/sw/legacy/blank/CMakeLists.txt +++ b/sw/legacy/blank/CMakeLists.txt @@ -1,3 +1,6 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 add_executable(blank blank.S) add_custom_command( diff --git a/sw/legacy/common/CMakeLists.txt b/sw/legacy/common/CMakeLists.txt index c42275e68..da71df9d6 100644 --- a/sw/legacy/common/CMakeLists.txt +++ b/sw/legacy/common/CMakeLists.txt @@ -1,2 +1,6 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + add_library(common OBJECT sonata_system.c usbdev.c uart.c timer.c rv_plic.c gpio.c i2c.c pwm.c spi.c crt0.S) target_include_directories(common INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}") diff --git a/sw/legacy/demo/CMakeLists.txt b/sw/legacy/demo/CMakeLists.txt index 15767c074..bd66b5bbf 100644 --- a/sw/legacy/demo/CMakeLists.txt +++ b/sw/legacy/demo/CMakeLists.txt @@ -1,3 +1,7 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + add_subdirectory(ethernet) add_subdirectory(hello_world) add_subdirectory(hello_usb) diff --git a/sw/legacy/demo/ethernet/CMakeLists.txt b/sw/legacy/demo/ethernet/CMakeLists.txt index de492b350..6990a2eca 100644 --- a/sw/legacy/demo/ethernet/CMakeLists.txt +++ b/sw/legacy/demo/ethernet/CMakeLists.txt @@ -1,3 +1,7 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + set(CMAKE_C_FLAGS "-O2") include(FetchContent) diff --git a/sw/legacy/demo/hello_usb/CMakeLists.txt b/sw/legacy/demo/hello_usb/CMakeLists.txt index 2a4e47832..5808df71f 100644 --- a/sw/legacy/demo/hello_usb/CMakeLists.txt +++ b/sw/legacy/demo/hello_usb/CMakeLists.txt @@ -1,3 +1,7 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + add_executable(hello_usb main.c) # pull in core dependencies and additional usbdev hardware support diff --git a/sw/legacy/demo/hello_world/CMakeLists.txt b/sw/legacy/demo/hello_world/CMakeLists.txt index 7c9934335..b68e04b23 100644 --- a/sw/legacy/demo/hello_world/CMakeLists.txt +++ b/sw/legacy/demo/hello_world/CMakeLists.txt @@ -1,3 +1,7 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + add_executable(demo main.c) target_link_libraries(demo common) diff --git a/sw/legacy/demo/i2c_hat_id/CMakeLists.txt b/sw/legacy/demo/i2c_hat_id/CMakeLists.txt index d56b3b8a4..68f8fdc81 100644 --- a/sw/legacy/demo/i2c_hat_id/CMakeLists.txt +++ b/sw/legacy/demo/i2c_hat_id/CMakeLists.txt @@ -1,3 +1,7 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + add_executable(i2c_hat_id i2c_hat_id.c) # pull in core dependencies and additional i2c hardware support diff --git a/sw/legacy/demo/lcd_st7735/CMakeLists.txt b/sw/legacy/demo/lcd_st7735/CMakeLists.txt index 43182bae1..df46a3b51 100644 --- a/sw/legacy/demo/lcd_st7735/CMakeLists.txt +++ b/sw/legacy/demo/lcd_st7735/CMakeLists.txt @@ -1,3 +1,7 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + # This is the same sets of compilation flags used in ibex CoreMark core_portme.mak. set(CMAKE_C_FLAGS "-mtune=sifive-3-series -O2 -falign-functions=16 -funroll-all-loops -finline-functions -falign-jumps=4 -mstrict-align") diff --git a/sw/legacy/gcc_toolchain.cmake b/sw/legacy/gcc_toolchain.cmake index 076e5e5e0..5c18ad05d 100644 --- a/sw/legacy/gcc_toolchain.cmake +++ b/sw/legacy/gcc_toolchain.cmake @@ -1,3 +1,7 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + set(LINKER_SCRIPT "${CMAKE_CURRENT_LIST_DIR}/link.ld") set(CMAKE_SYSTEM_NAME Generic) set(CMAKE_C_COMPILER riscv32-unknown-elf-gcc) diff --git a/sw/legacy/test/CMakeLists.txt b/sw/legacy/test/CMakeLists.txt index 377bf2ffd..868ddedd8 100644 --- a/sw/legacy/test/CMakeLists.txt +++ b/sw/legacy/test/CMakeLists.txt @@ -1,3 +1,7 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + add_executable(memory_test memory_test.c) target_link_libraries(memory_test common) diff --git a/sw/legacy/test/spi_test.c b/sw/legacy/test/spi_test.c index 71fe4a6b3..5b45bdfb8 100644 --- a/sw/legacy/test/spi_test.c +++ b/sw/legacy/test/spi_test.c @@ -1,3 +1,9 @@ +/** + * Copyright lowRISC contributors. + * Licensed under the Apache License, Version 2.0, see LICENSE for details. + * SPDX-License-Identifier: Apache-2.0 + */ + #include #include "sonata_system.h" diff --git a/sw/legacy/timer_test/CMakeLists.txt b/sw/legacy/timer_test/CMakeLists.txt index 0c35a73e2..f057eb996 100644 --- a/sw/legacy/timer_test/CMakeLists.txt +++ b/sw/legacy/timer_test/CMakeLists.txt @@ -1,3 +1,7 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + add_executable(timer_test timer_test.cc) target_link_libraries(timer_test common) diff --git a/util/generate_xbar.sh b/util/generate_xbar.sh index 032b3debb..0e3eac4f6 100755 --- a/util/generate_xbar.sh +++ b/util/generate_xbar.sh @@ -1,3 +1,7 @@ +# Copyright lowRISC contributors. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + mkdir -p rtl/bus vendor/lowrisc_ip/util/tlgen.py -t data/xbar_main.hjson -o rtl/bus vendor/lowrisc_ip/util/tlgen.py -t data/xbar_ifetch.hjson -o rtl/bus