[RTEMS Project] #2901: Emulate i386 (x86) BIOS for VESA Support

RTEMS trac trac at rtems.org
Sat Mar 26 22:41:16 UTC 2022


#2901: Emulate i386 (x86) BIOS for VESA Support
-----------------------------+-------------------------
 Reporter:  Tanu Hari Dixit  |       Owner:  Pavel Pisa
     Type:  project          |      Status:  new
 Priority:  normal           |   Milestone:  Indefinite
Component:  bsps             |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  SoC, BSP, large  |  Blocked By:
 Blocking:                   |
-----------------------------+-------------------------
Description changed by Pavel Pisa:

Old description:

> = Emulate i386 (x86) BIOS for VESA Support =
>

> '''Students:''' Past, Present, and Potential Students
>
> '''Status:'''  Uninitiated.
>
> '''Introduction:'''  This is Pavel Pisa's idea.
>
> '''Goal:''' Ask Pavel.
>
> '''Requirements:''' List the requirements and level of expertise you
> estimate are required by the developer tackling this project will have to
> have: Required level of programming language(s), specific areas of RTEMS
> or tools, level of familiarity with RTEMS, cross-development, GNU/Linux,
> etx., development/documentation/testing tools, mathematical/algorithmic
> background, other desirable skills.
>
> '''Resources:''' Pavel.
>
> '''Acknowledgements'''
>  *  who helped and did work
>
> = Miscellaneous Sections =
>
> As the project progresses, you will need to add build instructions, etc
> and this page will evolve from a project description into a HOWTO.
>
> = References =
>  *  TBD
>
> '''Other sections:''' If you have more to say about the project that
> doesn't fit in the proposed sections of this template, feel free to add
> other sections at will.

New description:

 = Emulate i386 (x86) BIOS for VESA Support =


 '''Students:''' Past, Present, and Potential Students

 '''Status:'''  Uninitiated.

 '''Introduction:'''  The graphic support requires either full featured
 driver for given hardware (graphic card/GPU) or simpler mechanism/driver
 which setups hardware to the appropriate graphic mode and provide mapping
 of the framebuffer to the user application or generic driver for software
 rendering. The complete graphics and accelerated rivers for today full
 featured graphic cards are complex. On the PC grade systems, there is
 available BIOS extension provided directly by the graphics card which
 allows basic configuration of the hardware to allow BIOS, boot loaders,
 DOS applications setup hardware generic way over interrupt 10h
 ([https://en.wikipedia.org/wiki/VESA_BIOS_Extensions
 VESA_BIOS_Extensions]). But until VBE version 3.0 it supports only
 operation in x86 real mode. Jan Dolezal implemented simple mechanism which
 allow to setup graphic card into appropriate mode according to attached
 monitor capabilities ([EDID]) in 2014 year. Se the source
 [https://git.rtems.org/rtems/tree/bsps/i386/pc386/console/fb_vesa_rm.c
 pc386/console/fb_vesa_rm.c]. But its use is limited only to case that
 RTEMS is started from real mode (today Linux kernel is, for example,
 typically started over protected entry). The system can setup x86 real
 mode environment to run x86 real mode BIOS but it is complex, requires
 mechanism which are not used in RTEMS (paging, descriptors or global IRQ
 locks...) and could impose uncontrollable latency. More systems resolve
 problem by small x86 instructions interpreter which allows to interpret
 x86 Int 10h functions from full featured 32-bit and or 64-bit OS. The
 performance is not critical, the code only communicated with display and
 sets the card registers. During actual graphics screen updates it doe not
 play role. Look at [https://devel.rtems.org/wiki/Projects/GraphicsToolkit
 RTEMS Graphics Toolkit] project page for description of complete graphics
 stack components usable on RTEMS. Alternative is to try VBE 3.0 protected
 entry but experiments with it was not successful and more reports from
 others indicate that it is tricky and often broken on the cards.


 '''Goal:'''  Implement simple x86 real mode processor emulator which can
 be used to interpret VESA BIOS to setup graphics card into usable mode
 matching the attached monitor capabilities. The situation should be
 analyzed the first. It is probably possible to include complete BSD
 solutions, X11 used mechanism to run VBE directly in x86 real mode process
 and then switched to SciTech's x86emu emulator. Alternatives are used in
 EFI startup mode, EFI 1.x UGA protocol and UEFI 2.x GOP. Check SciTech's
 x86emu if the use and license is acceptable for RTEMS and compare it with
 some alternatives.

 '''Requirements:''' Good knowledge of C and low level x86 based systems
 operation. Basic knowledge of the QEMU and other full systems emulators
 use is advantage for development and testing. Proceed of the development
 work on GNU/Linux or other POSIX based host system is preferred because it
 is easier to help. WSL option is acceptable.

 '''Resources:''' [https://en.wikipedia.org/wiki/VESA_BIOS_Extensions
 VESA_BIOS_Extensions],
 [https://git.rtems.org/rtems/tree/bsps/i386/pc386/console/fb_vesa_rm.c
 pc386/console/fb_vesa_rm.c],
 [https://devel.rtems.org/wiki/Projects/GraphicsToolkit RTEMS Graphics
 Toolkit],
 [https://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/x86emu
 SciTech's x86emu] used by actual X11 implementation.

 '''Acknowledgements'''
  *  who helped and did work

 = Miscellaneous Sections =

 As the project progresses, you will need to add build instructions, etc
 and this page will evolve from a project description into a HOWTO.

 = References =
  *  TBD

 '''Other sections:''' If you have more to say about the project that
 doesn't fit in the proposed sections of this template, feel free to add
 other sections at will.

--

--
Ticket URL: <http://devel.rtems.org/ticket/2901#comment:5>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list