Changeset 41658 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Jun 11, 2012 10:21:44 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS-new/MakeDebianBiosAssembly.cpp
r41609 r41658 904 904 905 905 /** 906 * Disassembler callback for reading opcode bytes. 907 * 908 * @returns VINF_SUCCESS. 909 * @param uFlatAddr The address to read at. 910 * @param pbDst Where to store them. 911 * @param cbToRead How many to read. 912 * @param pvUser Unused. 913 */ 914 static DECLCALLBACK(int) disReadOpcodeBytes(RTUINTPTR uFlatAddr, uint8_t *pbDst, unsigned cbToRead, void *pvUser) 915 { 916 if (uFlatAddr + cbToRead >= VBOX_BIOS_BASE + _64K) 906 * @callback_method_impl{FNDISREADBYTES} 907 * 908 * @remarks @a uSrcAddr is the flat address. 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) 917 913 { 918 914 RT_BZERO(pbDst, cbToRead); 919 if (u FlatAddr >= VBOX_BIOS_BASE + _64K)915 if (uSrcAddr >= VBOX_BIOS_BASE + _64K) 920 916 cbToRead = 0; 921 917 else 922 cbToRead = VBOX_BIOS_BASE + _64K - u FlatAddr;923 } 924 memcpy(pbDst, &g_pbImg[u FlatAddr - VBOX_BIOS_BASE], cbToRead);925 NOREF(p vUser);918 cbToRead = VBOX_BIOS_BASE + _64K - uSrcAddr; 919 } 920 memcpy(pbDst, &g_pbImg[uSrcAddr - VBOX_BIOS_BASE], cbToRead); 921 NOREF(pDisState); 926 922 return VINF_SUCCESS; 927 923 }
Note:
See TracChangeset
for help on using the changeset viewer.