From 1b6355c89574c42c5b5f8014b994cf26dae4737d Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Sun, 17 Jan 2016 18:27:46 -0800 Subject: cpu. arch: add initiateMemRead() to ExecContext interface For historical reasons, the ExecContext interface had a single function, readMem(), that did two different things depending on whether the ExecContext supported atomic memory mode (i.e., AtomicSimpleCPU) or timing memory mode (all the other models). In the former case, it actually performed a memory read; in the latter case, it merely initiated a read access, and the read completion did not happen until later when a response packet arrived from the memory system. This led to some confusing things, including timing accesses being required to provide a pointer for the return data even though that pointer was only used in atomic mode. This patch splits this interface, adding a new initiateMemRead() function to the ExecContext interface to replace the timing-mode use of readMem(). For consistency and clarity, the readMemTiming() helper function in the ISA definitions is renamed to initiateMemRead() as well. For x86, where the access size is passed in explicitly, we can also get rid of the data parameter at this level. For other ISAs, where the access size is determined from the type of the data parameter, we have to keep the parameter for that purpose. --- src/arch/alpha/isa/mem.isa | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/arch/alpha/isa/mem.isa') diff --git a/src/arch/alpha/isa/mem.isa b/src/arch/alpha/isa/mem.isa index 71b134340..6ba8ee5d0 100644 --- a/src/arch/alpha/isa/mem.isa +++ b/src/arch/alpha/isa/mem.isa @@ -223,7 +223,7 @@ def template LoadInitiateAcc {{ %(ea_code)s; if (fault == NoFault) { - fault = readMemTiming(xc, traceData, EA, Mem, memAccessFlags); + fault = initiateMemRead(xc, traceData, EA, Mem, memAccessFlags); } return fault; -- cgit v1.2.3