Page 1 of 1

How do I access pages

Posted: Wed Jun 03, 2020 1:46 pm
by nexos
Hello,
I am currently improving my paging code. I was curious as to how I should access the tables themselves, since the cpu can only use physical address for these tables. I have been accessing them via physical addresses, as the first 4MB are identity mapped. Thank you for your help.

Re: How do I access pages

Posted: Wed Jun 03, 2020 6:17 pm
by kzinti
Map the pages you want to access in your page table. Then you can access them using virtual addresses.

Re: How do I access pages

Posted: Wed Jun 03, 2020 11:57 pm
by thumble
You might want to look into recursive paging.

Re: How do I access pages

Posted: Thu Jun 04, 2020 7:56 am
by iansjack
This article: https://os.phil-opp.com/paging-implementation/ discusses the problem, and various solutions. I favour the "Map the Complete Physical Memory" approach.

Re: How do I access pages

Posted: Fri Jun 05, 2020 9:54 am
by nexos
Thank you for your help. I have decided to use recursive paging and it works quite well for me.