TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

2 pointsby pedrolinsover 2 years ago
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 comments

PaulHouleover 2 years ago
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.
snvzzover 2 years ago
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>