arch-arm: Change the TlbTestInterface to accept a RequestPtr
Now that the Request has been made an Extensible object, it can carry within itself much more data. It makes sense to pass it to the TlbTestInterface as more information about the table walk can be extracted from it. This is also aligning with the testTranslation utility which is expecting a request reference as first argument. Change-Id: I3dbc9a81d6b4bcc1801246ba7eb4136774d8f3c7 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Richard Cooper <richard.cooper@arm.com>
This commit is contained in:
@@ -2114,7 +2114,7 @@ TableWalker::fetchDescriptor(Addr desc_addr,
|
||||
desc_addr, num_bytes, flags, requestorId);
|
||||
req->taskId(context_switch_task_id::DMA);
|
||||
|
||||
Fault fault = testWalk(desc_addr, num_bytes, descriptor.domain(),
|
||||
Fault fault = testWalk(req, descriptor.domain(),
|
||||
lookup_level);
|
||||
|
||||
if (fault != NoFault) {
|
||||
@@ -2306,13 +2306,13 @@ TableWalker::pendingChange()
|
||||
}
|
||||
|
||||
Fault
|
||||
TableWalker::testWalk(Addr pa, Addr size, TlbEntry::DomainType domain,
|
||||
TableWalker::testWalk(const RequestPtr &walk_req, TlbEntry::DomainType domain,
|
||||
LookupLevel lookup_level)
|
||||
{
|
||||
if (!test) {
|
||||
return NoFault;
|
||||
} else {
|
||||
return test->walkCheck(pa, size, currState->vaddr, currState->isSecure,
|
||||
return test->walkCheck(walk_req, currState->vaddr, currState->isSecure,
|
||||
currState->el != EL0,
|
||||
currState->mode, domain, lookup_level);
|
||||
}
|
||||
|
||||
@@ -1206,7 +1206,7 @@ class TableWalker : public ClockedObject
|
||||
|
||||
void setTestInterface(TlbTestInterface *ti);
|
||||
|
||||
Fault testWalk(Addr pa, Addr size, TlbEntry::DomainType domain,
|
||||
Fault testWalk(const RequestPtr &walk_req, TlbEntry::DomainType domain,
|
||||
LookupLevel lookup_level);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2010-2013, 2016, 2019-2022 Arm Limited
|
||||
* Copyright (c) 2010-2013, 2016, 2019-2022, 2024 Arm Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* The license below extends only to copyright in the software and shall
|
||||
@@ -84,8 +84,7 @@ class TlbTestInterface
|
||||
/**
|
||||
* Check if a page table walker access should be forced to fail.
|
||||
*
|
||||
* @param pa Physical address the walker is accessing
|
||||
* @param size Walker access size
|
||||
* @param req walk request bearing a valid phys address
|
||||
* @param va Virtual address that initiated the walk
|
||||
* @param is_secure Access from secure state
|
||||
* @param is_priv Access from a privileged mode (i.e., not EL0)
|
||||
@@ -93,7 +92,8 @@ class TlbTestInterface
|
||||
* @param domain Domain type
|
||||
* @param lookup_level Page table walker level
|
||||
*/
|
||||
virtual Fault walkCheck(Addr pa, Addr size, Addr va, bool is_secure,
|
||||
virtual Fault walkCheck(const RequestPtr &walk_req,
|
||||
Addr va, bool is_secure,
|
||||
Addr is_priv, BaseMMU::Mode mode,
|
||||
TlbEntry::DomainType domain,
|
||||
enums::ArmLookupLevel lookup_level) = 0;
|
||||
|
||||
Reference in New Issue
Block a user