Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
OpenCorePKG_MOD
提交
745acbaa
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,发现更多精彩内容 >>
提交
745acbaa
编写于
6月 08, 2019
作者:
V
vit9696
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
OcBootManagementLib: Try working around missing handle for Tools
上级
b2b0fa3c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
111 addition
and
12 deletion
+111
-12
Include/Library/OcBootManagementLib.h
Include/Library/OcBootManagementLib.h
+2
-1
Include/Library/OcStorageLib.h
Include/Library/OcStorageLib.h
+8
-0
Library/OcAppleDiskImageLib/OcAppleDiskImageBlockIo.c
Library/OcAppleDiskImageLib/OcAppleDiskImageBlockIo.c
+2
-7
Library/OcBootManagementLib/OcBootManagementLib.c
Library/OcBootManagementLib/OcBootManagementLib.c
+21
-4
Library/OcStorageLib/OcStorageLib.c
Library/OcStorageLib/OcStorageLib.c
+78
-0
未找到文件。
Include/Library/OcBootManagementLib.h
浏览文件 @
745acbaa
...
...
@@ -235,7 +235,8 @@ EFI_STATUS
IN
VOID
*
Context
,
IN
OC_BOOT_ENTRY
*
ChosenEntry
,
OUT
VOID
**
Data
,
OUT
UINT32
*
DataSize
OUT
UINT32
*
DataSize
,
OUT
EFI_DEVICE_PATH_PROTOCOL
**
DevicePath
OPTIONAL
);
/**
...
...
Include/Library/OcStorageLib.h
浏览文件 @
745acbaa
...
...
@@ -72,6 +72,14 @@ typedef struct {
///
EFI_FILE_PROTOCOL
*
StorageRoot
;
///
/// Device handle with storage (dummy) device path for loading.
///
EFI_HANDLE
StorageHandle
;
///
/// Dummy file path for file storage.
///
EFI_DEVICE_PATH_PROTOCOL
*
DummyDevicePath
;
///
/// Vault context.
///
OC_STORAGE_VAULT
Vault
;
...
...
Library/OcAppleDiskImageLib/OcAppleDiskImageBlockIo.c
浏览文件 @
745acbaa
...
...
@@ -29,12 +29,7 @@
#define DMG_FILE_PATH_LEN (L_STR_LEN (L"DMG_.dmg") + 16 + 1)
#pragma pack(1)
typedef
PACKED
struct
{
VENDOR_DEVICE_PATH
Vendor
;
UINT32
Key
;
}
DMG_CONTROLLER_DEVICE_PATH
;
#pragma pack(push, 1)
typedef
PACKED
struct
{
VENDOR_DEFINED_DEVICE_PATH
Vendor
;
...
...
@@ -56,7 +51,7 @@ typedef PACKED struct {
EFI_DEVICE_PATH_PROTOCOL
End
;
}
DMG_DEVICE_PATH
;
#pragma pack()
#pragma pack(
pop
)
#define OC_APPLE_DISK_IMAGE_MOUNTED_DATA_SIGNATURE \
SIGNATURE_32('D','m','g','I')
...
...
Library/OcBootManagementLib/OcBootManagementLib.c
浏览文件 @
745acbaa
...
...
@@ -77,7 +77,7 @@ InternalLoadBootEntry (
if
(
UnicodeDevicePath
!=
NULL
)
{
DEBUG
((
DEBUG_INFO
,
"Dmg boot %s to dp %s
\n
"
,
"
OCB:
Dmg boot %s to dp %s
\n
"
,
BootEntry
->
Name
,
UnicodeDevicePath
));
...
...
@@ -96,11 +96,19 @@ InternalLoadBootEntry (
Context
->
CustomEntryContext
,
BootEntry
,
&
EntryData
,
&
EntryDataSize
&
EntryDataSize
,
&
DevicePath
);
if
(
!
EFI_ERROR
(
Status
))
{
Status
=
gBS
->
LoadImage
(
FALSE
,
ParentHandle
,
NULL
,
EntryData
,
EntryDataSize
,
EntryHandle
);
Status
=
gBS
->
LoadImage
(
FALSE
,
ParentHandle
,
DevicePath
,
EntryData
,
EntryDataSize
,
EntryHandle
);
FreePool
(
EntryData
);
}
}
else
{
...
...
@@ -116,6 +124,15 @@ InternalLoadBootEntry (
if
(
!
EFI_ERROR
(
OptionalStatus
))
{
LoadedImage
->
LoadOptionsSize
=
BootEntry
->
LoadOptionsSize
;
LoadedImage
->
LoadOptions
=
BootEntry
->
LoadOptions
;
if
(
BootEntry
->
IsCustom
)
{
DEBUG
((
DEBUG_INFO
,
"OCB: Custom DeviceHandle %p FilePath %p
\n
"
,
LoadedImage
->
DeviceHandle
,
LoadedImage
->
FilePath
));
}
}
}
else
{
InternalUnloadDmg
(
DmgLoadContext
);
...
...
@@ -198,7 +215,7 @@ OcDescribeBootEntry (
if
(
!
EFI_ERROR
(
Status
))
{
BootEntry
->
IsWindows
=
TRUE
;
if
(
BootEntry
->
Name
==
NULL
)
{
BootEntry
->
Name
=
AllocateCopyPool
(
sizeof
(
L"BOOTCAMP Windows"
),
L"BOOTCAMP Windows"
);
BootEntry
->
Name
=
AllocateCopyPool
(
sizeof
(
L"BOOTCAMP Windows"
),
L"BOOTCAMP Windows"
);
}
}
...
...
Library/OcStorageLib/OcStorageLib.c
浏览文件 @
745acbaa
...
...
@@ -19,6 +19,7 @@
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/DevicePathLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/OcStringLib.h>
#include <Library/OcStorageLib.h>
...
...
@@ -28,6 +29,74 @@ OC_STRUCTORS (OC_STORAGE_VAULT_HASH, ())
OC_MAP_STRUCTORS
(
OC_STORAGE_VAULT_FILES
)
OC_STRUCTORS
(
OC_STORAGE_VAULT
,
())
#pragma pack(push, 1)
typedef
PACKED
struct
{
VENDOR_DEFINED_DEVICE_PATH
Vendor
;
EFI_DEVICE_PATH_PROTOCOL
End
;
}
DUMMY_BOOT_DEVICE_PATH
;
typedef
PACKED
struct
{
VENDOR_DEFINED_DEVICE_PATH
Vendor
;
VENDOR_DEFINED_DEVICE_PATH
VendorFile
;
EFI_DEVICE_PATH_PROTOCOL
End
;
}
DUMMY_BOOT_DEVICE_FILE_PATH
;
#pragma pack(pop)
//
// We do not want to expose these for the time being!.
//
#define INTERNAL_STORAGE_GUID \
{ 0x33B5C65A, 0x5B82, 0x403D, {0x87, 0xA5, 0xD4, 0x67, 0x62, 0x50, 0xEC, 0x59} }
#define INTERNAL_STORAGE_FILE_GUID \
{ 0x1237EC17, 0xD3CE, 0x401D, {0xA8, 0x41, 0xB1, 0xD8, 0x18, 0xF8, 0xAF, 0x1A} }
STATIC
DUMMY_BOOT_DEVICE_PATH
mDummyBootDevicePath
=
{
.
Vendor
=
{
.
Header
=
{
.
Type
=
HARDWARE_DEVICE_PATH
,
.
SubType
=
HW_VENDOR_DP
,
.
Length
=
{
sizeof
(
VENDOR_DEFINED_DEVICE_PATH
),
0
}
},
.
Guid
=
INTERNAL_STORAGE_GUID
},
.
End
=
{
.
Type
=
END_DEVICE_PATH_TYPE
,
.
SubType
=
END_ENTIRE_DEVICE_PATH_SUBTYPE
,
.
Length
=
{
END_DEVICE_PATH_LENGTH
,
0
}
}
};
STATIC
DUMMY_BOOT_DEVICE_FILE_PATH
mDummyBootDeviceFilePath
=
{
.
Vendor
=
{
.
Header
=
{
.
Type
=
HARDWARE_DEVICE_PATH
,
.
SubType
=
HW_VENDOR_DP
,
.
Length
=
{
sizeof
(
VENDOR_DEFINED_DEVICE_PATH
),
0
}
},
.
Guid
=
INTERNAL_STORAGE_GUID
},
.
VendorFile
=
{
.
Header
=
{
.
Type
=
HARDWARE_DEVICE_PATH
,
.
SubType
=
HW_VENDOR_DP
,
.
Length
=
{
sizeof
(
VENDOR_DEFINED_DEVICE_PATH
),
0
}
},
.
Guid
=
INTERNAL_STORAGE_FILE_GUID
},
.
End
=
{
.
Type
=
END_DEVICE_PATH_TYPE
,
.
SubType
=
END_ENTIRE_DEVICE_PATH_SUBTYPE
,
.
Length
=
{
END_DEVICE_PATH_LENGTH
,
0
}
}
};
STATIC
OC_SCHEMA
...
...
@@ -101,6 +170,15 @@ OcStorageInitializeVault (
return
EFI_UNSUPPORTED
;
}
Context
->
StorageHandle
=
NULL
;
gBS
->
InstallProtocolInterface
(
&
Context
->
StorageHandle
,
&
gEfiDevicePathProtocolGuid
,
EFI_NATIVE_INTERFACE
,
&
mDummyBootDevicePath
);
Context
->
DummyDevicePath
=
(
EFI_DEVICE_PATH_PROTOCOL
*
)
&
mDummyBootDeviceFilePath
;
Context
->
HasVault
=
TRUE
;
return
EFI_SUCCESS
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录