void _main(paramblk_t* p) { gspHeap = (u8*)p->linear_heap; gspHeap_size = p->linear_size; initSrv(); srv_RegisterClient(NULL); gspGpuInit(); resetConsole(); print_str("hello\n"); print_str("_firm_appmemalloc "); print_hex((u32)_firm_appmemalloc); print_str("\n"); print_str("code address "); print_hex((u32)p->code_data); print_str("\n"); print_str("code size "); print_hex(p->code_size); print_str("\n"); setupStub((u8*)p->code_data); Result ret = apply_map(&p->map, (u8*)p->code_data, HANS_LOADER_SIZE); print_str("applied map "); print_hex(ret); print_str("\n"); ret = invalidateIcache(p->nssHandle); ret = runStub(p->nssHandle, &p->map, (u8*)p->code_data); print_hex(ret); while(1); gspGpuExit(); }
/* The default (absolute minimum) action to be taken by this function * is to call monrestart(INITIALIZE). It would be better if there was * some target-specific function that would really cause the target * to reset... * UMON-TODO: revise it */ void target_reset(void) { flushDcache(0,0); disableDcache(); invalidateIcache(0,0); disableIcache(); monrestart(INITIALIZE); }