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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: How does an OS become aware of memory layout?

2 点作者 pedrolins超过 2 年前
I have been learning about Operating Systems the past few months through MIT&#x27;s XV6 book (RISC-V edition).<p>One thing that isn&#x27;t made very clear is how computers in the real world &quot;know&quot; the memory layout for memory mapped i&#x2F;o (like, which addresses map to which devices in the physical address space).<p>I have a couple of questions: 1. Whose responsibility is it to define the memory layout (is it the ISA&#x27;s? The MMU&#x27;s?) 2. Do kernels know beforehand the layout? Or is it more common for them to discover at runtime?<p>Thanks

2 条评论

PaulHoule超过 2 年前
PCs enumerate hardware with<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;ACPI" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;ACPI</a><p>In that process the OS figures out the attached hardware and how to access it.
snvzz超过 2 年前
RISC-V does majorly use the Device Tree[0].<p>[0] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Devicetree" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Devicetree</a>