-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move uarch generated files to uarch source directory
- Loading branch information
Showing
12 changed files
with
184 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright Cartesi and individual authors (see AUTHORS) | ||
// SPDX-License-Identifier: LGPL-3.0-or-later | ||
// | ||
// This program is free software: you can redistribute it and/or modify it under | ||
// the terms of the GNU Lesser General Public License as published by the Free | ||
// Software Foundation, either version 3 of the License, or (at your option) any | ||
// later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, but WITHOUT ANY | ||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
// PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Lesser General Public License along | ||
// with this program (see COPYING). If not, see <https://www.gnu.org/licenses/>. | ||
// | ||
|
||
#include "uarch-pristine-state-hash.h" | ||
#include "uarch-pristine.h" | ||
|
||
#include <algorithm> | ||
|
||
namespace cartesi { | ||
|
||
static machine_merkle_tree::hash_type get_uarch_pristine_state_hash() noexcept { | ||
machine_merkle_tree::hash_type h; | ||
for (std::size_t i = 0; i < h.size(); ++i) { | ||
h[i] = uarch_pristine_hash[i]; | ||
} | ||
return h; | ||
} | ||
|
||
/// \brief Hash of the pristine uarch state. | ||
/// \details This hash is computed at compile time by the program compute-uarch-pristine-hash.cpp | ||
const machine_merkle_tree::hash_type uarch_pristine_state_hash = get_uarch_pristine_state_hash(); | ||
|
||
} // namespace cartesi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright Cartesi and individual authors (see AUTHORS) | ||
// SPDX-License-Identifier: LGPL-3.0-or-later | ||
// | ||
// This program is free software: you can redistribute it and/or modify it under | ||
// the terms of the GNU Lesser General Public License as published by the Free | ||
// Software Foundation, either version 3 of the License, or (at your option) any | ||
// later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, but WITHOUT ANY | ||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
// PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Lesser General Public License along | ||
// with this program (see COPYING). If not, see <https://www.gnu.org/licenses/>. | ||
// | ||
|
||
#ifndef UARCH_PRISTINE_H | ||
#define UARCH_PRISTINE_H | ||
|
||
/// \brief Embedded pristine uarch ram image. This symbol is created by "xxd" | ||
extern "C" const unsigned char uarch_pristine_ram[]; | ||
|
||
/// \brief Length of the embedded pristine uarch ram image. This symbol is created by "xxd" | ||
extern "C" const unsigned int uarch_pristine_ram_len; | ||
|
||
/// \brief Embedded pristine uarch ram image. This symbol is created by "compute-uarch-pristine-hash" | ||
extern "C" const unsigned char uarch_pristine_hash[]; | ||
|
||
/// \brief Length of the embedded pristine uarch ram image. This symbol is created by "compute-uarch-pristine-hash" | ||
extern "C" const unsigned int uarch_pristine_hash_len; | ||
|
||
#endif // UARCH_PRISTINE_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,6 @@ | |
*.bin | ||
.DS_Store | ||
.vscode | ||
uarch-pristine-hash.c | ||
uarch-pristine-ram.c | ||
compute-uarch-pristine-hash |
Oops, something went wrong.