description of BUILD_BUG_ON in linux-initialization-1.md
Probably need rework. The current description bases on its definition in the arch/x86/boot/boot.h, while is not belonged to vmlinux, it is belonged to ZO image, which is produced under arch/x86/boot.
The real definition locates include/linux/build_bug.h
#define BUILD_BUG_ON(condition) \
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
extend it along, will see it is a usage of GCC attribute
I would mark each point I identified in this doc, which I think should be improved here.
And after this we can see call of the reset_early_page_tables function where we resets all page global directory entries and write new pointer to the PGT in cr3:
It is (PTRS_PER_PGD-1), so it should be:
...we reset all page global directory entries but last one and ...
And the same problem in:
Here we can see that we zero all Page Global Directory entries.