Hacker News new | ask | show | jobs
by userbinator 2878 days ago
It depends on the exact architecture; on x86 the exact logic of the INT instruction is quite involved (see e.g. https://x86.puri.sm/html/file_module_x86_id_142.html for details) but when changing privilege levels, the CPU automatically switches stacks too.
1 comments

Is there a nice xv6 equivalent for x86_64? How do MIT students learn about 64-bit arch?

https://aaronbloomfield.github.io/pdr/book/x86-64bit-ccc-cha...

This was good, but it leaves a lot out. No mention of kernel space.

You will probably find an x86_64 port of xv6 on GitHub. IMHO, there is nothing terribly special about x86_64. The goal of xv6 is not to teach 64-bit computers, but to cover operating system basics (primarily multitasking, virtual memory and filesystems).