Port-powerpc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: when and how to enable caches
Tim Rightnour wrote:
> What kind of CPU is that exactly? some of the CPU's have a very specific
> set of operations you have to perform in a very specific order to turn
> caches on and off. Its usually documented in one of the CPU manuals.
Update:
I was successful to enable the caches with this sequence, taken from
mvmeppc's locore:
mfspr 8,SPR_HID0
andi. 0,8,HID0_DCE
ori 8,8,HID0_ICE|HID0_DCE
ori 9,8,HID0_ICFI
bne 1f
ori 9,9,HID0_DCFI /* only when dcache was disabled */
1: sync
mtspr SPR_HID0,9
sync
mtspr SPR_HID0,8
sync
isync
But now the system dies somewhere in pmap_bootstrap(), which it survived
without caches. I had redirected the msgbuf to a safe place, so I can analyze
it after a crash. What I see there, with PMAPDEBUG=BOOT, is *very* strange:
[...]
fff605e0: 20622d61 7661696c 5b305d20 73746172 b-avail[0] star
fff605f0: 74203078 38323264 30303020 73697a65 t 0x822d000 size
fff60600: 20307864 33303030 0a706d61 705f626f 0xd3000.pmap_bo
fff60610: 6f745f66 696e645f 6d656d6f 72793a20 ot_find_memory:
fff60620: 612d6176 61696c5b 305d2073 74617274 a-avail[0] start
fff60630: 20307838 32346430 30302073 697a6520 0x824d000 size
fff60640: 30786233 3030300a 706d6170 5f626f6f 0xb3000.pmap_boo
fff60650: 745f6669 6e645f6d 656d6f72 793a2073 t_find_memory: s
fff60660: 00000000 00000000 00000000 00000000 ................
fff60670: 00000000 00000000 00000000 00000000 ................
fff60680: 745f656e 643d313a 20307864 66373030 t_end=1: 0xdf700
fff60690: 30300a70 6d61705f 626f6f74 5f66696e 00.pmap_boot_fin
fff606a0: 00000000 00000000 00000000 00000000 ................
fff606b0: 00000000 00000000 00000000 00000000 ................
fff606c0: 30303030 2073697a 65203078 35623830 0000 size 0x5b80
fff606d0: 3030300a 706d6170 5f626f6f 745f6669 000.pmap_boot_fi
fff606e0: 00000000 00000000 00000000 00000000 ................
fff606f0: 00000000 00000000 00000000 00000000 ................
fff60700: 30303030 30207369 7a652030 78356237 00000 size 0x5b7
fff60710: 30303030 0a706d61 705f626f 6f747374 0000.pmap_bootst
fff60720: 00000000 00000000 00000000 00000000 ................
fff60730: 00000000 00000000 00000000 00000000 ................
fff60740: 66373030 30302f30 78356237 30303030 f70000/0x5b70000
fff60750: 0a706d61 705f626f 6f747374 7261703a .pmap_bootstrap:
fff60760: 00000000 00000000 00000000 00000000 ................
fff60770: 00000000 00000000 00000000 00000000 ................
fff60780: 30302f30 78623330 30300a70 6d61705f 00/0xb3000.pmap_
fff60790: 626f6f74 73747261 703a2055 564d206d bootstrap: UVM m
fff607a0: 00000000 00000000 00000000 00000000 ................
fff607b0: 00000000 00000000 00000000 00000000 ................
fff607c0: 00000000 00000000 00000000 00000000 ................
[..rest is unused..]
Note the holes, which are filled with zeroes.
AFAIK the cache line size for the 604e is 32 bytes? So something seems to
invalidate the cache lines, before they are written back to the RAM?
With such effects it doesn't surprise that a crash follows sooner or later. :|
--
_ Frank Wille (frank%phoenix.owl.de@localhost)
_ // http://sun.hasenbraten.de/~frank/
\X/ Phx @ #AmigaGer
Home |
Main Index |
Thread Index |
Old Index