pub fn new(boot_info: &'a BootInformation) -> Self {
        let lowest_module = boot_info
            .module_tags()
            .min_by_key(|module| module.start_address());
        let highest_module = boot_info
            .module_tags()
            .max_by_key(|module| module.end_address());

        let range = match (lowest_module, highest_module) {
            (Some(lowest), Some(highest)) => Some(Range {
                start: VirtAddr::new(lowest.start_address() as usize),
                len: (highest.end_address() - lowest.start_address()) as usize,
            }),
            (_, _) => None,
        };

        Self {
            module_iter: boot_info.module_tags(),
            range,
        }
    }
/// Creates a new module provider for this arch.
Creates a new module provider for this arch.
Creates a new module provider for this arch .
pub fn new(boot_info: &'a BootInformation) -> Self {
        let lowest_module = boot_info
            .module_tags()
            .min_by_key(|module| module.start_address());
        let highest_module = boot_info
            .module_tags()
            .max_by_key(|module| module.end_address());
        let range = match (lowest_module, highest_module) {
            (Some(lowest), Some(highest)) => Some(Range {
                start: VirtAddr::new(lowest.start_address() as usize),
                len: (highest.end_address() - lowest.start_address()) as usize,
            }),
            (_, _) => None,
        };
        Self {
            module_iter: boot_info.module_tags(),
            range,
        }
    }
pub fn new ( boot_info : & ' a BootInformation ) -> Self { let lowest_module = boot_info . module_tags ( ) . min_by_key ( | module | module . start_address ( ) ) ; let highest_module = boot_info . module_tags ( ) . max_by_key ( | module | module . end_address ( ) ) ; let range = match ( lowest_module , highest_module ) { ( Some ( lowest ) , Some ( highest ) ) => Some ( Range { start : VirtAddr :: new ( lowest . start_address ( ) as usize ) , len : ( highest . end_address ( ) - lowest . start_address ( ) ) as usize , } ) , ( _ , _ ) => None , } ; Self { module_iter : boot_info . module_tags ( ) , range , } }
Creates a new module provider for this arch.
Creates a new module provider for this arch .
boot_info
&'a BootInformation
boot_info
&'a BootInformation