|
|
|
|
|
Description |
Virtual Memory (section 3.2 in the paper)
The virtual memory facilities in the H monad support writing and
reading of page maps, which define the translation of virtual
addresses to physical addresses, with associated access permissions and history.
|
|
Synopsis |
|
|
|
Documentation |
|
type VAddr = Word32 |
VAddr is a concrete type representing virtual addresses. |
|
minVAddr :: VAddr |
|
maxVAddr :: VAddr |
|
data PageMap |
|
|
allocPageMap :: H (Maybe PageMap) |
New page maps, represented by the abstract type PageMap, are
obtained using llocPageMap. The number of available page maps may be limited;
allocPageMap returns returns Nothing if no more maps are available. |
|
freePageMap :: PageMap -> H () |
|
data PageInfo |
Page map entries are indexed by valid, aligned, virtual addresses. The
entry for an unmapped page contains {tt Nothing}; the entry for a
mapped page contains a value, Just p, where p is
of type PageInfo.
| Constructors | PageInfo | | physPage :: PhysPage | | writeable :: Bool | indicates whether the user process has write access to the page | dirty :: Bool | indicates that the page has been written | accessed :: Bool | indicates that it has been read or written |
|
| Instances | |
|
|
setPage :: PageMap -> VAddr -> Maybe PageInfo -> H Bool |
|
getPage :: PageMap -> VAddr -> H (Maybe PageInfo) |
|
fromPageMap :: PageMap -> PDir |
|
Produced by Haddock version 0.6 |