3 ms·
How do you patch a CPU remotely? Are the instructions programmable?
by quadcore 9y ago
How do you patch a CPU remotely? Are the instructions programmable?
- InclinedPlane 9y agoCPUs have code that runs code, essentially. Think of a modern CPU as like a collection of micro-controllers. You have micro-controllers which reads a stream of machine code instructions for a particular instruction set (e.g. x86-64) translates that code into "micro-ops" (RISC-like fine grained instructions) that are then re-ordered and so forth and fired off into the CPU core(s) proper. That whole process relies on a ton of code that exists as essentially "firmware" (microcode) within the processor. Things like translation tables for architecture level instructions (x86-64) to micro-ops as well as code for the scheduler, the branch predictor, and various other micro-architectural parts of the CPU. Some of these elements are hardwired into the silicon, some are controlled via decode tables, and some are controlled via flags and perhaps even instructions running on different components of the CPU, all of that together is grouped under the heading "microcode". A modern CPU is not infinitely programmable because a lot of functionality is hardwired (for example, what each micro-op does) but there's still a great deal of flexibility in how things work (such as exactly how the branch predictor and scheduler work, the translation of instructions to micro-ops, etc.)