From 1cb22bc3e3216244fbcae5ce9da8d56a82d456e9 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 1 May 2019 21:45:01 -0700 Subject: [PATCH] mem: Remove the now unused Copy* methods from the FS port proxy. Change-Id: Ie433a9e4c9ee748911060eb7b1b47e617aa297a6 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18576 Tested-by: kokoro Reviewed-by: Jason Lowe-Power Reviewed-by: Brandon Potter Reviewed-by: Andreas Sandberg Maintainer: Jason Lowe-Power --- src/mem/fs_translating_port_proxy.cc | 44 ---------------------------- src/mem/fs_translating_port_proxy.hh | 5 ---- 2 files changed, 49 deletions(-) diff --git a/src/mem/fs_translating_port_proxy.cc b/src/mem/fs_translating_port_proxy.cc index 2e17cbf63..6a25d1121 100644 --- a/src/mem/fs_translating_port_proxy.cc +++ b/src/mem/fs_translating_port_proxy.cc @@ -119,47 +119,3 @@ FSTranslatingPortProxy::tryMemsetBlob(Addr address, uint8_t v, int size) const } return true; } - -void -CopyOut(ThreadContext *tc, void *dest, Addr src, size_t cplen) -{ - uint8_t *dst = (uint8_t *)dest; - tc->getVirtProxy().readBlob(src, dst, cplen); -} - -void -CopyIn(ThreadContext *tc, Addr dest, const void *source, size_t cplen) -{ - uint8_t *src = (uint8_t *)source; - tc->getVirtProxy().writeBlob(dest, src, cplen); -} - -void -CopyStringOut(ThreadContext *tc, char *dst, Addr vaddr, size_t maxlen) -{ - char *start = dst; - FSTranslatingPortProxy &vp = tc->getVirtProxy(); - - bool foundNull = false; - while ((dst - start + 1) < maxlen && !foundNull) { - vp.readBlob(vaddr++, (uint8_t*)dst, 1); - if (*dst == '\0') - foundNull = true; - dst++; - } - - if (!foundNull) - *dst = '\0'; -} - -void -CopyStringIn(ThreadContext *tc, const char *src, Addr vaddr) -{ - FSTranslatingPortProxy &vp = tc->getVirtProxy(); - for (ChunkGenerator gen(vaddr, strlen(src), TheISA::PageBytes); !gen.done(); - gen.next()) - { - vp.writeBlob(gen.addr(), (uint8_t*)src, gen.size()); - src += gen.size(); - } -} diff --git a/src/mem/fs_translating_port_proxy.hh b/src/mem/fs_translating_port_proxy.hh index 78adf1ac5..410eb7d78 100644 --- a/src/mem/fs_translating_port_proxy.hh +++ b/src/mem/fs_translating_port_proxy.hh @@ -97,9 +97,4 @@ class FSTranslatingPortProxy : public PortProxy bool tryMemsetBlob(Addr address, uint8_t v, int size) const override; }; -void CopyOut(ThreadContext *tc, void *dest, Addr src, size_t cplen); -void CopyIn(ThreadContext *tc, Addr dest, const void *source, size_t cplen); -void CopyStringOut(ThreadContext *tc, char *dst, Addr vaddr, size_t maxlen); -void CopyStringIn(ThreadContext *tc, const char *src, Addr vaddr); - #endif //__MEM_FS_TRANSLATING_PORT_PROXY_HH__ -- 2.30.2