Skip to content

Commit b15854b

Browse files
committed
refactor: clean up PMA class strucure
1 parent 3acd330 commit b15854b

File tree

112 files changed

+2713
-2900
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+2713
-2900
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
third-party/** linguist-vendored

src/Makefile

+28-37
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ ifeq ($(slirp),yes)
133133
# Workaround for building with macports lua-luarocks installation
134134
machine.o: INCS+=$(SLIRP_INC)
135135
machine.clang-tidy: INCS+=$(SLIRP_INC)
136-
virtio-net-carrier-slirp.o: INCS+=$(SLIRP_INC)
137-
virtio-net-carrier-slirp.clang-tidy: INCS+=$(SLIRP_INC)
136+
virtio-net-user-address-range.o: INCS+=$(SLIRP_INC)
137+
virtio-net-user-address-range.clang-tidy: INCS+=$(SLIRP_INC)
138138
#INCS+=$(SLIRP_INC)
139139
LIBCARTESI_COMMON_LIBS+=$(SLIRP_LIB)
140140
else
@@ -345,48 +345,39 @@ c-api: $(LIBCARTESI) $(LIBCARTESI_MERKLE_TREE) $(LIBCARTESI_JSONRPC)
345345
.PHONY: all generate use clean lint format format-lua check-format check-format-lua luacartesi hash c-api compile_flags.txt
346346

347347
LIBCARTESI_OBJS:= \
348-
pma-driver.o \
349-
clint.o \
350-
clint-factory.o \
351-
plic.o \
352-
plic-factory.o \
353-
virtio-factory.o \
354-
virtio-device.o \
355-
virtio-console.o \
356-
virtio-p9fs.o \
357-
virtio-net.o \
358-
virtio-net-carrier-tuntap.o \
359-
virtio-net-carrier-slirp.o \
360-
dtb.o \
361-
os.o \
362-
htif.o \
363-
htif-factory.o \
364-
shadow-state.o \
365-
shadow-state-factory.o \
366-
shadow-pmas-factory.o \
367-
shadow-tlb.o \
368-
shadow-tlb-factory.o \
369-
shadow-uarch-state.o \
370-
shadow-uarch-state-factory.o \
371-
pma.o \
372-
machine.o \
373-
machine-config.o \
374-
json-util.o \
375348
base64.o \
349+
clint-address-range.o \
350+
dtb.o \
351+
htif-address-range.o \
376352
interpret.o \
377-
virtual-machine.o \
378-
sha3.o \
353+
json-util.o \
354+
machine-c-api.o \
355+
machine-config.o \
379356
machine-merkle-tree.o \
357+
machine.o \
358+
memory-address-range.o \
359+
os.o \
360+
plic-address-range.o \
380361
pristine-merkle-tree.o \
381-
machine-c-api.o \
362+
replay-step-state-access-interop.o \
363+
send-cmio-response.o \
364+
sha3.o \
365+
shadow-state-address-range.o \
366+
shadow-tlb-address-range.o \
367+
shadow-uarch-state-address-range.o \
368+
uarch-pristine-hash.o \
382369
uarch-pristine-ram.o \
383370
uarch-pristine-state-hash.o \
384-
uarch-pristine-hash.o \
385-
uarch-interpret.o \
386-
uarch-step.o \
387371
uarch-reset-state.o \
388-
send-cmio-response.o \
389-
replay-step-state-access-interop.o
372+
uarch-step.o \
373+
virtual-machine.o \
374+
uarch-interpret.o \
375+
virtio-address-range.o \
376+
virtio-console-address-range.o \
377+
virtio-p9fs-address-range.o \
378+
virtio-net-address-range.o \
379+
virtio-net-tuntap-address-range.o \
380+
virtio-net-user-address-range.o
390381

391382
CARTESI_CLUA_OBJS:= \
392383
clua.o \

src/machine-memory-range-descr.h src/address-range-description.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@
1414
// with this program (see COPYING). If not, see <https://www.gnu.org/licenses/>.
1515
//
1616

17-
#ifndef MACHINE_MEMORY_RANGE_DESCR_H
18-
#define MACHINE_MEMORY_RANGE_DESCR_H
17+
#ifndef ADDRESS_RANGE_DESCRIPTION_H
18+
#define ADDRESS_RANGE_DESCRIPTION_H
1919

2020
#include <cstdint>
2121
#include <string>
2222
#include <vector>
2323

2424
namespace cartesi {
2525

26-
/// \brief Description of memory range used for introspection (i.e., get_memory_ranges())
27-
struct machine_memory_range_descr {
26+
/// \brief Description of an address range used for introspection (i.e., get_address_ranges())
27+
struct address_range_description {
2828
uint64_t start = 0; ///< Start of memory range
2929
uint64_t length = 0; ///< Length of memory range
3030
std::string description; ///< User-friendly description for memory range
3131
};
3232

33-
/// \brief List of memory range descriptions used for introspection (i.e., get_memory_ranges())
34-
using machine_memory_range_descrs = std::vector<machine_memory_range_descr>;
33+
/// \brief List of address range descriptions used for introspection (i.e., get_address_ranges())
34+
using address_range_descriptions = std::vector<address_range_description>;
3535

3636
} // namespace cartesi
3737

0 commit comments

Comments
 (0)