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

static DECLCALLBACK ( int   ) 

Callback function for AVLPVDoWithAll().

Callback function for AVLULDoWithAll().

Callback function for AVLU32DoWithAll() & AVLU32Destroy().

Callback function for RTAvllU32DoWithAll() & RTAvllU32Destroy().

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 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.
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.

Get builtin register symbol.

The uUser is special for these symbol descriptors. See the SYMREG_* #defines.

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.
The 'go' 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.
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.
Minus (unary).

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.
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().
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
Disconnect the host side of the shared clipboard and send a "host disconnected" message to the guest side.

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.
Instruction reader.

Returns:
VBox status code.
Parameters:
PtrSrc Address to read from. In our case this is relative to the selector pointed to by the 2nd user argument of uDisCpu.
pu8Dst Where to store the bytes.
cbRead Number of bytes to read.
uDisCpu Pointer to the disassembler cpu state. In this context it's always pointer to the Core of a DBGFDISASSTATE.
Instruction reader.

Returns:
VBox status code. (Why this is a int32_t and not just an int is also beyond me.)
Parameters:
PtrSrc Address to read from. In our case this is relative to the selector pointed to by the 2nd user argument of uDisCpu.
pu8Dst Where to store the bytes.
cbRead Number of bytes to read.
uDisCpu Pointer to the disassembler cpu state. (Why this is a VBOXHUINTPTR is beyond me...) In this context it's always pointer to the Core of a DBGFDISASSTATE.
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.
Callback used to find the mapping that's been unused for the longest time.

Read callback for disassembly function; supports reading bytes that cross a page boundary

Returns:
VBox status code.
Parameters:
pSrc GC source pointer
pDest HC destination pointer
cb Number of bytes to read
dwUserdata Callback specific user data (pCpu)
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.
RTAvlU32Destroy callback.

Returns:
0
Parameters:
pNode The node to destroy.
pvGMM The GMM handle.

Todo:
r=bird: this doesn't make sense. WHY?

Definition at line 446 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