Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

DECLCALLBACK ( int   ) 

Module initialization callback function. This is called once after the module has been loaded.

Returns:
0 on success.

Appropriate error code on failure.

Callback function for AVLPVDoWithAll().

Callback function for AVLULDoWithAll().

Callback function for AVLU32DoWithAll() & AVLU32Destroy().

Callback function for RTAvloGCPhysDoWithAll() and RTAvloGCPhysDestroy().

Callback function for RTAvlroGCPhysDoWithAll() and RTAvlroGCPhysDestroy().

Callback function for RTAvlGCPtrDoWithAll().

Callback function for RTAvloGCPtrDoWithAll().

Callback function for RTAvlrGCPtrDoWithAll() and RTAvlrGCPtrDestroy().

Callback function for RTAvlroGCPtrDoWithAll() and RTAvlroGCPtrDestroy().

Callback function for RTAvlrooGCPtrDoWithAll() and RTAvlrooGCPtrDestroy().

Callback function for RTAvloHCPhysDoWithAll() and RTAvloHCPhysDestroy().

Callback function for RTAvloIOPortDoWithAll() and RTAvloIOPortDestroy().

Callback function for RTAvlroIOPortDoWithAll() and RTAvlroIOPortDestroy().

Callback function for RTAvlHCPhysDoWithAll() and RTAvlHCPhysDestroy().

Enumeration callback function used by RTLdrEnumSymbols().

Returns:
iprt status code. Failure will stop the enumeration.
Parameters:
hLdrMod The loader module handle.
pszSymbol Symbol name. NULL if ordinal only.
uSymbol Symbol ordinal, ~0 if not used.
Value Symbol value.
pvUser The user argument specified to RTLdrEnumSymbols().
Callback function for RTStrSpaceEnumerate() and RTStrSpaceDestroy().

Returns:
0 on continue.

Non-zero to aborts the operation.

Parameters:
pStr The string node
pvUser The user specified argument.
Callback function for supplying compressed data during decompression.

Returns:
iprt status code.
Parameters:
pvUser User argument.
pvBuf Where to store the compressed data.
cbBuf Size of the buffer.
pcbBuf Number of bytes actually stored in the buffer.
Command helper for writing formatted text to the debug console.

Returns:
VBox status.
Parameters:
pCmdHlp Pointer to the command callback structure.
pcb Where to store the number of bytes written.
pszFormat The format string. This is using the log formatter, so it's format extensions can be used.
... Arguments specified in the format string.
Command helper for writing formatted text to the debug console.

Returns:
VBox status.
Parameters:
pCmdHlp Pointer to the command callback structure.
pcb Where to store the number of bytes written.
pszFormat The format string. This is using the log formatter, so it's format extensions can be used.
args Arguments specified in the format string.
Command helper for formatting and error message for a VBox status code.

Returns:
VBox status code appropriate to return from a command.
Parameters:
pCmdHlp Pointer to the command callback structure.
rc The VBox status code.
pcb Where to store the number of bytes written.
pszFormat Format string for additional messages. Can be NULL.
... Format arguments, optional.
Command helper for formatting and error message for a VBox status code.

Returns:
VBox status code appropriate to return from a command.
Parameters:
pCmdHlp Pointer to the command callback structure.
rc The VBox status code.
pcb Where to store the number of bytes written.
pszFormat Format string for additional messages. Can be NULL.
args Format arguments, optional.
Command helper for reading memory specified by a DBGC variable.

Returns:
VBox status code appropriate to return from a command.
Parameters:
pCmdHlp Pointer to the command callback structure.
pVM VM handle if GC or physical HC address.
pvBuffer Where to store the read data.
cbRead Number of bytes to read.
pVarPointer DBGC variable specifying where to start reading.
pcbRead Where to store the number of bytes actually read. This optional, but it's useful when read GC virtual memory where a page in the requested range might not be present. If not specified not-present failure or end of a HC physical page will cause failure.
Command helper for writing memory specified by a DBGC variable.

Returns:
VBox status code appropriate to return from a command.
Parameters:
pCmdHlp Pointer to the command callback structure.
pVM VM handle if GC or physical HC address.
pvBuffer What to write.
cbWrite Number of bytes to write.
pVarPointer DBGC variable specifying where to start reading.
pcbWritten Where to store the number of bytes written. This is optional. If NULL be aware that some of the buffer might have been written to the specified address.
Evaluates an expression. (Hopefully the parser and functions are fully reentrant.)

Returns:
VBox status code appropriate to return from a command.
Parameters:
pCmdHlp Pointer to the command callback structure.
pResult Where to store the result.
pszExpr The expression. Format string with the format DBGC extensions.
... Format arguments.
Executes command an expression. (Hopefully the parser and functions are fully reentrant.)

Returns:
VBox status code appropriate to return from a command.
Parameters:
pCmdHlp Pointer to the command callback structure.
pszExpr The expression. Format string with the format DBGC extensions.
... Format arguments.
Command handler.

The console will call the handler for a command once it's finished parsing the user input. The command handler function is responsible for executing the command itself.

Returns:
VBox status.
Parameters:
pCmd Pointer to the command descriptor (as registered).
pCmdHlp Pointer to command helper functions.
pVM Pointer to the current VM (if any).
paArgs Pointer to (readonly) array of arguments.
cArgs Number of arguments in the array.
pResult Where to store the result. NULL if no result descriptor was specified.
Read input.

Returns:
VBox status code.
Parameters:
pBack Pointer to the backend structure supplied by the backend. The backend can use this to find it's instance data.
pvBuf Where to put the bytes we read.
cbBuf Maximum nymber of bytes to read.
pcbRead Where to store the number of bytes actually read. If NULL the entire buffer must be filled for a successful return.
Write (output).

Returns:
VBox status code.
Parameters:
pBack Pointer to the backend structure supplied by the backend. The backend can use this to find it's instance data.
pvBuf What to write.
cbBuf Number of bytes to write.
pcbWritten Where to store the number of bytes actually written. If NULL the entire buffer must be successfully written.
Enumeration callback for use with DBGFR3InfoEnum.

