I'm probably a poor candidate for this, but I couldn't resist. I've been following this thread since its inception over a year ago, but only managed to find time to install OpenCore this week. I'm no expert, so maybe some
actual experts could enhance or correct any details I got wrong. I banged this out over lunch, so please forgive any typos, etc.
With that said, were you looking for something like this?
(The following explanation assumes the reader is a computer novice; if you have more expertise and simply want an overview of OpenCore, skip to the 5th paragraph, which starts with the word "OpenCore." NOTE: The wording of this introduction assumes you're running an Apple Mac, loading MacOS, but the concepts generally apply to compatible systems and other operating systems, such as Linux or Windows, although the details may differ.)
When a general-purpose computer like a Mac is powered on, it knows almost nothing about what it's capable of, or what's attached to it. The first thing it needs to do is take inventory - for example, see what sort of CPU it is and how fast it's running, figure out how much RAM is available and where it is, see how many disks there are, see if there's a keyboard and/or mouse attached, etc. Part of that process usually involves testing and initializing each of those items - for example, the system might send a message to the keyboard asking "are you there? and if so, what are you?", the keyboard might respond with some details about itself, then the system might send another message to the keyboard instructing it to set its repeat rate, turn on/off the LEDs, etc. For disks, the system needs to first figure out what sort of disk controllers are installed (e.g. SATA, SAS, SCSI, IDE, NVMe, etc.), then get those controllers to ask what disks are attached to them, how big they are, how quickly they can communicate, etc. After all of the devices on the system are accounted for and initialized, the computer can locate and load the operating system (such as MacOS or Windows) and actually get something done. The process of testing, taking inventory, initializing the devices, loading an operating system, and passing control to it is referred to as "bootstrap loading," or just "booting" the computer. (It's also sometimes referred to as Power-On Self-Test, or POST, although that term really just applies to the first phase of booting.)
Early personal computers used a Basic Input/Output System, or BIOS, for the boot process. Most of the BIOS was embedded in a ROM or EPROM on the computer's motherboard, and was tightly tied to that particular hardware - if the hardware changed more than a trivial amount, the BIOS wouldn't work properly. Some add-on cards had BIOS ROMs of their own, and the motherboard's BIOS would transfer control to the cards to initialize themselves (which sometimes went very badly, since the card had no knowledge of the system it was plugged into, and programmers sometimes make bad assumptions). There were several problems and shortcomings to the BIOS approach. Because the BIOS methodology dates back to the 1980s, it runs in 16-bit mode, which severely restricts how much memory it can access, and it can only understand disks using Master Boot Record (MBR) partitioning, which limits the size of the disk to about 2TB. And, as previously mentioned, the BIOS only understands the hardware for which it was designed, so it could fail to properly initialize a newly-installed device, or fail to boot at all. All of these various issues could be (and often were) worked-around, but that made the BIOS code even more complex, error-prone, and difficult to deal with.
Intel's solution to this problem was the Extensible Firmware Interface, or EFI. It's like a tiny operating system of its own, with well-defined protocols for devices to talk to one another, and the ability to run specialized programs for more complex setups. EFI can handle extremely large disks, and is flexible enough to handle the testing and initialization of almost any hardware. When EFI began to be more widely adopted, Intel ended development of EFI; control of the standards and specifications passed from Intel to a new group, the UEFI Forum, and Unified Extensible Firmware Interface (UEFI) was born. UEFI is largely a superset of EFI. A computer using EFI or UEFI only needs to know how to load EFI itself; after that, EFI handles the whole boot process. (From here on, I'll use the term "EFI" to mean either EFI or UEFI, and use "UEFI" only when discussing something specific to UEFI.)
Intel-based Macs use an Apple-specific version of EFI, with capabilities somewhere between EFI and UEFI. For compatible graphics cards, Apple's EFI includes a graphical boot-picker, which allows you to choose which disk you'd like to boot from. However, if you use a non-Apple graphics card, this boot-picker is invisible to you, as are the progress bars and other messages that display while MacOS is loading. Apple's EFI is embedded in the Boot ROM in the Mac. The Boot ROM can be upgraded; for the Mac Pro 5,1, at least 12 versions of the Boot ROM have been released by Apple, adding support for things like the APFS filesystem, NVMe drives, and Intel CPU microcode updates.
OpenCore is a set of EFI programs designed to run on Macs (or compatible) computers. OpenCore runs on the EFI platform, it doesn't replace it. OpenCore is still evolving, and it has many facets, but broadly speaking, it's useful for three things: (1) it will display a boot-picker and progress screens on non-Apple graphics cards, (2) it allows you to fine-tune the initialization of the hardware, even to the point of "spoofing" (making one piece of hardware appear to be a different piece of hardware, or to disappear altogether), and (3) it allows you to "inject" code into MacOS to accomplish things that would otherwise be impossible, or prohibited by MacOS itself.
During the initial boot, when the EFI is initializing the hardware, the OpenCore boot-picker can run (if it's enabled). This is just an EFI program the looks for bootable partitions, then presents them, either graphically or as a list; once you choose one, it passes control to the boot loader and exits. The boot-picker runs and exits entirely before MacOS loads. It uses EFI drivers that can communicate with both old-style EFI Universal Graphics Adapter (UGA) graphics cards, or new-style Graphics Output Protocol (GOP) graphics cards. (The Apple EFI only includes support for the older UGA cards, and even then some cards won't work properly without an add-on like OpenCore.)
The goal of EFI/UEFI is to discover and initialize the hardware, then locate and load an operating system. Having discovered the hardware, EFI creates a "device tree," which is a description of all the hardware it found. Think of it as a dictionary, with an entry for every device that the computer could identify; each of these entries contains a list of all the details about the device. For example, a graphics card entry might contain the addresses of its I/O ports, the addresses of its on-board video memory, information about what interrupts it uses, who the manufacturer is, an identifier of what type of device it is, and many other details. However, the computer doesn't communicate directly with the graphics card - the card is attached to the computer via what's called a "bus" (which is just a common set of connections between things - if you picture a long hallway with rooms branching off of it to the left and right, the hallway could represent a "bus," being the path that allows you to move from room to room). In the case of a Mac, this is a Peripheral Component Interconnect Express (PCIe) bus, which ties most of the system together. Your computer's CPU, graphics card, disk controllers, USB controllers, network adapters, and other devices all communicate over the PCIe bus. The PCIe bus itself has entries in the device tree, as does the CPU itself. This is what gives us the "tree" structure. An oversimplified example might look something like this:
Code:
|-Core0
|-CPU-|-Core1
| |-Core2
| |-Core3
|
| |-Port0-Mouse
| |-USB-|-Port1-Keyboard
| | |-Port2-Flash Drive
| |
| | |-Monitor0
Computer-|-PCIe-|-GPU-|-Monitor1
| |
| | |-Disk0
| |-SATA-|-Disk1
| | |-Disk2
| |
| |-(...other PCIe devices...)
|
|-RTclock
|-(...other system devices...)
Once EFI has created this tree, with all the details for all the hardware (and there are a
lot of details; the example above is grossly oversimplified), it loads whatever operating system it has found (or you have selected) and passes this tree to the operating system (let's assume MacOS from here on). When MacOS loads, it's in the same boat that EFI was when it first loaded - it knows almost nothing about its environment. Rather than repeat the process of discovering and initializing the hardware, though, MacOS uses the device tree that EFI passed to it, and "hits the ground running" - all the hardware is already set up and ready to go, and MacOS now has a list of all that hardware and the details of how it's configured and how to access it.
Since MacOS relies on the EFI device tree to understand the hardware, a program like OpenCore has the opportunity to "spoof" the hardware - effectively, to misinform MacOS about what's installed. For example, if you're installing MacOS on a laptop that has an unsupported GPU, and MacOS crashes when it tries to initialize or use that GPU, you can have OpenCore simply tell MacOS that the GPU isn't there (i.e. delete it from the device tree that OpenCore passes to MacOS). Changes to the EFI device tree that gets passed to the operating system occur while EFI is still running, but they (and their effects) persist after EFI (and OpenCore) exit. So, in the trivial example above, OpenCore takes the EFI device tree, removes the offending GPU entry, loads MacOS, passes MacOS the modified device tree, then exits. OpenCore is no longer running, but MacOS proceeds under the belief that the problematic GPU doesn't exist, so it doesn't try to use it.
Some parts of OpenCore can continue to operate after MacOS has taken control. For example, OpenCore can intercept calls from MacOS to get or set variables in the Non-Volatile RAM (NVRAM), and present whatever values it wants, or prevent changes from being made. OpenCore can also "inject" kernel extensions (kexts) or other code patches - since OpenCore has control of the system before MacOS does, it can load MacOS into memory, then make modifications to that memory before passing control to MacOS. An example of this would be CPU spoofing - MacOS has some code that sets up the CPU, effectively asking the CPU "what are you, and what are your capabilities?" and creating a table of those details; once that's done, MacOS never needs to directly ask the CPU again, it just looks in the table to find out what it needs to know. OpenCore can modify that code before MacOS starts, so instead of asking the actual CPU "what are you, and what are your capabilities?", it skips that part and just uses the tables - which OpenCore has conveniently filled out with whatever details it wants. This is how the VMM flag (which tells MacOS that it's running in a virtual machine, even if it's not) can be set or reset by OpenCore. This mechanism can also be used to allow unsupported CPUs to be used by telling MacOS that it's a supported CPU, or to allow features that are missing from a CPU (such as SSE 4.2 on Penryn-class CPUs) to be implemented externally, yet have MacOS believe that the feature is available on the CPU itself.
OpenCore can also "inject" kernel extensions that might be needed for a successful boot on unusual hardware, or that would be difficult or impossible to load otherwise. By loading MacOS into memory, then loading the kext into memory and performing a kernel link in place, MacOS will boot the modified kernel without ever knowing it was modified. OpenCore itself is no longer running at this point, but the kext that OpenCore injected is.
For more details about how OpenCore operates, or how to configure OpenCore, see the OpenCore documentation.
Thoughts? Anyone with any inclination is welcome to take the above and modify it, include it in the first post, or use it as you will. (Or just roll your eyes because I've totally missed the mark, which is a real possibility here...)