MapError
now implementscore::error::Error
.
- Updated to
zerocopy
0.8.2.
- Added
mair
module with types to build MAIR values. - Implemented
Default
forAttributes
,Descriptor
,PageTable
,PhysicalAddress
andVirtualAddress
. Added associatedEMPTY
constant forDescriptor
andPageTable
.
- Added
Mapping::translation
method. - Added
Mapping::size
,IdMap::size
andLinearMap::size
methods. - Derived zerocopy traits for
VirtualAddress
,PhysicalAddress
,PageTable
andDescriptor
. This is guarded behind thezerocopy
feature so the dependency can be avoided if not desired. - Added
TargetAllocator
for pregenerating a static pagetable for a target device.
Translation::allocate_table
andTranslation::deallocate_table
now takes&mut self
rather than `&self.
- The
Translation
type parameter toMapping
no longer needs to beClone
. IdMap
,LinearMap
,Mapping
andRootTable
are nowSync
.
- Added support for EL2 and EL3 page tables. This requires a new parameter to
IdMap::new
,LinearMap::new
,Mapping::new
andRootTable::new
. Attributes::EXECUTE_NEVER
renamed toAttributes::UXN
.Attributes::DEVICE_NGNRE
andNORMAL
have been removed in favour ofATTRIBUTE_INDEX_*
,OUTER_SHAREABLE
andINNER_SHAREABLE
, to avoid making assumptions about how the MAIR registers are programmed.
- Added
root_address
,mark_active
andmark_inactive
methods toIdMap
,LinearMap
andMapping
. These may be used to activate and deactivate the page table manually rather than callingactivate
anddeactivate
. - Added
NS
andPXN
bits toAttributes
.
- When an invalid descriptor is split into a table, the table descriptors aren't set unless to non-zero values unless the original descriptor was.
Attributes::ACCESSED
is no longer automatically set on all new mappings. To maintain existing behaviour you should explicitly setAttributes::ACCESSED
whenever callingmap_range
for a valid mapping.
- Reject the
PAGE_OR_TABLE
flag when passed tomap_range
, which would result in corrupt table mappings to be created.
- Updated
modify_range
to split block entries before traversing them, and pass only the descriptors and subregions that are completely covered by the given region to the updater callback function. - Updated
modify_range
to only pass block or page descriptors to the callback function and prevent them from being converted into table descriptors inadvertently. - Added rigid break-before-make (BBM) checks to
map_range
andmodify_range
. - Marked
activate
anddeactivate
methods as unsafe.
- Added new
map_range()
alternativemap_range_with_constraints()
with extracontraints
argument. - Added
walk_range
method that iterates over all block or page descriptorsthat intersect with a given region, without permitting the callback to make changes to the descriptors
RootTable
,Mapping
,IdMap
andLinearMap
are now correctly marked asSend
, as it doesn't matter where they are used from.
- Updated
bitflags
to 2.0.2, which changes the API ofAttributes
a bit. - Updated
map_range
method to support mapping leaf page table entries without theVALID
flag.Attributes::VALID
is no longer implicitly set when mapping leaf page table entries.
- Added
modify_range
method toIdMap
,LinearMap
andMapping
to update details of a mapped range. This can be used e.g. to change flags for some range which is already mapped. As part of this, theDescriptor
struct was added to the public API. - Added
DBM
and software flags toAttributes
.
- Made
Translation
trait responsible for allocating page tables. This should help make it possible to use more complex mapping schemes, and to construct page tables in a different context to where they are used. - Renamed
AddressRangeError
toMapError
, which is now an enum with three variants and implementsDisplay
. From<*const T>
andFrom<*mut T>
are no longer implemented forVirtualAddress
.- Added support for using TTBR1 as well as TTBR0; this changes various constructors to take an extra parameter.
- Made
alloc
dependency optional via a feature flag. - Added support for linear mappings with new
LinearMap
. - Implemented subtraction of usize from address types.
- Fixed memory leak introduced in 0.2.0: dropping a page table will now actually free its memory.
- Implemented
Debug
andDisplay
forMemoryRegion
. - Implemented
From<Range<VirtualAddress>>
forMemoryRegion
. - Implemented arithmetic operations for
PhysicalAddress
andVirtualAddress
.
- Added bounds check to
IdMap::map_range
; it will now return an error if you attempt to map a virtual address outside the range of the page table given its configured root level.
- Implemented
Debug
forPhysicalAddress
andVirtualAddress
. - Validate that chosen root level is supported.
- Fixed bug in
Display
andDrop
implementation forRootTable
that would result in a crash for any pagetable with non-zero mappings. - Fixed
Display
implementation forPhysicalAddress
andVirtualAddress
to use correct number of digits.
Initial release.