Skip to content

Reserve 3 frames for higher half kernels - #160

Closed
Andy-Python-Programmer wants to merge 1 commit into
rust-osdev:mainfrom
Andy-Python-Programmer:main
Closed

Reserve 3 frames for higher half kernels#160
Andy-Python-Programmer wants to merge 1 commit into
rust-osdev:mainfrom
Andy-Python-Programmer:main

Conversation

@Andy-Python-Programmer

@Andy-Python-Programmer Andy-Python-Programmer commented May 14, 2021

Copy link
Copy Markdown

This pull request reserves three frames instead of two for higher half kernel support.

Related: #159

@phil-opp

Copy link
Copy Markdown
Member

Thanks for the PR! I'm currently looking into this issue too and I think there might be a better way to solve this. I'll keep you posted.

@Andy-Python-Programmer

Andy-Python-Programmer commented May 14, 2021

Copy link
Copy Markdown
Author

All good! Thanks!

@Andy-Python-Programmer

Copy link
Copy Markdown
Author

For reference the limine bootloader subtracts the fixed higher half offset from the elf header section.

https://github.com/limine-bootloader/limine/blob/f650e4b41bda371dd8d6fd764bc2c77bcbc3f102/stage23/lib/elf.c#L339

@Andy-Python-Programmer

Copy link
Copy Markdown
Author

Closing as of #161

@phil-opp

Copy link
Copy Markdown
Member

I opened #161 with an alternative fix.

For reference the limine bootloader subtracts the fixed higher half offset from the elf header section.

I'm not sure why this is done, maybe because the bootloader is still in 32 bit mode at this point? In our case, we are already in 64 bit mode when doing the mapping, so we can create mappings across the whole virtual address space without problems.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants