On 2014-11-26 12:56:06, Andrew Fish wrote:
> 
>     On Nov 26, 2014, at 11:10 AM, Jordan Justen <jordan.l.jus...@intel.com>
>     wrote:
>     One idea I have is to initialize the interrupt vector table on the
>     APs, and then allow the APs to run the CpuSleep function.
> 
>     Like IdleLoopEventCallback does for the BSP, this should put the APs
>     into a lower power state while they are not working.
> 
>     Then the BSP can send the APs an 'interrupt IPI' when needed to wake
>     the APs to do work. (I think SendFixedIpiAllExcludingSelf?)
> 
>     I think the DXE Core installs the IVT (Interrupt Vector Table) by
>     calling InitializeCpuExceptionHandlers, and CpuDxe modifies the
>     interrupt handler entries.
> 
>     But for the simpler situation of the APs, this might be more than
>     needed. Instead maybe just setting up the IVT and calling AsmWriteIdtr
>     would be all that is needed.
> 
>     One easy way to see if this is working is to run 'top' while using
>     qemu with smp. In the current state the APs will cause a few threads
>     to use 100% of the cpu while they busy-wait for something to do. (This
>     only applies to OVMF boot, and the UEFI Shell, since once the OS
>     manages the APs, they will be handled more efficiently.)
> 
> Do you need an IDT to “make it work”. Just send a SIPI. I’m assuming the IPI
> would wake the processor out of the hlt?

I'm not sure, but I thought that SIPI is ignored, unless the processor
is in 'wait-for-sipi'. (Which can be reset with the init-ipi.)

But, doesn't SIPI always mean setting up the real-mode entry point? I
think redo'ing init-ipi+sipi every time the APs were called upon would
have a lot more latency than an interrupt ipi.

If SIPI on an already woken AP will wake it from the hlt, without
requiring an interrupt table setup, then that would be simpler.

-Jordan

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to