Memory Class

Definition

Line 386 of cmsxm/Memory.cm

Constructors & Destructor

public nothrow Memory(Machine& machine_)

Member Functions

public ulong AllocatePage()
public ulong AllocateRootPage()
private nothrow bool CheckSecurityViolation(ulong virtualAddress)
public nothrow void ClearTranslationCache(ushort addressSpaceNumber)
public nothrow void CopyPage(ulong fromAddress, ulong toAddress)
public nothrow void DisposeTranslationCache(ushort addressSpaceNumber)
public void FreePage(ulong pageAddress)
public nothrow void FreeRootPage(ulong rootPageAddress)
public nothrow bool GetAddressFromTranslationCache(ulong virtualAddress, ushort& addressSpaceNumber, ulong& pageAddress, ushort& offset, int& entryIndex, ulong& sourcePageNumber)
public nothrow ulong GetPageTableEntry(ulong virtualAddress)
public nothrow ulong GetPageTableEntry(ulong virtualAddress, byte& segmentIndex, ulong& pageAddress, ushort& offset, ushort& addressSpaceNumber, Protection& pageProtection, ulong& pteAddress)
public inline nothrow AddressTranslationCache& GetTranslationCache(ushort addressSpaceNumber)
private nothrow void PageFault(ulong virtualAddress, Protection pageProtection, Protection access)
public nothrow byte ReadByte(ulong virtualAddress, Protection access)
public nothrow byte ReadByte(ulong virtualAddress, Protection access, bool pageFault)
public nothrow uint ReadUInt(ulong virtualAddress, Protection access)
public nothrow uint ReadUInt(ulong virtualAddress, Protection access, bool pageFault)
public nothrow ulong ReadULong(ulong virtualAddress, Protection access)
public nothrow ulong ReadULong(ulong virtualAddress, Protection access, bool pageFault)
public nothrow ushort ReadUShort(ulong virtualAddress, Protection access)
public nothrow ushort ReadUShort(ulong virtualAddress, Protection access, bool pageFault)
public inline nothrow void SetAddressToTranslationCache(ushort addressSpaceNumber, ulong pageAddress, int entryIndex, ulong sourcePageNumber)
public void SharePage(ulong pageAddress)
public nothrow ulong TranslateAddress(ulong virtualAddress, Protection access, bool pageFault)
public nothrow void WriteByte(ulong virtualAddress, byte b, Protection access)
public nothrow void WriteByte(ulong virtualAddress, byte b, Protection access, bool pageFault)
public nothrow void WriteUInt(ulong virtualAddress, uint u, Protection access)
public nothrow void WriteUInt(ulong virtualAddress, uint u, Protection access, bool pageFault)
public nothrow void WriteULong(ulong virtualAddress, ulong u, Protection access)
public nothrow void WriteULong(ulong virtualAddress, ulong u, Protection access, bool pageFault)
public nothrow void WriteUShort(ulong virtualAddress, ushort u, Protection access)
public nothrow void WriteUShort(ulong virtualAddress, ushort u, Protection access, bool pageFault)

Member Variables

private AddressTranslationCache[16] directTranslationCaches
private PageFrame* freePageFrameList
private Machine& machine
private HashMap<ushort, AddressTranslationCache*, Hasher<ushort>, EqualTo<ushort>> mappedTranslationCaches
private HashMap<ulong, PageFrame*, Hasher<ulong>, EqualTo<ulong>> pageFrameMap

Constructor& Destructor Details

Memory Constructor

public nothrow Memory(Machine& machine_)

Definition
Line 388 of cmsxm/Memory.cm


Member Function Details

AllocatePage Member Function

public ulong AllocatePage()

Definition
Line 391 of cmsxm/Memory.cm


AllocateRootPage Member Function

public ulong AllocateRootPage()

Definition
Line 402 of cmsxm/Memory.cm


CheckSecurityViolation Member Function

private nothrow bool CheckSecurityViolation(ulong virtualAddress)

Definition
Line 861 of cmsxm/Memory.cm


ClearTranslationCache Member Function

public nothrow void ClearTranslationCache(ushort addressSpaceNumber)

Definition
Line 613 of cmsxm/Memory.cm


CopyPage Member Function

public nothrow void CopyPage(ulong fromAddress, ulong toAddress)

Definition
Line 445 of cmsxm/Memory.cm


DisposeTranslationCache Member Function

public nothrow void DisposeTranslationCache(ushort addressSpaceNumber)

Definition
Line 619 of cmsxm/Memory.cm


FreePage Member Function

public void FreePage(ulong pageAddress)

Definition
Line 407 of cmsxm/Memory.cm


