46#include "params/PMAChecker.hh"
57uncacheable(params.uncacheable.begin(), params.uncacheable.end())
59 for (
auto& range:
params.misaligned) {
88 assert(req->hasVaddr());
100 if (range.
isSubset(uncacheable_range)) {
124 assert(derived_old !=
nullptr);
138 assert(req->hasPaddr());
139 paddr = req->getPaddr();
148 (req->hasVaddr() ? req->getVaddr() :
vaddr),
mode);
163 panic(
"Execute mode request should not reach here.");
165 return std::make_shared<AddressFault>(
vaddr, code);
170 return (
addr & (size - 1)) == 0;
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
AddrRange getAddrRange() const
Get address range to which this packet belongs.
@ STRICT_ORDER
The request is required to be strictly ordered by CPU models and is non-speculative.
@ UNCACHEABLE
The request is to an uncacheable address.
Based on the RISC-V ISA privileged specifications V1.11, there is no implementation guidelines on the...
This class provides an abstract PMAChecker for RISC-V to provide PMA checking functionality.
bool isUncacheable(const AddrRange &range)
PMAChecker(const Params ¶ms)
AddrRangeList uncacheable
Fault checkPAddrAlignment(const RequestPtr &req, BaseMMU::Mode mode, Addr vaddr)
Fault createMisalignFault(Addr vaddr, BaseMMU::Mode mode)
Fault check(const RequestPtr &req, BaseMMU::Mode mode, Addr vaddr=0) override
void takeOverFrom(BasePMAChecker *old) override
AddrRangeMap< bool, 3 > misaligned
Fault checkVAddrAlignment(const RequestPtr &req, BaseMMU::Mode mode) override
bool misalignedSupport(const AddrRange &range)
const Params & params() const
bool addressAlign(const Addr addr, const Addr size)
bool isSubset(const AddrRange &r) const
Determine if this range is a subset of another range, i.e.
AddrRange RangeSize(Addr start, Addr size)
iterator insert(const AddrRange &r, const V &d)
const_iterator contains(const AddrRange &r) const
Find entry that contains the given address range.
const_iterator end() const
#define panic(...)
This implements a cprintf based panic() function.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::shared_ptr< FaultBase > Fault
std::shared_ptr< Request > RequestPtr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
constexpr decltype(nullptr) NoFault
Declaration of the Packet class.
Declaration of a request, the overall memory request consisting of the parts of the request that are ...