|
|
Log in / Subscribe / Register

Bottomley: Owning your Windows 8 UEFI Platform

Bottomley: Owning your Windows 8 UEFI Platform

Posted Feb 22, 2013 18:52 UTC (Fri) by zlynx (guest, #2285)
In reply to: Bottomley: Owning your Windows 8 UEFI Platform by khim
Parent article: Bottomley: Owning your Windows 8 UEFI Platform

I'm not sure we're talking about the same things at all.

Grab a copy of your BIOS. Disassemble it. How much of it is in 16-bit real mode code and how much of it is in 32-bit protected mode code? Last time I did this, probably 10 years ago, none of it was.


to post comments

Bottomley: Owning your Windows 8 UEFI Platform

Posted Feb 22, 2013 22:43 UTC (Fri) by etienne (guest, #25256) [Link]

Well there was SMM for some time with its crappy interface (write ebx to port 0x20 and see all the registers changed) which I cannot call real mode even if it is .code16gcc. That thing handle hard disk emulation of USB drive, keyboard and mouse - which is not present in the standard BIOS in between segments 0xE000 and 0xFFFF.
I hope SMM has gone from EFI.
BIOS is not perfect neither with no standard support of network card (put a packet on the wire / read last packet from the wire) and no support for multiple screen/keyboard.

Bottomley: Owning your Windows 8 UEFI Platform

Posted Feb 23, 2013 15:32 UTC (Sat) by khim (subscriber, #9252) [Link] (1 responses)

How much of it is in 16-bit real mode code and how much of it is in 32-bit protected mode code?

Significant chunk of it is for SMM mode which is 32-bit unprotected code with full access to 4GiB of address space. You can compile code for this mode with [relatively] modern compilers, etc. Yes, it's still weird mode (that's why EFI is going with normal 32/64-bit protected mode), but it's not 16-bit mode and it's programmed in C, not in assembler which means that the message which started the whole discussion (in BIOS there's limited amounts of RAM available and it all has to be written in 16-bit assembly) is factually wrong as mirabilos pointed out.

Bottomley: Owning your Windows 8 UEFI Platform

Posted Mar 1, 2013 1:09 UTC (Fri) by Wol (subscriber, #4433) [Link]

I thought that at least one MAJOR bios was not written in Assembler (and why shouldn't a bios be written in c?). It's written in Forth.

Which has the unusual property that a decently competent programmer can make the Forth object code smaller than the equivalent assembly! Excellent for the old BIOSes where the BIOS chip size was measured in Kb not Mb.

Forth is also unusual in that it is pretty near impossible to code a GOTO :-) Most other languages have a goto, even if it's not normally necessary or used.

Cheers,
Wol


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds