Changeset d78eac6 in rtems


Ignore:
Timestamp:
12/03/14 23:56:38 (9 years ago)
Author:
Jan Dolezal <dolezj21@…>
Branches:
4.11, 5, master
Children:
038e1dba
Parents:
adc1dbeb
git-author:
Jan Dolezal <dolezj21@…> (12/03/14 23:56:38)
git-committer:
Gedare Bloom <gedare@…> (12/04/14 18:37:50)
Message:

i386/pc386: cammelCase (struct and function names) to underscores, typedefed structs, break >80 chars lines, removed newlines at EOFs

fb_vesa_rm.c: removed inline from functions declared in fb_vesa.h

removed unnecessary printks in the end of patch

edid.h, vbe3.h: switched from custom *PACKED_ATTRIBUTE at the structs to the

RTEMS_COMPILER_PACKED_ATTRIBUTE for easier maintainability
of doxygen

Location:
c/src/lib/libbsp/i386
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/pc386/console/fb_vesa_rm.c

    radc1dbeb rd78eac6  
    6060static struct fb_fix_screeninfo fb_fix;
    6161
    62 static uint16_t vbe_usedMode;
    63 
    64 inline uint32_t VBEControllerInformation(   struct VBE_VbeInfoBlock *infoBlock,
    65                                             uint16_t queriedVBEVersion)
     62static uint16_t vbe_used_mode;
     63
     64uint32_t VBE_controller_information( VBE_vbe_info_block *info_block,
     65                                            uint16_t queried_VBE_Version)
    6666{
    6767    uint16_t size;
    68     struct VBE_VbeInfoBlock *VBE_buffer =
    69         (struct VBE_VbeInfoBlock *)i386_get_default_rm_buffer(&size);
     68    VBE_vbe_info_block *VBE_buffer =
     69        (VBE_vbe_info_block *)i386_get_default_rm_buffer(&size);
    7070    i386_realmode_interrupt_registers parret;
    7171    parret.reg_eax = VBE_RetVBEConInf;
     
    7575    parret.reg_es = seg;
    7676    /* indicate to graphic's bios that VBE2.0 extended information is desired */
    77     if (queriedVBEVersion >= 0x200)
     77    if (queried_VBE_Version >= 0x200)
    7878    {
    7979        strncpy(
     
    8888        (VBE_callSuccessful<<8 | VBE_functionSupported))
    8989    {
    90         *infoBlock = *VBE_buffer;
     90        *info_block = *VBE_buffer;
    9191    }
    9292    return (parret.reg_eax & 0xFFFF);
    9393}
    9494
    95 inline uint32_t VBEModeInformation( struct VBE_ModeInfoBlock *infoBlock,
    96                                     uint16_t modeNumber)
     95uint32_t VBE_mode_information( VBE_mode_info_block *info_block,
     96                                    uint16_t mode_number)
    9797{
    9898    uint16_t size;
    99     struct VBE_ModeInfoBlock *VBE_buffer =
    100         (struct VBE_ModeInfoBlock *)i386_get_default_rm_buffer(&size);
     99    VBE_mode_info_block *VBE_buffer =
     100        (VBE_mode_info_block *)i386_get_default_rm_buffer(&size);
    101101    i386_realmode_interrupt_registers parret;
    102102    parret.reg_eax = VBE_RetVBEModInf;
    103     parret.reg_ecx = modeNumber;
     103    parret.reg_ecx = mode_number;
    104104    uint16_t seg, off;
    105105    i386_Physical_to_real(VBE_buffer, &seg, &off);
     
    111111        (VBE_callSuccessful<<8 | VBE_functionSupported))
    112112    {
    113         *infoBlock = *VBE_buffer;
     113        *info_block = *VBE_buffer;
    114114    }
    115115    return (parret.reg_eax & 0xFFFF);
    116116}
    117117
    118 inline uint32_t VBESetMode( uint16_t modeNumber,
    119                             struct VBE_CRTCInfoBlock *infoBlock)
     118uint32_t VBE_set_mode( uint16_t mode_number,
     119                            VBE_CRTC_info_block *info_block)
    120120{
    121121    uint16_t size;
    122     struct VBE_CRTCInfoBlock *VBE_buffer =
    123         (struct VBE_CRTCInfoBlock *)i386_get_default_rm_buffer(&size);
     122    VBE_CRTC_info_block *VBE_buffer =
     123        (VBE_CRTC_info_block *)i386_get_default_rm_buffer(&size);
    124124    i386_realmode_interrupt_registers parret;
    125125    /* copy CRTC */
    126     *VBE_buffer = *infoBlock;
     126    *VBE_buffer = *info_block;
    127127    parret.reg_eax = VBE_SetVBEMod;
    128     parret.reg_ebx = modeNumber;
     128    parret.reg_ebx = mode_number;
    129129    uint16_t seg, off;
    130130    i386_Physical_to_real(VBE_buffer, &seg, &off);
     
    136136}
    137137
    138 inline uint32_t VBECurrentMode(uint16_t *modeNumber)
     138uint32_t VBE_current_mode(uint16_t *mode_number)
    139139{
    140140    i386_realmode_interrupt_registers parret;
     
    142142    if (i386_real_interrupt_call(INTERRUPT_NO_VIDEO_SERVICES, &parret) == 0)
    143143        return -1;
    144     *modeNumber = (uint16_t)parret.reg_ebx;
     144    *mode_number = (uint16_t)parret.reg_ebx;
    145145    return (parret.reg_eax & 0xFFFF);
    146146}
    147147
    148 inline uint32_t VBEReportDDCCapabilities(   uint16_t controllerUnitNumber,
    149                                             uint8_t *secondsToTransferEDIDBlock,
    150                                             uint8_t *DDCLevelSupported)
     148uint32_t VBE_report_DDC_capabilities(uint16_t controller_unit_number,
     149                                        uint8_t *seconds_to_transfer_EDID_block,
     150                                        uint8_t *DDC_level_supported)
    151151{
    152152    i386_realmode_interrupt_registers parret;
    153153    parret.reg_eax = VBE_DisDatCha;
    154154    parret.reg_ebx = VBEDDC_Capabilities;
    155     parret.reg_ecx = controllerUnitNumber;
     155    parret.reg_ecx = controller_unit_number;
    156156    parret.reg_edi = 0;
    157157    parret.reg_es = 0;
    158158    if (i386_real_interrupt_call(INTERRUPT_NO_VIDEO_SERVICES, &parret) == 0)
    159159        return -1;
    160     *secondsToTransferEDIDBlock = (uint8_t)parret.reg_ebx >> 8;
    161     *DDCLevelSupported = (uint8_t)parret.reg_ebx;
     160    *seconds_to_transfer_EDID_block = (uint8_t)parret.reg_ebx >> 8;
     161    *DDC_level_supported = (uint8_t)parret.reg_ebx;
    162162    return (parret.reg_eax & 0xFFFF);
    163163}
    164164
    165 inline uint32_t VBEReadEDID(uint16_t controllerUnitNumber,
    166                             uint16_t EDIDBlockNumber,
    167                             struct edid1 *buffer)
     165uint32_t VBE_read_EDID(uint16_t controller_unit_number,
     166                            uint16_t EDID_block_number,
     167                            EDID_edid1 *buffer)
    168168{
    169169    uint16_t size;
    170     struct edid1 *VBE_buffer = (struct edid1 *)i386_get_default_rm_buffer(&size);
     170    EDID_edid1 *VBE_buffer = (EDID_edid1*)i386_get_default_rm_buffer(&size);
    171171    i386_realmode_interrupt_registers parret;
    172172    parret.reg_eax = VBE_DisDatCha;
    173173    parret.reg_ebx = VBEDDC_ReadEDID;
    174     parret.reg_ecx = controllerUnitNumber;
    175     parret.reg_edx = EDIDBlockNumber;
     174    parret.reg_ecx = controller_unit_number;
     175    parret.reg_edx = EDID_block_number;
    176176    uint16_t seg, off;
    177177    i386_Physical_to_real(VBE_buffer, &seg, &off);
     
    189189
    190190typedef struct {
    191     uint16_t modeNumber;
     191    uint16_t mode_number;
    192192    uint16_t resX;
    193193    uint16_t resY;
    194194    uint8_t bpp;
    195 } modeParams;
     195} Mode_params;
    196196
    197197/* finds mode in 'modeList' of 'listLength' length according to resolution
     
    201201    'searchedResolution'. bpp is also filled into 'searchedResolution' if it
    202202    was 0 before call. */
    203 static uint16_t findModeByResolution(   modeParams *modeList,
    204                                         uint8_t listLength,
    205                                         modeParams *searchedResolution)
     203static uint16_t find_mode_by_resolution(Mode_params *mode_list,
     204                                        uint8_t list_length,
     205                                        Mode_params *searched_resolution)
    206206{
    207207    uint8_t i = 0;
    208     while (i < listLength)
    209     {
    210         if (searchedResolution->resX == modeList[i].resX &&
    211             searchedResolution->resY == modeList[i].resY)
    212         {
    213             if (searchedResolution->bpp==0 ||
    214                 searchedResolution->bpp==modeList[i].bpp)
     208    while (i < list_length)
     209    {
     210        if (searched_resolution->resX == mode_list[i].resX &&
     211            searched_resolution->resY == mode_list[i].resY)
     212        {
     213            if (searched_resolution->bpp==0 ||
     214                searched_resolution->bpp==mode_list[i].bpp)
    215215            {
    216                 searchedResolution->bpp = modeList[i].bpp;
    217                 searchedResolution->modeNumber = modeList[i].modeNumber;
    218                 return modeList[i].modeNumber;
     216                searched_resolution->bpp = mode_list[i].bpp;
     217                searched_resolution->mode_number = mode_list[i].mode_number;
     218                return mode_list[i].mode_number;
    219219            }
    220220        }
     
    233233 *         -1 on parsing error or when no suitable mode found
    234234 */
    235 static uint16_t findModeUsingCmdline(   modeParams *modeList,
    236                                         uint8_t listLength)
     235static uint16_t find_mode_using_cmdline(Mode_params *mode_list,
     236                                        uint8_t list_length)
    237237{
    238238    const char* opt;
    239     modeParams cmdlineMode;
     239    Mode_params cmdline_mode;
    240240    char* endptr;
    241     cmdlineMode.bpp = 0;
     241    cmdline_mode.bpp = 0;
    242242    opt = bsp_cmdline_arg("--video=");
    243243    if (opt)
    244244    {
    245245        opt += sizeof("--video=")-1;
    246         cmdlineMode.resX = strtol(opt, &endptr, 10);
     246        cmdline_mode.resX = strtol(opt, &endptr, 10);
    247247        if (*endptr != 'x')
    248248        {
     
    250250        }
    251251        opt = endptr+1;
    252         cmdlineMode.resY = strtol(opt, &endptr, 10);
     252        cmdline_mode.resY = strtol(opt, &endptr, 10);
    253253        switch (*endptr)
    254254        {
     
    256256                opt = endptr+1;
    257257                if (strlen(opt) <= 2)
    258                     cmdlineMode.bpp = strtol(opt, &endptr, 10);
     258                    cmdline_mode.bpp = strtol(opt, &endptr, 10);
    259259                else
    260260                {
    261                     cmdlineMode.bpp = strtol(opt, &endptr, 10);
     261                    cmdline_mode.bpp = strtol(opt, &endptr, 10);
    262262                    if (*endptr != ' ')
    263263                    {
     
    272272        }
    273273
    274         if (findModeByResolution(modeList, listLength, &cmdlineMode) !=
     274        if (find_mode_by_resolution(mode_list, list_length, &cmdline_mode) !=
    275275            (uint16_t)-1)
    276             return cmdlineMode.modeNumber;
     276            return cmdline_mode.mode_number;
    277277    }
    278278    return -1;
     
    285285 *         -1 on parsing error or when no suitable mode found
    286286 */
    287 static uint16_t findModeUsingEDID(  modeParams *modeList,
    288                                     uint8_t listLength)
    289 {
    290     struct edid1 edid;
     287static uint16_t find_mode_using_EDID( Mode_params *mode_list,
     288                                      uint8_t list_length)
     289{
     290    EDID_edid1 edid;
    291291    uint8_t checksum, iterator;
    292292    uint8_t index, j;
    293     modeParams EDIDmode;
     293    Mode_params EDIDmode;
    294294    checksum = 0;
    295295    iterator = 0;
    296296    EDIDmode.bpp = 0;
    297     if (VBEReadEDID(0, 0, &edid) !=
     297    if (VBE_read_EDID(0, 0, &edid) !=
    298298        (VBE_callSuccessful<<8 | VBE_functionSupported))
    299299    {
     
    304304    if (edid.Version == 1)
    305305    { /* EDID version 1 */
    306         while (iterator < sizeof(struct edid1))
     306        while (iterator < sizeof(EDID_edid1))
    307307        {
    308308            checksum += *((uint8_t *)&edid+iterator);
     
    326326                continue;
    327327            }
    328             EDIDmode.resX = DTD_HorizontalActive(&edid.dtd_md[0].dtd);
    329             EDIDmode.resY = DTD_VerticalActive(&edid.dtd_md[0].dtd);
    330             if (findModeByResolution(modeList, listLength, &EDIDmode) !=
     328            EDIDmode.resX = DTD_horizontal_active(&edid.dtd_md[0].dtd);
     329            EDIDmode.resY = DTD_vertical_active(&edid.dtd_md[0].dtd);
     330            if (find_mode_by_resolution(mode_list, list_length, &EDIDmode) !=
    331331                (uint16_t)-1)
    332                 return EDIDmode.modeNumber;
     332                return EDIDmode.mode_number;
    333333
    334334            index++;
     
    351351                edid.dtd_md[index].md.Flag2 == 0)
    352352            {
    353                 struct CVTTimingCodes3B *cvt = (struct CVTTimingCodes3B *)
     353                EDID_CVT_timing_codes_3B *cvt = (EDID_CVT_timing_codes_3B *)
    354354                    &edid.dtd_md[index].md.DescriptorData[0];
    355355                j = 0;
    356356                while (j < 4)
    357357                {
    358                     EDIDmode.resY = edid1_CVT_AddressableLinesHigh(&cvt->cvt[j]);
    359                     switch (edid1_CVT_AspectRatio(&cvt->cvt[j]))
     358                    EDIDmode.resY = edid1_CVT_addressable_lines_high(
     359                        &cvt->cvt[j]
     360                    );
     361                    switch (edid1_CVT_aspect_ratio(&cvt->cvt[j]))
    360362                    {
    361363                        case EDID_CVT_AspectRatio_4_3:
     
    373375                    }
    374376                    EDIDmode.resX = (EDIDmode.resX/8)*8;
    375                     if (findModeByResolution(modeList, listLength, &EDIDmode) !=
    376                         (uint16_t)-1)
    377                         return EDIDmode.modeNumber;
     377                    if (find_mode_by_resolution(
     378                            mode_list, list_length, &EDIDmode) != (uint16_t)-1)
     379                        return EDIDmode.mode_number;
    378380
    379381                    j++;
     
    397399            }
    398400            EDIDmode.resX = (edid.STI[index].HorizontalActivePixels+31)*8;
    399             switch (edid.STI[index].ImageAspectRatio_RefreshRate & EDID1_STI_ImageAspectRatioMask)
     401            switch (edid.STI[index].ImageAspectRatio_RefreshRate &
     402                    EDID1_STI_ImageAspectRatioMask)
    400403            {
    401404                case EDID_STI_AspectRatio_16_10:
     
    412415                    break;
    413416            }
    414             if (findModeByResolution(modeList, listLength, &EDIDmode) !=
     417            if (find_mode_by_resolution(mode_list, list_length, &EDIDmode) !=
    415418                (uint16_t)-1)
    416                 return EDIDmode.modeNumber;
     419                return EDIDmode.mode_number;
    417420
    418421            index++;
     
    422425        /* not implemented */
    423426        /* use Established Timings */
    424         if (edid1_EstablishedTim(&edid, EST_1280x1024_75Hz))
     427        if (edid1_established_tim(&edid, EST_1280x1024_75Hz))
    425428        {
    426429            EDIDmode.resX = 1280;
    427430            EDIDmode.resY = 1024;
    428431            EDIDmode.bpp = 0;
    429             if (findModeByResolution(modeList, listLength, &EDIDmode) !=
     432            if (find_mode_by_resolution(mode_list, list_length, &EDIDmode) !=
    430433                (uint16_t)-1)
    431                 return EDIDmode.modeNumber;
    432         }
    433         if (edid1_EstablishedTim(&edid, EST_1152x870_75Hz))
     434                return EDIDmode.mode_number;
     435        }
     436        if (edid1_established_tim(&edid, EST_1152x870_75Hz))
    434437        {
    435438            EDIDmode.resX = 1152;
    436439            EDIDmode.resY = 870;
    437440            EDIDmode.bpp = 0;
    438             if (findModeByResolution(modeList, listLength, &EDIDmode) !=
     441            if (find_mode_by_resolution(mode_list, list_length, &EDIDmode) !=
    439442                (uint16_t)-1)
    440                 return EDIDmode.modeNumber;
    441         }
    442         if (edid1_EstablishedTim(&edid, EST_1024x768_75Hz) ||
    443             edid1_EstablishedTim(&edid, EST_1024x768_70Hz) ||
    444             edid1_EstablishedTim(&edid, EST_1024x768_60Hz) ||
    445             edid1_EstablishedTim(&edid, EST_1024x768_87Hz))
     443                return EDIDmode.mode_number;
     444        }
     445        if (edid1_established_tim(&edid, EST_1024x768_75Hz) ||
     446            edid1_established_tim(&edid, EST_1024x768_70Hz) ||
     447            edid1_established_tim(&edid, EST_1024x768_60Hz) ||
     448            edid1_established_tim(&edid, EST_1024x768_87Hz))
    446449        {
    447450            EDIDmode.resX = 1024;
    448451            EDIDmode.resY = 768;
    449452            EDIDmode.bpp = 0;
    450             if (findModeByResolution(modeList, listLength, &EDIDmode) !=
     453            if (find_mode_by_resolution(mode_list, list_length, &EDIDmode) !=
    451454                (uint16_t)-1)
    452                 return EDIDmode.modeNumber;
    453         }
    454         if (edid1_EstablishedTim(&edid, EST_832x624_75Hz))
     455                return EDIDmode.mode_number;
     456        }
     457        if (edid1_established_tim(&edid, EST_832x624_75Hz))
    455458        {
    456459            EDIDmode.resX = 832;
    457460            EDIDmode.resY = 624;
    458461            EDIDmode.bpp = 0;
    459             if (findModeByResolution(modeList, listLength, &EDIDmode) !=
     462            if (find_mode_by_resolution(mode_list, list_length, &EDIDmode) !=
    460463                (uint16_t)-1)
    461                 return EDIDmode.modeNumber;
    462         }
    463         if (edid1_EstablishedTim(&edid, EST_800x600_60Hz) ||
    464             edid1_EstablishedTim(&edid, EST_800x600_56Hz) ||
    465             edid1_EstablishedTim(&edid, EST_800x600_75Hz) ||
    466             edid1_EstablishedTim(&edid, EST_800x600_72Hz))
     464                return EDIDmode.mode_number;
     465        }
     466        if (edid1_established_tim(&edid, EST_800x600_60Hz) ||
     467            edid1_established_tim(&edid, EST_800x600_56Hz) ||
     468            edid1_established_tim(&edid, EST_800x600_75Hz) ||
     469            edid1_established_tim(&edid, EST_800x600_72Hz))
    467470        {
    468471            EDIDmode.resX = 800;
    469472            EDIDmode.resY = 600;
    470473            EDIDmode.bpp = 0;
    471             if (findModeByResolution(modeList, listLength, &EDIDmode) !=
     474            if (find_mode_by_resolution(mode_list, list_length, &EDIDmode) !=
    472475                (uint16_t)-1)
    473                 return EDIDmode.modeNumber;
    474         }
    475         if (edid1_EstablishedTim(&edid, EST_720x400_88Hz) ||
    476             edid1_EstablishedTim(&edid, EST_720x400_70Hz))
     476                return EDIDmode.mode_number;
     477        }
     478        if (edid1_established_tim(&edid, EST_720x400_88Hz) ||
     479            edid1_established_tim(&edid, EST_720x400_70Hz))
    477480        {
    478481            EDIDmode.resX = 720;
    479482            EDIDmode.resY = 400;
    480483            EDIDmode.bpp = 0;
    481             if (findModeByResolution(modeList, listLength, &EDIDmode) !=
     484            if (find_mode_by_resolution(mode_list, list_length, &EDIDmode) !=
    482485                (uint16_t)-1)
    483                 return EDIDmode.modeNumber;
    484         }
    485         if (edid1_EstablishedTim(&edid, EST_640x480_75Hz) ||
    486             edid1_EstablishedTim(&edid, EST_640x480_72Hz) ||
    487             edid1_EstablishedTim(&edid, EST_640x480_67Hz) ||
    488             edid1_EstablishedTim(&edid, EST_640x480_60Hz))
     486                return EDIDmode.mode_number;
     487        }
     488        if (edid1_established_tim(&edid, EST_640x480_75Hz) ||
     489            edid1_established_tim(&edid, EST_640x480_72Hz) ||
     490            edid1_established_tim(&edid, EST_640x480_67Hz) ||
     491            edid1_established_tim(&edid, EST_640x480_60Hz))
    489492        {
    490493            EDIDmode.resX = 640;
    491494            EDIDmode.resY = 480;
    492495            EDIDmode.bpp = 0;
    493             if (findModeByResolution(modeList, listLength, &EDIDmode) !=
     496            if (find_mode_by_resolution(mode_list, list_length, &EDIDmode) !=
    494497                (uint16_t)-1)
    495                 return EDIDmode.modeNumber;
     498                return EDIDmode.mode_number;
    496499        }
    497500    }
     
    505508    uint32_t vbe_ret_val;
    506509    uint16_t size;
    507     struct VBE_VbeInfoBlock *vib = (struct VBE_VbeInfoBlock *)
     510    VBE_vbe_info_block *vib = (VBE_vbe_info_block *)
    508511        i386_get_default_rm_buffer(&size);
    509     vbe_ret_val = VBEControllerInformation(vib, 0x300);
     512    vbe_ret_val = VBE_controller_information(vib, 0x300);
    510513    if (vbe_ret_val == -1)
    511514    {
     
    526529    VESA function. */
    527530#define MAX_NO_OF_SORTED_MODES 100
    528     modeParams sortModeParams[MAX_NO_OF_SORTED_MODES];
     531    Mode_params sorted_mode_params[MAX_NO_OF_SORTED_MODES];
    529532
    530533    uint16_t *vmpSegOff = (uint16_t *)&vib->VideoModePtr;
     
    544547            if (iterator < MAX_NO_OF_SORTED_MODES)
    545548            {
    546                 sortModeParams[iterator].modeNumber = *(modeNOPtr+iterator);
     549                sorted_mode_params[iterator].mode_number =*(modeNOPtr+iterator);
    547550                iterator ++;
    548551            }
     
    551554        }
    552555        if (iterator < MAX_NO_OF_SORTED_MODES)
    553             sortModeParams[iterator].modeNumber = 0;
    554     }
    555 
    556     struct VBE_ModeInfoBlock *mib = (struct VBE_ModeInfoBlock *)
     556            sorted_mode_params[iterator].mode_number = 0;
     557    }
     558
     559    VBE_mode_info_block *mib = (VBE_mode_info_block *)
    557560        i386_get_default_rm_buffer(&size);
    558561    iterator = 0;
     
    563566        required parameters */
    564567    while (iterator < MAX_NO_OF_SORTED_MODES &&
    565         sortModeParams[iterator].modeNumber!=0)
    566     {
    567         VBEModeInformation(mib, sortModeParams[iterator].modeNumber);
     568        sorted_mode_params[iterator].mode_number!=0)
     569    {
     570        VBE_mode_information(mib, sorted_mode_params[iterator].mode_number);
    568571        if ((mib->ModeAttributes&required_mode_attributes) ==
    569572            required_mode_attributes)
    570573        {
    571             sortModeParams[nextFilteredMode].modeNumber =
    572                 sortModeParams[iterator].modeNumber;
    573             sortModeParams[nextFilteredMode].resX = mib->XResolution;
    574             sortModeParams[nextFilteredMode].resY = mib->YResolution;
    575             sortModeParams[nextFilteredMode].bpp  = mib->BitsPerPixel;
     574            sorted_mode_params[nextFilteredMode].mode_number =
     575                sorted_mode_params[iterator].mode_number;
     576            sorted_mode_params[nextFilteredMode].resX = mib->XResolution;
     577            sorted_mode_params[nextFilteredMode].resY = mib->YResolution;
     578            sorted_mode_params[nextFilteredMode].bpp  = mib->BitsPerPixel;
    576579            nextFilteredMode ++;
    577580        }
    578581        iterator ++;
    579582    }
    580     sortModeParams[nextFilteredMode].modeNumber = 0;
    581 
    582     uint8_t numberOfModes = nextFilteredMode;
     583    sorted_mode_params[nextFilteredMode].mode_number = 0;
     584
     585    uint8_t number_of_modes = nextFilteredMode;
    583586    /* sort filtered modes */
    584     modeParams modeXchgPlace;
     587    Mode_params modeXchgPlace;
    585588    iterator = 0;
    586589    uint8_t j;
    587590    uint8_t idxBestMode;
    588     while (iterator < numberOfModes)
     591    while (iterator < number_of_modes)
    589592    {
    590593        idxBestMode = iterator;
    591594        j = iterator+1;
    592         while (j < numberOfModes)
    593         {
    594             if (sortModeParams[j].resX > sortModeParams[idxBestMode].resX)
     595        while (j < number_of_modes)
     596        {
     597            if (sorted_mode_params[j].resX >
     598                    sorted_mode_params[idxBestMode].resX)
    595599                idxBestMode = j;
    596             else if (sortModeParams[j].resX == sortModeParams[idxBestMode].resX)
     600            else if (sorted_mode_params[j].resX ==
     601                     sorted_mode_params[idxBestMode].resX)
    597602            {
    598                 if (sortModeParams[j].resY > sortModeParams[idxBestMode].resY)
     603                if (sorted_mode_params[j].resY >
     604                        sorted_mode_params[idxBestMode].resY)
    599605                    idxBestMode = j;
    600                 else if (sortModeParams[j].resY ==
    601                     sortModeParams[idxBestMode].resY)
     606                else if (sorted_mode_params[j].resY ==
     607                    sorted_mode_params[idxBestMode].resY)
    602608                {
    603                     if (sortModeParams[j].bpp > sortModeParams[idxBestMode].bpp)
     609                    if (sorted_mode_params[j].bpp >
     610                            sorted_mode_params[idxBestMode].bpp)
    604611                        idxBestMode = j;
    605612                }
     
    609616        if (idxBestMode != iterator)
    610617        {
    611             modeXchgPlace = sortModeParams[iterator];
    612             sortModeParams[iterator] = sortModeParams[idxBestMode];
    613             sortModeParams[idxBestMode] = modeXchgPlace;
     618            modeXchgPlace = sorted_mode_params[iterator];
     619            sorted_mode_params[iterator] = sorted_mode_params[idxBestMode];
     620            sorted_mode_params[idxBestMode] = modeXchgPlace;
    614621        }
    615622        iterator++;
     
    617624
    618625    /* first search for video argument in multiboot options */
    619     vbe_usedMode = findModeUsingCmdline(sortModeParams, numberOfModes);
    620     if (vbe_usedMode == (uint16_t)-1)
     626    vbe_used_mode = find_mode_using_cmdline(sorted_mode_params,
     627                                            number_of_modes);
     628    if (vbe_used_mode == (uint16_t)-1)
    621629    {
    622630        printk(FB_VESA_NAME " video on command line not provided"
    623631            "\n\ttrying EDID ...\n");
    624632        /* second search monitor for good resolution */
    625         vbe_usedMode = findModeUsingEDID(sortModeParams, numberOfModes);
    626         if (vbe_usedMode == (uint16_t)-1)
     633        vbe_used_mode = find_mode_using_EDID(sorted_mode_params,
     634                                             number_of_modes);
     635        if (vbe_used_mode == (uint16_t)-1)
    627636        {
    628637            printk(FB_VESA_NAME" monitor's EDID video parameters not supported"
    629638                               "\n\tusing mode with highest resolution, bpp\n");
    630639            /* third set highest values */
    631             vbe_usedMode = sortModeParams[0].modeNumber;
     640            vbe_used_mode = sorted_mode_params[0].mode_number;
    632641        }
    633642    }
    634643
    635644    /* fill framebuffer structs with info about selected mode */
    636     vbe_ret_val = VBEModeInformation(mib, vbe_usedMode);
     645    vbe_ret_val = VBE_mode_information(mib, vbe_used_mode);
    637646    if ((vbe_ret_val&0xff)!=VBE_functionSupported ||
    638647        (vbe_ret_val>>8)!=VBE_callSuccessful)
     
    668677
    669678    /* set selected mode */
    670     vbe_ret_val = VBESetMode(vbe_usedMode | VBE_linearFlatFrameBufMask,
    671         (struct VBE_CRTCInfoBlock *)(i386_get_default_rm_buffer(&size)));
     679    vbe_ret_val = VBE_set_mode(vbe_used_mode | VBE_linearFlatFrameBufMask,
     680        (VBE_CRTC_info_block *)(i386_get_default_rm_buffer(&size)));
    672681    if (vbe_ret_val>>8 == VBE_callFailed)
    673682        printk(FB_VESA_NAME " VBE: Requested mode is not available.");
     
    800809static int get_fix_screen_info( struct fb_fix_screeninfo *info )
    801810{
    802     printk("get_fix_screen_info\n");
    803811  *info = fb_fix;
    804812  return 0;
     
    807815static int get_var_screen_info( struct fb_var_screeninfo *info )
    808816{
    809     printk("get_var_screen_info\n");
    810817  *info =  fb_var;
    811818  return 0;
  • c/src/lib/libbsp/i386/pc386/include/edid.h

    radc1dbeb rd78eac6  
    3535
    3636#include <rtems/score/basedefs.h>
    37 #define EDID_PACKED_ATTRIBUTE   RTEMS_COMPILER_PACKED_ATTRIBUTE
    3837#define EDID_INLINE_ROUTINE     RTEMS_INLINE_ROUTINE
    3938
     
    7170#define EDID1_DTD_HorizontalSyncIsPositiveMask  0x1
    7271
    73 struct DetailedTimingDescriptor {
     72typedef struct {
    7473    uint8_t PixelClock_div10000[2];
    7574    uint8_t HorizontalActiveLow;
     
    8988    uint8_t VerticalBorder;
    9089    uint8_t Flags;
    91 } EDID_PACKED_ATTRIBUTE;
    92 
    93 EDID_INLINE_ROUTINE uint16_t DTD_HorizontalActive (
    94     struct DetailedTimingDescriptor *dtd)
     90} RTEMS_COMPILER_PACKED_ATTRIBUTE EDID_detailed_timing_descriptor;
     91
     92EDID_INLINE_ROUTINE uint16_t DTD_horizontal_active (
     93    EDID_detailed_timing_descriptor *dtd)
    9594{
    9695    return (dtd->HorizontalActiveLow |
     
    9897}
    9998
    100 EDID_INLINE_ROUTINE uint16_t DTD_HorizontalBlanking (
    101     struct DetailedTimingDescriptor *dtd)
     99EDID_INLINE_ROUTINE uint16_t DTD_horizontal_blanking (
     100    EDID_detailed_timing_descriptor *dtd)
    102101{
    103102    return (dtd->HorizontalBlankingLow |
     
    105104}
    106105
    107 EDID_INLINE_ROUTINE uint16_t DTD_VerticalActive (
    108     struct DetailedTimingDescriptor *dtd)
     106EDID_INLINE_ROUTINE uint16_t DTD_vertical_active (
     107    EDID_detailed_timing_descriptor *dtd)
    109108{
    110109    return (dtd->VerticalActiveLow |
     
    112111}
    113112
    114 EDID_INLINE_ROUTINE uint16_t DTD_VerticalBlanking (
    115     struct DetailedTimingDescriptor *dtd)
     113EDID_INLINE_ROUTINE uint16_t DTD_vertical_blanking (
     114    EDID_detailed_timing_descriptor *dtd)
    116115{
    117116    return (dtd->VerticalBlankingLow |
     
    119118}
    120119
    121 EDID_INLINE_ROUTINE uint16_t DTD_VerticalSyncPulseWidth (
    122     struct DetailedTimingDescriptor *dtd)
     120EDID_INLINE_ROUTINE uint16_t DTD_vertical_sync_pulse_width (
     121    EDID_detailed_timing_descriptor *dtd)
    123122{
    124123    return ((dtd->VerticalSyncPulseWidth_OffsetLow & 0xF) |
     
    126125}
    127126
    128 EDID_INLINE_ROUTINE uint16_t DTD_VerticalSyncOffset (
    129     struct DetailedTimingDescriptor *dtd)
     127EDID_INLINE_ROUTINE uint16_t DTD_vertical_sync_offset (
     128    EDID_detailed_timing_descriptor *dtd)
    130129{
    131130    return ((dtd->VerticalSyncPulseWidth_OffsetLow >> 4) |
     
    133132}
    134133
    135 EDID_INLINE_ROUTINE uint16_t DTD_HorizontalSyncPulseWidth (
    136     struct DetailedTimingDescriptor *dtd)
     134EDID_INLINE_ROUTINE uint16_t DTD_horizontal_sync_pulse_width (
     135    EDID_detailed_timing_descriptor *dtd)
    137136{
    138137    return (dtd->HorizontalSyncPulseWidthLow |
     
    140139}
    141140
    142 EDID_INLINE_ROUTINE uint16_t DTD_HorizontalSyncOffset (
    143     struct DetailedTimingDescriptor *dtd)
     141EDID_INLINE_ROUTINE uint16_t DTD_horizontal_sync_offset (
     142    EDID_detailed_timing_descriptor *dtd)
    144143{
    145144    return (dtd->HorizontalSyncOffsetLow |
     
    147146}
    148147
    149 EDID_INLINE_ROUTINE uint16_t DTD_VerticalImageSize (
    150     struct DetailedTimingDescriptor *dtd)
     148EDID_INLINE_ROUTINE uint16_t DTD_vertical_image_size (
     149    EDID_detailed_timing_descriptor *dtd)
    151150{
    152151    return (dtd->VerticalImageSizeLow |
     
    154153}
    155154
    156 EDID_INLINE_ROUTINE uint16_t DTD_HorizontalImageSize (
    157     struct DetailedTimingDescriptor *dtd)
     155EDID_INLINE_ROUTINE uint16_t DTD_horizontal_image_size (
     156    EDID_detailed_timing_descriptor *dtd)
    158157{
    159158    return (dtd->HorizontalImageSizeLow |
     
    161160}
    162161
    163 struct ColorPointData {
     162typedef struct {
    164163    uint8_t ColorPointWhitePointIndexNumber;
    165164    uint8_t ColorPointWhiteLowBits;
     
    167166    uint8_t ColorPointWhite_y;
    168167    uint8_t ColorPointWhiteGamma;
    169 } EDID_PACKED_ATTRIBUTE;
     168} RTEMS_COMPILER_PACKED_ATTRIBUTE EDID_color_point_data;
    170169
    171170/* Basic Display Parameters */
     
    176175
    177176#define EDID_DTT_MonitorRangeLimits         0xFD
    178 struct MonitorRangeLimits {
     177typedef struct {
    179178    uint8_t MinVerticalRateInHz;
    180179    uint8_t MaxVerticalRateInHz;
     
    185184        Version 1.0, December 18, 1996 */
    186185    uint8_t GTFStandard[8];
    187 } EDID_PACKED_ATTRIBUTE;
     186} RTEMS_COMPILER_PACKED_ATTRIBUTE EDID_monitor_range_limits;
    188187
    189188#define EDID_DTT_MonitorName                0xFC
     
    223222#define EDID_CVT_PrefVertRate75Hz           2
    224223#define EDID_CVT_PrefVertRate85Hz           3
    225 struct CVT3ByteCodeDescriptor {
     224typedef struct {
    226225    uint8_t AddressableLinesLow;
    227226    uint8_t AspectRatio_AddressableLinesHigh;
    228227    uint8_t VerticalRate_PreferredVerticalRate;
    229 } EDID_PACKED_ATTRIBUTE;
    230 struct CVTTimingCodes3B {
     228} RTEMS_COMPILER_PACKED_ATTRIBUTE EDID_CVT_3_byte_code_descriptor;
     229typedef struct {
    231230    uint8_t VersionNumber;
    232     struct CVT3ByteCodeDescriptor cvt[4];
    233 } EDID_PACKED_ATTRIBUTE;
    234 
    235 EDID_INLINE_ROUTINE uint16_t edid1_CVT_AddressableLinesHigh (
    236     struct CVT3ByteCodeDescriptor *cvt)
     231    EDID_CVT_3_byte_code_descriptor cvt[4];
     232} RTEMS_COMPILER_PACKED_ATTRIBUTE EDID_CVT_timing_codes_3B;
     233
     234EDID_INLINE_ROUTINE uint16_t edid1_CVT_addressable_lines_high (
     235    EDID_CVT_3_byte_code_descriptor *cvt)
    237236{
    238237    return (cvt->AddressableLinesLow |
     
    242241}
    243242
    244 EDID_INLINE_ROUTINE uint8_t edid1_CVT_AspectRatio (
    245     struct CVT3ByteCodeDescriptor *cvt)
     243EDID_INLINE_ROUTINE uint8_t edid1_CVT_aspect_ratio (
     244    EDID_CVT_3_byte_code_descriptor *cvt)
    246245{
    247246    return (cvt->AspectRatio_AddressableLinesHigh >> EDID1_CVT_AspectRatioOff) &
     
    250249
    251250#define EDID_DTT_EstablishedTimingsIII      0xF7
    252 struct EstablishedTimingsIII {
     251typedef struct {
    253252    uint8_t RevisionNumber;
    254253    uint8_t EST_III[12];
    255 } EDID_PACKED_ATTRIBUTE;
     254} RTEMS_COMPILER_PACKED_ATTRIBUTE EDID_established_timings_III;
    256255enum EST_III {
    257256    EST_1152x864_75Hz   = 0,
     
    309308/* DTT 0x0 - 0xF are manufacturer specific */
    310309
    311 struct MonitorDescriptor {
     310typedef struct {
    312311    uint8_t Flag0[2];
    313312    uint8_t Flag1;
     
    315314    uint8_t Flag2;
    316315    uint8_t DescriptorData[13];
    317 } EDID_PACKED_ATTRIBUTE;
    318 
    319 union DTD_MD {
    320     struct DetailedTimingDescriptor dtd;
    321     struct MonitorDescriptor md;
    322 } EDID_PACKED_ATTRIBUTE;
     316} RTEMS_COMPILER_PACKED_ATTRIBUTE EDID_monitor_descriptor;
     317
     318union EDID_DTD_MD {
     319    EDID_detailed_timing_descriptor dtd;
     320    EDID_monitor_descriptor md;
     321} RTEMS_COMPILER_PACKED_ATTRIBUTE;
    323322
    324323#define EDID1_STI_ImageAspectRatioOff           0
     
    332331#define EDID_STI_AspectRatio_5_4            2
    333332#define EDID_STI_AspectRatio_16_9           3
    334 struct StandardTimingIdentification {
     333typedef struct {
    335334    uint8_t HorizontalActivePixels;
    336335    uint8_t ImageAspectRatio_RefreshRate;
    337 } EDID_PACKED_ATTRIBUTE;
     336} RTEMS_COMPILER_PACKED_ATTRIBUTE EDID_standard_timing_identification;
    338337
    339338/* Video Input Definition */
     
    410409#define EDID_DisplayType_RGB444YCrCb444YCrCb422     3
    411410
    412 struct edid1 {
     411typedef struct {
    413412    uint8_t Header[8];
    414413/*  Vendor Product Identification */
     
    443442    uint8_t EST_I_II_Man[3];
    444443/*  Standard Timing Identification */
    445     struct StandardTimingIdentification STI[8];
     444    EDID_standard_timing_identification STI[8];
    446445/*  Detailed Timing Descriptions / Monitor Descriptions */
    447     union DTD_MD dtd_md[4];
     446    union EDID_DTD_MD dtd_md[4];
    448447    uint8_t ExtensionFlag;
    449448    uint8_t Checksum;
    450 } EDID_PACKED_ATTRIBUTE;
    451 
    452 EDID_INLINE_ROUTINE uint16_t edid1_RedX (struct edid1 *edid) {
     449} RTEMS_COMPILER_PACKED_ATTRIBUTE EDID_edid1;
     450
     451EDID_INLINE_ROUTINE uint16_t edid1_RedX (EDID_edid1 *edid) {
    453452    return (edid->RedXHigh<<2) | (edid->GreenRedLow>>6);
    454453}
    455 EDID_INLINE_ROUTINE uint16_t edid1_RedY (struct edid1 *edid) {
     454EDID_INLINE_ROUTINE uint16_t edid1_RedY (EDID_edid1 *edid) {
    456455    return (edid->RedYHigh<<2) | (edid->GreenRedLow>>4)&&0x3;
    457456}
    458 EDID_INLINE_ROUTINE uint16_t edid1_GreenX (struct edid1 *edid) {
     457EDID_INLINE_ROUTINE uint16_t edid1_GreenX (EDID_edid1 *edid) {
    459458    return (edid->GreenXHigh<<2) | (edid->GreenRedLow>>2)&&0x3;
    460459}
    461 EDID_INLINE_ROUTINE uint16_t edid1_GreenY (struct edid1 *edid) {
     460EDID_INLINE_ROUTINE uint16_t edid1_GreenY (EDID_edid1 *edid) {
    462461    return (edid->GreenYHigh<<2) | (edid->GreenRedLow&0x3);
    463462}
    464 EDID_INLINE_ROUTINE uint16_t edid1_BlueX (struct edid1 *edid) {
     463EDID_INLINE_ROUTINE uint16_t edid1_BlueX (EDID_edid1 *edid) {
    465464    return (edid->BlueXHigh<<2)  | (edid->WhiteBlueLow>>6);
    466465}
    467 EDID_INLINE_ROUTINE uint16_t edid1_BlueY (struct edid1 *edid) {
     466EDID_INLINE_ROUTINE uint16_t edid1_BlueY (EDID_edid1 *edid) {
    468467    return (edid->BlueYHigh<<2)  | (edid->WhiteBlueLow>>4)&&0x3;
    469468}
    470 EDID_INLINE_ROUTINE uint16_t edid1_WhiteX (struct edid1 *edid) {
     469EDID_INLINE_ROUTINE uint16_t edid1_WhiteX (EDID_edid1 *edid) {
    471470    return (edid->WhiteXHigh<<2) | (edid->WhiteBlueLow>>2)&&0x3;
    472471}
    473 EDID_INLINE_ROUTINE uint16_t edid1_WhiteY (struct edid1 *edid) {
     472EDID_INLINE_ROUTINE uint16_t edid1_WhiteY (EDID_edid1 *edid) {
    474473    return (edid->WhiteYHigh<<2) | (edid->WhiteBlueLow&0x3);
    475474}
    476475
    477 enum edid1_EstablishedTimings {
     476enum edid1_established_timings {
    478477/*  Established Timings I */
    479478    EST_800x600_60Hz    = 0,
     
    498497};
    499498
    500 EDID_INLINE_ROUTINE uint8_t edid1_EstablishedTim (
    501     struct edid1 *edid,
    502     enum edid1_EstablishedTimings est)
     499EDID_INLINE_ROUTINE uint8_t edid1_established_tim (
     500    EDID_edid1 *edid,
     501    enum edid1_established_timings est)
    503502{
    504503    return (uint8_t)(edid->EST_I_II_Man[est/8] & (est%8));
  • c/src/lib/libbsp/i386/pc386/include/fb_vesa.h

    radc1dbeb rd78eac6  
    4646 *          -1 error calling graphical bios
    4747 */
    48 uint32_t VBEControllerInformation (
    49     struct VBE_VbeInfoBlock *infoBlock,
    50     uint16_t queriedVBEVersion
     48uint32_t VBE_controller_information (
     49    VBE_vbe_info_block *info_block,
     50    uint16_t queried_VBE_Version
    5151);
    5252
     
    6060 *          -1 error calling graphical bios
    6161 */
    62 uint32_t VBEModeInformation (
    63     struct VBE_ModeInfoBlock *infoBlock,
    64     uint16_t modeNumber
     62uint32_t VBE_mode_information (
     63    VBE_mode_info_block *info_block,
     64    uint16_t mode_number
    6565);
    6666
     
    7474 *          -1 error calling graphical bios
    7575 */
    76 uint32_t VBESetMode (
    77     uint16_t modeNumber,
    78     struct VBE_CRTCInfoBlock *infoBlock
     76uint32_t VBE_set_mode (
     77    uint16_t mode_number,
     78    VBE_CRTC_info_block *info_block
    7979);
    8080
     
    8686 *          -1 error calling graphical bios
    8787 */
    88 uint32_t VBECurrentMode (
    89     uint16_t *modeNumber
     88uint32_t VBE_current_mode (
     89    uint16_t *mode_number
    9090);
    9191
     
    102102 *          -1 error calling graphical bios
    103103 */
    104 uint32_t VBEReportDDCCapabilities (
    105     uint16_t controllerUnitNumber,
    106     uint8_t *secondsToTransferEDIDBlock,
    107     uint8_t *DDCLevelSupported
     104uint32_t VBE_report_DDC_capabilities (
     105    uint16_t controller_unit_number,
     106    uint8_t *seconds_to_transfer_EDID_block,
     107    uint8_t *DDC_level_supported
    108108);
    109109
     
    117117 *          -1 error calling graphical bios
    118118 */
    119 uint32_t VBEReadEDID (
    120     uint16_t controllerUnitNumber,
    121     uint16_t EDIDBlockNumber,
    122     struct edid1 *buffer
     119uint32_t VBE_read_EDID (
     120    uint16_t controller_unit_number,
     121    uint16_t EDID_block_number,
     122    EDID_edid1 *buffer
    123123);
    124124
  • c/src/lib/libbsp/i386/pc386/include/tblsizes.h

    radc1dbeb rd78eac6  
    2323#define IDT_SIZE (256)
    2424#define GDT_SIZE (3 + NUM_APP_DRV_GDT_DESCRIPTORS)
    25 
  • c/src/lib/libbsp/i386/pc386/include/vbe3.h

    radc1dbeb rd78eac6  
    3434
    3535#include <rtems/score/basedefs.h>
    36 #define VBE3_PACKED_ATTRIBUTE   RTEMS_COMPILER_PACKED_ATTRIBUTE
    3736
    3837/*  VESA BIOS EXTENSION (VBE) Core functions Standard
     
    157156                                        Specification Information */
    158157/* *** Structures *** */
    159 struct VBE_FarPtr {
     158typedef struct {
    160159    uint16_t offset;
    161160    uint16_t selector;
    162 } VBE3_PACKED_ATTRIBUTE;
    163 
    164 struct VBE_PMInfoBlock {
     161} RTEMS_COMPILER_PACKED_ATTRIBUTE VBE_far_pointer;
     162
     163typedef struct {
    165164    uint8_t   Signature[4];    /*  PM Info Block Signature */
    166165    uint16_t  EntryPoint;      /*  Offset of PM entry point within BIOS */
     
    173172    uint8_t   InProtectMode;   /*  Set to 1 when in protected mode */
    174173    uint8_t   Checksum;        /*  Checksum byte for structure */
    175 } VBE3_PACKED_ATTRIBUTE;
     174} RTEMS_COMPILER_PACKED_ATTRIBUTE VBE_protected_mode_info_block;
    176175
    177176/* General VBE signature */
     
    182181#define VBE_END_OF_VideoModeList 0xFFFF
    183182#define VBE_STUB_VideoModeList 0xFFFF
    184 struct VBE_VbeInfoBlock {
     183typedef struct {
    185184    uint8_t   VbeSignature[4];   /*  VBE Signature */
    186185    uint16_t  VbeVersion;        /*  VBE Version */
     
    197196    /*    area */
    198197    uint8_t   OemData[256];      /*  Data Area for OEM Strings */
    199 } VBE3_PACKED_ATTRIBUTE;
    200 
    201 struct VBE_ModeInfoBlock {
     198} RTEMS_COMPILER_PACKED_ATTRIBUTE VBE_vbe_info_block;
     199
     200typedef struct {
    202201    /*  Mandatory information for all VBE revisions */
    203202    uint16_t  ModeAttributes;        /* mode attributes */
     
    253252                                        (in Hz) for graphics mode */
    254253    uint8_t   Reserved3[189];        /* remainder of ModeInfoBlock */
    255 } VBE3_PACKED_ATTRIBUTE;
    256 
    257 struct VBE_CRTCInfoBlock {
     254} RTEMS_COMPILER_PACKED_ATTRIBUTE VBE_mode_info_block;
     255
     256typedef struct {
    258257    uint16_t  HorizontalTotal;       /* Horizontal total in pixels */
    259258    uint16_t  HorizontalSyncStart;   /* Horizontal sync start in pixels */
     
    266265    uint16_t  RefreshRate;           /* Refresh rate in units of 0.01 Hz */
    267266    uint8_t   Reserved[40];          /* remainder of ModeInfoBlock */
    268 } VBE3_PACKED_ATTRIBUTE;
    269 
    270 struct VBE_PaletteEntry {
     267} RTEMS_COMPILER_PACKED_ATTRIBUTE VBE_CRTC_info_block;
     268
     269typedef struct {
    271270    uint8_t   Blue;                  /* Blue channel value (6 or 8 bits) */
    272271    uint8_t   Green;                 /* Green channel value (6 or 8 bits) */
    273272    uint8_t   Red;                   /* Red channel value(6 or 8 bits) */
    274273    uint8_t   Alignment;             /* DWORD alignment byte (unused) */
    275 } VBE3_PACKED_ATTRIBUTE;
    276 
    277 struct VBE_SupVbeInfoBlock {
     274} RTEMS_COMPILER_PACKED_ATTRIBUTE VBE_palette_entry;
     275
     276typedef struct {
    278277    uint8_t   SupVbeSignature[7];    /* Supplemental VBE Signature */
    279278    uint16_t  SupVbeVersion;         /* Supplemental VBE Version */
     
    287286                                        strings and future */
    288287    /*  expansion */
    289 } VBE3_PACKED_ATTRIBUTE;
     288} RTEMS_COMPILER_PACKED_ATTRIBUTE VBE_supplemental_vbe_info_block;
    290289
    291290/* VbeInfoBlock Capabilities */
     
    461460
    462461#endif /* _VBE_H */
    463 
  • c/src/lib/libbsp/i386/shared/realmode_int/realmode_int.c

    radc1dbeb rd78eac6  
    182182}
    183183
    184 int i386_real_interrupt_call(uint8_t interruptNumber,
     184int i386_real_interrupt_call(uint8_t interrupt_number,
    185185                             i386_realmode_interrupt_registers *ir)
    186186{
     
    271271    );
    272272    interrupt_number_ptr = (uint8_t *)(rm_swtch_code_dst+interrupt_number_off);
    273     *interrupt_number_ptr = interruptNumber;
     273    *interrupt_number_ptr = interrupt_number;
    274274    /* execute code that jumps to coppied function, which switches to real mode,
    275275       loads registers with values passed to interrupt and executes interrupt */
     
    404404    return 1;
    405405}
    406 
  • c/src/lib/libbsp/i386/shared/realmode_int/realmode_int.h

    radc1dbeb rd78eac6  
    7575 *          1 call successful
    7676 */
    77 extern int i386_real_interrupt_call(uint8_t interruptNumber, i386_realmode_interrupt_registers *ir);
     77extern int i386_real_interrupt_call(
     78    uint8_t interrupt_number,
     79    i386_realmode_interrupt_registers *ir
     80);
    7881
    7982#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.