Jump to content











- - - - -

BIOS/legacy/CSM emulator for UEFI?


  • Please log in to reply
8 replies to this topic

#1 Guest_AnonVendetta_*

Guest_AnonVendetta_*
  • Guests

Posted 14 July 2021 - 02:31 AM

I don't even know if such a thing exists right now, not including VMs. But I figured now would be a good time to ask.

Some time ago, Intel stated that legacy support would be discontinued, presumably starting in 2020. Presumably AMD will follow suit, sooner or later.

Microsoft is now requiring UEFI, Secure Boot, and TPM 2.0 for Windows 11. My PC meets all the requirements except for CPU. They are requiring 8th gen Intel/AMD equivalent, whereas I have a 7th gen (i7-7700K with unlocked cores and no overclocking enabled). So, I could upgrade to it, but I don't want to give up legacy booting so easily. For now, there are workarounds that allow it to boot in legacy mode. But I'm betting that once RTM hits, MS will try to enforce these requirements, with little leniency in regards to the stated requirements.

And there are now UEFI only PCs that don't allow legacy boot at all. I'm sure this trend will continue. Within a few years, all new PCs will be UEFI only, is my personal guess.

This will relegate users needing legacy support to VMs...or emulators.

I'm basically asking if there exists a non-VM emulated BIOS environment that allows UEFI only PCs to boot legacy stuff. Something that starts out in UEFI mode, but then loads an emulated BIOS environment. Basically, the exact opposite of UEFI DUET or Clover, which I've used in the past.

#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 14 July 2021 - 09:16 AM

I don't think a "full" (and portable) solution exists (yet) though in theory it is possible, it would be a .efi executable that emulates BIOS calls.

 

Something (a small sub-set) has already been done (only for the record):

https://github.com/manatails/uefiseven

 

Possibly the most promising project is 

https://github.com/i.../KVMGT-seabios/

https://github.com/i...ster/README.CSM

 but I believe that going from that to having something that works on *all* UEFI's will be a long way.

 

:duff:

Wonko



#3 Guest_AnonVendetta_*

Guest_AnonVendetta_*
  • Guests

Posted 14 July 2021 - 09:33 AM

Yes, I figured it would need to be an efi executable binary, for it to be able to load after the PC starts.

I'm kind of surprised that noone has developed a comprehensive emulation solution that works on most UEFI systems. (including scenarios where Secure Boot is enabled). I suppose compatibility with SB isn't an issue in the short term, since they could just use a signed intermediary shim loader. Linux distros have been making use of this for a long time, allowing unsigned efi binaries to boot even when SB is enabled.

People have known for years that legacy booting is dying, surely we all saw the writing on the wall. That is, again, why i'm surprised that developers weren't on top of this years ago.

Lastly, BIOS isnt nearly as complex as UEFI, which is kind of why I figure that emulating BIOS on UEFI should be fairly easy for experienced devs to write code for. Of course, making it compatible with most UEFI systems is another matter.

My understanding of BIOS booting is that it provides no functionality at all once an OS has booted. Whereas UEFI can interface (talk) with the OS. So, BIOS's only function is find and bootstrap bootable code (MBR, PBR, etc). And then everything is out of its' hands. Any wrong/uninformed conclusions I'm making?

The last 2 of your links seem to be source code and documentation only. I do have rudimentary knowledge of compiling from source, but mainly Android kernels, not PC stuff. They also make mention of things like Bochs and Qemu. I'm not sure how either of those relate to what I'm asking. They sound like softwares that are meant to be ran only after an OS is fully booted (more like VMs).

#4 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 14 July 2021 - 11:28 AM

The point is that SeaBios (the "base") is used in Qemu and other VM's and is "generic".

 

The project aims (aimed) to have SeaBios functions available through an .efi executable.

 

So - generally speaking and in theory - it is possible to make a .efi that loads or emulates a BIOS, the issues revolve around the "a" in "a BIOS".

 

Real machines may (will) *need* specific BIOSes (but - should they actually exist - they would likely be already added to firmware as CSM).

Emulating BIOS calls in a .efi executable is possible, but the issue is about the way the actual specific BIOS implements the calls on the specific hardware.

 

 

Lastly, BIOS isnt nearly as complex as UEFI, which is kind of why I figure that emulating BIOS on UEFI should be fairly easy for experienced devs to write code for. Of course, making it compatible with most UEFI systems is another matter.

From what I understand, the problems revolve not around the .efi executing or emulating BIOS code, but rather in writing (specific) BIOS code for the given machine.

 

 

My understanding of BIOS booting is that it provides no functionality at all once an OS has booted. Whereas UEFI can interface (talk) with the OS. So, BIOS's only function is find and bootstrap bootable code (MBR, PBR, etc). And then everything is out of its' hands. Any wrong/uninformed conclusions I'm making?
 

