File tree Expand file tree Collapse file tree 4 files changed +24
-14
lines changed Expand file tree Collapse file tree 4 files changed +24
-14
lines changed Original file line number Diff line number Diff line change 1
- // Copyright 2021 ETH Zurich and University of Bologna.
1
+ // Copyright 2025 ETH Zurich and University of Bologna.
2
2
// Solderpad Hardware License, Version 0.51, see LICENSE for details.
3
3
// SPDX-License-Identifier: SHL-0.51
4
4
5
5
#include <tb _lib.hh >
6
6
7
7
namespace sim {
8
8
9
- const BootData BOOTDATA = {.boot_addr = ${hex(cfg[' cluster' ][' boot_addr' ])} ,
9
+ // Allow other C sources to use BOOTDATA (ex. crt0s defined in other SDKs)
10
+ extern " C" const BootData BOOTDATA = {.boot_addr = ${hex(cfg[' cluster' ][' boot_addr' ])} ,
10
11
.core_count = ${ cfg[' cluster' ][' nr_cores' ]} ,
11
12
.hartid_base = ${ cfg[' cluster' ][' cluster_base_hartid' ]} ,
12
13
.tcdm_start = ${ hex(cfg[' cluster' ][' cluster_base_addr' ])} ,
Original file line number Diff line number Diff line change
1
+ // Copyright 2025 ETH Zurich and University of Bologna.
2
+ // Solderpad Hardware License, Version 0.51, see LICENSE for details.
3
+ // SPDX-License-Identifier: SHL-0.51
4
+
5
+ #pragma once
6
+
7
+ #include <inttypes.h>
8
+
9
+ struct BootData {
10
+ uint32_t boot_addr ;
11
+ uint32_t core_count ;
12
+ uint32_t hartid_base ;
13
+ uint32_t tcdm_start ;
14
+ uint32_t tcdm_size ;
15
+ uint32_t tcdm_offset ;
16
+ uint64_t global_mem_start ;
17
+ uint64_t global_mem_end ;
18
+ uint32_t cluster_count ;
19
+ uint32_t clint_base ;
20
+ };
Original file line number Diff line number Diff line change 14
14
#include < unordered_map>
15
15
#include < vector>
16
16
17
+ #include " bootdata.h"
17
18
#include " ipc.hh"
18
19
19
20
namespace sim {
Original file line number Diff line number Diff line change @@ -116,18 +116,6 @@ struct GlobalMemory {
116
116
extern GlobalMemory MEM;
117
117
118
118
// The boot data generated along with the system RTL.
119
- struct BootData {
120
- uint32_t boot_addr;
121
- uint32_t core_count;
122
- uint32_t hartid_base;
123
- uint32_t tcdm_start;
124
- uint32_t tcdm_size;
125
- uint32_t tcdm_offset;
126
- uint64_t global_mem_start;
127
- uint64_t global_mem_end;
128
- uint32_t cluster_count;
129
- uint32_t clint_base;
130
- };
131
119
extern const BootData BOOTDATA;
132
120
133
121
} // namespace sim
You can’t perform that action at this time.
0 commit comments