On 19 Feb 2022 at 02:35a, Dr. What pondered and said...
 
My understanding is that it's even worse than that.  From what I've read the UEFI boot process uses MS-DOS.
No, it does not.  The confusion might come because by
design, when an x86 CPU comes out of reset, it begins
executing at code-boot reset vector in 16-bit real
mode; often that's executing instructions directly from
SPI-flash or something.  The SEC phase code has to
handle running in that constrained environment and
getting the PEI running; that usually means turning on
DRAM (on Intel, you do training here; AMD does that
from the PSP), handling the A20 latch on the BSP, and
getting into 32-bit protected mode, loading the PEI
and jumping to it.  From then on, it's mostly 32-bit
until you get to DXE.  PEI does a lot of platform-specific
stuff, like enumerating APICs (CPUs), initializing
buses, device configuration, and so on, then it loads
and starts the DXE runtime, which remains resident even
after the OS boots (the OS can make UEFI calls by jumping
into DXE).
MS-DOS isn't used at all here, but DXE applications
often ship as Windows PE executables (which themselves
are based on COFF, which came out of System V Unix).
But the the only truthful sentance that includes the words "Microsoft"
and "secure" is "Microsoft products are inherently not secure."
That's not true.  MSFT has some really crackerjack people
working on Windows, and has produced some very nice research
work in security.
--- Mystic BBS v1.12 A47 2021/12/24 (Linux/64)
 * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (21:1/101)