
Ask HN: x86 SMP with cpus on different processor modes - i4k
It&#x27;s possible to setup SMP on intel x86 processors and leave the BSP in real mode?<p>I have the following setup in mind:<p><pre><code>  - BSP in 16-bit real mode;
  - 1 AP in 32-bit protected mode;
  - Every other cpu off;
</code></pre>
Why?<p>The project is a simple assembler IDE that runs in bare metal, and could be used to fast prototype of ideas talking directly to real hardware. The code is assembled in-memory, and then to &quot;test&quot; is just a jump to the assembled location. Will be used most to learn&#x2F;teach OS design.<p>The use case is very simple (only need disk and VGA), but I need 4GB address space. Being able to use BIOS services could make it a trivial project. My initial plan was to use <i>Unreal</i> mode for it, but it turns out to be error prone.<p>My idea is use the AP processor to develop the simple OS (it&#x27;s just editor TUI + assembler), and invoke the BSP processor to access disk. I&#x27;m aware that will require a mutual exclusion lock, but I never programmed a SMP and every reference online uses protected mode BSP.<p>It makes sense? What kind of problems I have in this design?<p>Thanks!<p><pre><code>  Project details: https:&#x2F;&#x2F;github.com&#x2F;tiago4orion&#x2F;EnzOS
  Plan: https:&#x2F;&#x2F;github.com&#x2F;tiago4orion&#x2F;EnzOS&#x2F;blob&#x2F;master&#x2F;plan.md</code></pre>
======
sinatosk
I ain't an expert in x86 so I'm not sure... only read some of Intel's manual
but judging by the code at

[https://github.com/mit-pdos/xv6-public](https://github.com/mit-
pdos/xv6-public)

file "entryother.S" is asm that executes on AP's and "bootasm.S" executes on
the BSP... both after the BIOS

so... maybe?

maybe that's what your looking for?

~~~
i4k
I'd already read the booting process of xv6, but it does IPI in protected mode
too. Maybe BSP will need to enter pmode to make any IPI call anyway.

Thanks for the help!