Returns:
VBox status code. A status code indicating failure will end the enumeration and DBGFR3InfoEnum will return with that status code.
Parameters:
pVM VM handle.
pszName Info identifier name.
pszDesc The description.
Service initialization entry point.

Port I/O Handler for string IN operations.

Returns:
VINF_SUCCESS or VINF_EM_*.

VERR_IOM_IOPORT_UNUSED if the port is really unused and a ~0 value should be returned.

Parameters:
pDevIns The device instance.
pvUser User argument.
uPort Port number used for the IN operation.
pGCPtrDst Pointer to the destination buffer (GC, incremented appropriately).
pcTransfers Pointer to the number of transfer units to read, on return remaining transfer units.
cb Size of the transfer unit (1, 2 or 4 bytes).
Port I/O Handler for OUT operations.

Returns:
VINF_SUCCESS or VINF_EM_*.
Parameters:
pDevIns The device instance.
pvUser User argument.
uPort Port number used for the OUT operation.
u32 The value to output.
cb The value size in bytes.
Port I/O Handler for string OUT operations.

Returns:
VINF_SUCCESS or VINF_EM_*.
Parameters:
pDevIns The device instance.
pvUser User argument.
uPort Port number used for the OUT operation.
pGCPtrSrc Pointer to the source buffer (GC, incremented appropriately).
pcTransfers Pointer to the number of transfer units to write, on return remaining transfer units.
cb Size of the transfer unit (1, 2 or 4 bytes).
Memory mapped I/O Handler for read operations.

Returns:
VBox status code.
Parameters:
pDevIns The device instance.
pvUser User argument.
GCPhysAddr Physical address (in GC) where the read starts.
pv Where to store the result.
cb Number of bytes read.
Remarks:
wonder if we could merge the IOMMMIO* and IOMPORT* callbacks...
Port I/O Handler for write operations.

Returns:
VBox status code.
Parameters:
pDevIns The device instance.
pvUser User argument.
GCPhysAddr Physical address (in GC) where the read starts.
pv Where to fetch the result.
cb Number of bytes to write.
Remarks:
wonder if we could merge the IOMMMIO* and IOMPORT* callbacks...
Port I/O Handler for memset operations, actually for REP STOS* instructions handling.

Returns:
VBox status code.
Parameters:
pDevIns The device instance.
pvUser User argument.
GCPhysAddr Physical address (in GC) where the write starts.
u32Item Byte/Word/Dword data to fill.
cbItem Size of data in u32Item parameter, restricted to 1/2/4 bytes.
cItems Number of iterations.
Destruct a device instance.

Most VM resources are freed by the VM. This callback is provided so that any non-VM resources can be freed correctly.

Returns:
VBox status.
Parameters:
pDevIns The device instance data.
Device I/O Control interface.

This is used by external components, such as the COM interface, to communicate with devices using a class wide interface or a device specific interface.

Returns:
VBox status code.
Parameters:
pDevIns Pointer to the device instance.
uFunction Function to perform.
pvIn Pointer to input data.
cbIn Size of input data.
pvOut Pointer to output data.
cbOut Size of output data.
pcbOut Where to store the actual size of the output data.
Attach command.

This is called to let the device attach to a driver for a specified LUN at runtime. This is not called during VM construction, the device constructor have to attach to all the available drivers.

This is like plugging in the keyboard or mouse after turning on the PC.

Returns:
VBox status code.
Parameters:
pDevIns The device instance.
iLUN The logical unit which is being detached.
Query the base interface of a logical unit.

Returns:
VBOX status code.
Parameters:
pDevIns The device instance.
iLUN The logicial unit to query.
ppBase Where to store the pointer to the base interface of the LUN.
Init complete notification. This can be done to do communication with other devices and other initialization which requires everything to be in place.

Returns:
VBOX status code.
Parameters:
pDevIns The device instance.
The VBoxDevicesRegister callback function.

PDM will invoke this function after loading a device module and letting the module decide which devices to register and how to handle conflicts.

Returns:
VBox status code.
Parameters:
pCallbacks Pointer to the callback table.
u32Version VBox version number.
Driver I/O Control interface.

This is used by external components, such as the COM interface, to communicate with a driver using a driver specific interface. Generally, the driver interfaces are used for this task.

Returns:
VBox status code.
Parameters:
pDrvIns Pointer to the driver instance.
uFunction Function to perform.
pvIn Pointer to input data.
cbIn Size of input data.
pvOut Pointer to output data.
cbOut Size of output data.
pcbOut Where to store the actual size of the output data.
The VBoxDriverRegister callback function.

PDM will invoke this function after loading a driver module and letting the module decide which drivers to register and how to handle conflicts.

Returns:
VBox status code.
Parameters:
pCallbacks Pointer to the callback table.
u32Version VBox version number.
The VBoxServicesRegister callback function.

PDM will invoke this function after loading a device module and letting the module decide which devices to register and how to handle conflicts.

Returns:
VBox status code.
Parameters:
pCallbacks Pointer to the callback table.
u32Version VBox version number.
#PF Handler callback for physical access handler ranges (MMIO among others) in R0.

Returns:
VBox status code (appropriate for GC return).
Parameters:
pVM VM Handle.
uErrorCode CPU Error code.
pRegFrame Trap register frame. NULL on DMA and other non CPU access.
pvFault The fault address (cr2).
GCPhysFault The GC physical address corresponding to pvFault.
pvUser User argument.
#PF Handler callback for physical access handler ranges (MMIO among others) in HC.

The handler can not raise any faults, it's mainly for monitoring write access to certain pages.

Returns:
VINF_SUCCESS if the handler have carried out the operation.

VINF_PGM_HANDLER_DO_DEFAULT if the caller should carry out the access operation.

Parameters:
pVM VM Handle.
GCPhys The physical address the guest is writing to.
pvPhys The HC mapping of that address.
pvBuf What the guest is reading/writing.
cbBuf How much it's reading/writing.
enmAccessType The access type.
pvUser User argument.
#PF Handler callback for virtual access handler ranges.

Important to realize that a physical page in a range can have aliases, and for ALL and WRITE handlers these will also trigger.

