Multicore and IDT
Posted: Fri Feb 20, 2015 11:37 am
Hi,
Whats the best approach to managing IDTs/Handlers across multiple cores from a design/feasibility point of view?
I've been thinking of the below 3 options:
Option a)
Allocate an IDT per processor, some duplication of setup/assigning handlers to vectors, degree of flexibility, vector handlers can be by shared by assigning the same handler to each respective IDT entry,
but we'd need some way to pass the processor number/apicid to the handler.
Option b)
Use one IDT for all processors, no need to setup the handlers again, assigning a new handler from any core would automatically apply to all cores (Assuming the IDT resides in normal memory the cores should all see the up-to-date version, however locking would need to be used around adding/removing handlers), once again we'd have to have a way to let the handler know which processor/apicid.
Option c)
Every processor has it's own IDT, handlers are assigned per core and every core has a unique handler. No need to let it know which processor/apicid it is as it's implicit, however this is a lot of work creating duplicate handlers, for example
the LVT_Thermal, or LVT_Error handler is going to be identical per core.
Whats the best approach to managing IDTs/Handlers across multiple cores from a design/feasibility point of view?
I've been thinking of the below 3 options:
Option a)
Allocate an IDT per processor, some duplication of setup/assigning handlers to vectors, degree of flexibility, vector handlers can be by shared by assigning the same handler to each respective IDT entry,
but we'd need some way to pass the processor number/apicid to the handler.
Option b)
Use one IDT for all processors, no need to setup the handlers again, assigning a new handler from any core would automatically apply to all cores (Assuming the IDT resides in normal memory the cores should all see the up-to-date version, however locking would need to be used around adding/removing handlers), once again we'd have to have a way to let the handler know which processor/apicid.
Option c)
Every processor has it's own IDT, handlers are assigned per core and every core has a unique handler. No need to let it know which processor/apicid it is as it's implicit, however this is a lot of work creating duplicate handlers, for example
the LVT_Thermal, or LVT_Error handler is going to be identical per core.