Paging issues...
Posted: Mon Aug 06, 2007 8:38 am
In attempting to write some new address-space independent synchronizing utilities I've run into a pager issue.
The scenario is relatively simple:
- I want to map a physical page to 0xbffff000
- To do this, I need to create a page table
- After creating the page table, I set the appropriate location to map linear 0xbffff000 to the physical page I have
- Immediately after I read back this value and I get 0 instead of the value I just wrote there.
I assume this has something to do with the TLB cache, but invlpg doesn't appear to help (is there a general set of rules as to when an invlpg is required on an x86 platform, btw?).
The creation of the page table may play a role here. After creating a new page table, I make sure that I zero out all the entries in it. It's my current assumption that this 0 has stuck in the TLB cache and remains, even though I've more recently overwritten it with a valid physical page.
Any help in this matter would be greatly appreciated!
Thanks,
Jeff
The scenario is relatively simple:
- I want to map a physical page to 0xbffff000
- To do this, I need to create a page table
- After creating the page table, I set the appropriate location to map linear 0xbffff000 to the physical page I have
- Immediately after I read back this value and I get 0 instead of the value I just wrote there.
I assume this has something to do with the TLB cache, but invlpg doesn't appear to help (is there a general set of rules as to when an invlpg is required on an x86 platform, btw?).
The creation of the page table may play a role here. After creating a new page table, I make sure that I zero out all the entries in it. It's my current assumption that this 0 has stuck in the TLB cache and remains, even though I've more recently overwritten it with a valid physical page.
Any help in this matter would be greatly appreciated!
Thanks,
Jeff