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
SMP Paging
-
- Member
- Posts: 5563
- Joined: Mon Mar 25, 2013 7:01 pm
Re: SMP Paging
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
Re: SMP Paging
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..
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..