Changeset 22470 in vbox
- Timestamp:
- Aug 26, 2009 1:21:31 PM (15 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r22468 r22470 3122 3122 NOREF(pvUser); 3123 3123 3124 #ifdef VBOX_WITH_HGSMI3125 #ifdef IN_RING33126 if (s->vbe_index == VBE_DISPI_INDEX_VBVA_GUEST)3127 {3128 HGSMIGuestWrite (s->pHGSMI, u32);3129 PDMCritSectLeave(&s->lock);3130 return VINF_SUCCESS;3131 }3132 if (s->vbe_index == VBE_DISPI_INDEX_VBVA_HOST)3133 {3134 #if defined(VBOX_WITH_VIDEOHWACCEL)3135 if(u32 == HGSMIOFFSET_VOID)3136 {3137 PDMDevHlpPCISetIrq(pDevIns, 0, PDM_IRQ_LEVEL_LOW);3138 HGSMIClearHostGuestFlags(s->pHGSMI, HGSMIHOSTFLAGS_IRQ);3139 }3140 else3141 #endif3142 {3143 HGSMIHostWrite (s->pHGSMI, u32);3144 }3145 PDMCritSectLeave(&s->lock);3146 return VINF_SUCCESS;3147 }3148 #else3149 if ( s->vbe_index == VBE_DISPI_INDEX_VBVA_HOST3150 || s->vbe_index == VBE_DISPI_INDEX_VBVA_GUEST)3151 {3152 Log(("vgaIOPortWriteVBEData: %s - Switching to host...\n",3153 s->vbe_index == VBE_DISPI_INDEX_VBVA_HOST? "VBE_DISPI_INDEX_VBVA_HOST": "VBE_DISPI_INDEX_VBVA_GUEST"));3154 PDMCritSectLeave(&s->lock);3155 return VINF_IOM_HC_IOPORT_WRITE;3156 }3157 #endif /* !IN_RING3 */3158 #endif /* VBOX_WITH_HGSMI */3159 3160 3124 #ifndef IN_RING3 3161 3125 /* … … 3294 3258 if (rc != VINF_SUCCESS) 3295 3259 return rc; 3296 3297 #ifdef VBOX_WITH_HGSMI3298 #ifdef IN_RING33299 if (s->vbe_index == VBE_DISPI_INDEX_VBVA_GUEST)3300 {3301 *pu32 = HGSMIGuestRead (s->pHGSMI);3302 PDMCritSectLeave(&s->lock);3303 return VINF_SUCCESS;3304 }3305 if (s->vbe_index == VBE_DISPI_INDEX_VBVA_HOST)3306 {3307 *pu32 = HGSMIHostRead (s->pHGSMI);3308 PDMCritSectLeave(&s->lock);3309 return VINF_SUCCESS;3310 }3311 #else3312 if ( s->vbe_index == VBE_DISPI_INDEX_VBVA_HOST3313 || s->vbe_index == VBE_DISPI_INDEX_VBVA_GUEST)3314 {3315 Log(("vgaIOPortWriteVBEData: %s - Switching to host...\n",3316 s->vbe_index == VBE_DISPI_INDEX_VBVA_HOST? "VBE_DISPI_INDEX_VBVA_HOST": "VBE_DISPI_INDEX_VBVA_GUEST"));3317 PDMCritSectLeave(&s->lock);3318 return VINF_IOM_HC_IOPORT_READ;3319 }3320 #endif /* !IN_RING3 */3321 #endif /* VBOX_WITH_HGSMI */3322 3260 3323 3261 #ifdef VBE_BYTEWISE_IO -
trunk/src/VBox/Devices/Graphics/DevVGA.h
r22468 r22470 87 87 #define VBE_DISPI_INDEX_Y_OFFSET 0x9 88 88 #define VBE_DISPI_INDEX_VBOX_VIDEO 0xa 89 #ifdef VBOX_WITH_HGSMI90 /* @todo this will break saved state and is inefficient. use 2 PCI io ports. */91 #define VBE_DISPI_INDEX_VBVA_HOST 0xb92 #define VBE_DISPI_INDEX_VBVA_GUEST 0xc93 #define VBE_DISPI_INDEX_NB 0xd94 #else95 89 #define VBE_DISPI_INDEX_NB 0xb 96 #endif /* !VBOX_WITH_HGSMI */97 90 98 91 #define VBE_DISPI_ID0 0xB0C0 … … 106 99 #define VBE_DISPI_ID_VBOX_VIDEO 0xBE00 107 100 #ifdef VBOX_WITH_HGSMI 108 /* The VBOX interface id. Indicates support for VBVA shared memory interface, 109 * VBE_DISPI_INDEX_VBVA_GUEST_CMD and VBE_DISPI_INDEX_VBVA_HOST_CMD VBE indexes. 110 */ 101 /* The VBOX interface id. Indicates support for VBVA shared memory interface. */ 111 102 #define VBE_DISPI_ID_HGSMI 0xBE01 112 103 #endif /* VBOX_WITH_HGSMI */
Note:
See TracChangeset
for help on using the changeset viewer.