From 7b79ab3a85589d65ce4c9c784fe99776f037d236 Mon Sep 17 00:00:00 2001 From: Kathlene Magnus Date: Thu, 21 Nov 2024 14:27:35 -0600 Subject: [PATCH 1/3] Changed variable name from vaddr to paddr --- core/AtlasState.cpp | 8 ++------ core/AtlasState.hpp | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/core/AtlasState.cpp b/core/AtlasState.cpp index f4c64e0..2e88c69 100644 --- a/core/AtlasState.cpp +++ b/core/AtlasState.cpp @@ -74,10 +74,8 @@ namespace atlas translate_unit_ = getContainer()->getChild("translate")->getResourceAs(); } - template MemoryType AtlasState::readMemory(const Addr vaddr) + template MemoryType AtlasState::readMemory(const Addr paddr) { - // TODO: Get physical address from translation result - const Addr paddr = vaddr; auto* memory = atlas_system_->getSystemMemory(); static_assert(std::is_trivial()); @@ -93,10 +91,8 @@ namespace atlas } template - void AtlasState::writeMemory(const Addr vaddr, const MemoryType value) + void AtlasState::writeMemory(const Addr paddr, const MemoryType value) { - // TODO: Get physical address from translation result - const Addr paddr = vaddr; auto* memory = atlas_system_->getSystemMemory(); static_assert(std::is_trivial()); diff --git a/core/AtlasState.hpp b/core/AtlasState.hpp index dfbf067..0b27ac8 100644 --- a/core/AtlasState.hpp +++ b/core/AtlasState.hpp @@ -155,9 +155,9 @@ namespace atlas return csr_rset_->getRegister(reg_num); } - template MemoryType readMemory(const Addr vaddr); + template MemoryType readMemory(const Addr paddr); - template void writeMemory(const Addr vaddr, const MemoryType value); + template void writeMemory(const Addr paddr, const MemoryType value); void addObserver(Observer* observer) { observers_.push_back(observer); } From c4c18ef8614ff8decccf47f198d36c1079adf8c0 Mon Sep 17 00:00:00 2001 From: Kathlene Magnus Date: Thu, 21 Nov 2024 14:34:12 -0600 Subject: [PATCH 2/3] Fix --- core/AtlasState.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/AtlasState.cpp b/core/AtlasState.cpp index 2e88c69..5d76d51 100644 --- a/core/AtlasState.cpp +++ b/core/AtlasState.cpp @@ -83,7 +83,7 @@ namespace atlas const size_t size = sizeof(MemoryType); std::vector buffer(sizeof(MemoryType) / sizeof(uint8_t), 0); const bool success = memory->tryRead(paddr, size, buffer.data()); - sparta_assert(success, "Failed to read from memory at address 0x" << std::hex << vaddr); + sparta_assert(success, "Failed to read from memory at address 0x" << std::hex << paddr); const MemoryType value = convertFromByteVector(buffer); ILOG("Memory read to 0x" << std::hex << paddr << ": 0x" << (uint64_t)value); @@ -100,7 +100,7 @@ namespace atlas const size_t size = sizeof(MemoryType); const std::vector buffer = convertToByteVector(value); const bool success = memory->tryWrite(paddr, size, buffer.data()); - sparta_assert(success, "Failed to write to memory at address 0x" << std::hex << vaddr); + sparta_assert(success, "Failed to write to memory at address 0x" << std::hex << paddr); ILOG("Memory write to 0x" << std::hex << paddr << ": 0x" << (uint64_t)value); } From 840d6d7e6755f14a398e13dc615036b19a5a0ef4 Mon Sep 17 00:00:00 2001 From: Kathlene Magnus Date: Thu, 21 Nov 2024 15:04:56 -0600 Subject: [PATCH 3/3] Try removing secrets to fix forked PR --- .github/workflows/clangformat-check.yml | 5 ----- .github/workflows/ubuntu-build.yml | 5 ----- 2 files changed, 10 deletions(-) diff --git a/.github/workflows/clangformat-check.yml b/.github/workflows/clangformat-check.yml index fa4eab4..4f9efa3 100644 --- a/.github/workflows/clangformat-check.yml +++ b/.github/workflows/clangformat-check.yml @@ -25,11 +25,6 @@ jobs: COMPILER: ${{ matrix.COMPILER }} steps: - - name: Setup Keys - uses: webfactory/ssh-agent@v0.9.0 - with: - ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - # Get Atlas - name: Clone Atlas uses: actions/checkout@v4 diff --git a/.github/workflows/ubuntu-build.yml b/.github/workflows/ubuntu-build.yml index 3d9167b..76cfe00 100644 --- a/.github/workflows/ubuntu-build.yml +++ b/.github/workflows/ubuntu-build.yml @@ -25,11 +25,6 @@ jobs: COMPILER: ${{ matrix.COMPILER }} steps: - - name: Setup Keys - uses: webfactory/ssh-agent@v0.9.0 - with: - ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - # Get Atlas - name: Clone Atlas uses: actions/checkout@v4