1 #include "ppcmmu/mmu.h"
2 #include "ppcmmu/mmuutil.h"
8 int (*fun
)(int ret
) = (void *)0x80000000;
9 ppc_map_info_t info
= { 0 };
10 volatile int oldmsr
, msr
= 0x2030;
11 __asm__("mfmsr 0\n\tstw 0,0(%0)" : : "r" (&oldmsr
));
13 info
.flags
= MMU_ALL_RW
;
15 info
.addr
= (vaddr_t
)fun
;
17 __asm__("mtmsr %0" : : "r" (msr
));
18 __asm__("mtsdr1 %0" : : "r" (HTABORG
));
19 *((int *)fun
) = 0x4e800020;
21 __asm__("mtmsr %0" : : "r" (oldmsr
));