| 406 | } |
| 407 | |
| 408 | void __OSCacheInit() { |
| 409 | if (!(PPCMfhid0() & HID0_ICE)) { |
| 410 | ICEnable(); |
| 411 | DBPrintf("L1 i-caches initialized\n"); |
| 412 | } |
| 413 | if (!(PPCMfhid0() & HID0_DCE)) { |
| 414 | DCEnable(); |
| 415 | DBPrintf("L1 d-caches initialized\n"); |
| 416 | } |
| 417 | |
| 418 | if (!(PPCMfl2cr() & L2CR_L2E)) { |
| 419 | L2Init(); |
| 420 | L2Enable(); |
| 421 | DBPrintf("L2 cache initialized\n"); |
| 422 | } |
| 423 | |
| 424 | OSSetErrorHandler(OS_ERROR_MACHINE_CHECK, DMAErrorHandler); |
| 425 | DBPrintf("Locked cache machine check handler installed\n"); |
| 426 | } |