Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The realisticity of writing a full operating system as an UEFI application [closed]

Tags:

c

osdev

uefi

Technically UEFI provides a lot of functionality which is part of the groundwork of an operating system, such as a file system. In a way, it is a shame that everything gets discarded and reimplemented by the operating system in the process of booting.

I am wondering how much of a functional operating system would it to implement it as a simple a UEFI application. I am thinking of a graphical user interface and multitasking. Using FAT32 as a file system, UEFI should do well for a lot of purposes and so should identity mapped memory. It would make a very lean and simple operating system, probably even without the need for installation.

The question is where would the limits be of what is feasible to provide in terms of functionality of a full fledged operating system? Any suggestions?

like image 670
Thomas F. Avatar asked Apr 19 '16 10:04

Thomas F.


1 Answers

Please don't.

UEFI has no isolation and exposes all it's state, drivers, handles and protocols directly to the user, like DOS did back then.

There is no virtual addresses, there is no user mode, there is no privilege levels, but there is a bunch of code written with an intent to work fast and be discarded fast. Any UEFI application that interacts with the user is a potential security disaster waiting to happen.

Call gRT->ExitBootServices as soon as possible and boot Linux, QNX, L4, Redox or whatever proper OS kernel you like.

like image 192
CodeRush Avatar answered Nov 15 '22 10:11

CodeRush