- Timestamp:
- Jan 14, 2024 10:26:14 PM (13 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r102850 r102867 2115 2115 return rcStrict; 2116 2116 } 2117 2118 #ifdef LOG_ENABLED 2119 /* If software interrupt, try decode it if logging is enabled and such. */ 2120 if ( (fFlags & IEM_XCPT_FLAGS_T_SOFT_INT) 2121 && LogIsItEnabled(RTLOGGRPFLAGS_ENABLED, LOG_GROUP_IEM_SYSCALL)) 2122 iemLogSyscallRealModeInt(pVCpu, u8Vector, cbInstr); 2123 #endif 2117 2124 2118 2125 /* -
trunk/src/VBox/VMM/VMMAll/IEMAllDbg.cpp
r102740 r102867 40 40 #include <VBox/log.h> 41 41 #include <iprt/errcore.h> 42 #include <iprt/ctype.h> 42 43 #include <iprt/string.h> 43 44 … … 51 52 # undef LOG_GROUP 52 53 # define LOG_GROUP LOG_GROUP_IEM_SYSCALL 54 55 /** 56 * VIDEO. 57 */ 58 static void iemLogSyscallVgaBiosInt10h(PVMCPUCC pVCpu) 59 { 60 const char *pszSimple; 61 switch (pVCpu->cpum.GstCtx.ah) 62 { 63 case 0x00: 64 Log(("VGABIOS INT 10h: AH=00h: set video mode: AL=%#x (BX=%#x)\n", pVCpu->cpum.GstCtx.al, pVCpu->cpum.GstCtx.bx)); 65 return; 66 case 0x01: pszSimple = "set text-mode cursor shape"; break; 67 case 0x02: pszSimple = "set cursor position"; break; 68 case 0x03: pszSimple = "get cursor position"; break; 69 case 0x04: pszSimple = "get light pen position"; break; 70 case 0x05: pszSimple = "select active display page"; break; 71 case 0x06: pszSimple = "scroll up window"; break; 72 case 0x07: pszSimple = "scroll down window"; break; 73 case 0x08: pszSimple = "read char & attr at cursor"; break; 74 case 0x09: pszSimple = "write char & attr at cursor"; break; 75 case 0x0a: pszSimple = "write char only at cursor"; break; 76 case 0x0b: 77 switch (pVCpu->cpum.GstCtx.bh) 78 { 79 case 0: pszSimple = "set background/border color"; break; 80 case 1: pszSimple = "set palette"; break; 81 case 2: pszSimple = "set palette entry"; break; 82 default: 83 return; 84 } 85 break; 86 case 0x0c: pszSimple = "write graphics pixel"; break; 87 case 0x0d: pszSimple = "read graphics pixel"; break; 88 case 0x0e: 89 if (RT_C_IS_PRINT(pVCpu->cpum.GstCtx.al)) 90 Log(("VGABIOS INT 10h: AH=0eh: teletype output: AL=%#04x '%c' BH=%#x (pg) BL=%#x\n", 91 pVCpu->cpum.GstCtx.al, pVCpu->cpum.GstCtx.al, pVCpu->cpum.GstCtx.bh, pVCpu->cpum.GstCtx.bl)); 92 else 93 Log(("VGABIOS INT 10h: AH=0eh: teletype output: AL=%#04x %s BH=%#x (pg) BL=%#x\n", pVCpu->cpum.GstCtx.al, 94 pVCpu->cpum.GstCtx.al == '\n' ? "\\n " 95 : pVCpu->cpum.GstCtx.al == '\r' ? "\\r " 96 : pVCpu->cpum.GstCtx.al == '\t' ? "\\t " : " ? ", 97 pVCpu->cpum.GstCtx.bh, pVCpu->cpum.GstCtx.bl)); 98 return; 99 case 0x13: 100 { 101 char szRaw[256] = {0}; 102 unsigned const cbToRead = RT_MIN(RT_ELEMENTS(szRaw), pVCpu->cpum.GstCtx.cx); 103 PGMPhysSimpleReadGCPtr(pVCpu, szRaw, pVCpu->cpum.GstCtx.es.u64Base + pVCpu->cpum.GstCtx.bp, cbToRead); 104 char szChars[256+1]; 105 if (pVCpu->cpum.GstCtx.al & RT_BIT_32(1)) 106 { 107 for (unsigned i = 0; i < cbToRead; i += 2) 108 szChars[i / 2] = RT_C_IS_PRINT(szRaw[i]) ? szRaw[i] : '.'; 109 szChars[cbToRead / 2] = '\0'; 110 } 111 else 112 { 113 for (unsigned i = 0; i < cbToRead; i += 2) 114 szChars[i] = RT_C_IS_PRINT(szRaw[i]) ? szRaw[i] : '.'; 115 szChars[cbToRead] = '\0'; 116 } 117 Log(("VGABIOS INT 10h: AH=13h: write string: AL=%#x BH=%#x (pg) BL=%#x DH=%#x (row) DL=%#x (col) CX=%#x (len) ES:BP=%04x:%04x: '%s' (%.*Rhxs)\n", 118 pVCpu->cpum.GstCtx.al, pVCpu->cpum.GstCtx.bh, pVCpu->cpum.GstCtx.bl, pVCpu->cpum.GstCtx.dh, pVCpu->cpum.GstCtx.dl, 119 pVCpu->cpum.GstCtx.cx, pVCpu->cpum.GstCtx.es.Sel, pVCpu->cpum.GstCtx.bp, szChars, cbToRead, szRaw)); 120 return; 121 } 122 default: 123 return; 124 } 125 Log(("VGABIOS INT 10h: AH=%02xh: %s - AL=%#x BX=%#x CX=%#x DX=%#x\n", 126 pVCpu->cpum.GstCtx.ah, pszSimple, pVCpu->cpum.GstCtx.al, 127 pVCpu->cpum.GstCtx.bx, pVCpu->cpum.GstCtx.cx, pVCpu->cpum.GstCtx.dx)); 128 } 129 130 131 /** 132 * BIOS INT 16h. 133 */ 134 static void iemLogSyscallBiosInt16h(PVMCPUCC pVCpu) 135 { 136 const char *pszSimple; 137 switch (pVCpu->cpum.GstCtx.ah) 138 { 139 case 0x00: pszSimple = "get keystroke"; break; 140 case 0x01: pszSimple = "check for keystroke"; break; 141 case 0x02: pszSimple = "get shift flags"; break; 142 case 0x03: pszSimple = "set typematic rate and delay"; break; 143 case 0x09: pszSimple = "get keyboard functionality"; break; 144 case 0x0a: pszSimple = "get keyboard id"; break; 145 case 0x10: pszSimple = "get enhanced keystroke"; break; 146 case 0x11: pszSimple = "check for enhanced keystroke"; break; 147 case 0x12: pszSimple = "get enhanced shift flags"; break; 148 default: 149 return; 150 } 151 Log(("BIOS INT 16h: AH=%02xh: %s - AL=%#x BX=%#x CX=%#x DX=%#x\n", 152 pVCpu->cpum.GstCtx.ah, pszSimple, pVCpu->cpum.GstCtx.al, 153 pVCpu->cpum.GstCtx.bx, pVCpu->cpum.GstCtx.cx, pVCpu->cpum.GstCtx.dx)); 154 } 53 155 54 156 … … 1074 1176 1075 1177 1076 void iemLogSyscall ProtModeInt(PVMCPUCC pVCpu, uint8_t u8Vector, uint8_t cbInstr)1178 void iemLogSyscallRealModeInt(PVMCPUCC pVCpu, uint8_t u8Vector, uint8_t cbInstr) 1077 1179 { 1078 1180 /* DOS & BIOS (V86 mode) */ 1079 1181 if (LogIsEnabled()) 1080 1182 { 1183 switch (u8Vector) 1184 { 1185 case 0x10: 1186 iemLogSyscallVgaBiosInt10h(pVCpu); 1187 break; 1188 case 0x16: 1189 iemLogSyscallBiosInt16h(pVCpu); 1190 break; 1191 } 1192 } 1193 RT_NOREF(cbInstr); 1194 } 1195 1196 1197 void iemLogSyscallProtModeInt(PVMCPUCC pVCpu, uint8_t u8Vector, uint8_t cbInstr) 1198 { 1199 /* DOS & BIOS (V86 mode) */ 1200 if ( LogIsEnabled() 1201 && pVCpu->cpum.GstCtx.eflags.Bits.u1VM /* v8086 mode */) 1202 { 1203 switch (u8Vector) 1204 { 1205 case 0x10: 1206 iemLogSyscallVgaBiosInt10h(pVCpu); 1207 break; 1208 case 0x16: 1209 iemLogSyscallBiosInt16h(pVCpu); 1210 break; 1211 } 1081 1212 } 1082 1213 … … 1087 1218 case 0x20: /* VxD call. */ 1088 1219 iemLogSyscallWinVxDCall(pVCpu, cbInstr); 1089 break; ;1220 break; 1090 1221 } 1091 1222 -
trunk/src/VBox/VMM/include/IEMInternal.h
r102850 r102867 4980 4980 VBOXSTRICTRC iemRaiseSimdFpException(PVMCPUCC pVCpu) RT_NOEXCEPT; 4981 4981 4982 void iemLogSyscallRealModeInt(PVMCPUCC pVCpu, uint8_t u8Vector, uint8_t cbInstr); 4982 4983 void iemLogSyscallProtModeInt(PVMCPUCC pVCpu, uint8_t u8Vector, uint8_t cbInstr); 4983 4984
Note:
See TracChangeset
for help on using the changeset viewer.