Changeset 17767 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Mar 12, 2009 5:14:01 PM (16 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r17335 r17767 885 885 s->vbe_regs[s->vbe_index] = val; 886 886 } 887 #ifdef VBOX_WITH_HGSMI 888 else if (val == VBE_DISPI_ID_HGSMI) { 889 s->vbe_regs[s->vbe_index] = val; 890 } 891 #endif /* VBOX_WITH_HGSMI */ 887 892 #endif /* VBOX */ 888 893 break; … … 3131 3136 NOREF(pvUser); 3132 3137 3138 #ifdef VBOX_WITH_HGSMI 3139 #ifdef IN_RING3 3140 if (s->vbe_index == VBE_DISPI_INDEX_VBVA_GUEST) 3141 { 3142 HGSMIGuestWrite (s->pHGSMI, u32); 3143 return VINF_SUCCESS; 3144 } 3145 if (s->vbe_index == VBE_DISPI_INDEX_VBVA_HOST) 3146 { 3147 HGSMIHostWrite (s->pHGSMI, u32); 3148 return VINF_SUCCESS; 3149 } 3150 #else 3151 if ( s->vbe_index == VBE_DISPI_INDEX_VBVA_HOST 3152 || s->vbe_index == VBE_DISPI_INDEX_VBVA_GUEST) 3153 { 3154 Log(("vgaIOPortWriteVBEData: %s - Switching to host...\n", 3155 s->vbe_index == VBE_DISPI_INDEX_VBVA_HOST? "VBE_DISPI_INDEX_VBVA_HOST": "VBE_DISPI_INDEX_VBVA_GUEST")); 3156 return VINF_IOM_HC_IOPORT_WRITE; 3157 } 3158 #endif /* !IN_RING3 */ 3159 #endif /* VBOX_WITH_HGSMI */ 3160 3133 3161 #ifndef IN_RING3 3134 3162 /* … … 3246 3274 { 3247 3275 NOREF(pvUser); 3276 3277 #ifdef VBOX_WITH_HGSMI 3278 #ifdef IN_RING3 3279 VGAState *s = PDMINS_2_DATA(pDevIns, PVGASTATE); 3280 3281 if (s->vbe_index == VBE_DISPI_INDEX_VBVA_GUEST) 3282 { 3283 *pu32 = HGSMIGuestRead (s->pHGSMI); 3284 return VINF_SUCCESS; 3285 } 3286 if (s->vbe_index == VBE_DISPI_INDEX_VBVA_HOST) 3287 { 3288 *pu32 = HGSMIHostRead (s->pHGSMI); 3289 return VINF_SUCCESS; 3290 } 3291 #else 3292 if ( Port == VBE_DISPI_INDEX_VBVA_HOST 3293 || Port == VBE_DISPI_INDEX_VBVA_GUEST) 3294 { 3295 return VINF_IOM_HC_IOPORT_WRITE; 3296 } 3297 #endif /* !IN_RING3 */ 3298 #endif /* VBOX_WITH_HGSMI */ 3299 3248 3300 #ifdef VBE_BYTEWISE_IO 3249 3301 if (cb == 1) … … 4603 4655 PPDMDEVINS pDevIns = pThis->CTX_SUFF(pDevIns); 4604 4656 4657 #ifndef VBOX_WITH_HGSMI 4605 4658 /* This should be called only in non VBVA mode. */ 4659 #else 4660 if (VBVAUpdateDisplay (pThis) == VINF_SUCCESS) 4661 { 4662 return VINF_SUCCESS; 4663 } 4664 #endif /* VBOX_WITH_HGSMI */ 4606 4665 4607 4666 int rc = vga_update_display(pThis, false); … … 6114 6173 if (FileLogo != NIL_RTFILE) 6115 6174 RTFileClose(FileLogo); 6175 6176 #ifdef VBOX_WITH_HGSMI 6177 VBVAInit (pThis); 6178 #endif /* VBOX_WITH_HGSMI */ 6116 6179 6117 6180 /* -
trunk/src/VBox/Devices/Graphics/DevVGA.h
r17325 r17767 44 44 * THE SOFTWARE. 45 45 */ 46 47 #ifdef VBOX_WITH_HGSMI 48 #include "HGSMI/HGSMIHost.h" 49 #endif /* VBOX_WITH_HGSMI */ 46 50 47 51 #define MSR_COLOR_EMULATION 0x01 … … 74 78 #define VBE_DISPI_INDEX_Y_OFFSET 0x9 75 79 #define VBE_DISPI_INDEX_VBOX_VIDEO 0xa 80 #ifdef VBOX_WITH_HGSMI 81 /* @todo this will break saved state and is inefficient. use 2 PCI io ports. */ 82 #define VBE_DISPI_INDEX_VBVA_HOST 0xb 83 #define VBE_DISPI_INDEX_VBVA_GUEST 0xc 84 #define VBE_DISPI_INDEX_NB 0xd 85 #else 76 86 #define VBE_DISPI_INDEX_NB 0xb 87 #endif /* !VBOX_WITH_HGSMI */ 77 88 78 89 #define VBE_DISPI_ID0 0xB0C0 … … 85 96 /* The VBOX interface id. Indicates support for VBE_DISPI_INDEX_VBOX_VIDEO. */ 86 97 #define VBE_DISPI_ID_VBOX_VIDEO 0xBE00 98 #ifdef VBOX_WITH_HGSMI 99 /* The VBOX interface id. Indicates support for VBVA shared memory interface, 100 * VBE_DISPI_INDEX_VBVA_GUEST_CMD and VBE_DISPI_INDEX_VBVA_HOST_CMD VBE indexes. 101 */ 102 #define VBE_DISPI_ID_HGSMI 0xBE01 103 #endif /* VBOX_WITH_HGSMI */ 87 104 #endif /* VBOX */ 88 105 … … 268 285 bool padding9[2]; 269 286 287 #ifdef VBOX_WITH_HGSMI 288 R3PTRTYPE(PHGSMIINSTANCE) pHGSMI; 289 #endif /* VBOX_WITH_HGSMI */ 290 270 291 /** Current refresh timer interval. */ 271 292 uint32_t cMilliesRefreshInterval; … … 416 437 #endif /* !VBOX || IN_RING3 */ 417 438 439 440 #ifdef VBOX_WITH_HGSMI 441 int VBVAInit (PVGASTATE pVGAState); 442 void VBVADestroy (PVGASTATE pVGAState); 443 int VBVAUpdateDisplay (PVGASTATE pVGAState); 444 #endif /* VBOX_WITH_HGSMI */ 445 418 446 #ifndef VBOX 419 447 void vga_common_init(VGAState *s, DisplayState *ds, uint8_t *vga_ram_base,
Note:
See TracChangeset
for help on using the changeset viewer.