Windows 8 Build 7973.0.fbl core1 kernel npc.110330-1809:修订间差异
跳转到导航
跳转到搜索
Windows 8 Build 7973.0.fbl core1 kernel npc.110330-1809 (查看源代码)
2026 年 2 月 12 日 (四) 20:44 的版本
、 2026 年 2 月 12 日 (星期四)→Compiler
(Placeholder) |
正义羊-JRJSheep(讨论 | 贡献) |
||
| 第 50 行: | 第 50 行: | ||
In this build, the pseudo language pack is present, and it can be installed. This is caused by improper cleanup of the pseudo language pack while staging the build, resulting in leftover files. | In this build, the pseudo language pack is present, and it can be installed. This is caused by improper cleanup of the pseudo language pack while staging the build, resulting in leftover files. | ||
== | == 编译器 == | ||
这是使用新编译器生成的首批版本之一。然而,当时围绕它的问题导致此版本在某些硬件上无法启动,引导加载程序在现代 x86 CPU(特别是包括 AVX 指令集的英特尔处理器和部分 AMD CPU)上无法正常工作。因此,会发生 CPU 三重故障,导致在虚拟机管理程序上崩溃或在真实硬件上重启。 | |||
=== | === 修补 <code>winload.exe</code> 以在支持 AVX 的英特尔处理器上运行 === | ||
为了在配备支持 AVX 的英特尔处理器的机器上正确启用 SSE 指令,必须开启控制寄存器 4(CR4)中的第 9 位。以下代码被执行,并位于 <code>winload.exe</code> 的 <code>A552</code> 偏移处: | |||
<syntaxhighlight lang="nasm"> | <syntaxhighlight lang="nasm"> | ||
mov eax, cr4 ; 0f20e0 | mov eax, cr4 ; 0f20e0 | ||
or eax, 20h ; 83c820 -- | or eax, 20h ; 83c820 -- 开启第 5 位,PAE(Physical Address Extension,物理地址扩展) | ||
mov cr4, eax ; 0f22e0 -- | mov cr4, eax ; 0f22e0 -- 存储到 CR4 | ||
mov eax, cr0 ; 0f20c0 | mov eax, cr0 ; 0f20c0 | ||
or eax, 80000000h ; 0d00000080 -- | or eax, 80000000h ; 0d00000080 -- 启用分页 | ||
mov cr0, eax ; 0f22c0 | mov cr0, eax ; 0f22c0 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
默认情况下,CR0 中设置的位包括:受保护模式(PE)(<code>0x00000001</code>)、协处理器监控(MP)(<code>0x00000002</code>)和扩展类型(ET)(<code>0x00000010</code>),而 CR4 中最初没有任何位被设置,因此需要开启第 9 SSE 位(即 OR 和 <code>0x600</code>),但由于这段代码的限制,需要进行重写,可以改为以下方式: | |||
<syntaxhighlight lang="nasm"> | <syntaxhighlight lang="nasm"> | ||
mov eax,620h ; b820060000 | mov eax,620h ; b820060000 | ||
| 第 75 行: | 第 75 行: | ||
nop ; 90 | nop ; 90 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== | 需要声明的是,用这些更改来修改 <code>winload.exe</code> 将会使签名失效,因此需要在 BCD 中启用 <code>{bootmgr} nointegritychecks</code> 才能使用修改后的 <code>winload.exe</code> 启动,同时在 <code>%systemroot%\System32</code> 和 <code>%systemroot%\System32\Boot</code> 中对此文件的所有权也需要进行修改,以防无法替换文件。 | ||
====VMware Workstation==== | |||
=== 兼容性 === | |||
==== VMware Workstation ==== | |||
英特尔 SSE 漏洞可以通过将兼容性级别设置为 7.x 或更低版本来解决,且必须将以下代码块添加到 VMX(虚拟机配置)文件中,以允许此版本在现代英特尔 CPU 上启动: | |||
<syntaxhighlight lang="ini"> | <syntaxhighlight lang="ini"> | ||
cpuid.0.ebx = "0110:1000:0111:0100:0111:0101:0100:0001" | cpuid.0.ebx = "0110:1000:0111:0100:0111:0101:0100:0001" | ||
| 第 87 行: | 第 88 行: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
如果主机使用的是 AMD 处理器,上述配置步骤大多不需要,仅需更改兼容性版本即可。 | |||
== 引用资料 == | == 引用资料 == | ||