FreeRootPage Member Function

public nothrow void FreeRootPage(ulong rootPageAddress)

Definition
Line 427 of cmsxm/Memory.cm


GetAddressFromTranslationCache Member Function

public nothrow bool GetAddressFromTranslationCache(ulong virtualAddress, ushort& addressSpaceNumber, ulong& pageAddress, ushort& offset, int& entryIndex, ulong& sourcePageNumber)

Definition
Line 636 of cmsxm/Memory.cm


GetPageTableEntry Member Function

public nothrow ulong GetPageTableEntry(ulong virtualAddress)

Definition
Line 449 of cmsxm/Memory.cm


GetPageTableEntry Member Function

public nothrow ulong GetPageTableEntry(ulong virtualAddress, byte& segmentIndex, ulong& pageAddress, ushort& offset, ushort& addressSpaceNumber, Protection& pageProtection, ulong& pteAddress)

Definition
Line 459 of cmsxm/Memory.cm


GetTranslationCache Member Function

public inline nothrow AddressTranslationCache& GetTranslationCache(ushort addressSpaceNumber)

Definition
Line 592 of cmsxm/Memory.cm


PageFault Member Function

private nothrow void PageFault(ulong virtualAddress, Protection pageProtection, Protection access)

Definition
Line 857 of cmsxm/Memory.cm


ReadByte Member Function

public nothrow byte ReadByte(ulong virtualAddress, Protection access)

Definition
Line 745 of cmsxm/Memory.cm


ReadByte Member Function

public nothrow byte ReadByte(ulong virtualAddress, Protection access, bool pageFault)

Definition
Line 749 of cmsxm/Memory.cm


ReadUInt Member Function

public nothrow uint ReadUInt(ulong virtualAddress, Protection access)

Definition
Line 801 of cmsxm/Memory.cm


ReadUInt Member Function

public nothrow uint ReadUInt(ulong virtualAddress, Protection access, bool pageFault)

Definition
Line 805 of cmsxm/Memory.cm


ReadULong Member Function

public nothrow ulong ReadULong(ulong virtualAddress, Protection access)

Definition
Line 829 of cmsxm/Memory.cm


ReadULong Member Function

public nothrow ulong ReadULong(ulong virtualAddress, Protection access, bool pageFault)

Definition
Line 833 of cmsxm/Memory.cm


ReadUShort Member Function

public nothrow ushort ReadUShort(ulong virtualAddress, Protection access)

Definition
Line 773 of cmsxm/Memory.cm


ReadUShort Member Function

public nothrow ushort ReadUShort(ulong virtualAddress, Protection access, bool pageFault)

Definition
Line 777 of cmsxm/Memory.cm


SetAddressToTranslationCache Member Function

public inline nothrow void SetAddressToTranslationCache(ushort addressSpaceNumber, ulong pageAddress, int entryIndex, ulong sourcePageNumber)

Definition
Line 656 of cmsxm/Memory.cm


SharePage Member Function

public void SharePage(ulong pageAddress)

Definition
Line 431 of cmsxm/Memory.cm


TranslateAddress Member Function

public nothrow ulong TranslateAddress(ulong virtualAddress, Protection access, bool pageFault)

Definition
Line 661 of cmsxm/Memory.cm


WriteByte Member Function

public nothrow void WriteByte(ulong virtualAddress, byte b, Protection access)

Definition
Line 761 of cmsxm/Memory.cm


WriteByte Member Function

public nothrow void WriteByte(ulong virtualAddress, byte b, Protection access, bool pageFault)

Definition
Line 765 of cmsxm/Memory.cm


WriteUInt Member Function

public nothrow void WriteUInt(ulong virtualAddress, uint u, Protection access)

Definition
Line 817 of cmsxm/Memory.cm


WriteUInt Member Function

public nothrow void WriteUInt(ulong virtualAddress, uint u, Protection access, bool pageFault)

Definition
Line 821 of cmsxm/Memory.cm


WriteULong Member Function

public nothrow void WriteULong(ulong virtualAddress, ulong u, Protection access)

Definition
Line 845 of cmsxm/Memory.cm


WriteULong Member Function

public nothrow void WriteULong(ulong virtualAddress, ulong u, Protection access, bool pageFault)

Definition
Line 849 of cmsxm/Memory.cm


WriteUShort Member Function

public nothrow void WriteUShort(ulong virtualAddress, ushort u, Protection access)

Definition
Line 789 of cmsxm/Memory.cm


WriteUShort Member Function

public nothrow void WriteUShort(ulong virtualAddress, ushort u, Protection access, bool pageFault)

Definition
Line 793 of cmsxm/Memory.cm