Basically: Computer starts with 1 logical processor, others are halted. Find the number of cpus by scanning memory for mp structures Use apic to send SIPI, an interrupt that will wake up the other cpus. When sending sipi, you provide an address that you want your cpus to start executing from.
Once they start executing, setup long mode, setup a timer uaing their local apic and make that timer execute the scheduling function. Now you have tasks running on each cpus note that you task list will be global and all cpus will compete to run a task. A task should not run on 2 cpu at the same time.
The wiki page referenced above is a good start. Intel manuals are your best friend.
|