41#ifndef __ARCH_ARM_PAGETABLE_H__
42#define __ARCH_ARM_PAGETABLE_H__
50#include "enums/TypeTLB.hh"
51#include "enums/ArmLookupLevel.hh"
80 panic(
"Need to implement PTE serialization\n");
85 panic(
"Need to implement PTE serialization\n");
265 bool uncacheable,
bool read_only) :
281 warn(
"ARM TlbEntry does not support read-only mappings\n");
317 return lookup.
va <= page_addr +
size &&
318 lookup.
va + lookup.
size > page_addr;
321 return lookup.
va >= page_addr && lookup.
va <= page_addr +
size;
347 return regime == target_regime;
408 return csprintf(
"%#x, asn %d vmn %d ppn %#x size: %#x ap:%d "
441 uint8_t domain_ =
static_cast<uint8_t
>(
domain);
472 paramIn(cp,
"domain", domain_);
Basic support for object serialization.
#define panic(...)
This implements a cprintf based panic() function.
#define SERIALIZE_ENUM(scalar)
#define UNSERIALIZE_ENUM(scalar)
static bool useVMID(TranslationRegime regime)
const PageTableOps * getPageTableOps(GrainSize trans_granule)
static const char * regimeToStr(TranslationRegime regime)
const GrainSize GrainMap_tg1[]
const unsigned MaxPhysAddrRange
const GrainSize GrainMap_tg0[]
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::ostream CheckpointOut
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void paramOut(CheckpointOut &cp, const std::string &name, ExtMachInst const &machInst)
void paramIn(CheckpointIn &cp, const std::string &name, ExtMachInst &machInst)
std::string csprintf(const char *format, const Args &...args)
#define UNSERIALIZE_SCALAR(scalar)
#define SERIALIZE_SCALAR(scalar)
void serialize(CheckpointOut &cp) const
void unserialize(CheckpointIn &cp)
virtual bool isWritable(pte_t pte, unsigned level, bool stage2) const =0
enums::ArmLookupLevel LookupLevel
Addr walkMask(unsigned level) const
virtual LookupLevel firstS2Level(uint8_t sl0) const =0
virtual LookupLevel lastLevel() const =0
virtual Addr nextLevelPointer(pte_t pte, unsigned level) const =0
virtual unsigned walkBits(unsigned level) const =0
virtual bool isValid(pte_t pte, unsigned level) const =0
virtual LookupLevel firstLevel(uint8_t tsz) const =0
virtual Addr pageMask(pte_t pte, unsigned level) const =0
virtual Addr index(Addr va, unsigned level, int tsz) const =0
virtual bool isLeaf(pte_t pte, unsigned level) const =0
TranslationRegime targetRegime
TlbEntry(Addr _asn, Addr _vaddr, Addr _paddr, bool uncacheable, bool read_only)
void updateVaddr(Addr new_vaddr)
bool checkRegime(TranslationRegime target_regime) const
void setAttributes(bool lpae)
bool match(const Lookup &lookup) const
std::string print() const
enums::ArmLookupLevel LookupLevel
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Addr pAddr(Addr va) const
void serialize(CheckpointOut &cp) const override
Serialize an object.
bool matchAddress(const Lookup &lookup) const
Addr pageMask(pte_t pte, unsigned level) const override
bool isValid(pte_t pte, unsigned level) const override
bool isLeaf(pte_t pte, unsigned level) const override
bool isWritable(pte_t pte, unsigned level, bool stage2) const override
Addr nextLevelPointer(pte_t pte, unsigned level) const override
unsigned walkBits(unsigned level) const override
LookupLevel firstLevel(uint8_t tsz) const override
LookupLevel lastLevel() const override
LookupLevel firstS2Level(uint8_t sl0) const override
unsigned walkBits(unsigned level) const override
Addr pageMask(pte_t pte, unsigned level) const override
bool isLeaf(pte_t pte, unsigned level) const override
LookupLevel firstLevel(uint8_t tsz) const override
bool isValid(pte_t pte, unsigned level) const override
LookupLevel lastLevel() const override
Addr nextLevelPointer(pte_t pte, unsigned level) const override
bool isWritable(pte_t pte, unsigned level, bool stage2) const override
unsigned walkBits(unsigned level) const override
Addr pageMask(pte_t pte, unsigned level) const override
LookupLevel firstS2Level(uint8_t sl0) const override
bool isWritable(pte_t pte, unsigned level, bool stage2) const override
Addr nextLevelPointer(pte_t pte, unsigned level) const override
LookupLevel lastLevel() const override
bool isValid(pte_t pte, unsigned level) const override
bool isLeaf(pte_t pte, unsigned level) const override
LookupLevel firstLevel(uint8_t tsz) const override
Addr nextLevelPointer(pte_t pte, unsigned level) const override
LookupLevel lastLevel() const override
bool isValid(pte_t pte, unsigned level) const override
unsigned walkBits(unsigned level) const override
LookupLevel firstLevel(uint8_t tsz) const override
Addr pageMask(pte_t pte, unsigned level) const override
bool isWritable(pte_t pte, unsigned level, bool stage2) const override
LookupLevel firstS2Level(uint8_t sl0) const override
bool isLeaf(pte_t pte, unsigned level) const override