Lines Matching refs:base
96 * - base address must be aligned to the block size. So the maximum block size
97 * is identified by the lowest bit set to 1 in the base address (for instance
98 * if base is 0x16000000, max size is 0x02000000).
102 unsigned int bat_block_size(unsigned long base, unsigned long top)
105 unsigned int base_shift = (ffs(base) - 1) & 31;
106 unsigned int block_shift = (fls(top - base) - 1) & 31;
142 static unsigned long __init __mmu_mapin_ram(unsigned long base, unsigned long top)
146 while ((idx = find_free_bat()) != -1 && base != top) {
147 unsigned int size = bat_block_size(base, top);
151 setbat(idx, PAGE_OFFSET + base, base, size, PAGE_KERNEL_X);
152 base += size;
155 return base;
158 unsigned long __init mmu_mapin_ram(unsigned long base, unsigned long top)
169 if (base >= border)
170 return base;
175 if (!strict_kernel_rwx_enabled() || base >= border || top <= border)
176 return __mmu_mapin_ram(base, top);
178 done = __mmu_mapin_ram(base, border);
200 unsigned long base = (unsigned long)_stext - PAGE_OFFSET;
205 for (i = 0; i < nb - 1 && base < top;) {
206 size = bat_block_size(base, top);
207 setibat(i++, PAGE_OFFSET + base, base, size, PAGE_KERNEL_TEXT);
208 base += size;
210 if (base < top) {
211 size = bat_block_size(base, top);
212 if ((top - base) > size) {
214 if (strict_kernel_rwx_enabled() && base + size > border)
218 setibat(i++, PAGE_OFFSET + base, base, size, PAGE_KERNEL_TEXT);
219 base += size;