3 ms·
Thanks for sharing that...yep, this book is awesome indeed :) I agree with you that the book is superior in every possible way at documenting design decisions.
by wavepocket 5y ago
Thanks for sharing that...yep, this book is awesome indeed :) I agree with you that the book is superior in every possible way at documenting design decisions. My intention was just to speculate about it and potentially help people writing hobbyist OSes out there.
This blog post is more like a brain dump of my journey to understand how to set up page tables and in particular the 4-Kbyte PTE - Long mode (AMD64 manual - section 5.3.3).
I must confess that coming to the conclusion that the last 3 nibbles are assumed to be zero for the "Physical-Page Base Address" so it can be 'reused' for the Page flags (bits 0:11) is far from intuitive and this is only possible because pages are 4096 bytes aligned =)
I hope you that you liked that blog post and thanks for the feedback