1
+ #[ cfg( feature = "experimental" ) ]
2
+ use crate :: structures:: paging:: PageTableIndex ;
1
3
use crate :: structures:: paging:: {
2
4
frame:: PhysFrame ,
3
5
frame_alloc:: { FrameAllocator , FrameDeallocator } ,
4
6
mapper:: * ,
5
7
page:: { AddressNotAligned , Page , PageRangeInclusive , Size1GiB , Size2MiB , Size4KiB } ,
6
8
page_table:: { FrameError , PageTable , PageTableEntry , PageTableFlags , PageTableLevel } ,
7
- PageTableIndex ,
8
9
} ;
9
10
10
11
/// A Mapper implementation that relies on a PhysAddr to VirtAddr conversion function.
@@ -142,6 +143,7 @@ impl<'a, P: PageTableFrameMapping> MappedPageTable<'a, P> {
142
143
Ok ( MapperFlush :: new ( page) )
143
144
}
144
145
146
+ #[ cfg( feature = "experimental" ) ]
145
147
#[ inline]
146
148
fn next_table_fn_create_next_table < ' b , A > (
147
149
( flags, allocator) : & mut ( PageTableFlags , & mut A ) ,
@@ -156,6 +158,7 @@ impl<'a, P: PageTableFrameMapping> MappedPageTable<'a, P> {
156
158
. map_err ( Into :: into)
157
159
}
158
160
161
+ #[ cfg( feature = "experimental" ) ]
159
162
#[ inline]
160
163
fn next_table_fn_next_table_mut < ' b , T > (
161
164
_: & mut T ,
@@ -165,6 +168,7 @@ impl<'a, P: PageTableFrameMapping> MappedPageTable<'a, P> {
165
168
walker. next_table_mut ( entry)
166
169
}
167
170
171
+ #[ cfg( feature = "experimental" ) ]
168
172
fn modify_range_1gib < ModifyFn , ModifyInfo , Err , NextTableFn , NextTableFnErr > (
169
173
& mut self ,
170
174
pages : PageRange < Size1GiB > ,
@@ -230,6 +234,7 @@ impl<'a, P: PageTableFrameMapping> MappedPageTable<'a, P> {
230
234
} )
231
235
}
232
236
237
+ #[ cfg( feature = "experimental" ) ]
233
238
#[ inline]
234
239
fn map_to_range_1gib < F , A > (
235
240
& mut self ,
@@ -258,6 +263,7 @@ impl<'a, P: PageTableFrameMapping> MappedPageTable<'a, P> {
258
263
)
259
264
}
260
265
266
+ #[ cfg( feature = "experimental" ) ]
261
267
fn modify_range_2mib < ModifyFn , ModifyInfo , Err , NextTableFn , NextTableFnErr > (
262
268
& mut self ,
263
269
pages : PageRange < Size2MiB > ,
@@ -360,6 +366,7 @@ impl<'a, P: PageTableFrameMapping> MappedPageTable<'a, P> {
360
366
} )
361
367
}
362
368
369
+ #[ cfg( feature = "experimental" ) ]
363
370
#[ inline]
364
371
fn map_to_range_2mib < F , A > (
365
372
& mut self ,
@@ -388,6 +395,7 @@ impl<'a, P: PageTableFrameMapping> MappedPageTable<'a, P> {
388
395
)
389
396
}
390
397
398
+ #[ cfg( feature = "experimental" ) ]
391
399
fn modify_range_4kib < ModifyFn , ModifyInfo , Err , NextTableFn , NextTableFnErr > (
392
400
& mut self ,
393
401
pages : PageRange < Size4KiB > ,
@@ -526,6 +534,7 @@ impl<'a, P: PageTableFrameMapping> MappedPageTable<'a, P> {
526
534
} )
527
535
}
528
536
537
+ #[ cfg( feature = "experimental" ) ]
529
538
#[ inline]
530
539
fn map_to_range_4kib < F , A > (
531
540
& mut self ,
@@ -571,6 +580,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size1GiB> for MappedPageTable<'a, P> {
571
580
self . map_to_1gib ( page, frame, flags, parent_table_flags, allocator)
572
581
}
573
582
583
+ #[ cfg( feature = "experimental" ) ]
574
584
#[ inline]
575
585
unsafe fn map_to_range_with_table_flags < A > (
576
586
& mut self ,
@@ -597,6 +607,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size1GiB> for MappedPageTable<'a, P> {
597
607
)
598
608
}
599
609
610
+ #[ cfg( feature = "experimental" ) ]
600
611
#[ inline]
601
612
unsafe fn map_range_with_table_flags < A > (
602
613
& mut self ,
@@ -644,6 +655,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size1GiB> for MappedPageTable<'a, P> {
644
655
Ok ( ( frame, MapperFlush :: new ( page) ) )
645
656
}
646
657
658
+ #[ cfg( feature = "experimental" ) ]
647
659
#[ inline]
648
660
unsafe fn unmap_range < D > (
649
661
& mut self ,
@@ -689,6 +701,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size1GiB> for MappedPageTable<'a, P> {
689
701
Ok ( MapperFlush :: new ( page) )
690
702
}
691
703
704
+ #[ cfg( feature = "experimental" ) ]
692
705
#[ inline]
693
706
unsafe fn update_flags_range (
694
707
& mut self ,
@@ -774,6 +787,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size2MiB> for MappedPageTable<'a, P> {
774
787
self . map_to_2mib ( page, frame, flags, parent_table_flags, allocator)
775
788
}
776
789
790
+ #[ cfg( feature = "experimental" ) ]
777
791
#[ inline]
778
792
unsafe fn map_to_range_with_table_flags < A > (
779
793
& mut self ,
@@ -800,6 +814,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size2MiB> for MappedPageTable<'a, P> {
800
814
)
801
815
}
802
816
817
+ #[ cfg( feature = "experimental" ) ]
803
818
#[ inline]
804
819
unsafe fn map_range_with_table_flags < A > (
805
820
& mut self ,
@@ -850,6 +865,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size2MiB> for MappedPageTable<'a, P> {
850
865
Ok ( ( frame, MapperFlush :: new ( page) ) )
851
866
}
852
867
868
+ #[ cfg( feature = "experimental" ) ]
853
869
#[ inline]
854
870
unsafe fn unmap_range < D > (
855
871
& mut self ,
@@ -899,6 +915,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size2MiB> for MappedPageTable<'a, P> {
899
915
Ok ( MapperFlush :: new ( page) )
900
916
}
901
917
918
+ #[ cfg( feature = "experimental" ) ]
902
919
#[ inline]
903
920
unsafe fn update_flags_range (
904
921
& mut self ,
@@ -997,6 +1014,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size4KiB> for MappedPageTable<'a, P> {
997
1014
self . map_to_4kib ( page, frame, flags, parent_table_flags, allocator)
998
1015
}
999
1016
1017
+ #[ cfg( feature = "experimental" ) ]
1000
1018
#[ inline]
1001
1019
unsafe fn map_to_range_with_table_flags < A > (
1002
1020
& mut self ,
@@ -1023,6 +1041,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size4KiB> for MappedPageTable<'a, P> {
1023
1041
)
1024
1042
}
1025
1043
1044
+ #[ cfg( feature = "experimental" ) ]
1026
1045
#[ inline]
1027
1046
unsafe fn map_range_with_table_flags < A > (
1028
1047
& mut self ,
@@ -1069,6 +1088,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size4KiB> for MappedPageTable<'a, P> {
1069
1088
Ok ( ( frame, MapperFlush :: new ( page) ) )
1070
1089
}
1071
1090
1091
+ #[ cfg( feature = "experimental" ) ]
1072
1092
#[ inline]
1073
1093
unsafe fn unmap_range < D > (
1074
1094
& mut self ,
@@ -1123,6 +1143,7 @@ impl<'a, P: PageTableFrameMapping> Mapper<Size4KiB> for MappedPageTable<'a, P> {
1123
1143
Ok ( MapperFlush :: new ( page) )
1124
1144
}
1125
1145
1146
+ #[ cfg( feature = "experimental" ) ]
1126
1147
#[ inline]
1127
1148
unsafe fn update_flags_range (
1128
1149
& mut self ,
0 commit comments