Re: [GXemul-devel] NetBSD/hpcmips install fails under GXemul 0.6.1
Status: Alpha
Brought to you by:
gavare
From: Anders G. <ga...@gm...> - 2019-06-01 12:18:20
|
Andreas: Can you try changing the if statement in this block in src/cpus/cpu_mips_coproc.cc in 0.6.1: ... /* * If we have a memblock (host page) for the physical page, * then add a translation for it immediately, to save some * time. (It would otherwise be added later on anyway, * because of a translation miss.) * * NOTE/TODO: This is only for 4KB pages so far. It would * be too expensive to add e.g. 16MB pages like * this. */ if (psize == 0x1000) { memblock = memory_paddr_to_hostaddr(cpu->mem, paddr0, 0); if (memblock != NULL && cp->reg[COP0_ENTRYLO0] & ENTRYLO_V) cpu->update_translation_table(cpu, vaddr0, memblock, wf0, paddr0); memblock = memory_paddr_to_hostaddr(cpu->mem, paddr1, 0); if (memblock != NULL && cp->reg[COP0_ENTRYLO1] & ENTRYLO_V) cpu->update_translation_table(cpu, vaddr1, memblock, wf1, paddr1); } to if (psize == 0x1000 && cpu->cd.mips.cpu_type.rev != MIPS_R4100) { and see if that works as a short-term hack? I tried it here, and it seemed to work. I have no idea why. I assumed that page size 1 KB would be problematic, not 4 KB. So perhaps this just hides the bug... Anders On Sat, Jun 1, 2019 at 11:03 AM Anders Gavare <ga...@gm...> wrote: > > Hi, > > GXemul 0.6.1 is having trouble installing NetBSD/hpcmips. > > More details here: > > http://gnats.netbsd.org/54252 > > Hi Andreas, > > I think I may have found the revision where this broke. > > ------------------------------------------------------------------------ > r5906 | debug | 2018-06-13 15:13:23 +0200 (Wed, 13 Jun 2018) | 1 line > > Fixing an old TODO for invalidating translation caches when using non-4KB > pages for MIPS. This makes HelenOS 0.7.1/malta boot further than before. > ------------------------------------------------------------------------ > > At least on my machine, installing NetBSD 8.0 and booting after install to > a working login as root worked fine up to revision 5905, but not with 5906 > and forward. > > (Except for the usual problem of /dev/ttyE0 not being enabled by default, > so login via serial console doesn't work "out of the box".) > > I will investigate that fix, and see if it can be done some other way. > > A wild guess as to the cause of the bug: The VR4121 has 1 KB pages which I > guess are buggy in GXemul. I don't know how much of that NetBSD uses in > practice, perhaps it mostly uses 4 KB pages. > > Also, this is a good opportunity to clean up the GXemul documentation and > create up-to-date regression testing scripts for hpcmips; many of the modes > (MobilePro 770, 800, and 880) seem to have bit-rotted over time when > booting NetBSD with -X. Most likely due to incompleteness of emulation. > These modes only seem to work with serial console these days. Luckily, > MobilePro 780 emulation still works with both serial and graphical console. > :-) > > > Anders > > |