Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
OpenCorePKG_MOD
提交
0aa75e80
O
OpenCorePKG_MOD
项目概览
btwise
/
OpenCorePKG_MOD
通知
26
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
OpenCorePKG_MOD
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0aa75e80
编写于
3月 13, 2019
作者:
V
vit9696
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Implement flex ratio quirk
上级
da708a84
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
39 addition
and
5 deletion
+39
-5
Include/Library/OcCpuLib.h
Include/Library/OcCpuLib.h
+1
-1
Include/ProcessorInfo.h
Include/ProcessorInfo.h
+5
-1
Library/OcCpuLib/OcCpuLib.c
Library/OcCpuLib/OcCpuLib.c
+2
-2
STATUS.md
STATUS.md
+7
-1
Tests/DataHubTest/DataHubTest.c
Tests/DataHubTest/DataHubTest.c
+24
-0
未找到文件。
Include/Library/OcCpuLib.h
浏览文件 @
0aa75e80
...
...
@@ -25,7 +25,7 @@ typedef struct {
//
// Note, Vendor and BrandString are reordered for proper alignment.
//
UINT
8
Vendor
[
16
];
UINT
32
Vendor
[
4
];
CHAR8
BrandString
[
48
];
UINT8
Type
;
...
...
Include/ProcessorInfo.h
浏览文件 @
0aa75e80
...
...
@@ -48,6 +48,8 @@
#define MSR_IA32_EXT_CONFIG 0xEE
#define MSR_FEATURE_CONFIG 0x13C
#define MSR_FLEX_RATIO 0x194
#define FLEX_RATIO_LOCK (1U << 20U)
#define FLEX_RATIO_EN (1U << 16U)
#define MSR_IA32_PERF_CONTROL 0x199
#define MSR_THERM2_CTL 0x19D
...
...
@@ -161,12 +163,14 @@ enum {
#define CPU_MODEL_BROADWELL_ULX 0x3D
#define CPU_MODEL_BROADWELL_ULT 0x3D
#define CPU_MODEL_BRYSTALWELL 0x47
#define CPU_MODEL_AIRMONT 0x4C ///< CherryTrail / Braswell
#define CPU_MODEL_AVOTON 0x4D ///< Avaton/Rangely
#define CPU_MODEL_SKYLAKE 0x4E ///< Skylake-S
#define CPU_MODEL_SKYLAKE_ULT 0x4E
#define CPU_MODEL_SKYLAKE_ULX 0x4E
#define CPU_MODEL_SKYLAKE_DT 0x5E
#define CPU_MODEL_SKYLAKE_W 0x55
#define CPU_MODEL_GOLDMONT 0x5C ///< Apollo Lake
#define CPU_MODEL_DENVERTON 0x5F ///< Goldmont Microserver
#define CPU_MODEL_CANNONLAKE 0x66
#define CPU_MODEL_XEON_MILL 0x85 ///< Knights Mill
...
...
Library/OcCpuLib/OcCpuLib.c
浏览文件 @
0aa75e80
...
...
@@ -762,7 +762,7 @@ OcCpuScanProcessor (
//
// Get vendor CPUID 0x00000000
//
AsmCpuid
(
CPUID_SIGNATURE
,
&
CpuidEax
,
(
UINT32
*
)
Cpu
->
Vendor
,
(
UINT32
*
)
(
Cpu
->
Vendor
+
8
),
(
UINT32
*
)
(
Cpu
->
Vendor
+
4
)
);
AsmCpuid
(
CPUID_SIGNATURE
,
&
CpuidEax
,
&
Cpu
->
Vendor
[
0
],
&
Cpu
->
Vendor
[
2
],
&
Cpu
->
Vendor
[
1
]
);
//
// Get extended CPUID 0x80000000
...
...
@@ -843,7 +843,7 @@ OcCpuScanProcessor (
Cpu
->
ExtFamily
));
if
(
*
(
UINT32
*
)
Cpu
->
Vendor
==
CPUID_VENDOR_INTEL
)
{
if
(
Cpu
->
Vendor
[
0
]
==
CPUID_VENDOR_INTEL
)
{
ScanIntelProcessor
(
Cpu
);
}
}
STATUS.md
浏览文件 @
0aa75e80
...
...
@@ -10,7 +10,8 @@ listed here.
*
OcAcpiLib
**Status**
: functional
**Issues**
: none
**Issues**
:
1.
On legacy platforms rebooting may not work afterwards.
*
OcAppleBootPolicyLib
**Status**
: functional
**Issues**
:
...
...
@@ -30,6 +31,7 @@ listed here.
1.
No package count detection.
1.
No AMD CPU support.
1.
Apple processor type detection is incomplete.
1.
FSBFrequency calculation is sometimes incorrect, e.g. for Core 2 Quad Q9450.
*
OcCryptoLib
**Status**
: functional
**Issues**
: none
...
...
@@ -96,6 +98,10 @@ listed here.
**Status**
: functional
**Issues**
:
1.
No AMD CPU support.
*
OcVirtualFsLib
**Status**
: functional
**Issues**
:
1.
Does not support directory iteration with virtualised files.
*
OcXmlLib
**Status**
: functional
**Issues**
: none
Tests/DataHubTest/DataHubTest.c
浏览文件 @
0aa75e80
...
...
@@ -43,6 +43,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Protocol/GraphicsOutput.h>
#include <Protocol/SimpleTextInEx.h>
#include <Protocol/SimpleFileSystem.h>
#include <ProcessorInfo.h>
STATIC
GUID
SystemUUID
=
{
0x5BC82C38
,
0x4DB6
,
0x4883
,
{
0x85
,
0x2E
,
0xE7
,
0x8D
,
0x78
,
0x0A
,
0x6F
,
0xE6
}};
STATIC
UINT8
BoardRevision
=
1
;
...
...
@@ -130,6 +131,29 @@ TestDataHub (
//TODO: also put elsewhere, boot.efi kills watchdog only in FV2 UI.
gBS
->
SetWatchdogTimer
(
0
,
0
,
0
,
NULL
);
//TODO: put this elsewhere, fixes early reboot on APTIO IV (Ivy/Haswell).
{
UINT64
Msr
;
UINT64
FlexRatio
;
if
(
CpuInfo
.
Vendor
[
0
]
==
CPUID_VENDOR_INTEL
&&
CpuInfo
.
Model
!=
CPU_MODEL_GOLDMONT
&&
CpuInfo
.
Model
!=
CPU_MODEL_AIRMONT
&&
CpuInfo
.
Model
!=
CPU_MODEL_AVOTON
)
{
Msr
=
AsmReadMsr64
(
MSR_FLEX_RATIO
);
if
(
Msr
&
FLEX_RATIO_EN
)
{
FlexRatio
=
BitFieldRead64
(
Msr
,
8
,
15
);
if
(
FlexRatio
==
0
)
{
//
// Disable Flex Ratio if current value is 0.
//
AsmWriteMsr64
(
MSR_FLEX_RATIO
,
Msr
&
~
((
UINT64
)
MSR_FLEX_RATIO
));
}
}
}
}
return
EFI_SUCCESS
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录