xv6: How exactly is memory addressed? (Part 1)

Memory management is one of the key concepts to understand OS and architecture. Naturally it was necessary for me to understand it for the development of an x86 simulator, dax86 and it was indeed tricky to connect all the xv6’s source code with the understanding of MMU. This article talks about the initial part of memory addressing in xv6 as well as how it organizes the instruction addresses of kernel.

xv6 image: How exactly is the boot sector created and loaded?

One of the difficulties I faced in the development of an x86 simulator, dax86 was the end-to-end understanding of the OS image structure. This article talks about the creation of the booting block and how it is formed into the OS image as well as how hardware loads and executes it. Makefile Makefile is where we start obviously. It has all the setup for creating different binaries and linked objects required to compose the OS image.

dax86: xv6-runnable x86 Emulator for Study Purpose

I wrote an x86 simulator that runs a small OS, xv6 for study purpose without translating binaries or memory. Everything is implemented C codes. Repository Link: https://github.com/ykskb/dax86 Here’s some key points about it (excerpt from README): Why: I wanted to learn how an OS runs on CPUs at architecture / instruction level. What: Runs vanilla xv6 (memfs) image from boot. Each instruction is manually implemented and executed sequentially without binary translation, pipeline or OoOE.