Port-ofppc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: SmartFirmware /memory (was: Pegasos dmesg)
Tim Rightnour wrote:
>> The battable[] already contains a valid VA==PA entry for 0x10000000. This
>> is done automatically by oea_batinit(), which calls mem_regions() and
>> takes it from the "reg" property of "/memory".
>>
>> So it doesn't help. System crash on the first OF-call, when adding the
>> region to "available".
>
> What about getting it added to the available set, and then running the map
> command in OF to create a translation for it.
No difference.
Unless somebody (like Matt Sealey) states the opposite, I would guess that
most methods, like "map" and "unmap" in /cpus, are dummies. They do nothing.
I can play with any stupid arguments I like, but it has no effect.
Then I had a look into the SmartFirmware source at openbios.org. The map
function in cpu-ppc.c does nothing (same for unmap):
---8<---
C(f_mmu_map) /* map (phys.lo ... phys.hi virt size mode --) */
{
Int cells = get_address_cells(e->currpkg->parent);
Byte *virt;
Int size, mode;
Int lo, hi;
IFCKSP(e, cells + 3, 0);
POP(e, mode);
POP(e, size);
POPT(e, virt, Byte*);
/* hack to get only the hi and lo cells - machine-dependent */
POP(e, lo);
DROPN(e, cells - 2);
POP(e, hi);
/* perform machine-dependent mapping here */
return NO_ERROR;
}
---8<---
I don't think that bplan/Genesi changed that... :|
>>> That, or run through it with pmap_enter to
>>> add it all to the page table?
>>
>> Honestly I don't know where to do that. Would it make any difference?
>
> It might. You can try it real quick by fiddling with the if 0'd code at
> the bottom of pmap.c inside the PMAP_NEED_MAPKERN
Ok. I tried this:
---8<---
for (va = 0x10000000, pa = 0x10000000; va < 0x20000000;
pa += PAGE_SIZE, va += PAGE_SIZE) {
ptegidx = va_to_pteg(pm, va);
pmap_pte_create(&pt, pm, va, pa | PTE_M|PTE_BW);
pmap_pte_insert(ptegidx, &pt);
}
---8<---
But again, same crash.
--
_ Frank Wille (frank%phoenix.owl.de@localhost)
_ // http://sun.hasenbraten.de/~frank/
\X/ Phx @ #AmigaGer
Home |
Main Index |
Thread Index |
Old Index