4 ms·
"The only interface a programmer has above the actual hardware is the kernel itself." Laughs in bare metal.
by analognoise 5y ago
"The only interface a programmer has above the actual hardware is the kernel itself."
Laughs in bare metal.
- chrisseaton 5y ago> Laughs in bare metal. But that's what they said. If you aren't using bare metal, then the only other interface you have directly above that is the kernel.
- Koshkin 5y agoThe thing is, the metal has not been bare for a long time now.
- tux3 5y agoWell, there's still plenty of systems you may interface with that sit somewhere between the kernel and the metal! UEFI software, SMM code, various other pieces of firmware, your cloud provider's hypervisor, the Intel ME, .. All those things send machine code to the CPU, which is really where bare metal starts. Everything that happens after is hardcoded in silicon (ignoring ucode!)
- Koshkin 5y ago> ignoring ucode Which you can’t anymore, because in modern CISC CPUs it is no longer microcode in the original sense but rather machine code for an internal RISC processor. Also, some hardware parts are built using FPGAs. (Basically, we might as well call the Java VM “bare metal.”)
- tux3 5y agoWell, it's not that simple, but I'm happy to argue that you can consider machine code the real interface to the hardware, not the undocumented microarchitectural uops. The translation to macro and micro ops is done in silicon, hardcoded, with the exceptions of instructions that may need to read from MSROM, and the patching system that ucode updates have. That's a small percentage of instructions executed. And because all of that is hidden from the software, it's not something you can interract with, and it changes with the CPU model. It's internal details, not the external interface (despite some people really writing the machine code specifically with some uop sequence in mind :) ) I'm not sure FPGAs are really the same concept, though. Even if they're reconfigurable, I still consider them hardware, not software code. After all you write FPGA code in HDL :)