File tree Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Expand file tree Collapse file tree 1 file changed +0
-24
lines changed Original file line number Diff line number Diff line change @@ -136,30 +136,6 @@ fn main_inner(image: Handle, mut st: SystemTable<Boot>) -> Status {
136
136
}
137
137
) ;
138
138
139
- let _mmap_storage = {
140
- let mut memory_map_size = st. boot_services ( ) . memory_map_size ( ) ;
141
- loop {
142
- let ptr = st
143
- . boot_services ( )
144
- . allocate_pool ( MemoryType :: LOADER_DATA , memory_map_size. map_size )
145
- . expect ( "Failed to allocate memory for mmap storage" ) ;
146
-
147
- let storage = unsafe { slice:: from_raw_parts_mut ( ptr, memory_map_size. map_size ) } ;
148
-
149
- if st. boot_services ( ) . memory_map ( storage) . is_ok ( ) {
150
- break storage;
151
- }
152
-
153
- // By measuring the size here, we can find out exactly how much we need.
154
- // We may hit this code twice, if the map allocation ends up spanning more pages.
155
- memory_map_size = st. boot_services ( ) . memory_map_size ( ) ;
156
- // allocated memory region was not big enough -> free it again
157
- st. boot_services ( )
158
- . free_pool ( ptr)
159
- . expect ( "Failed to free temporary memory for memory map!" ) ;
160
- }
161
- } ;
162
-
163
139
log:: trace!( "exiting boot services" ) ;
164
140
let ( system_table, memory_map) = st. exit_boot_services ( ) ;
165
141
You can’t perform that action at this time.
0 commit comments