Returns:
VBox status code (appropriate for GC return).
Parameters:
pVM VM Handle.
uErrorCode CPU Error code.
pRegFrame Trap register frame.
pvFault The fault address (cr2).
pvRange The base address of the handled virtual range.
offRange The offset of the access into this range. (If it's a EIP range this's the EIP, if not it's pvFault.)
#PF Handler callback for virtual access handler ranges.

Important to realize that a physical page in a range can have aliases, and for ALL and WRITE handlers these will also trigger.

Returns:
VINF_SUCCESS if the handler have carried out the operation.

VINF_PGM_HANDLER_DO_DEFAULT if the caller should carry out the access operation.

Parameters:
pVM VM Handle.
GCPtr The virtual address the guest is writing to. (not correct if it's an alias!)
pvPtr The HC mapping of that address.
pvBuf What the guest is reading/writing.
cbBuf How much it's reading/writing.
enmAccessType The access type.
pvUser User argument.
#PF Handler callback for invalidation of virtual access handler ranges.

Parameters:
pVM VM Handle.
GCPtr The virtual address the guest has changed.
VM reset internal callback.

Returns:
VBox status code.
Parameters:
pVM The VM which is begin reset.
pvUser User argument.
Called by the server when (VRDP_CLIPBOARD_FUNCTION_*):
  • (0) client announces available clipboard formats;
  • (1) client requests clipboard data.

Parameters:
pvCallback Callback specific value returned by VRDPSERVERCALLBACK::pfnInterceptClipboard.
u32ClientId Identifies the RDP client that sent the reply.
u32Function The cause of the callback.
u32Format Bitmask of reported formats or the format of received data.
pvData Reserved.
cbData Reserved.
Returns:
VBox error code.
Execute state save operation.

Returns:
VBox status code.
Parameters:
pVM VM Handle.
pSSM SSM operation handle.
Execute state load operation.

Returns:
VBox status code.
Parameters:
pVM VM Handle.
pSSM SSM operation handle.
u32Version Data layout version.
Enables or disables singled stepped disassembly.

Returns:
VBox status code.
Parameters:
pVM VM handle.
fEnable To enable set this flag, to disable clear it.
Binary operator handler function.

Returns:
0 on success.

VBox evaluation / parsing error code on failure. The caller does the bitching.

Parameters:
pDbgc Debugger console instance data.
pArg1 The first argument.
pArg2 The 2nd argument.
pResult Where to store the result.
Get builtin symbol.

Returns:
0 on success.

VBox evaluation / parsing error code on failure. The caller does the bitching.

Parameters:
pSymDesc Pointer to the symbol descriptor.
pCmdHlp Pointer to the command callback structure.
enmType The result type.
pResult Where to store the result.
Set builtin symbol.

Returns:
0 on success.

VBox evaluation / parsing error code on failure. The caller does the bitching.

Parameters:
pSymDesc Pointer to the symbol descriptor.
pCmdHlp Pointer to the command callback structure.
pValue The value to assign the symbol.
The 'help' command.

Returns:
VBox status.
Parameters:
pCmd Pointer to the command descriptor (as registered).
pCmdHlp Pointer to command helper functions.
pVM Pointer to the current VM (if any).
paArgs Pointer to (readonly) array of arguments.
cArgs Number of arguments in the array.
Write (output).

Returns:
VBox status code.
Parameters:
pBack Pointer to VBoxDbgConsole::m_Back.
pvBuf What to write.
cbBuf Number of bytes to write.
pcbWritten Where to store the number of bytes actually written. If NULL the entire buffer must be successfully written.
The Debugger Console Thread

Returns:
VBox status code (ignored).
Parameters:
Thread The thread handle.
pvUser Pointer to the VBoxDbgConsole object.s
Construct a device instance for a VM.

Returns:
VBox status.
Parameters:
pDevIns The device instance data. If the registration structure is needed, pDevIns->pDevReg points to it.
iInstance Instance number. Use this to figure out which registers and such to use. The device number is also found in pDevIns->iInstance, but since it's likely to be freqently used PDM passes it as parameter.
pCfgHandle Configuration node handle for the device. Use this to obtain the configuration of the device instance. It's also found in pDevIns->pCfgHandle, but like iInstance it's expected to be used a bit in this function.
Port I/O Handler for OUT operations.

Returns:
VBox status code.
Parameters:
pDevIns The device instance.
pvUser User argument.
uPort Port number used for the IN operation.
u32 The value to output.
cb The value size in bytes.
Port I/O Handler for math coprocessor OUT operations.

Returns:
VBox status code.
Parameters:
pDevIns The device instance.
pvUser User argument - ignored.
uPort Port number used for the IN operation.
u32 The value to output.
cb The value size in bytes.
Todo:
Add IGNNE support.
Port I/O Handler for PS/2 system control port A IN operations.

Returns:
VBox status code.
Parameters:
pDevIns The device instance.
pvUser User argument - ignored.
uPort Port number used for the IN operation.
pu32 Where to store the result.
cb Number of bytes read.
Todo:
Check if the A20 enable/disable method implemented here in any way should cooperate with the one implemented in the PS/2 keyboard device. This probably belongs together in the PS/2 keyboard device (since that is where the "port B" mentioned by Ralph Brown is implemented).
Remarks:
Ralph Brown and friends have this to say about this port:
0092 RW PS/2 system control port A (port B is at PORT 0061h) (see P0415)

Bitfields for PS/2 system control port A: Bit(s) Description (Table P0415) 7-6 any bit set to 1 turns activity light on 5 unused 4 watchdog timout occurred 3 =0 RTC/CMOS security lock (on password area) unlocked =1 CMOS locked (done by POST) 2 unused 1 A20 is active 0 =0 system reset or write =1 pulse alternate reset pin (high-speed alternate CPU reset) Notes: once set, bit 3 may only be cleared by a power-on reset on at least the C&T 82C235, bit 0 remains set through a CPU reset to allow the BIOS to determine the reset method on the PS/2 30-286 & "Tortuga" the INT 15h/87h memory copy does not use this port for A20 control, but instead uses the keyboard controller (8042). Reportedly this may cause the system to crash when access to the 8042 is disabled in password server mode (see P0398). SeeAlso: P0416,P0417,MSR 00001000h

Port I/O Handler for PS/2 system control port A OUT operations.

Returns:
VBox status code.
Parameters:
pDevIns The device instance.
pvUser User argument - ignored.
uPort Port number used for the IN operation.
u32 The value to output.
cb The value size in bytes.
See also:
Remark and todo of pcarchIOPortPS2SysControlPortARead().
Init complete notification. This routine will write information needed by the bios to the CMOS.

Returns:
VBOX status code.
Parameters:
pDevIns The device instance.
See also:
http://www.brl.ntt.co.jp/people/takehiko/interrupt/CMOS.LST.txt for a description of standard and non-standard CMOS registers.
Port I/O Handler for IN operations.

Returns:
VBox status code.
Parameters:
pDevIns The device instance.
pvUser User argument - ignored.
Port Port number used for the IN operation.
pu32 Where to store the result.
cb Number of bytes read.
Destruct a device instance.

Most VM resources are freed by the VM. This callback is provided so that any non-VM resources can be freed correctly.

Parameters:
pDevIns The device instance data.

Construct a ISO media driver instance.

Returns:
VBox status.
Parameters:
pDrvIns The driver instance data. If the registration structure is needed, pDrvIns->pDrvReg points to it.
pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration of the driver instance. It's also found in pDrvIns->pCfgHandle, but like iInstance it's expected to be used a bit in this function.
Construct a raw image driver instance.

Returns:
VBox status.
Parameters:
pDrvIns The driver instance data. If the registration structure is needed, pDrvIns->pDrvReg points to it.
pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration of the driver instance. It's also found in pDrvIns->pCfgHandle, but like iInstance it's expected to be used a bit in this function.
Construct a display driver instance.

Returns:
VBox status.
Parameters:
pDrvIns The driver instance data. If the registration structure is needed, pDrvIns->pDrvReg points to it.
pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration of the driver instance. It's also found in pDrvIns->pCfgHandle, but like iInstance it's expected to be used a bit in this function.
Callback used to calculate the image size.
Returns:
VINF_SUCCESS
Performs the Floppy/DVD change in EMT.

Returns:
VBox status code.
Parameters:
pThis Pointer to the Console object.
pszDevice The PDM device name.
uInstance The PDM device instance.
uLun The PDM LUN number of the drive.
eState The new state.
peState Pointer to the variable keeping the actual state of the drive. This will be both read and updated to eState or other appropriate state.
pszPath The path to the media / drive which is now being mounted / captured. If NULL no media or drive is attached and the lun will be configured with the default block driver with no media. This will also be the state if mounting / capturing the specified media / drive fails.
fPassthrough Enables using passthrough mode of the host DVD drive if applicable.
EMT
Note:
Locks the Console object for writing
Thread function which starts the VM (also from saved state) and track progress.

Parameters:
Thread The thread id.
pvUser Pointer to a VMPowerUpTask structure.
Returns:
VINF_SUCCESS (ignored).
Note:
Locks the Console object for writing.
Reconfigures a VDI.

Parameters:
pVM The VM handle.
hda The harddisk attachment.
phrc Where to store com error - only valid if we return VERR_GENERAL_FAILURE.
Returns:
VBox status code.
Construct a status driver instance.

Returns:
VBox status.
Parameters:
pDrvIns The driver instance data. If the registration structure is needed, pDrvIns->pDrvReg points to it.
pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration of the driver instance. It's also found in pDrvIns->pCfgHandle, but like iInstance it's expected to be used a bit in this function.
Handle display resize event issued by the VGA device for the primary screen.

See also:
PDMIDISPLAYCONNECTOR::pfnResize
Thread function that handles custom events posted using postEvent().

Thread function for catching the other cpus.

Returns:
VINF_SUCCESS (we don't care).
Parameters:
Thread The thread handle.
pvUser PTSCDATA.
Callback function for RTAvloGCPtrDoWithAll

Updates all fixups in the patches

Returns:
VBox status code.
Parameters:
pNode Current node
pParam The VM to operate on.
Registers a device with the current VM instance.

Returns:
VBox status code.
Parameters:
pCallbacks Pointer to the callback table.
pDevReg Pointer to the device registration record. This data must be permanent and readonly.
Validate a node in the physical handler tree.

Returns:
0 on if ok, other wise 1.
Parameters:
pNode The handler node.
pvUser pVM.
Deal with traps occuring during segment loading and IRET when resuming guest context.

Returns:
VBox status code.
Parameters:
pVM The VM handle.
pRegFrame The register frame.
uUser User argument. In this case a combination of the CPUM_HANDLER_* #defines.
Resolve an external symbol during RTLdrGetBits().

Returns:
iprt status code.
Parameters:
hLdrMod The loader module handle.
pszModule Module name.
pszSymbol Symbol name, NULL if uSymbol should be used.
uSymbol Symbol ordinal, ~0 if pszSymbol should be used.
pValue Where to store the symbol value (address).
pvUser User argument.
Enumeration callback function used by RTLdrEnumSymbols().

Returns:
iprt status code. Failure will stop the enumeration.
Parameters:
hLdrMod The loader module handle.
pszSymbol Symbol name. NULL if ordinal only.
uSymbol Symbol ordinal, ~0 if not used.
Value Symbol value.
pvUser The user argument specified to RTLdrEnumSymbols().
Callback to format non-standard format specifiers.

Returns:
The number of bytes formatted.
Parameters:
pvArg Formatter argument.
pfnOutput Pointer to output function.
pvArgOutput Argument for the output function.
ppszFormat Pointer to the format string pointer. Advance this till the char after the format specifier.
pArgs Pointer to the argument list. Use this to fetch the arguments.
cchWidth Format Width. -1 if not specified.
cchPrecision Format Precision. -1 if not specified.
fFlags Flags (RTSTR_NTFS_*).
chArgSize The argument size specifier, 'l' or 'L'.
Callback function for RTStrSpaceEnumerate() and RTStrSpaceDestroy().

Returns:
0 on continue.

Non-zero to aborts the operation.

Parameters:
pStr The string node
pvUser The user specified argument.
Serve a TCP Server connection.

Returns:
iprt status code.

VERR_TCP_SERVER_STOP to terminate the server loop forcing the RTTcpCreateServer() call to return.

Parameters:
Sock The socket which the client is connected to. The call will close this socket.
pvUser User argument.
Thread function.

Returns:
0 on success.
Parameters:
ThreadSelf Thread handle to this thread.
pvUser User argument.
Generic process callback.

Returns:
VBox status code. Failure will cancel the operation.
Parameters:
uPercentage The percentage of the operation which has been completed.
pvUser The user specified argument.
Callback function for consuming compressed data during compression.

Returns:
iprt status code.
Parameters:
pvUser User argument.
pvBuf Compressed data.
cbBuf Size of the compressed data.
Callback function for supplying compressed data during decompression.

Returns:
iprt status code.
Parameters:
pvUser User argument.
pvBuf Where to store the compressed data.
cbBuf Size of the buffer.
pcbBuf Number of bytes actually stored in the buffer.
Command helper for writing text to the debug console.

Returns:
VBox status.
Parameters:
pCmdHlp Pointer to the command callback structure.
pvBuf What to write.
cbBuf Number of bytes to write.
pcbWritten Where to store the number of bytes actually written. If NULL the entire buffer must be successfully written.
Command helper for writing formatted text to the debug console.

Returns:
VBox status.
Parameters:
pCmdHlp Pointer to the command callback structure.
pcb Where to store the number of bytes written.
pszFormat The format string. This is using the log formatter, so it's format extensions can be used.
... Arguments specified in the format string.
Command helper for writing formatted text to the debug console.

Returns:
VBox status.
Parameters:
pCmdHlp Pointer to the command callback structure.
pcb Where to store the number of bytes written.
pszFormat The format string. This is using the log formatter, so it's format extensions can be used.
args Arguments specified in the format string.
Command helper for formatting and error message for a VBox status code.

Returns:
VBox status code appropriate to return from a command.
Parameters:
pCmdHlp Pointer to the command callback structure.
rc The VBox status code.
pcb Where to store the number of bytes written.
pszFormat Format string for additional messages. Can be NULL.
... Format arguments, optional.
Command helper for formatting and error message for a VBox status code.

Returns:
VBox status code appropriate to return from a command.
Parameters:
pCmdHlp Pointer to the command callback structure.
rc The VBox status code.
pcb Where to store the number of bytes written.
pszFormat Format string for additional messages. Can be NULL.
args Format arguments, optional.
Command helper for reading memory specified by a DBGC variable.

Returns:
VBox status code appropriate to return from a command.
Parameters:
pCmdHlp Pointer to the command callback structure.
pVM VM handle if GC or physical HC address.
pvBuffer Where to store the read data.
cbRead Number of bytes to read.
pVarPointer DBGC variable specifying where to start reading.
pcbRead Where to store the number of bytes actually read. This optional, but it's useful when read GC virtual memory where a page in the requested range might not be present. If not specified not-present failure or end of a HC physical page will cause failure.
Command helper for writing memory specified by a DBGC variable.

Returns:
VBox status code appropriate to return from a command.
Parameters:
pCmdHlp Pointer to the command callback structure.
pVM VM handle if GC or physical HC address.
pvBuffer What to write.
cbWrite Number of bytes to write.
pVarPointer DBGC variable specifying where to start reading.
pcbWritten Where to store the number of bytes written. This is optional. If NULL be aware that some of the buffer might have been written to the specified address.
Evaluates an expression. (Hopefully the parser and functions are fully reentrant.)

Returns:
VBox status code appropriate to return from a command.
Parameters:
pCmdHlp Pointer to the command callback structure.
pResult Where to store the result.
pszExpr The expression. Format string with the format DBGC extensions.
... Format arguments.
Executes command an expression. (Hopefully the parser and functions are fully reentrant.)

Returns:
VBox status code appropriate to return from a command.
Parameters:
pCmdHlp Pointer to the command callback structure.
pszExpr The expression. Format string with the format DBGC extensions.
... Format arguments.
Command handler.

The console will call the handler for a command once it's finished parsing the user input. The command handler function is responsible for executing the command itself.

Returns:
VBox status.
Parameters:
pCmd Pointer to the command descriptor (as registered).
pCmdHlp Pointer to command helper functions.
pVM Pointer to the current VM (if any).
paArgs Pointer to (readonly) array of arguments.
cArgs Number of arguments in the array.
pResult Where to store the result. NULL if no result descriptor was specified.
Read input.

Returns:
VBox status code.
Parameters:
pBack Pointer to the backend structure supplied by the backend. The backend can use this to find it's instance data.
pvBuf Where to put the bytes we read.
cbBuf Maximum nymber of bytes to read.
pcbRead Where to store the number of bytes actually read. If NULL the entire buffer must be filled for a successful return.
Write (output).

Returns:
VBox status code.
Parameters:
pBack Pointer to the backend structure supplied by the backend. The backend can use this to find it's instance data.
pvBuf What to write.
cbBuf Number of bytes to write.
pcbWritten Where to store the number of bytes actually written. If NULL the entire buffer must be successfully written.
Breakpoint enumeration callback function.

Returns:
VBox status code. Any failure will stop the enumeration.
Parameters:
pVM The VM handle.
pvUser The user argument.
pBp Pointer to the breakpoint information. (readonly)
Enumeration callback for use with DBGFR3InfoEnum.

Returns:
VBox status code. A status code indicating failure will end the enumeration and DBGFR3InfoEnum will return with that status code.
Parameters:
pVM VM handle.
pszName Info identifier name.
pszDesc The description.
Service specific extension callback. This callback is called by the service to perform service specific operation.

Parameters:
pvExtension The extension pointer.
u32Function What the callback is supposed to do.
pvParm The function parameters.
cbParm The size of the function parameters.
Service initialization entry point.

Port I/O Handler for IN operations.

Returns:
VINF_SUCCESS or VINF_EM_*.

VERR_IOM_IOPORT_UNUSED if the port is really unused and a ~0 value should be returned.

Parameters:
pDevIns The device instance.
pvUser User argument.
uPort Port number used for the IN operation.
pu32 Where to store the result.
cb Number of bytes read.
Port I/O Handler for string IN operations.

Returns:
VINF_SUCCESS or VINF_EM_*.

VERR_IOM_IOPORT_UNUSED if the port is really unused and a ~0 value should be returned.

Parameters:
pDevIns The device instance.
pvUser User argument.
uPort Port number used for the IN operation.
pGCPtrDst Pointer to the destination buffer (GC, incremented appropriately).
pcTransfers Pointer to the number of transfer units to read, on return remaining transfer units.
cb Size of the transfer unit (1, 2 or 4 bytes).
Port I/O Handler for OUT operations.

Returns:
VINF_SUCCESS or VINF_EM_*.
Parameters:
pDevIns The device instance.
pvUser User argument.
uPort Port number used for the OUT operation.
u32 The value to output.
cb The value size in bytes.
Port I/O Handler for string OUT operations.

Returns:
VINF_SUCCESS or VINF_EM_*.
Parameters:
pDevIns The device instance.
pvUser User argument.
uPort Port number used for the OUT operation.
pGCPtrSrc Pointer to the source buffer (GC, incremented appropriately).
pcTransfers Pointer to the number of transfer units to write, on return remaining transfer units.
cb Size of the transfer unit (1, 2 or 4 bytes).
Memory mapped I/O Handler for read operations.

Returns:
VBox status code.
Parameters:
pDevIns The device instance.
pvUser User argument.
GCPhysAddr Physical address (in GC) where the read starts.
pv Where to store the result.
cb Number of bytes read.
Remarks:
wonder if we could merge the IOMMMIO* and IOMPORT* callbacks...
Port I/O Handler for write operations.

Returns:
VBox status code.
Parameters:
pDevIns The device instance.
pvUser User argument.
GCPhysAddr Physical address (in GC) where the read starts.
pv Where to fetch the result.
cb Number of bytes to write.
Remarks:
wonder if we could merge the IOMMMIO* and IOMPORT* callbacks...
Port I/O Handler for memset operations, actually for REP STOS* instructions handling.

Returns:
VBox status code.
Parameters:
pDevIns The device instance.
pvUser User argument.
GCPhysAddr Physical address (in GC) where the write starts.
u32Item Byte/Word/Dword data to fill.
cbItem Size of data in u32Item parameter, restricted to 1/2/4 bytes.
cItems Number of iterations.
Callback function for mapping an PCI I/O region.

Returns:
VBox status code.
Parameters:
pPciDev Pointer to PCI device. Use pPciDev->pDevIns to get the device instance.
iRegion The region number.
GCPhysAddress Physical address of the region. If iType is PCI_ADDRESS_SPACE_IO, this is an I/O port, else it's a physical address. This address is *NOT* relative to pci_mem_base like earlier!
enmType One of the PCI_ADDRESS_SPACE_* values.
Construct a device instance for a VM.

Returns:
VBox status.
Parameters:
pDevIns The device instance data. If the registration structure is needed, pDevIns->pDevReg points to it.
iInstance Instance number. Use this to figure out which registers and such to use. The instance number is also found in pDevIns->iInstance, but since it's likely to be freqently used PDM passes it as parameter.
pCfgHandle Configuration node handle for the device. Use this to obtain the configuration of the device instance. It's also found in pDevIns->pCfgHandle, but since it's primary usage will in this function it's passed as a parameter.
Destruct a device instance.

Most VM resources are freed by the VM. This callback is provided so that any non-VM resources can be freed correctly.

Returns:
VBox status.
Parameters:
pDevIns The device instance data.
Device I/O Control interface.

This is used by external components, such as the COM interface, to communicate with devices using a class wide interface or a device specific interface.

Returns:
VBox status code.
Parameters:
pDevIns Pointer to the device instance.
uFunction Function to perform.
pvIn Pointer to input data.
cbIn Size of input data.
pvOut Pointer to output data.
cbOut Size of output data.
pcbOut Where to store the actual size of the output data.
Attach command.

This is called to let the device attach to a driver for a specified LUN at runtime. This is not called during VM construction, the device constructor have to attach to all the available drivers.

This is like plugging in the keyboard or mouse after turning on the PC.

Returns:
VBox status code.
Parameters:
pDevIns The device instance.
iLUN The logical unit which is being detached.
Query the base interface of a logical unit.

Returns:
VBOX status code.
Parameters:
pDevIns The device instance.
iLUN The logicial unit to query.
ppBase Where to store the pointer to the base interface of the LUN.
Init complete notification. This can be done to do communication with other devices and other initialization which requires everything to be in place.

Returns:
VBOX status code.
Parameters:
pDevIns The device instance.
The VBoxDevicesRegister callback function.

PDM will invoke this function after loading a device module and letting the module decide which devices to register and how to handle conflicts.

Returns:
VBox status code.
Parameters:
pCallbacks Pointer to the callback table.
u32Version VBox version number.
Construct a driver instance for a VM.

Returns:
VBox status.
Parameters:
pDrvIns The driver instance data. If the registration structure is needed, pDrvIns->pDrvReg points to it.
pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration of the driver instance. It's also found in pDrvIns->pCfgHandle as it's expected to be used frequently in this function.
Driver I/O Control interface.

This is used by external components, such as the COM interface, to communicate with a driver using a driver specific interface. Generally, the driver interfaces are used for this task.

Returns:
VBox status code.
Parameters:
pDrvIns Pointer to the driver instance.
uFunction Function to perform.
pvIn Pointer to input data.
cbIn Size of input data.
pvOut Pointer to output data.
cbOut Size of output data.
pcbOut Where to store the actual size of the output data.
The VBoxDriverRegister callback function.

PDM will invoke this function after loading a driver module and letting the module decide which drivers to register and how to handle conflicts.

Returns:
VBox status code.
Parameters:
pCallbacks Pointer to the callback table.
u32Version VBox version number.
Construct a service instance for a VM.

Returns:
VBox status.
Parameters:
pSrvIns The service instance data. If the registration structure is needed, pSrvIns->pReg points to it.
pCfg Configuration node handle for the service. Use this to obtain the configuration of the driver instance. It's also found in pSrvIns->pCfg, but since it's primary usage is expected in this function it is passed as a parameter.
The VBoxServicesRegister callback function.

PDM will invoke this function after loading a device module and letting the module decide which devices to register and how to handle conflicts.

Returns:
VBox status code.
Parameters:
pCallbacks Pointer to the callback table.
u32Version VBox version number.
The VBoxUsbRegister callback function.

PDM will invoke this function after loading a USB device module and letting the module decide which devices to register and how to handle conflicts.

Returns:
VBox status code.
Parameters:
pCallbacks Pointer to the callback table.
u32Version VBox version number.
#PF Handler callback for physical access handler ranges (MMIO among others) in GC.

Returns:
VBox status code (appropriate for GC return).
Parameters:
pVM VM Handle.
uErrorCode CPU Error code.
pRegFrame Trap register frame. NULL on DMA and other non CPU access.
pvFault The fault address (cr2).
GCPhysFault The GC physical address corresponding to pvFault.
pvUser User argument.
#PF Handler callback for physical access handler ranges (MMIO among others) in R0.

Returns:
VBox status code (appropriate for GC return).
Parameters:
pVM VM Handle.
uErrorCode CPU Error code.
pRegFrame Trap register frame. NULL on DMA and other non CPU access.
pvFault The fault address (cr2).
GCPhysFault The GC physical address corresponding to pvFault.
pvUser User argument.
#PF Handler callback for physical access handler ranges (MMIO among others) in HC.

The handler can not raise any faults, it's mainly for monitoring write access to certain pages.

Returns:
VINF_SUCCESS if the handler have carried out the operation.

VINF_PGM_HANDLER_DO_DEFAULT if the caller should carry out the access operation.

Parameters:
pVM VM Handle.
GCPhys The physical address the guest is writing to.
pvPhys The HC mapping of that address.
pvBuf What the guest is reading/writing.
cbBuf How much it's reading/writing.
enmAccessType The access type.
pvUser User argument.
#PF Handler callback for virtual access handler ranges.

Important to realize that a physical page in a range can have aliases, and for ALL and WRITE handlers these will also trigger.

Returns:
VBox status code (appropriate for GC return).
Parameters:
pVM VM Handle.
uErrorCode CPU Error code.
pRegFrame Trap register frame.
pvFault The fault address (cr2).
pvRange The base address of the handled virtual range.
offRange The offset of the access into this range. (If it's a EIP range this's the EIP, if not it's pvFault.)
#PF Handler callback for virtual access handler ranges.

Important to realize that a physical page in a range can have aliases, and for ALL and WRITE handlers these will also trigger.

Returns:
VINF_SUCCESS if the handler have carried out the operation.

VINF_PGM_HANDLER_DO_DEFAULT if the caller should carry out the access operation.

Parameters:
pVM VM Handle.
GCPtr The virtual address the guest is writing to. (not correct if it's an alias!)
pvPtr The HC mapping of that address.
pvBuf What the guest is reading/writing.
cbBuf How much it's reading/writing.
enmAccessType The access type.
pvUser User argument.
#PF Handler callback for invalidation of virtual access handler ranges.

Parameters:
pVM VM Handle.
GCPtr The virtual address the guest has changed.
VM reset callback.

Returns:
VBox status code.
Parameters:
pDevInst Device instance of the device which registered the callback.
pvUser User argument.
VM reset internal callback.

Returns:
VBox status code.
Parameters:
pVM The VM which is begin reset.
pvUser User argument.
Called by the server when a reply is received from a client.

Parameters:
pvCallback Callback specific value returned by VRDPSERVERCALLBACK::pfnInterceptUSB.
u32ClientId Identifies the client that sent the reply.
u8Code The operation code VRDP_USB_REQ_*.
pvRet Points to data received from the client.
cbRet Size of the data in bytes.
Returns:
VBox error code.
Called by the server when (VRDP_CLIPBOARD_FUNCTION_*):
  • (0) client announces available clipboard formats;
  • (1) client requests clipboard data.

Parameters:
pvCallback Callback specific value returned by VRDPSERVERCALLBACK::pfnInterceptClipboard.
u32ClientId Identifies the RDP client that sent the reply.
u32Function The cause of the callback.
u32Format Bitmask of reported formats or the format of received data.
pvData Reserved.
cbData Reserved.
Returns:
VBox error code.
Unary operator handler function.

Returns:
0 on success.

VBox evaluation / parsing error code on failure. The caller does the bitching.

Parameters:
pDbgc Debugger console instance data.
pArg The argument.
pResult Where to store the result.
Binary operator handler function.

Returns:
0 on success.

VBox evaluation / parsing error code on failure. The caller does the bitching.

Parameters:
pDbgc Debugger console instance data.
pArg1 The first argument.
pArg2 The 2nd argument.
pResult Where to store the result.
Get builtin symbol.

Returns:
0 on success.

VBox evaluation / parsing error code on failure. The caller does the bitching.

Parameters:
pSymDesc Pointer to the symbol descriptor.
pCmdHlp Pointer to the command callback structure.
enmType The result type.
pResult Where to store the result.
Set builtin symbol.

Returns:
0 on success.

VBox evaluation / parsing error code on failure. The caller does the bitching.

Parameters:
pSymDesc Pointer to the symbol descriptor.
pCmdHlp Pointer to the command callback structure.
pValue The value to assign the symbol.
The 'help' command.

Returns:
VBox status.
Parameters:
pCmd Pointer to the command descriptor (as registered).
pCmdHlp Pointer to command helper functions.
pVM Pointer to the current VM (if any).
paArgs Pointer to (readonly) array of arguments.
cArgs Number of arguments in the array.
Read input.

Returns:
VBox status code.
Parameters:
pBack Pointer to VBoxDbgConsole::m_Back.
pvBuf Where to put the bytes we read.
cbBuf Maximum nymber of bytes to read.
pcbRead Where to store the number of bytes actually read. If NULL the entire buffer must be filled for a successful return.
Write (output).

Returns:
VBox status code.
Parameters:
pBack Pointer to VBoxDbgConsole::m_Back.
pvBuf What to write.
cbBuf Number of bytes to write.
pcbWritten Where to store the number of bytes actually written. If NULL the entire buffer must be successfully written.
The Debugger Console Thread

Returns:
VBox status code (ignored).
Parameters:
Thread The thread handle.
pvUser Pointer to the VBoxDbgConsole object.s
Send thread. This is constantly broadcasting frames to the network.

Handle display resize event

Parameters:
pInterface VMDisplay connector.
cx New width in pixels.
cy New height in pixels.
Construct a display driver instance.

Returns:
VBox status.
Parameters:
pDrvIns The driver instance data. If the registration structure is needed, pDrvIns->pDrvReg points to it.
pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration of the driver instance. It's also found in pDrvIns->pCfgHandle, but like iInstance it's expected to be used a bit in this function.
Construct a mouse driver instance.

Returns:
VBox status.
Parameters:
pDrvIns The driver instance data. If the registration structure is needed, pDrvIns->pDrvReg points to it.
pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration of the driver instance. It's also found in pDrvIns->pCfgHandle, but like iInstance it's expected to be used a bit in this function.
Construct a status driver instance.

Returns:
VBox status.
Parameters:
pDrvIns The driver instance data. If the registration structure is needed, pDrvIns->pDrvReg points to it.
pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration of the driver instance. It's also found in pDrvIns->pCfgHandle, but like iInstance it's expected to be used a bit in this function.
command handler type

Callback used to calculate the image size.

Returns:
VINF_SUCCESS
Performs the Floppy/DVD change in EMT.

Returns:
VBox status code.
Parameters:
pThis Pointer to the Console object.
pszDevice The PDM device name.
uInstance The PDM device instance.
uLun The PDM LUN number of the drive.
eState The new state.
peState Pointer to the variable keeping the actual state of the drive. This will be both read and updated to eState or other appropriate state.
pszPath The path to the media / drive which is now being mounted / captured. If NULL no media or drive is attached and the lun will be configured with the default block driver with no media. This will also be the state if mounting / capturing the specified media / drive fails.
fPassthrough Enables using passthrough mode of the host DVD drive if applicable.
EMT
Note:
Locks the Console object for writing
Thread function which starts the VM (also from saved state) and track progress.

Parameters:
Thread The thread id.
pvUser Pointer to a VMPowerUpTask structure.
Returns:
VINF_SUCCESS (ignored).
Note:
Locks the Console object for writing.
Reconfigures a VDI.

Parameters:
pVM The VM handle.
hda The harddisk attachment.
phrc Where to store com error - only valid if we return VERR_GENERAL_FAILURE.
Returns:
VBox status code.
Construct a status driver instance.

Returns:
VBox status.
Parameters:
pDrvIns The driver instance data. If the registration structure is needed, pDrvIns->pDrvReg points to it.
pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration of the driver instance. It's also found in pDrvIns->pCfgHandle, but like iInstance it's expected to be used a bit in this function.
Construct the VM configuration tree (CFGM).

This is a callback for VMR3Create() call. It is called from CFGMR3Init() in the emulation thread (EMT). Any per thread COM/XPCOM initialization is done here.

Parameters:
pVM VM handle.
pvConsole Pointer to the VMPowerUpTask object.
Returns:
VBox status code.
Note:
Locks the Console object for writing.
Changes the current frame buffer. Called on EMT to avoid both race conditions and excessive locking.

Note:
locks this object for writing EMT
Handle display resize event issued by the VGA device for the primary screen.

See also:
PDMIDISPLAYCONNECTOR::pfnResize
Construct a display driver instance.

Returns:
VBox status.
Parameters:
pDrvIns The driver instance data. If the registration structure is needed, pDrvIns->pDrvReg points to it.
pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration of the driver instance. It's also found in pDrvIns->pCfgHandle, but like iInstance it's expected to be used a bit in this function.
Thread function that watches the termination of all client processes that have opened sessions using IVirtualBox::OpenSession()

Thread function that handles custom events posted using postEvent().

Callback to resolve external entities when parsing and validating VirtualBox settings files (see FNCFGLDRENTITYRESOLVER).

Execute state save operation.

Returns:
VBox status code.
Parameters:
pVM VM Handle.
pSSM SSM operation handle.
Execute state load operation.

Returns:
VBox status code.
Parameters:
pVM VM Handle.
pSSM SSM operation handle.
u32Version Data layout version.

Todo:
Check this cast!

Definition at line 456 of file VBoxRecompiler.c.

{
    LogFlow(("remR3Save:\n"));

    /*
     * Save the required CPU Env bits.
     * (Not much because we're never in REM when doing the save.)
     */
    PREM pRem = &pVM->rem.s;
    Assert(!pRem->fInREM);
    SSMR3PutU32(pSSM,   pRem->Env.hflags);
    SSMR3PutMem(pSSM,   &pRem->Env, RT_OFFSETOF(CPUState, jmp_env));
    SSMR3PutU32(pSSM,   ~0);            /* separator */

    /* Remember if we've entered raw mode (vital for ring 1 checks in e.g. iret emulation). */
    SSMR3PutU32(pSSM, !!(pRem->Env.state & CPU_RAW_RING0));

    /*
     * Save the REM stuff.
     */
    SSMR3PutUInt(pSSM,  pRem->cInvalidatedPages);
    unsigned i;
    for (i = 0; i < pRem->cInvalidatedPages; i++)
        SSMR3PutGCPtr(pSSM, pRem->aGCPtrInvalidatedPages[i]);

    SSMR3PutUInt(pSSM, pVM->rem.s.u32PendingInterrupt);

    return SSMR3PutU32(pSSM, ~0);       /* terminator */
}


Generated by  Doxygen 1.6.0   Back to index