TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: x86 SMP with cpus on different processor modes

5 点作者 i4k超过 8 年前
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>

1 comment

sinatosk超过 8 年前
I ain&#x27;t an expert in x86 so I&#x27;m not sure... only read some of Intel&#x27;s manual but judging by the code at<p><a href="https:&#x2F;&#x2F;github.com&#x2F;mit-pdos&#x2F;xv6-public" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mit-pdos&#x2F;xv6-public</a><p>file &quot;entryother.S&quot; is asm that executes on AP&#x27;s and &quot;bootasm.S&quot; executes on the BSP... both after the BIOS<p>so... maybe?<p>maybe that&#x27;s what your looking for?
评论 #12831182 未加载