diff options
author | Jan Sommer <jan.sommer@dlr.de> | 2020-05-31 16:22:52 +0200 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2020-06-11 13:28:46 +1000 |
commit | f99b1f02b0a9a3457336949e086b863561d0fb76 (patch) | |
tree | 94127c6b6cda3cc349177268c9d0bb2cc67cdad9 /bsps/i386/pc386/start/smp-imps.c | |
parent | bsp/pc386: Fix Makefile for building with SMP (diff) | |
download | rtems-f99b1f02b0a9a3457336949e086b863561d0fb76.tar.bz2 |
bsp/pc386: Turn start16.S into a startAP.S
start16.S is now only used for SMP configurations to start the
application processors.
This commit removes all unnecessary parts for this job,
i.e. video conssole initalisation, A20 gate activation
and all non-AP related code.
Update #3335
Diffstat (limited to 'bsps/i386/pc386/start/smp-imps.c')
-rw-r--r-- | bsps/i386/pc386/start/smp-imps.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/bsps/i386/pc386/start/smp-imps.c b/bsps/i386/pc386/start/smp-imps.c index 0543b17ec5..58d9178f90 100644 --- a/bsps/i386/pc386/start/smp-imps.c +++ b/bsps/i386/pc386/start/smp-imps.c @@ -309,6 +309,11 @@ boot_cpu(imps_processor *proc) } /* + * Wait until AP is in protected mode before starting the next AP + */ + while (reset[2] != 0); + + /* * Generic CPU startup sequence ends here, the rest is cleanup. */ @@ -342,12 +347,17 @@ add_processor(imps_processor *proc) printk("#0 BootStrap Processor (BSP)\n"); return; } + /* Setup the apic/cpu maps before booting the APs + * otherwise calls to _Get_current_processor can deliver + * wrong values if the BSP gets interrupted + */ + imps_cpu_apic_map[imps_num_cpus] = apicid; + imps_apic_cpu_map[apicid] = imps_num_cpus; if (boot_cpu(proc)) { /* XXXXX add OS-specific setup for secondary CPUs here */ - imps_cpu_apic_map[imps_num_cpus] = apicid; - imps_apic_cpu_map[apicid] = imps_num_cpus; + /* AP booted successfully, increase number of available cores */ imps_num_cpus++; } } |