File tree Expand file tree Collapse file tree 2 files changed +2
-21
lines changed Expand file tree Collapse file tree 2 files changed +2
-21
lines changed Original file line number Diff line number Diff line change @@ -10,31 +10,12 @@ mod memory_map;
10
10
#[ repr( C ) ]
11
11
pub struct BootInfo {
12
12
pub memory_map : MemoryMap ,
13
- pub package : Package ,
14
- }
15
-
16
- #[ derive( Debug ) ]
17
- #[ repr( C ) ]
18
- pub struct Package {
19
- ptr : * const u8 ,
20
- len : u64 ,
21
- }
22
-
23
- impl Deref for Package {
24
- type Target = [ u8 ] ;
25
- fn deref ( & self ) -> & [ u8 ] {
26
- unsafe { slice:: from_raw_parts ( self . ptr , self . len as usize ) }
27
- }
28
13
}
29
14
30
15
impl BootInfo {
31
- pub fn new ( memory_map : MemoryMap , package : & ' static [ u8 ] ) -> Self {
16
+ pub fn new ( memory_map : MemoryMap ) -> Self {
32
17
BootInfo {
33
18
memory_map,
34
- package : Package {
35
- ptr : package. as_ptr ( ) ,
36
- len : package. len ( ) as u64 ,
37
- } ,
38
19
}
39
20
}
40
21
}
Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ fn load_elf(
223
223
} ;
224
224
225
225
// Construct boot info structure.
226
- let mut boot_info = BootInfo :: new ( memory_map, & [ ] ) ;
226
+ let mut boot_info = BootInfo :: new ( memory_map) ;
227
227
boot_info. memory_map . sort ( ) ;
228
228
229
229
// Write boot info to boot info page.
You can’t perform that action at this time.
0 commit comments