mem: Add Request factory method for memory management command
This should be used to construct memory management Requests (Not requiring an address nor a size) Change-Id: Id1b6f1032c1390210a216cd77c7dd0cec14e962f Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/58357 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -522,6 +522,22 @@ class Request
|
||||
|
||||
~Request() {}
|
||||
|
||||
/**
|
||||
* Factory method for creating memory management requests, with
|
||||
* unspecified addr and size.
|
||||
*/
|
||||
static RequestPtr
|
||||
createMemManagement(Flags flags, RequestorID id)
|
||||
{
|
||||
auto mgmt_req = std::make_shared<Request>();
|
||||
mgmt_req->_flags.set(flags);
|
||||
mgmt_req->_requestorId = id;
|
||||
mgmt_req->_time = curTick();
|
||||
|
||||
assert(mgmt_req->isMemMgmt());
|
||||
return mgmt_req;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up Context numbers.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user