OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Apr 16, 2024 12:20 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 31 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject: Re: How do I keep track of which pages are free/used?
PostPosted: Tue Apr 06, 2021 3:29 am 
Offline
Member
Member

Joined: Wed Oct 01, 2008 1:55 pm
Posts: 3192
bzt wrote:
Not necessarily complicated. Some architectures (like the ARM for example) provide instructions to convert virtual to physical address for you in an absolutely non-complicated way. And yes, you probably only need that when you are freeing the page tables on process exit, because most of the time you can let the MMU do the conversion for you as you don't need to know the actual physical address (only the pointed data).


I think the most common case is MMIO schedules. You have some data you want to put in a schedule, but the device uses physical addresses and not linear, and so you need to convert your buffer to a physical address. The other direction is needed when the PCI device updates the schedules and changes the lists. Then you might need to traverse the schedule, but it has physical addresses and so you need to convert those to linear to be able to follow the updated links. And if your lists are in virtual memory rather than in an identity mapping, there is really no advantage in being able to convert to the identity mapping as that doesn't tell you which object you are following.

My new USB drivers all benefit from fast conversions in both directions since I now follow the schedule links to be able to examine which requests are completed and with what state.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 31 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 6 hours


Who is online

Users browsing this forum: TYDQSoft and 74 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group