RTDECL(int) VBoxQueryConfHGSMIDef(PHGSMIGUESTCOMMANDCONTEXT pCtx, uint32_t u32Index, uint32_t u32DefValue, uint32_t *pulValue) { 6f90: 55 push rbp 6f91: 48 89 e5 mov rbp,rsp 6f94: 41 57 push r15 6f96: 41 56 push r14 6f98: 41 55 push r13 6f9a: 41 54 push r12 6f9c: 41 89 f5 mov r13d,esi 6f9f: 53 push rbx 6fa0: 49 89 fc mov r12,rdi 6fa3: 41 89 d6 mov r14d,edx 6fa6: 48 89 cb mov rbx,rcx 6fa9: 48 83 ec 18 sub rsp,0x18 { static bool cOnce = false; uint32_t ulValue = 0; int rc; if (cOnce) 6fad: 80 3d 58 75 20 00 00 cmp BYTE PTR [rip+0x207558],0x0 # 20e50c <_ZZL13testQueryConfP24HGSMIGUESTCOMMANDCONTEXTE5cOnce> /** Sanity test on first call. We do not worry about concurrency issues. */ static int testQueryConf(PHGSMIGUESTCOMMANDCONTEXT pCtx) { static bool cOnce = false; uint32_t ulValue = 0; 6fb4: c7 45 cc 00 00 00 00 mov DWORD PTR [rbp-0x34],0x0 int rc; if (cOnce) 6fbb: 74 73 je 7030 uint16_t u16Op) { #ifdef VBOX_WDDM_MINIPORT return VBoxSHGSMIHeapAlloc (&pCtx->heapCtx, cbData, u8Ch, u16Op); #else return HGSMIHeapAlloc (&pCtx->heapCtx, cbData, u8Ch, u16Op); 6fbd: be 08 00 00 00 mov esi,0x8 6fc2: b9 01 00 00 00 mov ecx,0x1 6fc7: ba 02 00 00 00 mov edx,0x2 6fcc: 4c 89 e7 mov rdi,r12 6fcf: e8 4c 10 00 00 call 8020 return rc; /* Allocate the IO buffer. */ p = (VBVACONF32 *)VBoxHGSMIBufferAlloc(pCtx, sizeof(VBVACONF32), HGSMI_CH_VBVA, VBVA_QUERY_CONF32); if (p) 6fd4: 48 85 c0 test rax,rax uint16_t u16Op) { #ifdef VBOX_WDDM_MINIPORT return VBoxSHGSMIHeapAlloc (&pCtx->heapCtx, cbData, u8Ch, u16Op); #else return HGSMIHeapAlloc (&pCtx->heapCtx, cbData, u8Ch, u16Op); 6fd7: 48 89 c6 mov rsi,rax return rc; /* Allocate the IO buffer. */ p = (VBVACONF32 *)VBoxHGSMIBufferAlloc(pCtx, sizeof(VBVACONF32), HGSMI_CH_VBVA, VBVA_QUERY_CONF32); if (p) 6fda: 0f 84 99 00 00 00 je 7079 { /* Prepare data to be sent to the host. */ p->u32Index = u32Index; 6fe0: 44 89 2e mov DWORD PTR [rsi],r13d p->u32Value = u32DefValue; 6fe3: 44 89 76 04 mov DWORD PTR [rsi+0x4],r14d 6fe7: 48 8d 4e f0 lea rcx,[rsi-0x10] 6feb: 49 2b 0c 24 sub rcx,QWORD PTR [r12] 6fef: 41 8b 44 24 08 mov eax,DWORD PTR [r12+0x8] /* Submit the buffer to the host. */ VBoxVideoCmnPortWriteUlong(pCtx->port, offBuffer); return VINF_SUCCESS; } return VERR_INVALID_PARAMETER; 6ff4: 41 bf fe ff ff ff mov r15d,0xfffffffe 6ffa: 01 c8 add eax,ecx { /* Initialize the buffer and get the offset for port IO. */ HGSMIOFFSET offBuffer = HGSMIHeapBufferOffset (HGSMIGUESTCMDHEAP_GET(&pCtx->heapCtx), pvBuffer); Assert(offBuffer != HGSMIOFFSET_VOID); if (offBuffer != HGSMIOFFSET_VOID) 6ffc: 83 f8 ff cmp eax,0xffffffff 6fff: 74 12 je 7013 7001: 41 0f b7 94 24 60 01 movzx edx,WORD PTR [r12+0x160] 7008: 00 00 700a: ef out dx,eax p->u32Index = u32Index; p->u32Value = u32DefValue; rc = VBoxHGSMIBufferSubmit(pCtx, p); if (RT_SUCCESS(rc)) { *pulValue = p->u32Value; 700b: 8b 46 04 mov eax,DWORD PTR [rsi+0x4] //usleep(0); asm volatile("" : : : "memory"); /* Submit the buffer to the host. */ VBoxVideoCmnPortWriteUlong(pCtx->port, offBuffer); return VINF_SUCCESS; 700e: 45 31 ff xor r15d,r15d p->u32Index = u32Index; p->u32Value = u32DefValue; rc = VBoxHGSMIBufferSubmit(pCtx, p); if (RT_SUCCESS(rc)) { *pulValue = p->u32Value; 7011: 89 03 mov DWORD PTR [rbx],eax void *pvBuffer) { #ifdef VBOX_WDDM_MINIPORT VBoxSHGSMIHeapFree (&pCtx->heapCtx, pvBuffer); #else HGSMIHeapFree (&pCtx->heapCtx, pvBuffer); 7013: 4c 89 e7 mov rdi,r12 7016: e8 85 10 00 00 call 80a0 } else rc = VERR_NO_MEMORY; LogFunc(("rc = %d\n", rc)); return rc; } 701b: 48 83 c4 18 add rsp,0x18 701f: 44 89 f8 mov eax,r15d 7022: 5b pop rbx 7023: 41 5c pop r12 7025: 41 5d pop r13 7027: 41 5e pop r14 7029: 41 5f pop r15 702b: 5d pop rbp 702c: c3 ret 702d: 0f 1f 00 nop DWORD PTR [rax]