4 ms·
After bootstrapping, the kernel sits in its idle task and does absolutely nothing except serving interrupts, the scheduler only switching between kernel threads
by anyfoo 4y ago
After bootstrapping, the kernel sits in its idle task and does absolutely nothing except serving interrupts, the scheduler only switching between kernel threads at most. Then, after a set amount of time (5 minutes), another device with full DRAM access (or sufficiently configured IOMMU) and in the same coherency domain (or some contraption to make things coherent) starts to DMA the init task and the appropriate changes to the kernel's data structures into memory. When made coherent, the kernel's scheduler will see the new init task's thread in its set of runnable threads and eventually switch that.
What? You did not ask for a method that is not completely batshit insane.
- dmitrygr 4y agoExcept given the size of caches nowadays, without some cause, that coherency might never happen :-)
- anyfoo 4y agoYep. That’s why I kind of copped out with just mentioning that the device has to either be in the same coherency domain, or there must be some super vague hand-wavy “contraption” to achieve coherency. Be creative I guess! :P