VirtualBox

vbox的更動 11565 路徑 trunk/src/VBox/Devices/Graphics


忽略:
時間撮記:
2008-8-22 上午07:39:55 (16 年 以前)
作者:
vboxsync
訊息:

Workaround for bug(s) in the Ubuntu splash screen instruction emulator

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Devices/Graphics/BIOS/vbe.c

    r8132 r11565  
    4848
    4949// The current OEM Software Revision of this VBE Bios
    50 #define VBE_OEM_SOFTWARE_REV 0x0002;
     50#define VBE_OEM_SOFTWARE_REV 0x0002
    5151
    5252extern char vbebios_copyright;
     
    11061106{
    11071107        Bit16u            ss=get_SS();
     1108#ifndef VBOX
    11081109        VbeInfoBlock      vbe_info_block;
     1110#endif
    11091111        Bit16u            status;
    11101112        Bit16u            result;
     
    11411143
    11421144        vbe2_info = 0;
     1145#ifdef VBOX
     1146  #define RT_OFFSETOF(type, member)   ( (int)(unsigned)&( ((type *)(void *)0)->member) )
     1147
     1148        /* Don't use a local copy of VbeInfoBlock on the stack; it's too big.
     1149         * The Ubuntu 8.04 64 bits splash screen emulator can't handle this.
     1150         */
    11431151#ifdef VBE2_NO_VESA_CHECK
     1152#else
     1153        // check for VBE2 signature
     1154        if (((read_byte(ES, DI + RT_OFFSETOF(VbeInfoBlock, VbeSignature[0])) == 'V') &&
     1155             (read_byte(ES, DI + RT_OFFSETOF(VbeInfoBlock, VbeSignature[1])) == 'B') &&
     1156             (read_byte(ES, DI + RT_OFFSETOF(VbeInfoBlock, VbeSignature[2])) == 'E') &&
     1157             (read_byte(ES, DI + RT_OFFSETOF(VbeInfoBlock, VbeSignature[3])) == '2')) ||
     1158
     1159            ((read_byte(ES, DI + RT_OFFSETOF(VbeInfoBlock, VbeSignature[0])) == 'V') &&
     1160             (read_byte(ES, DI + RT_OFFSETOF(VbeInfoBlock, VbeSignature[1])) == 'E') &&
     1161             (read_byte(ES, DI + RT_OFFSETOF(VbeInfoBlock, VbeSignature[2])) == 'S') &&
     1162             (read_byte(ES, DI + RT_OFFSETOF(VbeInfoBlock, VbeSignature[3])) == 'A')) )
     1163        {
     1164                vbe2_info = 1;
     1165#ifdef DEBUG
     1166                printf("VBE correct VESA/VBE2 signature found\n");
     1167#endif
     1168        }
     1169#endif
     1170
     1171        // VBE Signature
     1172        write_byte(ES, DI + RT_OFFSETOF(VbeInfoBlock, VbeSignature[0]), 'V');
     1173        write_byte(ES, DI + RT_OFFSETOF(VbeInfoBlock, VbeSignature[1]), 'E');
     1174        write_byte(ES, DI + RT_OFFSETOF(VbeInfoBlock, VbeSignature[2]), 'S');
     1175        write_byte(ES, DI + RT_OFFSETOF(VbeInfoBlock, VbeSignature[3]), 'A');
     1176
     1177        // VBE Version supported
     1178        write_word(ES, DI + RT_OFFSETOF(VbeInfoBlock, VbeVersion), 0x0200);
     1179
     1180        // OEM String
     1181        write_word(ES, DI + RT_OFFSETOF(VbeInfoBlock, OemStringPtr_Seg), 0xc000);
     1182        write_word(ES, DI + RT_OFFSETOF(VbeInfoBlock, OemStringPtr_Off), &vbebios_copyright);
     1183
     1184        // Capabilities
     1185        write_byte(ES, DI + RT_OFFSETOF(VbeInfoBlock, Capabilities[0]), VBE_CAPABILITY_8BIT_DAC);
     1186        write_byte(ES, DI + RT_OFFSETOF(VbeInfoBlock, Capabilities[1]), 0);
     1187        write_byte(ES, DI + RT_OFFSETOF(VbeInfoBlock, Capabilities[2]), 0);
     1188        write_byte(ES, DI + RT_OFFSETOF(VbeInfoBlock, Capabilities[3]), 0);
     1189
     1190        // VBE Video Mode Pointer (dynamicly generated from the mode_info_list)
     1191        write_word(ES, DI + RT_OFFSETOF(VbeInfoBlock, VideoModePtr_Seg), ES);
     1192        write_word(ES, DI + RT_OFFSETOF(VbeInfoBlock, VideoModePtr_Off), DI + 34);
     1193
     1194        // VBE Total Memory (in 64b blocks)
     1195        write_word(ES, DI + RT_OFFSETOF(VbeInfoBlock, TotalMemory), in_word(VBE_EXTRA_PORT, 0xffff));
     1196
     1197        if (vbe2_info)
     1198        {
     1199                // OEM Stuff
     1200                write_word(ES, DI + RT_OFFSETOF(VbeInfoBlock, OemSoftwareRev), VBE_OEM_SOFTWARE_REV);
     1201                write_word(ES, DI + RT_OFFSETOF(VbeInfoBlock, OemVendorNamePtr_Seg), 0xc000);
     1202                write_word(ES, DI + RT_OFFSETOF(VbeInfoBlock, OemVendorNamePtr_Off), &vbebios_vendor_name);
     1203                write_word(ES, DI + RT_OFFSETOF(VbeInfoBlock, OemProductNamePtr_Seg), 0xc000);
     1204                write_word(ES, DI + RT_OFFSETOF(VbeInfoBlock, OemProductNamePtr_Off), &vbebios_product_name);
     1205                write_word(ES, DI + RT_OFFSETOF(VbeInfoBlock, OemProductRevPtr_Seg), 0xc000);
     1206                write_word(ES, DI + RT_OFFSETOF(VbeInfoBlock, OemProductRevPtr_Off), &vbebios_product_revision);
     1207        }
    11441208#else
    11451209        // get vbe_info_block into local variable
    11461210        memcpyb(ss, &vbe_info_block, ES, DI, sizeof(vbe_info_block));
    11471211
     1212#ifdef VBE2_NO_VESA_CHECK
     1213#else
    11481214        // check for VBE2 signature
    11491215        if (((vbe_info_block.VbeSignature[0] == 'V') &&
     
    12091275                memcpyb(ES, DI, ss, &vbe_info_block, 256);
    12101276        }
     1277#endif /* VBOX */
    12111278
    12121279#ifdef VBE_NEW_DYN_LIST
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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