用户内核地址划分

发布于 2024-08-31 16:52:36 字数 190 浏览 4 评论 0原文

在ARM linux中,用户-内核虚拟地址范围按照3:1的比例划分。

但在 MIPS linux 中,这通常是 2:2

有人知道是什么激发了这种设计差异吗?

我有一个隐隐的想法,这与以下事实有关:在 MIPS 中,TLB 重新填充是在软件中管理的,并且内核 TLB 条目是硬连线的,确保它们永远不会遭受 TLB 缺失。

In ARM linux, the user-kernel virtual address range is divided in the ratio 3:1.

But in MIPS linux, this is usually 2:2

Does someone know what motivates this design difference ?

I have a faint idea that this has something to do with the fact that in MIPS, the TLB refill is managed in s/w and the kernel TLB entries are kind of hard-wired ensuring that they will never suffer a TLB miss.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

叫嚣ゝ 2024-09-07 16:52:36

这是 MIPS 32 位架构的限制。大多数 MIPS CPU 上的用户模式限制为 2GB。

在用户模式下只能访问较低的 2GB 虚拟地址(0x0000_00000 到 0x7fff_ffff)。这部分地址空间称为kusegKuseg 地址由 TLB 转换。 TLB 重新填充是否在软件中完成并不重要。

内核位于从 0x8000_0000 到 9fff_ffff 的 512MB 虚拟空间中。这部分地址空间称为kseg0。 Kseg0 地址不由 TLB 转换。这些地址通过删除 MSB 进行转换(即虚拟地址范围 0x8000_0000-9fff_ffff 硬连线到物理地址范围0x0000_0000-0x1fff_0000),

请参阅 MIPS 手册以了解更多详细信息。

This is a limitation of the MIPS 32-bit architecture. User mode is limited to 2GB on most MIPS CPUs.

Only the lower 2GB virtual addresses (0x0000_00000 to 0x7fff_ffff) are accessible in user mode. This part of the address space is called kuseg. Kuseg addresses are translated by the TLB. Whether TLB refills are done in software is irrelevant.

The kernel lives in the 512MB virtual space that extends from 0x8000_0000 to 9fff_ffff. This part of the address space is called kseg0. Kseg0 addresses are not translated by the TLB. These addresses are translated by removing the MSB (i.e. the virtual address range 0x8000_0000-9fff_ffff is hardwired to the physical address range 0x0000_0000-0x1fff_0000)

Refer to a MIPS manual for more details.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文