OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Mar 29, 2024 7:11 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: SMP Paging
PostPosted: Fri Apr 08, 2022 10:06 am 
Offline
Member
Member

Joined: Fri Nov 01, 2019 1:17 am
Posts: 95
Hi, I have SMP support in my kernel, AP's boots up to 64 bit mode, then finally GDT,IDT and APIC initialised inside AP's startup routine, the problem is that, if I map a virtual page before starting AP's, it gets mapped and I can write to that virtual page but after starting the AP's I cannot access that particular virtual page from inside AP's routine, it page fault even if I use BSP's pml4 for all AP's. But if I map a virtual page from inside AP's and after startup of all AP's i can use that virtual page from BSP, it works. I use BSP's pml4 for all other application processors.

Thanks


Top
 Profile  
 
 Post subject: Re: SMP Paging
PostPosted: Fri Apr 08, 2022 11:43 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5103
It sounds like you might have a memory corruption bug.

  • The BSP maps the page
  • The BSP accesses the page, loading the translation into its TLB
  • The page is unmapped due to a bug
  • The BSP can still access the page using its TLB, but the APs page fault

If you flush the BSP's TLB, can it still access the page? What is the page fault error code?


Top
 Profile  
 
 Post subject: Re: SMP Paging
PostPosted: Fri Apr 08, 2022 1:03 pm 
Offline
Member
Member

Joined: Fri Nov 01, 2019 1:17 am
Posts: 95
Hi,
After experimenting, I came to know, only the heap memory area get unmapped after APs initialisation, and also it is not accessible from AP's routine..I checked all memory mappings using qemu, and only missing area is - kernel heap memory area. The page fault exception bit is-- present bit..


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: Bing [Bot], Google [Bot] and 209 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