59 |
|
|
60 |
|
|
61 |
|
// TVector of MakeExecutable |
62 |
< |
static uint32 *MakeExecutableTvec; |
62 |
> |
static uint32 MakeExecutableTvec; |
63 |
|
|
64 |
|
|
65 |
|
/* |
259 |
|
InstallDrivers(); |
260 |
|
|
261 |
|
// Patch MakeExecutable() |
262 |
< |
MakeExecutableTvec = (uint32 *)FindLibSymbol("\023PrivateInterfaceLib", "\016MakeExecutable"); |
263 |
< |
D(bug("MakeExecutable TVECT at %p\n", MakeExecutableTvec)); |
264 |
< |
MakeExecutableTvec[0] = htonl(NativeFunction(NATIVE_MAKE_EXECUTABLE)); |
262 |
> |
MakeExecutableTvec = (uint32)FindLibSymbol("\023PrivateInterfaceLib", "\016MakeExecutable"); |
263 |
> |
D(bug("MakeExecutable TVECT at %08x\n", MakeExecutableTvec)); |
264 |
> |
WriteMacInt32(MakeExecutableTvec, NativeFunction(NATIVE_MAKE_EXECUTABLE)); |
265 |
|
#if !EMULATED_PPC |
266 |
< |
MakeExecutableTvec[1] = (uint32)TOC; |
266 |
> |
WriteMacInt32(MakeExecutableTvec + 4, (uint32)TOC); |
267 |
|
#endif |
268 |
|
|
269 |
|
// Patch DebugStr() |
272 |
|
PW(0x4e74), // rtd #4 |
273 |
|
PW(0x0004) |
274 |
|
}; |
275 |
< |
WriteMacInt32(0x1dfc, (uint32)proc); |
275 |
> |
WriteMacInt32(0x1dfc, Host2MacAddr((uint8 *)proc)); |
276 |
|
break; |
277 |
|
} |
278 |
|
|
297 |
|
WriteMacInt32(KernelDataAddr + 0x1b04, DR_CACHE_BASE); |
298 |
|
WriteMacInt32(KernelDataAddr + 0x1b00, DR_EMULATOR_BASE); |
299 |
|
memcpy((void *)DR_EMULATOR_BASE, (void *)(ROM_BASE + 0x370000), DR_EMULATOR_SIZE); |
300 |
< |
MakeExecutable(0, (void *)DR_EMULATOR_BASE, DR_EMULATOR_SIZE); |
300 |
> |
MakeExecutable(0, DR_EMULATOR_BASE, DR_EMULATOR_SIZE); |
301 |
|
} |
302 |
|
break; |
303 |
|
|