Talk:Setting Up Paging

From OSDev Wiki
Jump to: navigation, search

I added a short tutorial on basic paging. Please correct any wrong information or comment on style etc... Stevo14 04:24, 29 April 2008 (CDT)

Added some notes about page-aligned addresses. You might also want to clarify that it's a good idea to use a page allocator for getting page tables/directories to make sure that they don't get overwritten.

--pcmattman 18:43, 30 April 2008 (CDT)

I changed the code so that it uses a page aligned address for the page directory and page table. Maybe the more advanced paging section could go through how to set up a proper page allocator. There is also the article on Page Frame Allocation which could be referenced.

Stevo14 00:40, 1 May 2008 (CDT)

It might be an idea to add a section to the end about how to deliberately trigger a page fault to test whether or not paging is correctly enabled. Maybe something simple like:

.global _test_page_fault
.type _test_page_fault, @function
	andb $0xFE, (_page_tables)
	movb $0, 0

--Ajxs 20:54, 29 July 2016 (CDT)

The problem being with such code is that it makes a lot of unwritten assumptions - it assumes the first page table is stored in the binary, it doesn't work with 4M pages, and it doesn't work if the page has already been cached in the TLB. There is also a tendency that people just grab the code without reading properly and misdiagnose things as a result. I'd recommend some prose to cover the subject instead of premade code. - Combuster 01:50, 1 August 2016 (CDT)
Personal tools