Changeset 41760 in vbox for trunk/src/VBox/Devices/PC
- Timestamp:
- Jun 15, 2012 3:56:20 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS-new/MakeDebianBiosAssembly.cpp
r41734 r41760 908 908 * @remarks @a uSrcAddr is the flat address. 909 909 */ 910 static DECLCALLBACK(int) disReadOpcodeBytes(PDISCPUSTATE pDisState, uint8_t *pbDst, RTUINTPTR uSrcAddr, uint32_t cbToRead) 911 { 912 if (uSrcAddr + cbToRead >= VBOX_BIOS_BASE + _64K) 913 { 914 RT_BZERO(pbDst, cbToRead); 915 if (uSrcAddr >= VBOX_BIOS_BASE + _64K) 910 static DECLCALLBACK(int) disReadOpcodeBytes(PDISCPUSTATE pDis, uint8_t offInstr, uint8_t cbMinRead, uint8_t cbMaxRead) 911 { 912 RTUINTPTR offBios = pDis->uInstrAddr + offInstr - VBOX_BIOS_BASE; 913 size_t cbToRead = cbMaxRead; 914 if (offBios + cbToRead > _64K) 915 { 916 if (offBios >= _64K) 916 917 cbToRead = 0; 917 918 else 918 cbToRead = VBOX_BIOS_BASE + _64K - uSrcAddr;919 } 920 memcpy( pbDst, &g_pbImg[uSrcAddr - VBOX_BIOS_BASE], cbToRead);921 NOREF(pDisState);919 cbToRead = _64K - offBios; 920 } 921 memcpy(&pDis->abInstr[offInstr], &g_pbImg[offBios], cbToRead); 922 pDis->cbCachedInstr = offInstr + cbToRead; 922 923 return VINF_SUCCESS; 923 924 }
Note:
See TracChangeset
for help on using the changeset viewer.