diff options
author | Lucas Fryzek <lucas.fryzek@fryzekconcepts.com> | 2024-08-02 23:33:44 +0100 |
---|---|---|
committer | Lucas Fryzek <lucas.fryzek@fryzekconcepts.com> | 2024-08-02 23:33:44 +0100 |
commit | 4c29e4b83e52f1e4afa3a8b4784be046592d8e4c (patch) | |
tree | 179cef1e7e0ed7e1421d83807f55eaa54bba03c0 /src/wrap.c | |
parent | c0cb2a22e7237c02df614f1994bd6acebfd23125 (diff) |
drv: Add custom userspace driver
Add userspace driver that we will eventually use to try and replay
the command dumps coming from the wrap library.
Diffstat (limited to 'src/wrap.c')
-rw-r--r-- | src/wrap.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -216,6 +216,7 @@ static void clear_mem(struct mem_entry *mem) { IMG_HANDLE handle = mem->mem_info.hKernelMemInfo; bool is_special_heap = (uintptr_t)handle == 0x14; if(mem->type == MEM_TYPE_NORMAL && (valid_heap || is_special_heap)) { + printf("Clearing heap\n"); for (int i = 0; i < 2; i++) if (mem->data[i]) memset(mem->data[i], 0x00, mem->mem_info.uAllocSize); @@ -736,6 +737,7 @@ static bool pvrsrv_ioctl(int fd, PVRSRV_BRIDGE_PACKAGE *bridge_package) { } #endif + PPRINT(stdout, mem_data, PVRSRV_BRIDGE_IN_ALLOCDEVICEMEM); printf("Alloc #%d %p\n", current_alloc, mem_data); current_alloc++; } @@ -939,9 +941,14 @@ static bool pvrsrv_ioctl(int fd, PVRSRV_BRIDGE_PACKAGE *bridge_package) { PPRINT(stdout, bridge_package->pvParamIn, PVRSRV_BRIDGE_IN_GETCLIENTINFO); //fwrite(bridge_package->pvParamIn, 1, sizeof(PVRSRV_BRIDGE_IN_GETCLIENTINFO), log_file); break; + case _IOC_NR(PVRSRV_BRIDGE_EVENT_OBJECT_OPEN): + { + PVRSRV_BRIDGE_IN_EVENT_OBJECT_OPEN *in = bridge_package->pvParamIn; + PPRINT(stdout, &in->sEventObject, PVRSRV_EVENTOBJECT); + break; + } case _IOC_NR(PVRSRV_BRIDGE_MAP_DMABUF): case _IOC_NR(PVRSRV_BRIDGE_GET_MISC_INFO): - case _IOC_NR(PVRSRV_BRIDGE_EVENT_OBJECT_OPEN): case _IOC_NR(PVRSRV_BRIDGE_GET_DEVMEM_HEAPINFO): case _IOC_NR(PVRSRV_BRIDGE_SGX_UNREGISTER_HW_RENDER_CONTEXT): case _IOC_NR(PVRSRV_BRIDGE_EVENT_OBJECT_CLOSE): |