Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenmmutest.c
Go to the documentation of this file.
00001 #include "ppcmmu/mmu.h" 00002 #include "ppcmmu/mmuutil.h" 00003 #include "mmuobject.h" 00004 00005 int mmunitest() 00006 { 00007 int ret; 00008 int (*fun)(int ret) = (void *)0x80000000; 00009 ppc_map_info_t info = { 0 }; 00010 volatile int oldmsr, msr = 0x2030; 00011 __asm__("mfmsr 0\n\tstw 0,0(%0)" : : "r" (&oldmsr)); 00012 mmusetvsid(8, 9, 0); 00013 info.flags = MMU_ALL_RW; 00014 info.proc = 0; 00015 info.addr = (vaddr_t)fun; 00016 mmuaddpage(&info, 1); 00017 __asm__("mtmsr %0" : : "r" (msr)); 00018 __asm__("mtsdr1 %0" : : "r" (HTABORG)); 00019 *((int *)fun) = 0x4e800020; 00020 ret = fun(3); 00021 __asm__("mtmsr %0" : : "r" (oldmsr)); 00022 return ret != 3; 00023 } Generated on Sat May 26 2012 04:35:16 for ReactOS by
1.7.6.1
|