In UEFI,how to prevent me from overwriting the page table?
-
- Member
- Posts: 25
- Joined: Sat May 04, 2024 7:48 am
- Libera.chat IRC: wishedtobe
In UEFI,how to prevent me from overwriting the page table?
I was trying to find out where the page table and gdt is in UEFI.Then I found that gdt is located in RT_data,while page table is located in BS_data.It is easy to prevent my OS from overwriting gdt,but how can I deal with the page table?It is said that BS_data would be reclaimed after exiting boot services,and can I reclaim the RT_data?
-
- Member
- Posts: 5560
- Joined: Mon Mar 25, 2013 7:01 pm
Re: In UEFI,how to prevent me from overwriting the page table?
You need to create your own GDT and page tables. You can't reuse the ones set up by UEFI.wishedtobe wrote: ↑Fri Jul 05, 2024 8:00 pmIt is easy to prevent my OS from overwriting gdt,but how can I deal with the page table?
No, you can't reclaim memory containing runtime data.wishedtobe wrote: ↑Fri Jul 05, 2024 8:00 pmIt is said that BS_data would be reclaimed after exiting boot services,and can I reclaim the RT_data?
-
- Member
- Posts: 25
- Joined: Sat May 04, 2024 7:48 am
- Libera.chat IRC: wishedtobe
Re: In UEFI,how to prevent me from overwriting the page table?
Due to the dirty memory space, I can hardly use any part of the memory (overwriting the page table may cause serious problems), making me unable to create my own page tables.Octocontrabass wrote: ↑Fri Jul 05, 2024 8:07 pmYou need to create your own GDT and page tables. You can't reuse the ones set up by UEFI.wishedtobe wrote: ↑Fri Jul 05, 2024 8:00 pmIt is easy to prevent my OS from overwriting gdt,but how can I deal with the page table?
No, you can't reclaim memory containing runtime data.wishedtobe wrote: ↑Fri Jul 05, 2024 8:00 pmIt is said that BS_data would be reclaimed after exiting boot services,and can I reclaim the RT_data?
-
- Member
- Posts: 5560
- Joined: Mon Mar 25, 2013 7:01 pm
Re: In UEFI,how to prevent me from overwriting the page table?
Why not create your page tables before you reclaim the boot services data?
-
- Member
- Posts: 25
- Joined: Sat May 04, 2024 7:48 am
- Libera.chat IRC: wishedtobe
Re: In UEFI,how to prevent me from overwriting the page table?
Maybe you are right.Then what will it be if I overwrite the runtime services?Octocontrabass wrote: ↑Fri Jul 05, 2024 8:28 pm Why not create your page tables before you reclaim the boot services data?
-
- Member
- Posts: 5560
- Joined: Mon Mar 25, 2013 7:01 pm
Re: In UEFI,how to prevent me from overwriting the page table?
Probably something bad will happen, but you shouldn't do it because the UEFI spec says you're not allowed to do it.