fn add_e820_entry(
    params: &mut boot_params,
    addr: u64,
    size: u64,
    mem_type: u32,
) -> super::Result<()> {
    if params.e820_entries >= params.e820_table.len() as u8 {
        return Err(Error::E820Configuration);
    }

    params.e820_table[params.e820_entries as usize].addr = addr;
    params.e820_table[params.e820_entries as usize].size = size;
    params.e820_table[params.e820_entries as usize].type_ = mem_type;
    params.e820_entries += 1;

    Ok(())
}
/// Add an e820 region to the e820 map.
/// Returns Ok(()) if successful, or an error if there is no space left in the map.
Add an e820 region to the e820 map.
Returns Ok(()) if successful, or an error if there is no space left in the map.
Add an e820 region to the e820 map . Returns Ok (( )) if successful or an error if there is no space left in the map .
fn add_e820_entry(
    params: &mut boot_params,
    addr: u64,
    size: u64,
    mem_type: u32,
) -> super::Result<()> {
    if params.e820_entries >= params.e820_table.len() as u8 {
        return Err(Error::E820Configuration);
    }
    params.e820_table[params.e820_entries as usize].addr = addr;
    params.e820_table[params.e820_entries as usize].size = size;
    params.e820_table[params.e820_entries as usize].type_ = mem_type;
    params.e820_entries += 1;
    Ok(())
}
fn add_e820_entry ( params : & mut boot_params , addr : u64 , size : u64 , mem_type : u32 , ) -> super :: Result < ( ) > { if params . e820_entries >= params . e820_table . len ( ) as u8 { return Err ( Error :: E820Configuration ) ; } params . e820_table [ params . e820_entries as usize ] . addr = addr ; params . e820_table [ params . e820_entries as usize ] . size = size ; params . e820_table [ params . e820_entries as usize ] . type_ = mem_type ; params . e820_entries += 1 ; Ok ( ( ) ) }
Add an e820 region to the e820 map.
Add an e820 region to the e820 map .
params
&mut boot_params
addr
u64
size
u64
mem_type
u32
params
&mut boot_params
addr
u64
size
u64
mem_type
u32