OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 8:36 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: duplicating kernel memory mapping across page directories
PostPosted: Fri Sep 29, 2017 7:36 am 
Offline
Member
Member

Joined: Thu Mar 14, 2013 1:30 am
Posts: 78
Hi.
I'm wondering how to map kernel memory that will be represented in all available page_directories.
The only way I can think of is to keep a linked list of all page_directories and update them on every mapping / unmapping.
Is there a better way ?

Thanks,
Ramon.

_________________
“Meaningless! Meaningless!”
says the Teacher.
“Utterly meaningless!
Everything is meaningless.” - Ecclesiastes 1, 2

Educational Purpose Operating System - EPOS


Top
 Profile  
 
 Post subject: Re: duplicating kernel memory mapping across page directorie
PostPosted: Fri Sep 29, 2017 9:07 am 
Offline
Member
Member

Joined: Thu May 17, 2007 1:27 pm
Posts: 999
Share the top-level paging struct entries, as I explained here.

_________________
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].


Top
 Profile  
 
 Post subject: Re: duplicating kernel memory mapping across page directorie
PostPosted: Fri Sep 29, 2017 10:09 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 27, 2004 11:00 pm
Posts: 874
Location: WA
of course if you are using PAE (or LMode) you can take an entire directory entry (or 2) for the global kernel, then updates to the kernel address space are automatically propagated to all address spaces without doing anything at all (of course with SMP you will need to notify any other CPUs so they can invalidate any necessary TLBs) and no modification of any address spaces other than the current one are ever necessary

_________________
## ---- ----- ------ Intel Manuals
OSdev wiki


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 89 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