Lines Matching refs:base
93 * - base address must be aligned to the block size. So the maximum block size
94 * is identified by the lowest bit set to 1 in the base address (for instance
95 * if base is 0x16000000, max size is 0x02000000).
99 unsigned int bat_block_size(unsigned long base, unsigned long top)
102 unsigned int base_shift = (ffs(base) - 1) & 31;
103 unsigned int block_shift = (fls(top - base) - 1) & 31;
139 static unsigned long __init __mmu_mapin_ram(unsigned long base, unsigned long top)
143 while ((idx = find_free_bat()) != -1 && base != top) {
144 unsigned int size = bat_block_size(base, top);
148 setbat(idx, PAGE_OFFSET + base, base, size, PAGE_KERNEL_X);
149 base += size;
152 return base;
155 unsigned long __init mmu_mapin_ram(unsigned long base, unsigned long top)
162 return base;
165 if (base >= border)
166 return base;
171 if (!strict_kernel_rwx_enabled() || base >= border || top <= border)
172 return __mmu_mapin_ram(base, top);
174 done = __mmu_mapin_ram(base, border);
203 unsigned long base = (unsigned long)_stext - PAGE_OFFSET;
208 for (i = 0; i < nb - 1 && base < top;) {
209 size = bat_block_size(base, top);
210 setibat(i++, PAGE_OFFSET + base, base, size, PAGE_KERNEL_TEXT);
211 base += size;
213 if (base < top) {
214 size = bat_block_size(base, top);
215 if ((top - base) > size) {
217 if (strict_kernel_rwx_enabled() && base + size > border)
221 setibat(i++, PAGE_OFFSET + base, base, size, PAGE_KERNEL_TEXT);
222 base += size;