5 ms·
A kernel doesn't need to use all the instructions a CPU offers -- only the ones it needs.
by frabert 5y ago
A kernel doesn't need to use all the instructions a CPU offers -- only the ones it needs.
- ithkuil 5y agoIf the extra instructions also operate in extra state (e.g. extra registers) a kernel needs to know about their existence so it can correctly save and restore state on context switches
- my123 5y agoNot necessarily/really, the custom extensions still need to be enabled by the kernel before they can be used. As such, it isn’t actually an issue.
- ndesaulniers 5y agoYou're confusing MSRs (which don't have to be saved/restored on context switch) with GPRs (which do).
- Someone 5y agoIt doesn’t need to use them, but it must be aware of them, insofar as they may introduce security problems. As an example, if the kernel doesn’t know of DMA channels, and it requires setup code to prevent user-level code from using them to copy across process boundaries, the kernel will run fine, but have glaring security problems.