MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / __OSCacheInit

Function __OSCacheInit

src/dolphin/src/os/OSCache.c:228–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228void __OSCacheInit()
229{
230 if (!(PPCMfhid0() & HID0_ICE))
231 {
232 ICEnable();
233 DBPrintf("L1 i-caches initialized\n");
234 }
235 if (!(PPCMfhid0() & HID0_DCE))
236 {
237 DCEnable();
238 DBPrintf("L1 d-caches initialized\n");
239 }
240
241 if (!(PPCMfl2cr() & L2CR_L2E))
242 {
243 L2Init();
244 PPCMtl2cr((PPCMfl2cr() | L2CR_L2E) & ~L2CR_L2I);
245 DBPrintf("L2 cache initialized\n");
246 }
247
248 OSSetErrorHandler(OS_ERROR_MACHINE_CHECK, DMAErrorHandler);
249 DBPrintf("Locked cache machine check handler installed\n");
250}

Callers 1

OSInitFunction · 0.85

Calls 7

PPCMfhid0Function · 0.85
DBPrintfFunction · 0.85
DCEnableFunction · 0.85
PPCMfl2crFunction · 0.85
L2InitFunction · 0.85
PPCMtl2crFunction · 0.85
OSSetErrorHandlerFunction · 0.85

Tested by

no test coverage detected