Generically speaking (and for modern OS's) you are correct, for "real mode" systems (as an example DOS) no.

 

So, for anything past Windows 7 (and as seen an emulator for BIOS 10h is needed in some setups) it is a non-problem (as the OS will be UEFI compliant) for all the previous OSes, a VM or similar will soon be needed on newer UEFI only machines.

 

:duff:

Wonko



#5 a1ive

a1ive

    Member

  • Developer
  • 58 posts
  •  
    China

Posted 14 July 2021 - 02:38 PM

 

 

Lastly, BIOS isnt nearly as complex as UEFI, which is kind of why I figure that emulating BIOS on UEFI should be fairly easy for experienced devs to write code for. Of course, making it compatible with most UEFI systems is another matter.

In general, it is easier to develop UEFI programs in C than BIOS programs in assembly. Not to mention the fact that UEFI has complete and detailed documentation.

 

 

The project aims (aimed) to have SeaBios functions available through an .efi executable.
SeaBIOS is indeed an interesting option.
It does not matter exactly what format it is, SeaBIOS can be compiled into a kernel in multiboot format and thus booted by grub2.
Last year I tried to modify SeaBIOS so that it would boot in a "generic" environment.
However it would only be able to be booted by GRUB2 under QEMU to emulate a BIOS, while on a physical machine its nvme/usb drivers would not work properly, it would not recognise any hard drives and would eventually crash.
 
Another interesting project is biefircate, which seems to be aimed at running real mode DOS programs under UEFI.
However, the project is still in the early stages of development and lacks documentation.
 
If you want to run an old system (e.g. Win98) on a new computer, the biggest obstacle is not UEFI; making a minimalist Linux distribution with QEMU is the easiest way, and you can even package it in a single EFI file.

  • Blackcrack likes this

#6 Guest_AnonVendetta_*

Guest_AnonVendetta_*
  • Guests

Posted 16 July 2021 - 12:07 AM

Well, at least now I know that when I'm finally ready to upgrade my hardware, it will likely have to be UEFI only. My hardware is still running great, it was top of the line when it released, I'm not ready to upgrade for probably another 2-3 years. What I have does everything I need to do, and does it well. I give it plenty of TLC and frequent hardware inspections, to make sure it lasts as long as possible.

As for Windows 11, I'm mostly liking what I'm seeing in the leaked build I've installed. Performance seems to be nearly identical to Windows 10, and I'm thinking that it's not compelling enough to warrant an upgrade. I've got it booting in legacy mode right now via a Registry edit. If Microsoft loosens up the requirements a bit and still allows W11 to boot in legacy mode for PCs that support it, then I may change my mind.

#7 Blackcrack

Blackcrack

    Frequent Member

  • Advanced user
  • 458 posts
  •  
    Germany

Posted 16 July 2021 - 05:30 AM

hmmm... i have read the Header and skim over the texts.. and i had a idea.. so, why could Grub not support some emulation for Win11 to be in possible for install Win11

 

klick off all other harddisks and install Win11 without network, then, if install Win11, klick on the other disks with grub loader , restart the installer of grub and be in able to start win11 with "UEFI"-emulation and TPM 2.0 Emulator who load it up by selecting Win11 in the TSR for give a feedback by starting from Win11 .. so, just a short-idea for the problematic of Win11..

 

but in general... i want not any UEFI or TPM in my Computer, because i whant run different Systems in different partitions, include Dos 6.22, win95 and Win95, but it's an other theme..

Linux don't need a UEFI, you have your passwords and Savety-systems, you can encrypt you Filesystem with a password if its need and so on, You can password your Bios to harding

and so on.. so what, why extra specials directly like UEFI and TPM directly in the Bios, if it's in the Bios, can you everytime disconenct your harddisk and put it in an other computer

and start with an other System in a Admin account if it's not encrypted.. and in the most cases is it not.. and becomes ever more forgotten to save directly the harddisk.. but this is wand, to have the Fasilitys the possible to read anytime the harddisk if i am not wrong..

 

so, why not kick out the whole bullshit and the bios should concentrate only on the hardware and the Software.. the Boot-software should concentrate into make a security barrier

to prevent the software to readout the hard-disks without any password .. for Linuxkernel exist already a boot possibility who connect the server and open the encrypted filesystem

 

so what should the crap to move security things of boot Software and OS in the Bios.. and making the the barriers before your hardware and dotted/stupid(ing) the Peoples. 

There it is a easy possibility to make a password in the Bios and disabling floppy and usb-boot and you can no more boot from an other device and Customers or Users of they are be no more in possibility for boot with an other stick.... fullstop !
 

By boot from the Harddsik it is a possible for setting up a encripting password and there is no possibility anymore for decrypting the harddisk without the passwort, this is more Trust imho !

 

Microsoft want only stupid the Users and Customers and make they all to Customers who neeeeed the MS-Support and must be paid to make more money.. that's all..

 

bahh stupid and untrusty ..

 

you are you should rather support Reactos, that it is faster to use, maybe with an more neutral Git or different git's or WorkGroups who make different stacks for it where be later put together as a Ordering System. (Clear, first rebuild the XP one ..)

 

best

Blacky



#8 Guest_AnonVendetta_*

Guest_AnonVendetta_*
  • Guests

Posted 17 July 2021 - 04:03 PM

klick off all other harddisks and install Win11 without network, then, if install Win11, klick on the other disks with grub loader , restart the installer of grub and be in able to start win11 with "UEFI"-emulation and TPM 2.0 Emulator who load it up by selecting Win11 in the TSR for give a feedback by starting from Win11 .. so, just a short-idea for the problematic of Win11..

I'm not aware of any solution that emulates Secure Boot, besides VMs. And yet, I don't need to. My PC is supports UEFI, Secure Boot, and TPM 2.0. I've never used a TPM on any PC, because I don't need to, but it's there if I ever did need to use it.

#9 Blackcrack

Blackcrack

    Frequent Member

  • Advanced user
  • 458 posts
  •  
    Germany

Posted 17 July 2021 - 04:47 PM

on my Notebook it's also there and i have a i5, so should it be possible to work because it's Win10 compliant with TMP2 but i want stay with ma' Win7.. it works easy, maybe use i Macrium to change the Win7 and Win11 out or to and fro ....

but on my AMD FX 8Core is it not.. nut UEFI is there, but i want not use it, but anyway, Win11 supports an AMD FX processor still not ..

and this with kill's  the classicmenu is also something.. well i wait a little time off what's happens in the next couples of month and monitor it/watch it out what's comes..

best






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users