gpt4 book ai didi

linux - 如何以及何时创建不同的内存映射?

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:22:37 24 4
gpt4 key购买 nike

我引用的其中一本书的摘录,

  • The processor memory map: This is the first memory map that needs to be created. It explains the CPU’s memory management policies such as how the CPU handles the different address spaces (user mode, kernel mode), what are the caching policies for the various memory regions, and so on.
  • The board memory map: Once there is an idea of how the processor sees the various memory areas, the next step is to fit the various onboard devices into the processor memory areas. This requires an understanding of the various onboard devices and the bus controllers.
  • The software memory map: Next a portion of the memory needs to be given for the various software components such as the boot loader and the Linux kernel. The Linux kernel sets up its own memory map and decides where the various kernel sections such as code and heap will reside.

这些内存映射是什么时候创建的?比如,它是在编译阶段之前硬编码的东西,还是由某些运行时任务决定的?

是否有一些关于将处理器地址空间映射到各种设备的标准,还是用户的选择?

book顺便说一句。

最佳答案

When are these memory maps created ? Like say, is it something hard coded and before the compilation phase or is it decided by some run time task ?

这方面的配置通常是内核在启动时要做的第一件事。它可以是硬编码的,也可以在内核启动之前决定,即在引导加载程序中。

Are there some standards on mapping the processor address space to various devices or is it the user's choice ?

这完全取决于您作为设计师。许多人可能会从其他操作系统(例如 linux)中选择类似的配置。

关于linux - 如何以及何时创建不同的内存映射?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40673761/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com