/* Figure out memory size by finding aliases. * *WeshouldtheoreticallyusethemappingfromCFEusingcfe_enummem(). *HoweverastheBCM47XXismostlyusedonlow-memorysystems,we *wanttoreusethememoryusedbyCFE(around4MB).Thatmeanscfe_* *functionsstoptoworkatsomepointduringtheboot,weshouldonly *callthematthebeginningoftheboot. * *BCM47XXuses128MBforaddressingtheram,ifthesystemcontains *lessthanthatamountoframitremapstherammoreoftenintothe *availablespace.
*/
/* Physical address, without mapping to any kernel segment */
off = CPHYSADDR((unsignedlong)prom_init);
/* Accessing memory after 128 MiB will cause an exception */
max = 128 << 20;
for (mem = 1 << 20; mem < max; mem += 1 << 20) { /* Loop condition may be not enough, off may be over 1 MiB */ if (off + mem >= max) {
mem = max;
pr_debug("Assume 128MB RAM\n"); break;
} if (!memcmp((void *)prom_init, (void *)prom_init + mem, 32)) break;
}
lowmem = mem;
/* Ignoring the last page when ddr size is 128M. Cached *accessestolastpageiscausingtheprocessortoprefetch *usingaddressabove128Msteppingoutoftheddraddress *space.
*/ if (c->cputype == CPU_74K && (mem == (128 << 20)))
mem -= 0x1000;
memblock_add(0, mem);
}
/* Stripped version of tlb_init, with the call to build_tlb_refill_handler *dropped.Callingitatthisstagecausesahang.
*/ staticvoid early_tlb_init(void)
{
write_c0_pagemask(PM_DEFAULT_MASK);
write_c0_wired(0);
temp_tlb_entry = current_cpu_data.tlbsize - 1;
local_flush_tlb_all();
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.