How does ARM Linux emulate the dirty, accessed, and file bits of a PTE?
My question is how does it check the dirty, accessed, file bit of a page on H/W PTE? TL;DR – they are emulated by taking a page fault on initial accesses. The answers are given in pgtable-2-level.h, The “dirty” bit is emulated by only granting hardware write permission iff the page is marked “writable” and … Read more
Context switch internals
At a high level, there are two separate mechanisms to understand. The first is the kernel entry/exit mechanism: this switches a single running thread from running usermode code to running kernel code in the context of that thread, and back again. The second is the context switch mechanism itself, which switches in kernel mode from … Read more
How do I find ARM Linux entry point when it fails to uncompress?
We seem to have ported Das U-Boot successfully. There’s evidence that that is a faulty assumption. Just before calling the kernel, the pointer theKernel is 10008000 and not 10800000. Which version of U-Boot are you using? In both 2012.10 and 2013.04 versions of U-Boot, the variable theKernel is only declared and used by code for … Read more
$(uname -a) returning the same in docker host or any docker container
Docker uses the host operating system kernel, there is no custom or additional kernel inside the container. All containers running on the machine are sharing this “host” kernel. See for more information this question on SuperUser.
Linux kernel ARM exception stack init
tl;dr – We switch modes to supervisor and use that stack. You are missing the key point of where control is handed to the CPU via the vector table and the mode is switched. See: entry-armv.S and __vectors_start. The vector stubs is the code where control is initially sent after the branch in the main … Read more
Image vs zImage vs uImage
What is the difference between them? Image: the generic Linux kernel binary image file. zImage: a compressed version of the Linux kernel image that is self-extracting. uImage: an image file that has a U-Boot wrapper (installed by the mkimage utility) that includes the OS type and loader information. A very common practice (e.g. the typical … Read more