From 0ed3c84c7b05d7d3c9d5f0e3f1c05c20afef93b9 Mon Sep 17 00:00:00 2001 From: Dam Sunwoo Date: Tue, 31 Jan 2012 07:46:04 -0800 Subject: util: implements "writefile" gem5 op to export file from guest to host filesystem Usage: m5 writefile File will be created in the gem5 output folder with the identical filename. Implementation is largely based on the existing "readfile" functionality. Currently does not support exporting of folders. --- util/m5/m5op.h | 1 + 1 file changed, 1 insertion(+) (limited to 'util/m5/m5op.h') diff --git a/util/m5/m5op.h b/util/m5/m5op.h index 38815e3c3..4e1d0b638 100644 --- a/util/m5/m5op.h +++ b/util/m5/m5op.h @@ -49,6 +49,7 @@ void m5_reset_stats(uint64_t ns_delay, uint64_t ns_period); void m5_dump_stats(uint64_t ns_delay, uint64_t ns_period); void m5_dumpreset_stats(uint64_t ns_delay, uint64_t ns_period); uint64_t m5_readfile(void *buffer, uint64_t len, uint64_t offset); +uint64_t m5_writefile(void *buffer, uint64_t len, uint64_t offset, const char *filename); void m5_debugbreak(void); void m5_switchcpu(void); void m5_addsymbol(uint64_t addr, char *symbol); -- cgit v1.2.3