X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Farch%2Fx86%2Fpagetable.hh;h=e42693c03d9d6a3c137b267d1bcf7be19786e0da;hb=06cdbe5ea7138d0f340448438d64e98c72936e1b;hp=aaf82ed70f95aa2cf897521c788045fec108d908;hpb=50e2d20cb876a054f53162e7b01306039c213457;p=gem5.git diff --git a/src/arch/x86/pagetable.hh b/src/arch/x86/pagetable.hh index aaf82ed70..e42693c03 100644 --- a/src/arch/x86/pagetable.hh +++ b/src/arch/x86/pagetable.hh @@ -62,24 +62,40 @@ #include #include "sim/host.hh" +#include "base/bitunion.hh" #include "base/misc.hh" class Checkpoint; namespace X86ISA { - struct VAddr - { - VAddr(Addr a) { panic("not implemented yet."); } - }; + BitUnion64(VAddr) + Bitfield<20, 12> longl1; + Bitfield<29, 21> longl2; + Bitfield<38, 30> longl3; + Bitfield<47, 39> longl4; + + Bitfield<20, 12> pael1; + Bitfield<29, 21> pael2; + Bitfield<31, 30> pael3; + + Bitfield<21, 12> norml1; + Bitfield<31, 22> norml2; + EndBitUnion(VAddr) struct TlbEntry { // The base of the physical page. - Addr pageStart; + Addr paddr; + + // The beginning of the virtual page this entry maps. + Addr vaddr; + // The size of the page this entry represents. + Addr size; + // Read permission is always available, assuming it isn't blocked by // other mechanisms. - bool writeable; + bool writable; // Whether this page is accesible without being in supervisor mode. bool user; // Whether to use write through or write back. M5 ignores this and @@ -94,13 +110,13 @@ namespace X86ISA // Whether or not memory on this page can be executed. bool noExec; - // The beginning of the virtual page this entry maps. - Addr vaddr; - // The size of the page this entry represents. - Addr size; - + TlbEntry(Addr asn, Addr _vaddr, Addr _paddr); TlbEntry() {} - TlbEntry(Addr paddr) : pageStart(paddr) {} + + Addr pageStart() + { + return paddr; + } void serialize(std::ostream &os); void unserialize(Checkpoint *cp, const std::string §ion);