Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

description of BUILD_BUG_ON in linux-initialization-1.md #675

Open
PinoTsao opened this issue Jun 21, 2019 · 1 comment
Open

description of BUILD_BUG_ON in linux-initialization-1.md #675

PinoTsao opened this issue Jun 21, 2019 · 1 comment

Comments

@PinoTsao
Copy link
Contributor

PinoTsao commented Jun 21, 2019

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

@PinoTsao
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants