OSDev.org

The Place to Start for Operating System Developers
It is currently Wed May 22, 2024 6:11 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: multicore/multiprocessor [solved]
PostPosted: Thu Oct 18, 2007 3:09 am 
Offline
Member
Member
User avatar

Joined: Sat Jan 27, 2007 3:21 pm
Posts: 553
Location: Best, Netherlands
Ok i am looking into multicpu programming and have a question regarding GDT and IDT. Do you share the same GDT and IDT on each processor or do you define new one for each proc.?

_________________
Author of COBOS


Last edited by os64dev on Thu Oct 18, 2007 6:15 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 18, 2007 4:52 am 
Offline
Member
Member
User avatar

Joined: Sun Oct 22, 2006 7:01 am
Posts: 2646
Location: Devon, UK
Hi,

Each CPU has its own GDTR and IDTR, but the actual GDT and IDT can be shared. One thing you should do is have a separate TSS for each CPU, though (which kind of makes sense - there could otherwise be quite a mess if both processors are running different threads from the same task).

HTH,
Adam


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 18, 2007 6:09 am 
Offline
Member
Member
User avatar

Joined: Wed Nov 17, 2004 12:00 am
Posts: 202
Location: Germany
AJ wrote:
One thing you should do is have a separate TSS for each CPU, though (which kind of makes sense - there could otherwise be quite a mess if both processors are running different threads from the same task).

Imho you can not even use the same TSS descriptor for different cpus, because one cpu sets the busy bit and the other throw an exception when it accesses that descriptor (because the busy bit is set).

_________________
lightOS


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 18, 2007 6:14 am 
Offline
Member
Member
User avatar

Joined: Sat Jan 27, 2007 3:21 pm
Posts: 553
Location: Best, Netherlands
bluecode wrote:
AJ wrote:
One thing you should do is have a separate TSS for each CPU, though (which kind of makes sense - there could otherwise be quite a mess if both processors are running different threads from the same task).

Imho you can not even use the same TSS descriptor for different cpus, because one cpu sets the busy bit and the other throw an exception when it accesses that descriptor (because the busy bit is set).

Yeah that was happening just now. thanks for pointing it out it has saved me a whole lot of debugging. The sharing of the GDT and IDT is what i did already, though it gives an additional requirement: namely reentrant interrupt handlers

_________________
Author of COBOS


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

All times are UTC - 6 hours


Who is online

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