[PATCH 1/2] i386/pc386: cammelCase to underscores, typedefed structs, break >80 chars lines, removed newlines at EOFs

Gedare Bloom gedare at rtems.org
Tue Dec 2 23:54:32 UTC 2014


Quick Notes:
* struct and function names still use camelCase, these are the real
problem, local variables are less important really.
* Use EDID not Edid
* Is some of this supposed to be called from user applications? Most
(all?) "user-facing" APIs in RTEMS use all lowercase function and type
names.
* Prepend static to all inline (separate patch is OK)

-Gedare

On Tue, Dec 2, 2014 at 11:49 AM, Jan Dolezal <dolezj21 at fel.cvut.cz> wrote:
> applies to files related to VESA real mode framebuffer
> ---
>  c/src/lib/libbsp/i386/pc386/console/fb_vesa_rm.c   | 251 +++++++++++----------
>  c/src/lib/libbsp/i386/pc386/include/edid.h         |  86 +++----
>  c/src/lib/libbsp/i386/pc386/include/fb_vesa.h      |  38 ++--
>  c/src/lib/libbsp/i386/pc386/include/tblsizes.h     |   1 -
>  c/src/lib/libbsp/i386/pc386/include/vbe3.h         |  29 ++-
>  .../libbsp/i386/shared/realmode_int/realmode_int.c |   5 +-
>  .../libbsp/i386/shared/realmode_int/realmode_int.h |   5 +-
>  7 files changed, 210 insertions(+), 205 deletions(-)
>
> diff --git a/c/src/lib/libbsp/i386/pc386/console/fb_vesa_rm.c b/c/src/lib/libbsp/i386/pc386/console/fb_vesa_rm.c
> index 6b26d35..b7b27b6 100644
> --- a/c/src/lib/libbsp/i386/pc386/console/fb_vesa_rm.c
> +++ b/c/src/lib/libbsp/i386/pc386/console/fb_vesa_rm.c
> @@ -59,14 +59,14 @@ static pthread_mutex_t vesa_mutex = PTHREAD_MUTEX_INITIALIZER;
>  static struct fb_var_screeninfo fb_var;
>  static struct fb_fix_screeninfo fb_fix;
>
> -static uint16_t vbe_usedMode;
> +static uint16_t vbe_used_mode;
>
> -inline uint32_t VBEControllerInformation(   struct VBE_VbeInfoBlock *infoBlock,
> -                                            uint16_t queriedVBEVersion)
> +inline uint32_t VBE_controller_information( VBE_VbeInfoBlock *info_block,
> +                                            uint16_t queried_VBE_Version)
>  {
>      uint16_t size;
> -    struct VBE_VbeInfoBlock *VBE_buffer =
> -        (struct VBE_VbeInfoBlock *)i386_get_default_rm_buffer(&size);
> +    VBE_VbeInfoBlock *VBE_buffer =
> +        (VBE_VbeInfoBlock *)i386_get_default_rm_buffer(&size);
>      i386_realmode_interrupt_registers parret;
>      parret.reg_eax = VBE_RetVBEConInf;
>      uint16_t seg, off;
> @@ -74,7 +74,7 @@ inline uint32_t VBEControllerInformation(   struct VBE_VbeInfoBlock *infoBlock,
>      parret.reg_edi = (uint32_t)off;
>      parret.reg_es = seg;
>      /* indicate to graphic's bios that VBE2.0 extended information is desired */
> -    if (queriedVBEVersion >= 0x200)
> +    if (queried_VBE_Version >= 0x200)
>      {
>          strncpy(
>              (char *)&VBE_buffer->VbeSignature,
> @@ -87,20 +87,20 @@ inline uint32_t VBEControllerInformation(   struct VBE_VbeInfoBlock *infoBlock,
>      if ((parret.reg_eax & 0xFFFF) ==
>          (VBE_callSuccessful<<8 | VBE_functionSupported))
>      {
> -        *infoBlock = *VBE_buffer;
> +        *info_block = *VBE_buffer;
>      }
>      return (parret.reg_eax & 0xFFFF);
>  }
>
> -inline uint32_t VBEModeInformation( struct VBE_ModeInfoBlock *infoBlock,
> -                                    uint16_t modeNumber)
> +inline uint32_t VBE_mode_information( VBE_ModeInfoBlock *info_block,
> +                                    uint16_t mode_number)
>  {
>      uint16_t size;
> -    struct VBE_ModeInfoBlock *VBE_buffer =
> -        (struct VBE_ModeInfoBlock *)i386_get_default_rm_buffer(&size);
> +    VBE_ModeInfoBlock *VBE_buffer =
> +        (VBE_ModeInfoBlock *)i386_get_default_rm_buffer(&size);
>      i386_realmode_interrupt_registers parret;
>      parret.reg_eax = VBE_RetVBEModInf;
> -    parret.reg_ecx = modeNumber;
> +    parret.reg_ecx = mode_number;
>      uint16_t seg, off;
>      i386_Physical_to_real(VBE_buffer, &seg, &off);
>      parret.reg_edi = (uint32_t)off;
> @@ -110,22 +110,22 @@ inline uint32_t VBEModeInformation( struct VBE_ModeInfoBlock *infoBlock,
>      if ((parret.reg_eax & 0xFFFF) ==
>          (VBE_callSuccessful<<8 | VBE_functionSupported))
>      {
> -        *infoBlock = *VBE_buffer;
> +        *info_block = *VBE_buffer;
>      }
>      return (parret.reg_eax & 0xFFFF);
>  }
>
> -inline uint32_t VBESetMode( uint16_t modeNumber,
> -                            struct VBE_CRTCInfoBlock *infoBlock)
> +inline uint32_t VBE_set_mode( uint16_t mode_number,
> +                            VBE_CRTCInfoBlock *info_block)
>  {
>      uint16_t size;
> -    struct VBE_CRTCInfoBlock *VBE_buffer =
> -        (struct VBE_CRTCInfoBlock *)i386_get_default_rm_buffer(&size);
> +    VBE_CRTCInfoBlock *VBE_buffer =
> +        (VBE_CRTCInfoBlock *)i386_get_default_rm_buffer(&size);
>      i386_realmode_interrupt_registers parret;
>      /* copy CRTC */
> -    *VBE_buffer = *infoBlock;
> +    *VBE_buffer = *info_block;
>      parret.reg_eax = VBE_SetVBEMod;
> -    parret.reg_ebx = modeNumber;
> +    parret.reg_ebx = mode_number;
>      uint16_t seg, off;
>      i386_Physical_to_real(VBE_buffer, &seg, &off);
>      parret.reg_edi = (uint32_t)off;
> @@ -135,44 +135,44 @@ inline uint32_t VBESetMode( uint16_t modeNumber,
>      return (parret.reg_eax & 0xFFFF);
>  }
>
> -inline uint32_t VBECurrentMode(uint16_t *modeNumber)
> +inline uint32_t VBE_current_mode(uint16_t *mode_number)
>  {
>      i386_realmode_interrupt_registers parret;
>      parret.reg_eax = VBE_RetCurVBEMod;
>      if (i386_real_interrupt_call(INTERRUPT_NO_VIDEO_SERVICES, &parret) == 0)
>          return -1;
> -    *modeNumber = (uint16_t)parret.reg_ebx;
> +    *mode_number = (uint16_t)parret.reg_ebx;
>      return (parret.reg_eax & 0xFFFF);
>  }
>
> -inline uint32_t VBEReportDDCCapabilities(   uint16_t controllerUnitNumber,
> -                                            uint8_t *secondsToTransferEDIDBlock,
> -                                            uint8_t *DDCLevelSupported)
> +inline uint32_t VBE_report_DDC_capabilities(uint16_t controller_unit_number,
> +                                        uint8_t *seconds_to_transfer_EDID_block,
> +                                        uint8_t *DDC_level_supported)
>  {
>      i386_realmode_interrupt_registers parret;
>      parret.reg_eax = VBE_DisDatCha;
>      parret.reg_ebx = VBEDDC_Capabilities;
> -    parret.reg_ecx = controllerUnitNumber;
> +    parret.reg_ecx = controller_unit_number;
>      parret.reg_edi = 0;
>      parret.reg_es = 0;
>      if (i386_real_interrupt_call(INTERRUPT_NO_VIDEO_SERVICES, &parret) == 0)
>          return -1;
> -    *secondsToTransferEDIDBlock = (uint8_t)parret.reg_ebx >> 8;
> -    *DDCLevelSupported = (uint8_t)parret.reg_ebx;
> +    *seconds_to_transfer_EDID_block = (uint8_t)parret.reg_ebx >> 8;
> +    *DDC_level_supported = (uint8_t)parret.reg_ebx;
>      return (parret.reg_eax & 0xFFFF);
>  }
>
> -inline uint32_t VBEReadEDID(uint16_t controllerUnitNumber,
> -                            uint16_t EDIDBlockNumber,
> -                            struct edid1 *buffer)
> +inline uint32_t VBE_read_EDID(uint16_t controller_unit_number,
> +                            uint16_t EDID_block_number,
> +                            Edid_edid1 *buffer)
>  {
>      uint16_t size;
> -    struct edid1 *VBE_buffer = (struct edid1 *)i386_get_default_rm_buffer(&size);
> +    Edid_edid1 *VBE_buffer = (Edid_edid1*)i386_get_default_rm_buffer(&size);
>      i386_realmode_interrupt_registers parret;
>      parret.reg_eax = VBE_DisDatCha;
>      parret.reg_ebx = VBEDDC_ReadEDID;
> -    parret.reg_ecx = controllerUnitNumber;
> -    parret.reg_edx = EDIDBlockNumber;
> +    parret.reg_ecx = controller_unit_number;
> +    parret.reg_edx = EDID_block_number;
>      uint16_t seg, off;
>      i386_Physical_to_real(VBE_buffer, &seg, &off);
>      parret.reg_edi = (uint32_t)off;
> @@ -188,11 +188,11 @@ inline uint32_t VBEReadEDID(uint16_t controllerUnitNumber,
>  }
>
>  typedef struct {
> -    uint16_t modeNumber;
> +    uint16_t mode_number;
>      uint16_t resX;
>      uint16_t resY;
>      uint8_t bpp;
> -} modeParams;
> +} Mode_params;
>
>  /* finds mode in 'modeList' of 'listLength' length according to resolution
>      given in 'searchedResolution'. If bpp is given in that struct as well
> @@ -200,22 +200,22 @@ typedef struct {
>      has to be zero. Mode number found is returned and also filled into
>      'searchedResolution'. bpp is also filled into 'searchedResolution' if it
>      was 0 before call. */
> -static uint16_t findModeByResolution(   modeParams *modeList,
> -                                        uint8_t listLength,
> -                                        modeParams *searchedResolution)
> +static uint16_t find_mode_by_resolution(   Mode_params *mode_list,
> +                                        uint8_t list_length,
> +                                        Mode_params *searched_resolution)
>  {
>      uint8_t i = 0;
> -    while (i < listLength)
> +    while (i < list_length)
>      {
> -        if (searchedResolution->resX == modeList[i].resX &&
> -            searchedResolution->resY == modeList[i].resY)
> +        if (searched_resolution->resX == mode_list[i].resX &&
> +            searched_resolution->resY == mode_list[i].resY)
>          {
> -            if (searchedResolution->bpp==0 ||
> -                searchedResolution->bpp==modeList[i].bpp)
> +            if (searched_resolution->bpp==0 ||
> +                searched_resolution->bpp==mode_list[i].bpp)
>              {
> -                searchedResolution->bpp = modeList[i].bpp;
> -                searchedResolution->modeNumber = modeList[i].modeNumber;
> -                return modeList[i].modeNumber;
> +                searched_resolution->bpp = mode_list[i].bpp;
> +                searched_resolution->mode_number = mode_list[i].mode_number;
> +                return mode_list[i].mode_number;
>              }
>          }
>          i++;
> @@ -232,33 +232,33 @@ static uint16_t findModeByResolution(   modeParams *modeList,
>   * @retval video mode number to be set
>   *         -1 on parsing error or when no suitable mode found
>   */
> -static uint16_t findModeUsingCmdline(   modeParams *modeList,
> -                                        uint8_t listLength)
> +static uint16_t find_mode_using_cmdline(Mode_params *mode_list,
> +                                        uint8_t list_length)
>  {
>      const char* opt;
> -    modeParams cmdlineMode;
> +    Mode_params cmdline_mode;
>      char* endptr;
> -    cmdlineMode.bpp = 0;
> +    cmdline_mode.bpp = 0;
>      opt = bsp_cmdline_arg("--video=");
>      if (opt)
>      {
>          opt += sizeof("--video=")-1;
> -        cmdlineMode.resX = strtol(opt, &endptr, 10);
> +        cmdline_mode.resX = strtol(opt, &endptr, 10);
>          if (*endptr != 'x')
>          {
>              return -1;
>          }
>          opt = endptr+1;
> -        cmdlineMode.resY = strtol(opt, &endptr, 10);
> +        cmdline_mode.resY = strtol(opt, &endptr, 10);
>          switch (*endptr)
>          {
>              case '-':
>                  opt = endptr+1;
>                  if (strlen(opt) <= 2)
> -                    cmdlineMode.bpp = strtol(opt, &endptr, 10);
> +                    cmdline_mode.bpp = strtol(opt, &endptr, 10);
>                  else
>                  {
> -                    cmdlineMode.bpp = strtol(opt, &endptr, 10);
> +                    cmdline_mode.bpp = strtol(opt, &endptr, 10);
>                      if (*endptr != ' ')
>                      {
>                          return -1;
> @@ -271,9 +271,9 @@ static uint16_t findModeUsingCmdline(   modeParams *modeList,
>                  return -1;
>          }
>
> -        if (findModeByResolution(modeList, listLength, &cmdlineMode) !=
> +        if (find_mode_by_resolution(mode_list, list_length, &cmdline_mode) !=
>              (uint16_t)-1)
> -            return cmdlineMode.modeNumber;
> +            return cmdline_mode.mode_number;
>      }
>      return -1;
>  }
> @@ -284,17 +284,17 @@ static uint16_t findModeUsingCmdline(   modeParams *modeList,
>   * @retval video mode number to be set
>   *         -1 on parsing error or when no suitable mode found
>   */
> -static uint16_t findModeUsingEDID(  modeParams *modeList,
> -                                    uint8_t listLength)
> +static uint16_t find_mode_using_EDID( Mode_params *mode_list,
> +                                      uint8_t list_length)
>  {
> -    struct edid1 edid;
> +    Edid_edid1 edid;
>      uint8_t checksum, iterator;
>      uint8_t index, j;
> -    modeParams EDIDmode;
> +    Mode_params EDIDmode;
>      checksum = 0;
>      iterator = 0;
>      EDIDmode.bpp = 0;
> -    if (VBEReadEDID(0, 0, &edid) !=
> +    if (VBE_read_EDID(0, 0, &edid) !=
>          (VBE_callSuccessful<<8 | VBE_functionSupported))
>      {
>          printk(FB_VESA_NAME " Function 15h (read EDID) not supported.\n");
> @@ -303,7 +303,7 @@ static uint16_t findModeUsingEDID(  modeParams *modeList,
>  /* version of EDID structure */
>      if (edid.Version == 1)
>      { /* EDID version 1 */
> -        while (iterator < sizeof(struct edid1))
> +        while (iterator < sizeof(Edid_edid1))
>          {
>              checksum += *((uint8_t *)&edid+iterator);
>              iterator++;
> @@ -327,9 +327,9 @@ static uint16_t findModeUsingEDID(  modeParams *modeList,
>              }
>              EDIDmode.resX = DTD_HorizontalActive(&edid.dtd_md[0].dtd);
>              EDIDmode.resY = DTD_VerticalActive(&edid.dtd_md[0].dtd);
> -            if (findModeByResolution(modeList, listLength, &EDIDmode) !=
> +            if (find_mode_by_resolution(mode_list, list_length, &EDIDmode) !=
>                  (uint16_t)-1)
> -                return EDIDmode.modeNumber;
> +                return EDIDmode.mode_number;
>
>              index++;
>          }
> @@ -350,12 +350,14 @@ static uint16_t findModeUsingEDID(  modeParams *modeList,
>                  edid.dtd_md[index].md.Flag1 == 0     &&
>                  edid.dtd_md[index].md.Flag2 == 0)
>              {
> -                struct CVTTimingCodes3B *cvt = (struct CVTTimingCodes3B *)
> +                Edid_CVTTimingCodes3B *cvt = (Edid_CVTTimingCodes3B *)
>                      &edid.dtd_md[index].md.DescriptorData[0];
>                  j = 0;
>                  while (j < 4)
>                  {
> -                    EDIDmode.resY = edid1_CVT_AddressableLinesHigh(&cvt->cvt[j]);
> +                    EDIDmode.resY = edid1_CVT_AddressableLinesHigh(
> +                        &cvt->cvt[j]
> +                    );
>                      switch (edid1_CVT_AspectRatio(&cvt->cvt[j]))
>                      {
>                          case EDID_CVT_AspectRatio_4_3:
> @@ -372,9 +374,9 @@ static uint16_t findModeUsingEDID(  modeParams *modeList,
>                              break;
>                      }
>                      EDIDmode.resX = (EDIDmode.resX/8)*8;
> -                    if (findModeByResolution(modeList, listLength, &EDIDmode) !=
> -                        (uint16_t)-1)
> -                        return EDIDmode.modeNumber;
> +                    if (find_mode_by_resolution(
> +                            mode_list, list_length, &EDIDmode) != (uint16_t)-1)
> +                        return EDIDmode.mode_number;
>
>                      j++;
>                  }
> @@ -396,7 +398,8 @@ static uint16_t findModeUsingEDID(  modeParams *modeList,
>                  continue;
>              }
>              EDIDmode.resX = (edid.STI[index].HorizontalActivePixels+31)*8;
> -            switch (edid.STI[index].ImageAspectRatio_RefreshRate & EDID1_STI_ImageAspectRatioMask)
> +            switch (edid.STI[index].ImageAspectRatio_RefreshRate &
> +                    EDID1_STI_ImageAspectRatioMask)
>              {
>                  case EDID_STI_AspectRatio_16_10:
>                      EDIDmode.resY = (EDIDmode.resX*10)/16;
> @@ -411,9 +414,9 @@ static uint16_t findModeUsingEDID(  modeParams *modeList,
>                      EDIDmode.resY = (EDIDmode.resX*9)/16;
>                      break;
>              }
> -            if (findModeByResolution(modeList, listLength, &EDIDmode) !=
> +            if (find_mode_by_resolution(mode_list, list_length, &EDIDmode) !=
>                  (uint16_t)-1)
> -                return EDIDmode.modeNumber;
> +                return EDIDmode.mode_number;
>
>              index++;
>          }
> @@ -426,18 +429,18 @@ static uint16_t findModeUsingEDID(  modeParams *modeList,
>              EDIDmode.resX = 1280;
>              EDIDmode.resY = 1024;
>              EDIDmode.bpp = 0;
> -            if (findModeByResolution(modeList, listLength, &EDIDmode) !=
> +            if (find_mode_by_resolution(mode_list, list_length, &EDIDmode) !=
>                  (uint16_t)-1)
> -                return EDIDmode.modeNumber;
> +                return EDIDmode.mode_number;
>          }
>          if (edid1_EstablishedTim(&edid, EST_1152x870_75Hz))
>          {
>              EDIDmode.resX = 1152;
>              EDIDmode.resY = 870;
>              EDIDmode.bpp = 0;
> -            if (findModeByResolution(modeList, listLength, &EDIDmode) !=
> +            if (find_mode_by_resolution(mode_list, list_length, &EDIDmode) !=
>                  (uint16_t)-1)
> -                return EDIDmode.modeNumber;
> +                return EDIDmode.mode_number;
>          }
>          if (edid1_EstablishedTim(&edid, EST_1024x768_75Hz) ||
>              edid1_EstablishedTim(&edid, EST_1024x768_70Hz) ||
> @@ -447,18 +450,18 @@ static uint16_t findModeUsingEDID(  modeParams *modeList,
>              EDIDmode.resX = 1024;
>              EDIDmode.resY = 768;
>              EDIDmode.bpp = 0;
> -            if (findModeByResolution(modeList, listLength, &EDIDmode) !=
> +            if (find_mode_by_resolution(mode_list, list_length, &EDIDmode) !=
>                  (uint16_t)-1)
> -                return EDIDmode.modeNumber;
> +                return EDIDmode.mode_number;
>          }
>          if (edid1_EstablishedTim(&edid, EST_832x624_75Hz))
>          {
>              EDIDmode.resX = 832;
>              EDIDmode.resY = 624;
>              EDIDmode.bpp = 0;
> -            if (findModeByResolution(modeList, listLength, &EDIDmode) !=
> +            if (find_mode_by_resolution(mode_list, list_length, &EDIDmode) !=
>                  (uint16_t)-1)
> -                return EDIDmode.modeNumber;
> +                return EDIDmode.mode_number;
>          }
>          if (edid1_EstablishedTim(&edid, EST_800x600_60Hz) ||
>              edid1_EstablishedTim(&edid, EST_800x600_56Hz) ||
> @@ -468,9 +471,9 @@ static uint16_t findModeUsingEDID(  modeParams *modeList,
>              EDIDmode.resX = 800;
>              EDIDmode.resY = 600;
>              EDIDmode.bpp = 0;
> -            if (findModeByResolution(modeList, listLength, &EDIDmode) !=
> +            if (find_mode_by_resolution(mode_list, list_length, &EDIDmode) !=
>                  (uint16_t)-1)
> -                return EDIDmode.modeNumber;
> +                return EDIDmode.mode_number;
>          }
>          if (edid1_EstablishedTim(&edid, EST_720x400_88Hz) ||
>              edid1_EstablishedTim(&edid, EST_720x400_70Hz))
> @@ -478,9 +481,9 @@ static uint16_t findModeUsingEDID(  modeParams *modeList,
>              EDIDmode.resX = 720;
>              EDIDmode.resY = 400;
>              EDIDmode.bpp = 0;
> -            if (findModeByResolution(modeList, listLength, &EDIDmode) !=
> +            if (find_mode_by_resolution(mode_list, list_length, &EDIDmode) !=
>                  (uint16_t)-1)
> -                return EDIDmode.modeNumber;
> +                return EDIDmode.mode_number;
>          }
>          if (edid1_EstablishedTim(&edid, EST_640x480_75Hz) ||
>              edid1_EstablishedTim(&edid, EST_640x480_72Hz) ||
> @@ -490,9 +493,9 @@ static uint16_t findModeUsingEDID(  modeParams *modeList,
>              EDIDmode.resX = 640;
>              EDIDmode.resY = 480;
>              EDIDmode.bpp = 0;
> -            if (findModeByResolution(modeList, listLength, &EDIDmode) !=
> +            if (find_mode_by_resolution(mode_list, list_length, &EDIDmode) !=
>                  (uint16_t)-1)
> -                return EDIDmode.modeNumber;
> +                return EDIDmode.mode_number;
>          }
>      }
>      else
> @@ -504,9 +507,9 @@ void vesa_realmode_bootup_init(void)
>  {
>      uint32_t vbe_ret_val;
>      uint16_t size;
> -    struct VBE_VbeInfoBlock *vib = (struct VBE_VbeInfoBlock *)
> +    VBE_VbeInfoBlock *vib = (VBE_VbeInfoBlock *)
>          i386_get_default_rm_buffer(&size);
> -    vbe_ret_val = VBEControllerInformation(vib, 0x300);
> +    vbe_ret_val = VBE_controller_information(vib, 0x300);
>      if (vbe_ret_val == -1)
>      {
>          printk(FB_VESA_NAME " error calling real mode interrupt.\n");
> @@ -525,7 +528,7 @@ void vesa_realmode_bootup_init(void)
>      structure and if found we set such mode using corresponding
>      VESA function. */
>  #define MAX_NO_OF_SORTED_MODES 100
> -    modeParams sortModeParams[MAX_NO_OF_SORTED_MODES];
> +    Mode_params sorted_mode_params[MAX_NO_OF_SORTED_MODES];
>
>      uint16_t *vmpSegOff = (uint16_t *)&vib->VideoModePtr;
>      uint16_t *modeNOPtr = (uint16_t*)
> @@ -543,17 +546,17 @@ void vesa_realmode_bootup_init(void)
>          { /* some bios implementations ends the list incorrectly with 0 */
>              if (iterator < MAX_NO_OF_SORTED_MODES)
>              {
> -                sortModeParams[iterator].modeNumber = *(modeNOPtr+iterator);
> +                sorted_mode_params[iterator].mode_number =*(modeNOPtr+iterator);
>                  iterator ++;
>              }
>              else
>                  break;
>          }
>          if (iterator < MAX_NO_OF_SORTED_MODES)
> -            sortModeParams[iterator].modeNumber = 0;
> +            sorted_mode_params[iterator].mode_number = 0;
>      }
>
> -    struct VBE_ModeInfoBlock *mib = (struct VBE_ModeInfoBlock *)
> +    VBE_ModeInfoBlock *mib = (VBE_ModeInfoBlock *)
>          i386_get_default_rm_buffer(&size);
>      iterator = 0;
>      uint8_t nextFilteredMode = 0;
> @@ -562,45 +565,49 @@ void vesa_realmode_bootup_init(void)
>      /* get parameters of modes and filter modes according to set
>          required parameters */
>      while (iterator < MAX_NO_OF_SORTED_MODES &&
> -        sortModeParams[iterator].modeNumber!=0)
> +        sorted_mode_params[iterator].mode_number!=0)
>      {
> -        VBEModeInformation(mib, sortModeParams[iterator].modeNumber);
> +        VBE_mode_information(mib, sorted_mode_params[iterator].mode_number);
>          if ((mib->ModeAttributes&required_mode_attributes) ==
>              required_mode_attributes)
>          {
> -            sortModeParams[nextFilteredMode].modeNumber =
> -                sortModeParams[iterator].modeNumber;
> -            sortModeParams[nextFilteredMode].resX = mib->XResolution;
> -            sortModeParams[nextFilteredMode].resY = mib->YResolution;
> -            sortModeParams[nextFilteredMode].bpp  = mib->BitsPerPixel;
> +            sorted_mode_params[nextFilteredMode].mode_number =
> +                sorted_mode_params[iterator].mode_number;
> +            sorted_mode_params[nextFilteredMode].resX = mib->XResolution;
> +            sorted_mode_params[nextFilteredMode].resY = mib->YResolution;
> +            sorted_mode_params[nextFilteredMode].bpp  = mib->BitsPerPixel;
>              nextFilteredMode ++;
>          }
>          iterator ++;
>      }
> -    sortModeParams[nextFilteredMode].modeNumber = 0;
> +    sorted_mode_params[nextFilteredMode].mode_number = 0;
>
> -    uint8_t numberOfModes = nextFilteredMode;
> +    uint8_t number_of_modes = nextFilteredMode;
>      /* sort filtered modes */
> -    modeParams modeXchgPlace;
> +    Mode_params modeXchgPlace;
>      iterator = 0;
>      uint8_t j;
>      uint8_t idxBestMode;
> -    while (iterator < numberOfModes)
> +    while (iterator < number_of_modes)
>      {
>          idxBestMode = iterator;
>          j = iterator+1;
> -        while (j < numberOfModes)
> +        while (j < number_of_modes)
>          {
> -            if (sortModeParams[j].resX > sortModeParams[idxBestMode].resX)
> +            if (sorted_mode_params[j].resX >
> +                    sorted_mode_params[idxBestMode].resX)
>                  idxBestMode = j;
> -            else if (sortModeParams[j].resX == sortModeParams[idxBestMode].resX)
> +            else if (sorted_mode_params[j].resX ==
> +                     sorted_mode_params[idxBestMode].resX)
>              {
> -                if (sortModeParams[j].resY > sortModeParams[idxBestMode].resY)
> +                if (sorted_mode_params[j].resY >
> +                        sorted_mode_params[idxBestMode].resY)
>                      idxBestMode = j;
> -                else if (sortModeParams[j].resY ==
> -                    sortModeParams[idxBestMode].resY)
> +                else if (sorted_mode_params[j].resY ==
> +                    sorted_mode_params[idxBestMode].resY)
>                  {
> -                    if (sortModeParams[j].bpp > sortModeParams[idxBestMode].bpp)
> +                    if (sorted_mode_params[j].bpp >
> +                            sorted_mode_params[idxBestMode].bpp)
>                          idxBestMode = j;
>                  }
>              }
> @@ -608,32 +615,32 @@ void vesa_realmode_bootup_init(void)
>          }
>          if (idxBestMode != iterator)
>          {
> -            modeXchgPlace = sortModeParams[iterator];
> -            sortModeParams[iterator] = sortModeParams[idxBestMode];
> -            sortModeParams[idxBestMode] = modeXchgPlace;
> +            modeXchgPlace = sorted_mode_params[iterator];
> +            sorted_mode_params[iterator] = sorted_mode_params[idxBestMode];
> +            sorted_mode_params[idxBestMode] = modeXchgPlace;
>          }
>          iterator++;
>      }
>
>      /* first search for video argument in multiboot options */
> -    vbe_usedMode = findModeUsingCmdline(sortModeParams, numberOfModes);
> -    if (vbe_usedMode == (uint16_t)-1)
> +    vbe_used_mode = find_mode_using_cmdline(sorted_mode_params, number_of_modes);
> +    if (vbe_used_mode == (uint16_t)-1)
>      {
>          printk(FB_VESA_NAME " video on command line not provided"
>              "\n\ttrying EDID ...\n");
>          /* second search monitor for good resolution */
> -        vbe_usedMode = findModeUsingEDID(sortModeParams, numberOfModes);
> -        if (vbe_usedMode == (uint16_t)-1)
> +        vbe_used_mode = find_mode_using_EDID(sorted_mode_params, number_of_modes);
> +        if (vbe_used_mode == (uint16_t)-1)
>          {
>              printk(FB_VESA_NAME" monitor's EDID video parameters not supported"
>                                 "\n\tusing mode with highest resolution, bpp\n");
>              /* third set highest values */
> -            vbe_usedMode = sortModeParams[0].modeNumber;
> +            vbe_used_mode = sorted_mode_params[0].mode_number;
>          }
>      }
>
>      /* fill framebuffer structs with info about selected mode */
> -    vbe_ret_val = VBEModeInformation(mib, vbe_usedMode);
> +    vbe_ret_val = VBE_mode_information(mib, vbe_used_mode);
>      if ((vbe_ret_val&0xff)!=VBE_functionSupported ||
>          (vbe_ret_val>>8)!=VBE_callSuccessful)
>      {
> @@ -667,8 +674,8 @@ void vesa_realmode_bootup_init(void)
>          fb_fix.visual  = FB_VISUAL_TRUECOLOR;
>
>      /* set selected mode */
> -    vbe_ret_val = VBESetMode(vbe_usedMode | VBE_linearFlatFrameBufMask,
> -        (struct VBE_CRTCInfoBlock *)(i386_get_default_rm_buffer(&size)));
> +    vbe_ret_val = VBE_set_mode(vbe_used_mode | VBE_linearFlatFrameBufMask,
> +        (VBE_CRTCInfoBlock *)(i386_get_default_rm_buffer(&size)));
>      if (vbe_ret_val>>8 == VBE_callFailed)
>          printk(FB_VESA_NAME " VBE: Requested mode is not available.");
>
> @@ -799,14 +806,12 @@ frame_buffer_write(
>
>  static int get_fix_screen_info( struct fb_fix_screeninfo *info )
>  {
> -    printk("get_fix_screen_info\n");
>    *info = fb_fix;
>    return 0;
>  }
>
>  static int get_var_screen_info( struct fb_var_screeninfo *info )
>  {
> -    printk("get_var_screen_info\n");
>    *info =  fb_var;
>    return 0;
>  }
> diff --git a/c/src/lib/libbsp/i386/pc386/include/edid.h b/c/src/lib/libbsp/i386/pc386/include/edid.h
> index db3ec25..41bf1ca 100644
> --- a/c/src/lib/libbsp/i386/pc386/include/edid.h
> +++ b/c/src/lib/libbsp/i386/pc386/include/edid.h
> @@ -70,7 +70,7 @@ extern "C" {
>  #define EDID1_DTD_HorizontalSyncIsPositiveOff   1
>  #define EDID1_DTD_HorizontalSyncIsPositiveMask  0x1
>
> -struct DetailedTimingDescriptor {
> +typedef struct {
>      uint8_t PixelClock_div10000[2];
>      uint8_t HorizontalActiveLow;
>      uint8_t HorizontalBlankingLow;
> @@ -88,85 +88,85 @@ struct DetailedTimingDescriptor {
>      uint8_t HorizontalBorder;
>      uint8_t VerticalBorder;
>      uint8_t Flags;
> -} EDID_PACKED_ATTRIBUTE;
> +} EDID_PACKED_ATTRIBUTE Edid_DetailedTimingDescriptor;
>
>  EDID_INLINE_ROUTINE uint16_t DTD_HorizontalActive (
> -    struct DetailedTimingDescriptor *dtd)
> +    Edid_DetailedTimingDescriptor *dtd)
>  {
>      return (dtd->HorizontalActiveLow |
>          (dtd->HorizontalBlanking_ActiveHigh & 0xF0) << 4);
>  }
>
>  EDID_INLINE_ROUTINE uint16_t DTD_HorizontalBlanking (
> -    struct DetailedTimingDescriptor *dtd)
> +    Edid_DetailedTimingDescriptor *dtd)
>  {
>      return (dtd->HorizontalBlankingLow |
>          (dtd->HorizontalBlanking_ActiveHigh & 0xF) << 8);
>  }
>
>  EDID_INLINE_ROUTINE uint16_t DTD_VerticalActive (
> -    struct DetailedTimingDescriptor *dtd)
> +    Edid_DetailedTimingDescriptor *dtd)
>  {
>      return (dtd->VerticalActiveLow |
>          (dtd->VerticalBlanking_ActiveHigh & 0xF0) << 4);
>  }
>
>  EDID_INLINE_ROUTINE uint16_t DTD_VerticalBlanking (
> -    struct DetailedTimingDescriptor *dtd)
> +    Edid_DetailedTimingDescriptor *dtd)
>  {
>      return (dtd->VerticalBlankingLow |
>          (dtd->VerticalBlanking_ActiveHigh & 0xF) << 8);
>  }
>
>  EDID_INLINE_ROUTINE uint16_t DTD_VerticalSyncPulseWidth (
> -    struct DetailedTimingDescriptor *dtd)
> +    Edid_DetailedTimingDescriptor *dtd)
>  {
>      return ((dtd->VerticalSyncPulseWidth_OffsetLow & 0xF) |
>          (dtd->Vert_Hor_SyncPulseWidth_Offset_High & 0x3) << 4);
>  }
>
>  EDID_INLINE_ROUTINE uint16_t DTD_VerticalSyncOffset (
> -    struct DetailedTimingDescriptor *dtd)
> +    Edid_DetailedTimingDescriptor *dtd)
>  {
>      return ((dtd->VerticalSyncPulseWidth_OffsetLow >> 4) |
>          (dtd->Vert_Hor_SyncPulseWidth_Offset_High & 0xC) << 2);
>  }
>
>  EDID_INLINE_ROUTINE uint16_t DTD_HorizontalSyncPulseWidth (
> -    struct DetailedTimingDescriptor *dtd)
> +    Edid_DetailedTimingDescriptor *dtd)
>  {
>      return (dtd->HorizontalSyncPulseWidthLow |
>          (dtd->Vert_Hor_SyncPulseWidth_Offset_High & 0x30) << 4);
>  }
>
>  EDID_INLINE_ROUTINE uint16_t DTD_HorizontalSyncOffset (
> -    struct DetailedTimingDescriptor *dtd)
> +    Edid_DetailedTimingDescriptor *dtd)
>  {
>      return (dtd->HorizontalSyncOffsetLow |
>          (dtd->Vert_Hor_SyncPulseWidth_Offset_High & 0xC0) << 2);
>  }
>
>  EDID_INLINE_ROUTINE uint16_t DTD_VerticalImageSize (
> -    struct DetailedTimingDescriptor *dtd)
> +    Edid_DetailedTimingDescriptor *dtd)
>  {
>      return (dtd->VerticalImageSizeLow |
>          (dtd->Vertical_HorizontalImageSizeHigh & 0xF) << 8);
>  }
>
>  EDID_INLINE_ROUTINE uint16_t DTD_HorizontalImageSize (
> -    struct DetailedTimingDescriptor *dtd)
> +    Edid_DetailedTimingDescriptor *dtd)
>  {
>      return (dtd->HorizontalImageSizeLow |
>          (dtd->Vertical_HorizontalImageSizeHigh & 0xF0) << 4);
>  }
>
> -struct ColorPointData {
> +typedef struct {
>      uint8_t ColorPointWhitePointIndexNumber;
>      uint8_t ColorPointWhiteLowBits;
>      uint8_t ColorPointWhite_x;
>      uint8_t ColorPointWhite_y;
>      uint8_t ColorPointWhiteGamma;
> -} EDID_PACKED_ATTRIBUTE;
> +} EDID_PACKED_ATTRIBUTE Edid_ColorPointData;
>
>  /* Basic Display Parameters */
>  /* Monitor Descriptor - Data Type Tag */
> @@ -175,7 +175,7 @@ struct ColorPointData {
>  #define EDID_DTT_ASCIIString                0xFE
>
>  #define EDID_DTT_MonitorRangeLimits         0xFD
> -struct MonitorRangeLimits {
> +typedef struct {
>      uint8_t MinVerticalRateInHz;
>      uint8_t MaxVerticalRateInHz;
>      uint8_t MinHorizontalInKHz;
> @@ -184,7 +184,7 @@ struct MonitorRangeLimits {
>  /* see  VESA, Generalized Timing Formula Standard - GTF
>          Version 1.0, December 18, 1996 */
>      uint8_t GTFStandard[8];
> -} EDID_PACKED_ATTRIBUTE;
> +} EDID_PACKED_ATTRIBUTE Edid_MonitorRangeLimits;
>
>  #define EDID_DTT_MonitorName                0xFC
>
> @@ -222,18 +222,18 @@ struct MonitorRangeLimits {
>  #define EDID_CVT_PrefVertRate60Hz           1
>  #define EDID_CVT_PrefVertRate75Hz           2
>  #define EDID_CVT_PrefVertRate85Hz           3
> -struct CVT3ByteCodeDescriptor {
> +typedef struct {
>      uint8_t AddressableLinesLow;
>      uint8_t AspectRatio_AddressableLinesHigh;
>      uint8_t VerticalRate_PreferredVerticalRate;
> -} EDID_PACKED_ATTRIBUTE;
> -struct CVTTimingCodes3B {
> +} EDID_PACKED_ATTRIBUTE Edid_CVT3ByteCodeDescriptor;
> +typedef struct {
>      uint8_t VersionNumber;
> -    struct CVT3ByteCodeDescriptor cvt[4];
> -} EDID_PACKED_ATTRIBUTE;
> +    Edid_CVT3ByteCodeDescriptor cvt[4];
> +} EDID_PACKED_ATTRIBUTE Edid_CVTTimingCodes3B;
>
>  EDID_INLINE_ROUTINE uint16_t edid1_CVT_AddressableLinesHigh (
> -    struct CVT3ByteCodeDescriptor *cvt)
> +    Edid_CVT3ByteCodeDescriptor *cvt)
>  {
>      return (cvt->AddressableLinesLow |
>          (cvt->VerticalRate_PreferredVerticalRate &
> @@ -242,17 +242,17 @@ EDID_INLINE_ROUTINE uint16_t edid1_CVT_AddressableLinesHigh (
>  }
>
>  EDID_INLINE_ROUTINE uint8_t edid1_CVT_AspectRatio (
> -    struct CVT3ByteCodeDescriptor *cvt)
> +    Edid_CVT3ByteCodeDescriptor *cvt)
>  {
>      return (cvt->AspectRatio_AddressableLinesHigh >> EDID1_CVT_AspectRatioOff) &
>          EDID1_CVT_AspectRatioMask;
>  }
>
>  #define EDID_DTT_EstablishedTimingsIII      0xF7
> -struct EstablishedTimingsIII {
> +typedef struct {
>      uint8_t RevisionNumber;
>      uint8_t EST_III[12];
> -} EDID_PACKED_ATTRIBUTE;
> +} EDID_PACKED_ATTRIBUTE Edid_EstablishedTimingsIII;
>  enum EST_III {
>      EST_1152x864_75Hz   = 0,
>      EST_1024x768_85Hz   = 1,
> @@ -308,17 +308,17 @@ enum EST_III {
>  #define EDID_DTT_DescriptorSpaceUnused      0x10
>  /* DTT 0x0 - 0xF are manufacturer specific */
>
> -struct MonitorDescriptor {
> +typedef struct {
>      uint8_t Flag0[2];
>      uint8_t Flag1;
>      uint8_t DataTypeTag;
>      uint8_t Flag2;
>      uint8_t DescriptorData[13];
> -} EDID_PACKED_ATTRIBUTE;
> +} EDID_PACKED_ATTRIBUTE Edid_MonitorDescriptor;
>
>  union DTD_MD {
> -    struct DetailedTimingDescriptor dtd;
> -    struct MonitorDescriptor md;
> +    Edid_DetailedTimingDescriptor dtd;
> +    Edid_MonitorDescriptor md;
>  } EDID_PACKED_ATTRIBUTE;
>
>  #define EDID1_STI_ImageAspectRatioOff           0
> @@ -331,10 +331,10 @@ union DTD_MD {
>  #define EDID_STI_AspectRatio_4_3            1
>  #define EDID_STI_AspectRatio_5_4            2
>  #define EDID_STI_AspectRatio_16_9           3
> -struct StandardTimingIdentification {
> +typedef struct {
>      uint8_t HorizontalActivePixels;
>      uint8_t ImageAspectRatio_RefreshRate;
> -} EDID_PACKED_ATTRIBUTE;
> +} EDID_PACKED_ATTRIBUTE Edid_StandardTimingIdentification;
>
>  /* Video Input Definition */
>  /* Analog = 0, Digital = 1 */
> @@ -409,7 +409,7 @@ struct StandardTimingIdentification {
>  #define EDID_DisplayType_RGB444YCrCb422             2
>  #define EDID_DisplayType_RGB444YCrCb444YCrCb422     3
>
> -struct edid1 {
> +typedef struct {
>      uint8_t Header[8];
>  /*  Vendor Product Identification */
>      uint8_t IDManufacturerName[2];
> @@ -442,35 +442,35 @@ struct edid1 {
>  /*  Established Timings I, II, Manufacturer's */
>      uint8_t EST_I_II_Man[3];
>  /*  Standard Timing Identification */
> -    struct StandardTimingIdentification STI[8];
> +    Edid_StandardTimingIdentification STI[8];
>  /*  Detailed Timing Descriptions / Monitor Descriptions */
>      union DTD_MD dtd_md[4];
>      uint8_t ExtensionFlag;
>      uint8_t Checksum;
> -} EDID_PACKED_ATTRIBUTE;
> +} EDID_PACKED_ATTRIBUTE Edid_edid1;
>
> -EDID_INLINE_ROUTINE uint16_t edid1_RedX (struct edid1 *edid) {
> +EDID_INLINE_ROUTINE uint16_t edid1_RedX (Edid_edid1 *edid) {
>      return (edid->RedXHigh<<2) | (edid->GreenRedLow>>6);
>  }
> -EDID_INLINE_ROUTINE uint16_t edid1_RedY (struct edid1 *edid) {
> +EDID_INLINE_ROUTINE uint16_t edid1_RedY (Edid_edid1 *edid) {
>      return (edid->RedYHigh<<2) | (edid->GreenRedLow>>4)&&0x3;
>  }
> -EDID_INLINE_ROUTINE uint16_t edid1_GreenX (struct edid1 *edid) {
> +EDID_INLINE_ROUTINE uint16_t edid1_GreenX (Edid_edid1 *edid) {
>      return (edid->GreenXHigh<<2) | (edid->GreenRedLow>>2)&&0x3;
>  }
> -EDID_INLINE_ROUTINE uint16_t edid1_GreenY (struct edid1 *edid) {
> +EDID_INLINE_ROUTINE uint16_t edid1_GreenY (Edid_edid1 *edid) {
>      return (edid->GreenYHigh<<2) | (edid->GreenRedLow&0x3);
>  }
> -EDID_INLINE_ROUTINE uint16_t edid1_BlueX (struct edid1 *edid) {
> +EDID_INLINE_ROUTINE uint16_t edid1_BlueX (Edid_edid1 *edid) {
>      return (edid->BlueXHigh<<2)  | (edid->WhiteBlueLow>>6);
>  }
> -EDID_INLINE_ROUTINE uint16_t edid1_BlueY (struct edid1 *edid) {
> +EDID_INLINE_ROUTINE uint16_t edid1_BlueY (Edid_edid1 *edid) {
>      return (edid->BlueYHigh<<2)  | (edid->WhiteBlueLow>>4)&&0x3;
>  }
> -EDID_INLINE_ROUTINE uint16_t edid1_WhiteX (struct edid1 *edid) {
> +EDID_INLINE_ROUTINE uint16_t edid1_WhiteX (Edid_edid1 *edid) {
>      return (edid->WhiteXHigh<<2) | (edid->WhiteBlueLow>>2)&&0x3;
>  }
> -EDID_INLINE_ROUTINE uint16_t edid1_WhiteY (struct edid1 *edid) {
> +EDID_INLINE_ROUTINE uint16_t edid1_WhiteY (Edid_edid1 *edid) {
>      return (edid->WhiteYHigh<<2) | (edid->WhiteBlueLow&0x3);
>  }
>
> @@ -498,7 +498,7 @@ enum edid1_EstablishedTimings {
>  };
>
>  EDID_INLINE_ROUTINE uint8_t edid1_EstablishedTim (
> -    struct edid1 *edid,
> +    Edid_edid1 *edid,
>      enum edid1_EstablishedTimings est)
>  {
>      return (uint8_t)(edid->EST_I_II_Man[est/8] & (est%8));
> diff --git a/c/src/lib/libbsp/i386/pc386/include/fb_vesa.h b/c/src/lib/libbsp/i386/pc386/include/fb_vesa.h
> index 5638b50..88e7dd8 100644
> --- a/c/src/lib/libbsp/i386/pc386/include/fb_vesa.h
> +++ b/c/src/lib/libbsp/i386/pc386/include/fb_vesa.h
> @@ -45,9 +45,9 @@ extern "C" {
>   * @retval  register ax content as defined in VBE RETURN STATUS paragraph
>   *          -1 error calling graphical bios
>   */
> -uint32_t VBEControllerInformation (
> -    struct VBE_VbeInfoBlock *infoBlock,
> -    uint16_t queriedVBEVersion
> +uint32_t VBE_controller_information (
> +    VBE_VbeInfoBlock *info_block,
> +    uint16_t queried_VBE_Version
>  );
>
>  /**
> @@ -59,9 +59,9 @@ uint32_t VBEControllerInformation (
>   * @retval  register ax content as defined in VBE RETURN STATUS paragraph
>   *          -1 error calling graphical bios
>   */
> -uint32_t VBEModeInformation (
> -    struct VBE_ModeInfoBlock *infoBlock,
> -    uint16_t modeNumber
> +uint32_t VBE_mode_information (
> +    VBE_ModeInfoBlock *info_block,
> +    uint16_t mode_number
>  );
>
>  /**
> @@ -73,9 +73,9 @@ uint32_t VBEModeInformation (
>   * @retval  register ax content as defined in VBE RETURN STATUS paragraph
>   *          -1 error calling graphical bios
>   */
> -uint32_t VBESetMode (
> -    uint16_t modeNumber,
> -    struct VBE_CRTCInfoBlock *infoBlock
> +uint32_t VBE_set_mode (
> +    uint16_t mode_number,
> +    VBE_CRTCInfoBlock *info_block
>  );
>
>  /**
> @@ -85,8 +85,8 @@ uint32_t VBESetMode (
>   * @retval  register ax content as defined in VBE RETURN STATUS paragraph
>   *          -1 error calling graphical bios
>   */
> -uint32_t VBECurrentMode (
> -    uint16_t *modeNumber
> +uint32_t VBE_current_mode (
> +    uint16_t *mode_number
>  );
>
>  /**
> @@ -101,10 +101,10 @@ uint32_t VBECurrentMode (
>   * @retval  register ax content as defined in VBE RETURN STATUS paragraph
>   *          -1 error calling graphical bios
>   */
> -uint32_t VBEReportDDCCapabilities (
> -    uint16_t controllerUnitNumber,
> -    uint8_t *secondsToTransferEDIDBlock,
> -    uint8_t *DDCLevelSupported
> +uint32_t VBE_report_DDC_capabilities (
> +    uint16_t controller_unit_number,
> +    uint8_t *seconds_to_transfer_EDID_block,
> +    uint8_t *DDC_level_supported
>  );
>
>  /**
> @@ -116,10 +116,10 @@ uint32_t VBEReportDDCCapabilities (
>   * @retval  register ax content as defined in VBE RETURN STATUS paragraph
>   *          -1 error calling graphical bios
>   */
> -uint32_t VBEReadEDID (
> -    uint16_t controllerUnitNumber,
> -    uint16_t EDIDBlockNumber,
> -    struct edid1 *buffer
> +uint32_t VBE_read_EDID (
> +    uint16_t controller_unit_number,
> +    uint16_t EDID_block_number,
> +    Edid_edid1 *buffer
>  );
>
>  #ifdef __cplusplus
> diff --git a/c/src/lib/libbsp/i386/pc386/include/tblsizes.h b/c/src/lib/libbsp/i386/pc386/include/tblsizes.h
> index ef51ae7..6128d87 100644
> --- a/c/src/lib/libbsp/i386/pc386/include/tblsizes.h
> +++ b/c/src/lib/libbsp/i386/pc386/include/tblsizes.h
> @@ -22,4 +22,3 @@
>
>  #define IDT_SIZE (256)
>  #define GDT_SIZE (3 + NUM_APP_DRV_GDT_DESCRIPTORS)
> -
> diff --git a/c/src/lib/libbsp/i386/pc386/include/vbe3.h b/c/src/lib/libbsp/i386/pc386/include/vbe3.h
> index 2bf1b59..ba0ae3f 100644
> --- a/c/src/lib/libbsp/i386/pc386/include/vbe3.h
> +++ b/c/src/lib/libbsp/i386/pc386/include/vbe3.h
> @@ -156,12 +156,12 @@ extern "C" {
>  #define VBE_RetVBESupSpeInf    0x00  /* Return VBE Supplemental
>                                          Specification Information */
>  /* *** Structures *** */
> -struct VBE_FarPtr {
> +typedef struct {
>      uint16_t offset;
>      uint16_t selector;
> -} VBE3_PACKED_ATTRIBUTE;
> +} VBE3_PACKED_ATTRIBUTE VBE_FarPtr;
>
> -struct VBE_PMInfoBlock {
> +typedef struct {
>      uint8_t   Signature[4];    /*  PM Info Block Signature */
>      uint16_t  EntryPoint;      /*  Offset of PM entry point within BIOS */
>      uint16_t  PMInitialize;    /*  Offset of PM initialization entry point */
> @@ -172,7 +172,7 @@ struct VBE_PMInfoBlock {
>      uint16_t  CodeSegSel;      /*  Selector to access code segment as data */
>      uint8_t   InProtectMode;   /*  Set to 1 when in protected mode */
>      uint8_t   Checksum;        /*  Checksum byte for structure */
> -} VBE3_PACKED_ATTRIBUTE;
> +} VBE3_PACKED_ATTRIBUTE VBE_PMInfoBlock;
>
>  /* General VBE signature */
>  #define VBE_SIGNATURE "VESA"
> @@ -181,7 +181,7 @@ struct VBE_PMInfoBlock {
>  /* for STUB see VBE CORE FUNCTIONS VERSION 3.0 - Appendix 1 */
>  #define VBE_END_OF_VideoModeList 0xFFFF
>  #define VBE_STUB_VideoModeList 0xFFFF
> -struct VBE_VbeInfoBlock {
> +typedef struct {
>      uint8_t   VbeSignature[4];   /*  VBE Signature */
>      uint16_t  VbeVersion;        /*  VBE Version */
>      uint8_t  *OemStringPtr;      /*  VbeFarPtr to OEM String */
> @@ -196,9 +196,9 @@ struct VBE_VbeInfoBlock {
>      uint8_t   Reserved[222];     /*  Reserved for VBE implementation scratch */
>      /*    area */
>      uint8_t   OemData[256];      /*  Data Area for OEM Strings */
> -} VBE3_PACKED_ATTRIBUTE;
> +} VBE3_PACKED_ATTRIBUTE VBE_VbeInfoBlock;
>
> -struct VBE_ModeInfoBlock {
> +typedef struct {
>      /*  Mandatory information for all VBE revisions */
>      uint16_t  ModeAttributes;        /* mode attributes */
>      uint8_t   WinAAttributes;        /* window A attributes */
> @@ -252,9 +252,9 @@ struct VBE_ModeInfoBlock {
>      uint32_t  MaxPixelClock;         /* maximum pixel clock
>                                          (in Hz) for graphics mode */
>      uint8_t   Reserved3[189];        /* remainder of ModeInfoBlock */
> -} VBE3_PACKED_ATTRIBUTE;
> +} VBE3_PACKED_ATTRIBUTE VBE_ModeInfoBlock;
>
> -struct VBE_CRTCInfoBlock {
> +typedef struct {
>      uint16_t  HorizontalTotal;       /* Horizontal total in pixels */
>      uint16_t  HorizontalSyncStart;   /* Horizontal sync start in pixels */
>      uint16_t  HorizontalSyncEnd;     /* Horizontal sync end in pixels */
> @@ -265,16 +265,16 @@ struct VBE_CRTCInfoBlock {
>      uint32_t  PixelClock;            /* Pixel clock in units of Hz */
>      uint16_t  RefreshRate;           /* Refresh rate in units of 0.01 Hz */
>      uint8_t   Reserved[40];          /* remainder of ModeInfoBlock */
> -} VBE3_PACKED_ATTRIBUTE;
> +} VBE3_PACKED_ATTRIBUTE VBE_CRTCInfoBlock;
>
> -struct VBE_PaletteEntry {
> +typedef struct {
>      uint8_t   Blue;                  /* Blue channel value (6 or 8 bits) */
>      uint8_t   Green;                 /* Green channel value (6 or 8 bits) */
>      uint8_t   Red;                   /* Red channel value(6 or 8 bits) */
>      uint8_t   Alignment;             /* DWORD alignment byte (unused) */
> -} VBE3_PACKED_ATTRIBUTE;
> +} VBE3_PACKED_ATTRIBUTE VBE_PaletteEntry;
>
> -struct VBE_SupVbeInfoBlock {
> +typedef struct {
>      uint8_t   SupVbeSignature[7];    /* Supplemental VBE Signature */
>      uint16_t  SupVbeVersion;         /* Supplemental VBE Version */
>      uint8_t   SupVbeSubFunc[8];      /* Bitfield of supported subfunctions */
> @@ -286,7 +286,7 @@ struct VBE_SupVbeInfoBlock {
>      uint8_t   Reserved[221];         /* Reserved for description
>                                          strings and future */
>      /*  expansion */
> -} VBE3_PACKED_ATTRIBUTE;
> +} VBE3_PACKED_ATTRIBUTE VBE_SupVbeInfoBlock;
>
>  /* VbeInfoBlock Capabilities */
>  /*  D0 = 0  DAC is fixed width, with 6 bits per primary color */
> @@ -460,4 +460,3 @@ struct VBE_SupVbeInfoBlock {
>  #endif /* ASM */
>
>  #endif /* _VBE_H */
> -
> diff --git a/c/src/lib/libbsp/i386/shared/realmode_int/realmode_int.c b/c/src/lib/libbsp/i386/shared/realmode_int/realmode_int.c
> index 0aa71e6..af5cf1e 100644
> --- a/c/src/lib/libbsp/i386/shared/realmode_int/realmode_int.c
> +++ b/c/src/lib/libbsp/i386/shared/realmode_int/realmode_int.c
> @@ -181,7 +181,7 @@ void *i386_get_default_rm_buffer(uint16_t *size) {
>      return default_rm_buffer_spot;
>  }
>
> -int i386_real_interrupt_call(uint8_t interruptNumber,
> +int i386_real_interrupt_call(uint8_t interrupt_number,
>                               i386_realmode_interrupt_registers *ir)
>  {
>      uint32_t pagingon;
> @@ -270,7 +270,7 @@ int i386_real_interrupt_call(uint8_t interruptNumber,
>          : "=rm"(interrupt_number_off)
>      );
>      interrupt_number_ptr = (uint8_t *)(rm_swtch_code_dst+interrupt_number_off);
> -    *interrupt_number_ptr = interruptNumber;
> +    *interrupt_number_ptr = interrupt_number;
>      /* execute code that jumps to coppied function, which switches to real mode,
>         loads registers with values passed to interrupt and executes interrupt */
>      __asm__ volatile(   "\t"
> @@ -403,4 +403,3 @@ int i386_real_interrupt_call(uint8_t interruptNumber,
>      *ir = int_passed_regs_spot->inoutregs;
>      return 1;
>  }
> -
> diff --git a/c/src/lib/libbsp/i386/shared/realmode_int/realmode_int.h b/c/src/lib/libbsp/i386/shared/realmode_int/realmode_int.h
> index e5f80d0..a0216ea 100644
> --- a/c/src/lib/libbsp/i386/shared/realmode_int/realmode_int.h
> +++ b/c/src/lib/libbsp/i386/shared/realmode_int/realmode_int.h
> @@ -74,7 +74,10 @@ extern void *i386_get_default_rm_buffer(uint16_t *size);
>   * @retval  0 call failed (GDT too small or pagin is on)
>   *          1 call successful
>   */
> -extern int i386_real_interrupt_call(uint8_t interruptNumber, i386_realmode_interrupt_registers *ir);
> +extern int i386_real_interrupt_call(
> +    uint8_t interrupt_number,
> +    i386_realmode_interrupt_registers *ir
> +);
>
>  #ifdef __cplusplus
>  }
> --
> 1.9.1
>
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel



More information about the devel mailing list