1+ #[ cfg( feature = "experimental" ) ]
2+ use crate :: structures:: paging:: PageTableIndex ;
13use crate :: structures:: paging:: {
24 frame:: PhysFrame ,
35 frame_alloc:: FrameAllocator ,
46 mapper:: * ,
57 page:: { AddressNotAligned , Page , Size1GiB , Size2MiB , Size4KiB } ,
68 page_table:: { FrameError , PageTable , PageTableEntry , PageTableFlags } ,
7- PageTableIndex ,
89} ;
910
1011/// A Mapper implementation that relies on a PhysAddr to VirtAddr conversion function.
@@ -142,6 +143,7 @@ impl<'a, P: PageTableFrameMapping> MappedPageTable<'a, P> {
142143 Ok ( MapperFlush :: new ( page) )
143144 }
144145
146+ #[ cfg( feature = "experimental" ) ]
145147 #[ inline]
146148 fn next_table_fn_create_next_table < ' b , A > (
147149 ( flags, allocator) : & mut ( PageTableFlags , & mut A ) ,
@@ -156,6 +158,7 @@ impl<'a, P: PageTableFrameMapping> MappedPageTable<'a, P> {
156158 . map_err ( Into :: into)
157159 }
158160
161+ #[ cfg( feature = "experimental" ) ]
159162 #[ inline]
160163 fn next_table_fn_next_table_mut < ' b , T > (
161164 _: & mut T ,
@@ -165,6 +168,7 @@ impl<'a, P: PageTableFrameMapping> MappedPageTable<'a, P> {
165168 walker. next_table_mut ( entry)
166169 }
167170
171+ #[ cfg( feature = "experimental" ) ]
168172 fn modify_range_1gib < ModifyFn , ModifyInfo , Err , NextTableFn , NextTableFnErr > (
169173 & mut self ,
170174 pages : PageRange < Size1GiB > ,
@@ -230,6 +234,7 @@ impl<'a, P: PageTableFrameMapping> MappedPageTable<'a, P> {
230234 } )
231235 }
232236
237+ #[ cfg( feature = "experimental" ) ]
233238 #[ inline]
234239 fn map_to_range_1gib < F , A > (
235240 & mut self ,
@@ -258,6 +263,7 @@ impl<'a, P: PageTableFrameMapping> MappedPageTable<'a, P> {
258263 )
259264 }
260265
266+ #[ cfg( feature = "experimental" ) ]
261267 fn modify_range_2mib < ModifyFn , ModifyInfo , Err , NextTableFn , NextTableFnErr > (
262268 & mut self ,
263269 pages : PageRange < Size2MiB > ,
@@ -360,6 +366,7 @@ impl<'a, P: PageTableFrameMapping> MappedPageTable<'a, P> {
360366 } )
361367 }
362368
369+ #[ cfg( feature = "experimental" ) ]
363370 #[ inline]
364371 fn map_to_range_2mib < F , A > (
365372 & mut self ,
@@ -388,6 +395,7 @@ impl<'a, P: PageTableFrameMapping> MappedPageTable<'a, P> {
388395 )
389396 }
390397
398+ #[ cfg( feature = "experimental" ) ]
391399 fn modify_range_4kib < ModifyFn , ModifyInfo , Err , NextTableFn , NextTableFnErr > (
392400 & mut self ,
393401 pages : PageRange < Size4KiB > ,
@@ -526,6 +534,7 @@ impl<'a, P: PageTableFrameMapping> MappedPageTable<'a, P> {
526534 } )
527535 }
528536
537+ #[ cfg( feature = "experimental" ) ]
529538 #[ inline]
530539 fn map_to_range_4kib < F , A > (
531540 & mut self ,
@@ -571,6 +580,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size1GiB> for MappedPageTable<'a, P> {
571580 self . map_to_1gib ( page, frame, flags, parent_table_flags, allocator)
572581 }
573582
583+ #[ cfg( feature = "experimental" ) ]
574584 #[ inline]
575585 unsafe fn map_to_range_with_table_flags < A > (
576586 & mut self ,
@@ -597,6 +607,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size1GiB> for MappedPageTable<'a, P> {
597607 )
598608 }
599609
610+ #[ cfg( feature = "experimental" ) ]
600611 #[ inline]
601612 unsafe fn map_range_with_table_flags < A > (
602613 & mut self ,
@@ -644,6 +655,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size1GiB> for MappedPageTable<'a, P> {
644655 Ok ( ( frame, MapperFlush :: new ( page) ) )
645656 }
646657
658+ #[ cfg( feature = "experimental" ) ]
647659 #[ inline]
648660 unsafe fn unmap_range < D > (
649661 & mut self ,
@@ -689,6 +701,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size1GiB> for MappedPageTable<'a, P> {
689701 Ok ( MapperFlush :: new ( page) )
690702 }
691703
704+ #[ cfg( feature = "experimental" ) ]
692705 #[ inline]
693706 unsafe fn update_flags_range (
694707 & mut self ,
@@ -774,6 +787,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size2MiB> for MappedPageTable<'a, P> {
774787 self . map_to_2mib ( page, frame, flags, parent_table_flags, allocator)
775788 }
776789
790+ #[ cfg( feature = "experimental" ) ]
777791 #[ inline]
778792 unsafe fn map_to_range_with_table_flags < A > (
779793 & mut self ,
@@ -800,6 +814,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size2MiB> for MappedPageTable<'a, P> {
800814 )
801815 }
802816
817+ #[ cfg( feature = "experimental" ) ]
803818 #[ inline]
804819 unsafe fn map_range_with_table_flags < A > (
805820 & mut self ,
@@ -850,6 +865,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size2MiB> for MappedPageTable<'a, P> {
850865 Ok ( ( frame, MapperFlush :: new ( page) ) )
851866 }
852867
868+ #[ cfg( feature = "experimental" ) ]
853869 #[ inline]
854870 unsafe fn unmap_range < D > (
855871 & mut self ,
@@ -899,6 +915,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size2MiB> for MappedPageTable<'a, P> {
899915 Ok ( MapperFlush :: new ( page) )
900916 }
901917
918+ #[ cfg( feature = "experimental" ) ]
902919 #[ inline]
903920 unsafe fn update_flags_range (
904921 & mut self ,
@@ -997,6 +1014,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size4KiB> for MappedPageTable<'a, P> {
9971014 self . map_to_4kib ( page, frame, flags, parent_table_flags, allocator)
9981015 }
9991016
1017+ #[ cfg( feature = "experimental" ) ]
10001018 #[ inline]
10011019 unsafe fn map_to_range_with_table_flags < A > (
10021020 & mut self ,
@@ -1023,6 +1041,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size4KiB> for MappedPageTable<'a, P> {
10231041 )
10241042 }
10251043
1044+ #[ cfg( feature = "experimental" ) ]
10261045 #[ inline]
10271046 unsafe fn map_range_with_table_flags < A > (
10281047 & mut self ,
@@ -1069,6 +1088,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size4KiB> for MappedPageTable<'a, P> {
10691088 Ok ( ( frame, MapperFlush :: new ( page) ) )
10701089 }
10711090
1091+ #[ cfg( feature = "experimental" ) ]
10721092 #[ inline]
10731093 unsafe fn unmap_range < D > (
10741094 & mut self ,
@@ -1123,6 +1143,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size4KiB> for MappedPageTable<'a, P> {
11231143 Ok ( MapperFlush :: new ( page) )
11241144 }
11251145
1146+ #[ cfg( feature = "experimental" ) ]
11261147 #[ inline]
11271148 unsafe fn update_flags_range (
11281149 & mut self ,
0 commit comments