2

i was reading making your new OS docs as shown here: http://joelgompert.com/OS/TableOfContents.htm

These examples shows how to make boot loader for x86. But i don't know how to make it concurrent ? Is there any documents that explains how to run all cores ? How can i activate all of the cores and run asm separate each of them.

Is there any documents for ARM CPUs also ? Or can someone explain here in detail ?

Kadir BASOL
  • 729
  • 2
  • 10
  • 20

2 Answers2

1

It is not exactly the same for all CPU types (that's even just within x86, it is of course even more radically different on different architectures).

Ignoring ancient hardware, a rough sketch of the procedure on x86:

  • prepare the system for the start of other cpus (only 1 core is active at first) (parse MP table, init APIC, do some stuff you need)
  • send a SIPI
  • wait for it
  • send a second SIPI (maybe, not sure how necessary it is)
  • wait for it
  • let the other APs increment a counter so you know how many woke up
  • wait until as many APs started as you expected (based on the number of cores found in the MP table)

See Intel System Programming Guide chapter 8 (multiple-processor management) for a more thorough and correct procedure.

harold
  • 61,398
  • 6
  • 86
  • 164
0

Here is an example from "ALLAN CRUSE" that shows how to startup x86 cores: http://www.cs.usfca.edu/~cruse/cs630/mphello.s