Page 1 of 1

local apic of aplication processor

Posted: Wed Dec 07, 2016 10:36 am
by kailot2
Hi all , I apologize if this topic has already been, my English is not very good.
I am interested in the following questions:
- Do I need a separate IDT for each processor or i can use one?
- Can I use one vector for processing LVT Timer interrupt all CPUs?
-How properly initialize LOCAL APIC processors, I'm doing this so

Code: Select all

mov  ecx, IA32_APIC_BASE
mov  eax,LOCAL_APIC_REG
bts    eax, 11
wrmsr

mov dword [LOCAL_APIC_REG + APIC_LVT_Timer_REG], ((1 shl 17) or 20h)
mov dword [LOCAL_APIC_REG + Divide_Configuration_REG], APIC_TIMER_DIVIDE_BY_4
mov dword [LOCAL_APIC_REG + Initial_Count_REG], 2083333 

Re: local apic of aplication processor

Posted: Thu Dec 08, 2016 11:30 am
by digo_rp
First of all I need to say that my english is not good too.

But, I saw in some multprocessing tutorials that each application processor need to have each one structure. like gdt, idt, etc, and this includes a scheduler too.

its better for a good performance, cuz if you share the same structure you need to use spinlock, mutex, etc, and this should make your OS performance bad.

I hope this helps.

good lock.

Re: local apic of aplication processor

Posted: Thu Dec 08, 2016 12:27 pm
by osdever
- Do I need a separate IDT for each processor or i can use one?
I think that you need.

P.S. hi, Ozon OS dev :)