diff --git a/.clang-format b/.clang-format index 2a2041c..2e53c58 100644 --- a/.clang-format +++ b/.clang-format @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Rivos Inc. +# SPDX-FileCopyrightText: 2023 - 2026 Rivos Inc. # # SPDX-License-Identifier: Apache-2.0 diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml index 4cde0df..9aef2c3 100644 --- a/.github/workflows/reuse.yml +++ b/.github/workflows/reuse.yml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Rivos Inc. +# SPDX-FileCopyrightText: 2023 - 2026 Rivos Inc. # # SPDX-License-Identifier: Apache-2.0 diff --git a/.gitignore b/.gitignore index dd96872..f75f63b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Rivos Inc. +# SPDX-FileCopyrightText: 2023 - 2026 Rivos Inc. # # SPDX-License-Identifier: Apache-2.0 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6dec56f..d824086 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Rivos Inc. +# SPDX-FileCopyrightText: 2023 - 2026 Rivos Inc. # # SPDX-License-Identifier: Apache-2.0 diff --git a/.gitmodules b/.gitmodules index e69de29..fcc39b8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2026 Rivos Inc. +# +# SPDX-License-Identifier: Apache-2.0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 113c490..ed89681 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,10 @@ -# SPDX-FileCopyrightText: 2023 Rivos Inc. +# SPDX-FileCopyrightText: 2023 - 2026 Rivos Inc. # # SPDX-License-Identifier: Apache-2.0 repos: - # pull mirror from: https://github.com/pre-commit/pre-commit-hooks - - repo: https://gitlab.ba.rivosinc.com/pub/it/pre-commit-hooks.git - rev: v4.1.0 + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 hooks: - id: check-added-large-files - id: check-ast @@ -28,9 +27,8 @@ repos: args: [--markdown-linebreak-ext=md] exclude: ".patch" - # - repo: https://github.com/PyCQA/isort - - repo: https://gitlab.ba.rivosinc.com/pub/it/isort - rev: "5.10.1" + - repo: https://github.com/PyCQA/isort + rev: "7.0.0" hooks: - id: isort args: @@ -38,28 +36,25 @@ repos: - google - --filter-files - # pull mirror from: https://github.com/google/yapf - - repo: https://gitlab.ba.rivosinc.com/pub/it/yapf - rev: v0.31.0 + - repo: https://github.com/google/yapf + rev: v0.43.0 hooks: - id: yapf - # pull mirror of https://github.com/fsfe/reuse-tool (slightly modified) + # pull mirror of https://github.com/fsfe/reuse-tool - repo: https://github.com/rivosinc/reuse-tool - rev: '3a95909a30d51467575a95b8cabdc7949bb8e7bd' + rev: 'da430ed605e06460b020a75410d62ddb7fc9a616' hooks: # Add copyright/license header - id: reuse-annotate args: - - -c=Rivos Inc. - - -l=Apache-2.0 + - -c Rivos Inc. + - -l Apache-2.0 + - --merge-copyrights - --skip-unrecognised - # Check compliance - - id: reuse - # pull mirror from: https://github.com/jumanjihouse/pre-commit-hooks.git - - repo: https://gitlab.ba.rivosinc.com/pub/it/jumanjihouse_pre-commit-hooks - rev: 2.1.5 + - repo: https://github.com/jumanjihouse/pre-commit-hooks + rev: 3.0.0 hooks: - id: shellcheck - id: shfmt @@ -67,20 +62,17 @@ repos: - -i 2 - -ci - # pull mirror of https://github.com/ikamensh/flynt/ - - repo: https://gitlab.ba.rivosinc.com/pub/it/flynt - rev: '0.76' + - repo: https://github.com/ikamensh/flynt + rev: '1.0.6' hooks: - id: flynt - # pull mirror of https://github.com/asottile/pyupgrade - - repo: https://gitlab.ba.rivosinc.com/pub/it/pyupgrade - rev: v2.31.0 + - repo: https://github.com/asottile/pyupgrade + rev: v3.21.2 hooks: - id: pyupgrade - # mirror of https://github.com/pre-commit/mirrors-clang-format - - repo: https://gitlab.ba.rivosinc.com/pub/it/mirrors-clang-format - rev: v13.0.1 + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: v21.1.8 hooks: - id: clang-format diff --git a/.pylintrc b/.pylintrc index e09884e..ab602de 100644 --- a/.pylintrc +++ b/.pylintrc @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Rivos Inc. +# SPDX-FileCopyrightText: 2023 - 2026 Rivos Inc. # # SPDX-License-Identifier: Apache-2.0 diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 3232ed6..67440c3 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,3 +1,9 @@ + + # Code of Conduct ## Our Pledge diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fef5b36..06ad0dc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,9 @@ + + # Contributing to hammer We want to make contributing to this project as easy and transparent as possible. @@ -28,4 +34,4 @@ outlined on that page and do not file a public issue. ## License By contributing to hammer, you agree that your contributions will be licensed -under the LICENSE file in the root directory of this source tree. \ No newline at end of file +under the LICENSE file in the root directory of this source tree. diff --git a/README.md b/README.md index a47d0ec..05476d3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ diff --git a/hammer.cpp b/hammer.cpp index db48905..21516d7 100644 --- a/hammer.cpp +++ b/hammer.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2022 Rivos Inc. +// SPDX-FileCopyrightText: 2022 - 2026 Rivos Inc. // // SPDX-License-Identifier: Apache-2.0 @@ -49,8 +49,9 @@ Hammer::Hammer(const char *isa, const char *privilege_levels, const char *vector endianness_t endinaness = endianness_little; - cfg_t cfg = cfg_t(initrd_bounds, bootargs, isa, privilege_levels, vector_arch, misaligned, endinaness, num_pmpregions, memory_layout, - hart_ids, real_time_clint, trigger_count); + cfg_t cfg = + cfg_t(initrd_bounds, bootargs, isa, privilege_levels, vector_arch, misaligned, endinaness, + num_pmpregions, memory_layout, hart_ids, real_time_clint, trigger_count); if (start_pc.has_value()) { cfg.start_pc = start_pc.value(); @@ -155,4 +156,3 @@ std::vector Hammer::get_vector_reg(uint8_t hart_id, uint8_t vector_reg return vector_reg_value; } - diff --git a/hammer.h b/hammer.h index 654a267..b4a2c95 100644 --- a/hammer.h +++ b/hammer.h @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2026 Rivos Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + // SPDX-FileCopyrightText: 2022 Rivos Inc. // // SPDX-License-Identifier: Apache-2.0 diff --git a/hammer_enums.h b/hammer_enums.h index c7ea8b8..183ed34 100644 --- a/hammer_enums.h +++ b/hammer_enums.h @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2026 Rivos Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + // SPDX-FileCopyrightText: 2022 Rivos Inc. // // SPDX-License-Identifier: Apache-2.0 diff --git a/hammer_pybind.cpp b/hammer_pybind.cpp index 495cb9d..a5fec6b 100644 --- a/hammer_pybind.cpp +++ b/hammer_pybind.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2022 Rivos Inc. +// SPDX-FileCopyrightText: 2022 - 2026 Rivos Inc. // // SPDX-License-Identifier: Apache-2.0 diff --git a/meson.build b/meson.build index fd21cba..6ca61ea 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Rivos Inc. +# SPDX-FileCopyrightText: 2023 - 2026 Rivos Inc. # # SPDX-License-Identifier: Apache-2.0 diff --git a/meson_options.txt b/meson_options.txt index 9a60bbd..20da032 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Rivos Inc. +# SPDX-FileCopyrightText: 2023 - 2026 Rivos Inc. # # SPDX-License-Identifier: Apache-2.0 diff --git a/pytests/meson.build b/pytests/meson.build index c00c3f9..f662d16 100644 --- a/pytests/meson.build +++ b/pytests/meson.build @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Rivos Inc. +# SPDX-FileCopyrightText: 2023 - 2026 Rivos Inc. # # SPDX-License-Identifier: Apache-2.0 diff --git a/pytests/pytest000.py b/pytests/pytest000.py index c98a780..d0046ad 100755 --- a/pytests/pytest000.py +++ b/pytests/pytest000.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: 2022 Rivos Inc. + +# SPDX-FileCopyrightText: 2022 - 2026 Rivos Inc. # # SPDX-License-Identifier: Apache-2.0 diff --git a/pytests/pytest001.py b/pytests/pytest001.py index c7f0f42..9f21954 100755 --- a/pytests/pytest001.py +++ b/pytests/pytest001.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: 2022 Rivos Inc. + +# SPDX-FileCopyrightText: 2022 - 2026 Rivos Inc. # # SPDX-License-Identifier: Apache-2.0 diff --git a/pytests/pytest002.py b/pytests/pytest002.py index 1162d14..27551d9 100755 --- a/pytests/pytest002.py +++ b/pytests/pytest002.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: 2022 Rivos Inc. + +# SPDX-FileCopyrightText: 2022 - 2026 Rivos Inc. # # SPDX-License-Identifier: Apache-2.0 diff --git a/pytests/pytest003.py b/pytests/pytest003.py index 3f0cb4f..46bbc0b 100755 --- a/pytests/pytest003.py +++ b/pytests/pytest003.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: 2022 Rivos Inc. + +# SPDX-FileCopyrightText: 2022 - 2026 Rivos Inc. # # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/meson.build b/tests/meson.build index cc2c189..6bf4599 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Rivos Inc. +# SPDX-FileCopyrightText: 2023 - 2026 Rivos Inc. # # SPDX-License-Identifier: Apache-2.0 diff --git a/tests/test000.cpp b/tests/test000.cpp index 2050763..49d5be6 100644 --- a/tests/test000.cpp +++ b/tests/test000.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2022 Rivos Inc. +// SPDX-FileCopyrightText: 2022 - 2026 Rivos Inc. // // SPDX-License-Identifier: Apache-2.0 diff --git a/tests/test000.input.S b/tests/test000.input.S index ddaeee9..0d9aa8f 100644 --- a/tests/test000.input.S +++ b/tests/test000.input.S @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2026 Rivos Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + // SPDX-FileCopyrightText: 2022 Rivos Inc. // // SPDX-License-Identifier: Apache-2.0 diff --git a/tests/test001.cpp b/tests/test001.cpp index bb9b70c..24c7c01 100644 --- a/tests/test001.cpp +++ b/tests/test001.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2022 Rivos Inc. +// SPDX-FileCopyrightText: 2022 - 2026 Rivos Inc. // // SPDX-License-Identifier: Apache-2.0 diff --git a/tests/test001.input.S b/tests/test001.input.S index 5719ad7..8693a04 100644 --- a/tests/test001.input.S +++ b/tests/test001.input.S @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2026 Rivos Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + // SPDX-FileCopyrightText: 2022 Rivos Inc. // // SPDX-License-Identifier: Apache-2.0 diff --git a/tests/test002.cpp b/tests/test002.cpp index 22cbf94..b1b66e3 100644 --- a/tests/test002.cpp +++ b/tests/test002.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2022 Rivos Inc. +// SPDX-FileCopyrightText: 2022 - 2026 Rivos Inc. // // SPDX-License-Identifier: Apache-2.0 diff --git a/tests/test002.input.S b/tests/test002.input.S index 8f17294..bb0e9bb 100644 --- a/tests/test002.input.S +++ b/tests/test002.input.S @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2026 Rivos Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + // SPDX-FileCopyrightText: 2022 Rivos Inc. // // SPDX-License-Identifier: Apache-2.0 diff --git a/tests/test003.cpp b/tests/test003.cpp index 5b62800..effe789 100644 --- a/tests/test003.cpp +++ b/tests/test003.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2022 Rivos Inc. +// SPDX-FileCopyrightText: 2022 - 2026 Rivos Inc. // // SPDX-License-Identifier: Apache-2.0 diff --git a/tests/test003.input.S b/tests/test003.input.S index 0f475ea..42aae9c 100644 --- a/tests/test003.input.S +++ b/tests/test003.input.S @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2026 Rivos Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + // SPDX-FileCopyrightText: 2022 Rivos Inc. // // SPDX-License-Identifier: Apache-2.0 diff --git a/tests/testinput.link.ld b/tests/testinput.link.ld index 6f10420..361dfdd 100644 --- a/tests/testinput.link.ld +++ b/tests/testinput.link.ld @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: 2026 Rivos Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + # SPDX-FileCopyrightText: 2023 Rivos Inc. # # SPDX-License-Identifier: Apache-2.0