multicore/multiprocessor [solved]
multicore/multiprocessor [solved]
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.?
Last edited by os64dev on Thu Oct 18, 2007 6:15 am, edited 1 time in total.
Author of COBOS
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).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).
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 handlersbluecode wrote: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).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).
Author of COBOS