VirtualBox

Changeset 2123 in vbox for trunk


Ignore:
Timestamp:
Apr 17, 2007 12:25:00 PM (18 years ago)
Author:
vboxsync
Message:

TRPM changes to assert and report trap/interrupt types accurately.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/trpm.h

    r416 r2123  
    1919 */
    2020
    21 #ifndef __VBox_im_h__
    22 #define __VBox_im_h__
     21#ifndef __VBox_trpm_h__
     22#define __VBox_trpm_h__
    2323
    2424#include <VBox/cdefs.h>
     
    3838{
    3939    TRPM_TRAP_HAS_ERRORCODE = 0,
    40     TRPM_TRAP_NO_ERRORCODE
     40    TRPM_TRAP_NO_ERRORCODE,
     41    /** The usual 32-bit paranoia. */
     42    TRPM_TRAP_32BIT_HACK = 0x7fffffff
    4143} TRPMERRORCODE;
    4244
     
    4446 * TRPM event type
    4547 */
     48/** Note: must match trpm.mac! */
    4649typedef enum
    4750{
    48     TRPM_TRAP = 0,
    49     TRPM_HARDWARE_INT,
    50     TRPM_SOFTWARE_INT
     51    TRPM_TRAP         = 0,
     52    TRPM_HARDWARE_INT = 1,
     53    TRPM_SOFTWARE_INT = 2,
     54    /** The usual 32-bit paranoia. */
     55    TRPM_32BIT_HACK   = 0x7fffffff
    5156} TRPMEVENT;
    5257
     
    6368 * @param   pVM                     The virtual machine.
    6469 * @param   pu8TrapNo               Where to store the trap number.
    65  * @param   pfSoftwareInterrupt     Where to store the software interrupt indicator.
    66  */
    67 TRPMDECL(int)  TRPMQueryTrap(PVM pVM, uint8_t *pu8TrapNo, bool *pfSoftwareInterrupt);
     70 * @param   pEnmType                Where to store the trap type
     71 */
     72TRPMDECL(int)  TRPMQueryTrap(PVM pVM, uint8_t *pu8TrapNo, TRPMEVENT *pEnmType);
    6873
    6974/**
     
    120125 * @param   pVM                 The virtual machine.
    121126 * @param   u8TrapNo            The trap vector to assert.
    122  * @param   fSoftwareInterrupt  Indicate if it's a software interrupt or not.
    123  */
    124 TRPMDECL(int)  TRPMAssertTrap(PVM pVM, uint8_t u8TrapNo, bool fSoftwareInterrupt);
     127 * @param   enmType             Trap type.
     128 */
     129TRPMDECL(int)  TRPMAssertTrap(PVM pVM, uint8_t u8TrapNo, TRPMEVENT enmType);
    125130
    126131/**
     
    176181 * @param   pVM                     The virtual machine.
    177182 * @param   pu8TrapNo               Where to store the trap number.
    178  * @param   pfSoftwareInterrupt   Where to store the software interrupt indicator.
     183 * @param   pEnmType                Where to store the trap type.
    179184 * @param   puErrorCode             Where to store the error code associated with some traps.
    180185 *                                  ~0U is stored if the trap have no error code.
    181186 * @param   puCR2                   Where to store the CR2 associated with a trap 0E.
    182187 */
    183 TRPMDECL(int)  TRPMQueryTrapAll(PVM pVM, uint8_t *pu8TrapNo, bool *pfSoftwareInterrupt, PRTGCUINT puErrorCode, PRTGCUINTPTR puCR2);
     188TRPMDECL(int)  TRPMQueryTrapAll(PVM pVM, uint8_t *pu8TrapNo, TRPMEVENT *pEnmType, PRTGCUINT puErrorCode, PRTGCUINTPTR puCR2);
    184189
    185190
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette