Lines Matching refs:base
162 let (base, base_index) = read_cell(reg.value, base_index, addr_cells); in early_init_scan_memory()
169 kdebug!("Found memory: base={:#x}, size={:#x}", base, size); in early_init_scan_memory()
170 self.early_init_dt_add_memory(base, size); in early_init_scan_memory()
184 pub fn early_init_dt_add_memory(&self, base: u64, size: u64) { in early_init_dt_add_memory()
194 let mut base = base as usize; in early_init_dt_add_memory() localVariable
197 if size < (MMArch::PAGE_SIZE - (base & (!MMArch::PAGE_MASK))) { in early_init_dt_add_memory()
198 kwarn!("Ignoring memory block {:#x}-{:#x}", base, base + size); in early_init_dt_add_memory()
201 if PhysAddr::new(base).check_aligned(MMArch::PAGE_SIZE) == false { in early_init_dt_add_memory()
202 size -= MMArch::PAGE_SIZE - (base & (!MMArch::PAGE_MASK)); in early_init_dt_add_memory()
203 base = page_align_down(base); in early_init_dt_add_memory()
208 if base > MemBlockManager::MAX_MEMBLOCK_ADDR.data() { in early_init_dt_add_memory()
209 kwarn!("Ignoring memory block {:#x}-{:#x}", base, base + size); in early_init_dt_add_memory()
212 if base + size - 1 > MemBlockManager::MAX_MEMBLOCK_ADDR.data() { in early_init_dt_add_memory()
216 base + size in early_init_dt_add_memory()
218 size = MemBlockManager::MAX_MEMBLOCK_ADDR.data() - base + 1; in early_init_dt_add_memory()
221 if base + size < MemBlockManager::MIN_MEMBLOCK_ADDR.data() { in early_init_dt_add_memory()
222 kwarn!("Ignoring memory range {:#x}-{:#x}", base, base + size); in early_init_dt_add_memory()
226 if base < MemBlockManager::MIN_MEMBLOCK_ADDR.data() { in early_init_dt_add_memory()
230 base, in early_init_dt_add_memory()
233 size -= MemBlockManager::MIN_MEMBLOCK_ADDR.data() - base; in early_init_dt_add_memory()
234 base = MemBlockManager::MIN_MEMBLOCK_ADDR.data(); in early_init_dt_add_memory()
239 .add_block(PhysAddr::new(base), size) in early_init_dt_add_memory()
243 base, in early_init_dt_add_memory()
244 base + size, in early_init_dt_add_memory()
338 base: PhysAddr, in early_init_dt_reserve_memory()
343 if mem_block_manager().is_overlapped(base, size) in early_init_dt_reserve_memory()
344 && mem_block_manager().is_overlapped_with_reserved(base, size) in early_init_dt_reserve_memory()
351 return mem_block_manager().mark_nomap(base, size); in early_init_dt_reserve_memory()
354 return mem_block_manager().reserve_block(base, size); in early_init_dt_reserve_memory()
385 let (base, bi) = read_cell(reg.value, base_index, addr_cells); in reserved_mem_reserve_reg()
392 .early_init_dt_reserve_memory(PhysAddr::new(base as usize), size as usize, nomap) in reserved_mem_reserve_reg()
397 base, in reserved_mem_reserve_reg()
404 base, in reserved_mem_reserve_reg()