#2901 new project

Emulate i386 (x86) BIOS for VESA Support

Reported by: Tanu Hari Dixit Owned by: Pavel Pisa
Priority: normal Milestone: Indefinite
Component: bsps Version:
Severity: normal Keywords: SoC, BSP, large
Cc: Joel Sherrill Blocked By:
Blocking:

Description (last modified by Pavel Pisa)

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 (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 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 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: VESA_BIOS_Extensions, pc386/console/fb_vesa_rm.c, RTEMS Graphics Toolkit, 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.

Change History (5)

comment:1 Changed on 02/06/17 at 04:02:32 by Chris Johns

Type: enhancementproject

comment:2 Changed on 03/02/17 at 20:21:51 by Gedare Bloom

Keywords: BSP added

comment:3 Changed on 08/14/17 at 00:17:44 by Chris Johns

Version: 4.11

comment:4 Changed on 02/03/22 at 19:28:53 by Gedare Bloom

Description: modified (diff)
Keywords: large added

comment:5 Changed on 03/26/22 at 22:41:16 by Pavel Pisa

Description: modified (diff)
Note: See TracTickets for help on using tickets.