<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>http://wiki.foofun.cn//index.php?action=history&amp;feed=atom&amp;title=Higher_Half_Kernel</id>
	<title>Higher Half Kernel - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.foofun.cn//index.php?action=history&amp;feed=atom&amp;title=Higher_Half_Kernel"/>
	<link rel="alternate" type="text/html" href="http://wiki.foofun.cn//index.php?title=Higher_Half_Kernel&amp;action=history"/>
	<updated>2026-04-06T17:53:07Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>http://wiki.foofun.cn//index.php?title=Higher_Half_Kernel&amp;diff=934&amp;oldid=prev</id>
		<title>2022年3月18日 (五) 09:13 Zhang3</title>
		<link rel="alternate" type="text/html" href="http://wiki.foofun.cn//index.php?title=Higher_Half_Kernel&amp;diff=934&amp;oldid=prev"/>
		<updated>2022-03-18T09:13:04Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2022年3月18日 (五) 09:13的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l10&quot;&gt;第10行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第10行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* 针对更一般的CPU架构，用户应用程序不依赖于内核空间的内存有多少 (无论内核是在 “0xC0000000” 、 “0x80000000” 还是 “0xE0000000”...)，你的应用程序都可以链接到0x400000)，这使得ABI更好。（译者注：这里意思应该是指面对不同物理内存和CPU，这样可以让用户空间没有最小基地址的限制，从0开始，对ABI更好）&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* 针对更一般的CPU架构，用户应用程序不依赖于内核空间的内存有多少 (无论内核是在 “0xC0000000” 、 “0x80000000” 还是 “0xE0000000”...)，你的应用程序都可以链接到0x400000)，这使得ABI更好。（译者注：这里意思应该是指面对不同物理内存和CPU，这样可以让用户空间没有最小基地址的限制，从0开始，对ABI更好）&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* 如果你的操作系统是64位的，那么32位应用程序将能够使用完整的32位地址空间。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* 如果你的操作系统是64位的，那么32位应用程序将能够使用完整的32位地址空间。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* 可以使用'助记（Mnemonic）'&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;无效指针，如“”0xCAFEBABE“”、“”0xDEADBEEF“”、“”0xDEADC0DE“”等。“”&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* 可以使用'助记（Mnemonic）'&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;无效指针，如''0xCAFEBABE''、''0xDEADBEEF''、''0xDEADC0DE''等。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Bootloader支持 ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Bootloader支持 ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;为了让事情变得更简单，一些引导加载程序通过直接加载内核并将其映射到虚拟内存中的上半部分，原生支持higher half内核。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;为了让事情变得更简单，一些引导加载程序通过直接加载内核并将其映射到虚拟内存中的上半部分，原生支持higher half内核。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[BOOTBOOT]]按设计只支持higher half内核。 它有用 [[C]] 、 [[Pascal]] 、 [[Rust]] 和 [[Go]] 编写的Hello World内核示例&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[BOOTBOOT]]按设计只支持higher half内核。 它有用 [[C]]、[[Pascal]]、[[Rust]]和[[Go]]编写的Hello World内核示例&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Limine]]需要内核中的特殊节，有关如何为Limine编写简单的64位higher half内核的教程，请参阅[[stivale Bare Bones]]。&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [[Limine]]需要内核中的特殊节，有关如何为Limine编写简单的64位higher half内核的教程，请参阅[[stivale Bare Bones]]。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zhang3</name></author>
	</entry>
	<entry>
		<id>http://wiki.foofun.cn//index.php?title=Higher_Half_Kernel&amp;diff=933&amp;oldid=prev</id>
		<title>Zhang3：创建页面，内容为“{{Stub}} {{Template:Kernel designs}}  向每个用户进程中映射内核是传统做法的，通常也是比较好的做法。 例如，Linux和许多其它类Unix系统内核驻留在每个地址空间的虚拟地址 “0XC0000000-0XFFFFFFFF”，用户代码、数据、堆栈、库等的范围为 “0x00000000-0xbffffff”。 有这种设计的内核因为相对与应用程序，内核使用了“higher half（高一半）”的虚拟地址空间。（译…”</title>
		<link rel="alternate" type="text/html" href="http://wiki.foofun.cn//index.php?title=Higher_Half_Kernel&amp;diff=933&amp;oldid=prev"/>
		<updated>2022-03-18T09:11:21Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“{{Stub}} {{Template:Kernel designs}}  向每个用户进程中映射内核是传统做法的，通常也是比较好的做法。 例如，Linux和许多其它类Unix系统内核驻留在每个地址空间的虚拟地址 “0XC0000000-0XFFFFFFFF”，用户代码、数据、堆栈、库等的范围为 “0x00000000-0xbffffff”。 有这种设计的内核因为相对与应用程序，内核使用了“higher half（高一半）”的虚拟地址空间。（译…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Stub}}&lt;br /&gt;
{{Template:Kernel designs}}&lt;br /&gt;
&lt;br /&gt;
向每个用户进程中映射内核是传统做法的，通常也是比较好的做法。 例如，Linux和许多其它类Unix系统内核驻留在每个地址空间的虚拟地址 “0XC0000000-0XFFFFFFFF”，用户代码、数据、堆栈、库等的范围为 “0x00000000-0xbffffff”。 有这种设计的内核因为相对与应用程序，内核使用了“higher half（高一半）”的虚拟地址空间。（译者注：注意，这里指的是虚拟地址空间的相对关系。Higher Half Kernel也许可以翻译为“置高内核”，下文不翻译。）&lt;br /&gt;
&lt;br /&gt;
此外，还有一些非x86 ISA ([[MIPS Overview|MIPS]] [[User：schol-r-Lea/Underming RISC vs CISC|RISC Architecture]]和[[AArch64|ARM]])在一定程度上导致了必须使用该设计。 在MIPS和ARM系统上，使用高位 (位31还是位63，取决于系统字宽) 的地址保留用于主管模式（ Supervisor mode），并且在用户模式（User mode）下使用会设置异常捕获。&lt;br /&gt;
&lt;br /&gt;
higher half内核的优点是：&lt;br /&gt;
* 更容易设置[[Virtual 8086 Mode|VM86-虚拟8086模式]]进程，因为1MB以下的区域是用户空间。&lt;br /&gt;
* 针对更一般的CPU架构，用户应用程序不依赖于内核空间的内存有多少 (无论内核是在 “0xC0000000” 、 “0x80000000” 还是 “0xE0000000”...)，你的应用程序都可以链接到0x400000)，这使得ABI更好。（译者注：这里意思应该是指面对不同物理内存和CPU，这样可以让用户空间没有最小基地址的限制，从0开始，对ABI更好）&lt;br /&gt;
* 如果你的操作系统是64位的，那么32位应用程序将能够使用完整的32位地址空间。&lt;br /&gt;
* 可以使用'助记（Mnemonic）'无效指针，如“”0xCAFEBABE“”、“”0xDEADBEEF“”、“”0xDEADC0DE“”等。“”&lt;br /&gt;
&lt;br /&gt;
== Bootloader支持 ==&lt;br /&gt;
为了让事情变得更简单，一些引导加载程序通过直接加载内核并将其映射到虚拟内存中的上半部分，原生支持higher half内核。&lt;br /&gt;
&lt;br /&gt;
* [[BOOTBOOT]]按设计只支持higher half内核。 它有用 [[C]] 、 [[Pascal]] 、 [[Rust]] 和 [[Go]] 编写的Hello World内核示例&lt;br /&gt;
* [[Limine]]需要内核中的特殊节，有关如何为Limine编写简单的64位higher half内核的教程，请参阅[[stivale Bare Bones]]。&lt;br /&gt;
&lt;br /&gt;
==初始化==&lt;br /&gt;
要设置higher half内核，你必须将内核映射到适当的虚拟地址。 当使用直接支持higher half内核的引导协议时，比如[[BOOTBOOT]]或[[stivale]]，内核已经被正确映射。&lt;br /&gt;
&lt;br /&gt;
如何做到这一点基本上取决于'''何时'''你希望你的内核相信它处于较高端，以及'''何时'''你设置了分页。 如果没有引导加载程序的帮助，你需要一个小的蹦床（trampoline）代码，它在lower half运行，设置higher half分页和jump。&lt;br /&gt;
&lt;br /&gt;
==另见==&lt;br /&gt;
&lt;br /&gt;
===文章===&lt;br /&gt;
* [[Higher Half x86 Bare Bones]]&lt;br /&gt;
&lt;br /&gt;
=== 论坛主题 ===&lt;br /&gt;
* [[Topic:11160|I wrote a simple HigherHalf kernel]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Kernel]]&lt;/div&gt;</summary>
		<author><name>Zhang3</name></author>
	</entry>
</feed>