回复: [edk2-devel] [VFR REST_STYLE PATCH v2 1/1] VfrSpecification: Add REST_STYLE
Abner: I just push the patch @ e59aa6e9483e110d5dffda0ecdb4325d66aa179b.
Thanks Liming
toggle quoted messageShow quoted text
-----邮件原件----- 发件人: bounce+27952+67389+4905953+8761045@groups.io <bounce+27952+67389+4905953+8761045@groups.io> 代表 Abner Chang 发送时间: 2020年11月12日 21:58 收件人: gaoliming <gaoliming@...>; devel@edk2.groups.io 抄送: 'Dandan Bi' <dandan.bi@...>; Wang, Nickle (HPS SW) <nickle.wang@...>; O'Hanley, Peter (EXL) <peter.ohanley@...> 主题: Re: [edk2-devel] [VFR REST_STYLE PATCH v2 1/1] VfrSpecification: Add REST_STYLE
Seems like I don’t have the write access to that repo.
Abner
-----Original Message----- From: gaoliming [mailto:gaoliming@...] Sent: Thursday, November 12, 2020 9:35 PM To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) <abner.chang@...> Cc: 'Dandan Bi' <dandan.bi@...>; Wang, Nickle (HPS SW) <nickle.wang@...>; O'Hanley, Peter (EXL) <peter.ohanley@...> Subject: 回复: [edk2-devel] [VFR REST_STYLE PATCH v2 1/1] VfrSpecification:
Add REST_STYLE
Directly push for it. Now, PR is only enabled in Edk2 Repo.
Thanks Liming
-----邮件原件----- 发件人: bounce+27952+67377+4905953+8761045@groups.io <bounce+27952+67377+4905953+8761045@groups.io> 代表 Abner Chang
发送时间: 2020年11月12日 15:31 收件人: gaoliming <gaoliming@...>; devel@edk2.groups.io 抄送: 'Dandan Bi' <dandan.bi@...>; Wang, Nickle (HPS SW) <nickle.wang@...>; O'Hanley, Peter (EXL) <peter.ohanley@...>
主题: Re: [edk2-devel] [VFR REST_STYLE PATCH v2 1/1] VfrSpecification: Add REST_STYLE
Hi Liming, the way to merge this change is create a PR then merge it directly?
Abner
-----Original Message----- From: gaoliming [mailto:gaoliming@...] Sent: Thursday, November 12, 2020 3:13 PM To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) <abner.chang@...> Cc: 'Dandan Bi' <dandan.bi@...>; Wang, Nickle (HPS SW) <nickle.wang@...>; O'Hanley, Peter (EXL) <peter.ohanley@...>
Subject: 回复: [edk2-devel] [VFR REST_STYLE PATCH v2 1/1] VfrSpecification:
Add REST_STYLE
Reviewed-by: Liming Gao <gaoliming@...>
-----邮件原件----- 发件人: bounce+27952+67207+4905953+8761045@groups.io <bounce+27952+67207+4905953+8761045@groups.io> 代表 Abner Chang
发送时间: 2020年11月10日 9:46 收件人: devel@edk2.groups.io 抄送: abner.chang@...; Liming Gao
<gaoliming@...>;
Dandan
Bi <dandan.bi@...>; Nickle Wang <nickle.wang@...>; Peter
O'Hanley <peter.ohanley@...> 主题: [edk2-devel] [VFR REST_STYLE PATCH v2 1/1] VfrSpecification: Add REST_STYLE
Add REST_STYLE to question flag
Signed-off-by: Abner Chang <abner.chang@...>
Cc: Liming Gao <gaoliming@...> Cc: Dandan Bi <dandan.bi@...> Cc: Nickle Wang <nickle.wang@...> Cc: Peter O'Hanley <peter.ohanley@...> --- 2_vfr_description_in_bnf/210_vfr_general_token_definition.md | 2
++
2_vfr_description_in_bnf/211_vfr_form_definition.md |
2
++
2 files changed, 4 insertions(+)
diff --git a/2_vfr_description_in_bnf/210_vfr_general_token_definition.md b/2_vfr_description_in_bnf/210_vfr_general_token_definition.md index 7dc42f0..48057f5 100644 --- a/2_vfr_description_in_bnf/210_vfr_general_token_definition.md +++
b/2_vfr_description_in_bnf/210_vfr_general_token_definition.md
@@ -2,6 +2,7 @@ 2.10 VFR General Token Definition
Copyright (c) 2007-2017, Intel Corporation. All rights reserved.<BR> + (C) Copyright 2020 Hewlett Packard Enterprise Development + LP<BR>
Redistribution and use in source (original document form) and 'compiled'
forms (converted to PDF, epub, HTML and other formats) with or without @@ -117,6 +118,7 @@ questionheaderFlagsField ::= | "INTERACTIVE" | "RESET_REQUIRED" | "OPTIONS_ONLY" + | "REST_STYLE"
vfrStorageVarId ::= ( StringIdentifier "[" Number "]" ) diff --git a/2_vfr_description_in_bnf/211_vfr_form_definition.md b/2_vfr_description_in_bnf/211_vfr_form_definition.md index 2e63bdf..238436b 100644 --- a/2_vfr_description_in_bnf/211_vfr_form_definition.md +++ b/2_vfr_description_in_bnf/211_vfr_form_definition.md @@ -2,6 +2,7 @@ 2.11 VFR Form Definition
Copyright (c) 2007-2017, Intel Corporation. All rights reserved.<BR> + (C) Copyright 2020 Hewlett Packard Enterprise Development + LP<BR>
Redistribution and use in source (original document form) and 'compiled'
forms (converted to PDF, epub, HTML and other formats) with or without @@ -786,6 +787,7 @@ oneofoptionFlagsField ::= | "INTERACTIVE" | "RESET_REQUIRED" | "DEFAULT" + | "REST_STYLE" ```
#### BEHAVIORS AND RESTRICTIONS -- 2.21.0.windows.1
|
|
回复: [edk2-devel] 回复: [PATCH] MdeModulePkg DisplayEngineDxe: Correct the local variable name.
toggle quoted messageShow quoted text
-----邮件原件----- 发件人: bounce+27952+67336+4905953+8761045@groups.io <bounce+27952+67336+4905953+8761045@groups.io> 代表 gaoliming 发送时间: 2020年11月12日 9:40 收件人: gechao@...; devel@edk2.groups.io 抄送: dandan.bi@...; eric.dong@... 主题: [edk2-devel] 回复: [PATCH] MdeModulePkg DisplayEngineDxe: Correct the local variable name.
Reviewed-by: Liming Gao <gaoliming@...>
-----邮件原件----- 发件人: gechao@... <gechao@...> 发送时间: 2020年11月12日 9:34 收件人: devel@edk2.groups.io 抄送: dandan.bi@...; eric.dong@...; gaoliming@...; gechao <gechao@...> 主题: [PATCH] MdeModulePkg DisplayEngineDxe: Correct the local variable name.
From: gechao <gechao@...>
Signed-off-by: gechao <gechao@...> --- .../Universal/DisplayEngineDxe/FormDisplay.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c index 3b034a1c82..a3898dc2ec 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c @@ -372,7 +372,7 @@ GetWidth ( {
CHAR16 *String;
UINTN Size;
- EFI_IFR_TEXT *TestOp;
+ EFI_IFR_TEXT *TextOp;
UINT16 ReturnWidth;
FORM_DISPLAY_ENGINE_STATEMENT *Statement;
@@ -394,9 +394,9 @@ GetWidth ( // See if the second text parameter is really NULL
//
if (Statement->OpCode->OpCode == EFI_IFR_TEXT_OP) {
- TestOp = (EFI_IFR_TEXT *) Statement->OpCode;
- if (TestOp->TextTwo != 0) {
- String = GetToken (TestOp->TextTwo, gFormData->HiiHandle);
+ TextOp = (EFI_IFR_TEXT *) Statement->OpCode;
+ if (TextOp->TextTwo != 0) {
+ String = GetToken (TextOp->TextTwo, gFormData->HiiHandle);
Size = StrLen (String);
FreePool (String);
}
@@ -2166,7 +2166,7 @@ HasOptionString ( FORM_DISPLAY_ENGINE_STATEMENT *Statement;
CHAR16 *String;
UINTN Size;
- EFI_IFR_TEXT *TestOp;
+ EFI_IFR_TEXT *TextOp;
Size = 0;
Statement = MenuOption->ThisTag;
@@ -2175,9 +2175,9 @@ HasOptionString ( // See if the second text parameter is really NULL
//
if (Statement->OpCode->OpCode == EFI_IFR_TEXT_OP) {
- TestOp = (EFI_IFR_TEXT *) Statement->OpCode;
- if (TestOp->TextTwo != 0) {
- String = GetToken (TestOp->TextTwo, gFormData->HiiHandle);
+ TextOp = (EFI_IFR_TEXT *) Statement->OpCode;
+ if (TextOp->TextTwo != 0) {
+ String = GetToken (TextOp->TextTwo, gFormData->HiiHandle);
Size = StrLen (String);
FreePool (String);
}
-- 2.28.0.windows.1
|
|
回复: [edk2-devel] [PATCH v9 00/13] Add the VariablePolicy feature
Bret: V9 version change is mainly for MdeModule Variable driver. The change is good to me. Reviewed-by: Liming Gao <gaoliming@...> Besides, I find V9 doesn’t include the patch 0014-MdeModulePkg-Add-a-shell-based-functional-test-for-VariablePolicy. Because this patch doesn’t pass ECC, will you plan to add it later? Thanks Liming 发件人: bounce+27952+67296+4905953+8761045@groups.io <bounce+27952+67296+4905953+8761045@groups.io> 代表 Bret Barkelew 发送时间: 2020年11月12日 2:44 收件人: edk2-devel-groups-io <devel@edk2.groups.io> 主题: Re: [edk2-devel] [PATCH v9 00/13] Add the VariablePolicy feature The current solution to the MorLock EndOfDxe issue is to expressly call LockVariablePolicy() in the same locations that mEndOfDxe is set (which was the mechanism that previously locked the VariableLock interface). This solution maintains parity with the old design, which is keeping with the ethos of minimal changes and similar functionality to VariableLock. It does not introduce any new dependencies. The only drawback to this approach is that it preserves the strict ordering that was also previously required by MorLock, which I will attempt to address in later updates.
toggle quoted messageShow quoted text
On Sun, Nov 8, 2020 at 10:45 PM Bret Barkelew <bret@...> wrote:The 14 patches in this series add the VariablePolicy feature to the core, deprecate Edk2VarLock (while adding a compatibility layer to reduce code churn), and integrate the VariablePolicy libraries and protocols into Variable Services.
Since the integration requires multiple changes, including adding libraries, a protocol, an SMI communication handler, and VariableServices integration, the patches are broken up by individual library additions and then a final integration. Security-sensitive changes like bypassing Authenticated Variable enforcement are also broken out into individual patches so that attention can be called directly to them.
Platform porting instructions are described in this wiki entry: https://github.com/tianocore/tianocore.github.io/wiki/VariablePolicy-Protocol---Enhanced-Method-for-Managing-Variables#platform-porting
Discussion of the feature can be found in multiple places throughout the last year on the RFC channel, staging branches, and in devel.
Most recently, this subject was discussed in this thread: https://edk2.groups.io/g/devel/message/53712 (the code branches shared in that discussion are now out of date, but the whitepapers and discussion are relevant).
Cc: Jiewen Yao <jiewen.yao@...> Cc: Dandan Bi <dandan.bi@...> Cc: Chao Zhang <chao.b.zhang@...> Cc: Jian J Wang <jian.j.wang@...> Cc: Hao A Wu <hao.a.wu@...> Cc: Liming Gao <liming.gao@...> Cc: Jordan Justen <jordan.l.justen@...> Cc: Laszlo Ersek <lersek@...> Cc: Ard Biesheuvel <ard.biesheuvel@...> Cc: Andrew Fish <afish@...> Cc: Ray Ni <ray.ni@...> Cc: Bret Barkelew <brbarkel@...> Signed-off-by: Bret Barkelew <brbarkel@...>
v9 changes: * Rebase * Address the event ordering issues around MorLock at EndOfDxe * Drop problematic tests * Address ECC issues
v8 changes: * Rebase * Small tweaks from final PRs * Drank a lot * Enrolled several members and a steward in CatFacts
v7 changes: * Address comments from Dandan about security of the MM handler * Add readme * Fix bug around hex characters in BOOT####, etc * Add additional testing for hex characters * Add additional testing for authenticated variables
v6 changes: * Fix an issue with uninitialized Status in InitVariablePolicyLib() and DeinitVariablePolicyLib() * Fix GCC building in shell-based functional test * Rebase on latest origin/master
v5 changes: * Fix the CONST mismatch in VariablePolicy.h and VariablePolicySmmDxe.c * Fix EFIAPI mismatches in the functional unittest * Rebase on latest origin/master
v4 changes: * Remove Optional PcdAllowVariablePolicyEnforcementDisable PCD from platforms * Rebase on master * Migrate to new MmCommunicate2 protocol * Fix an oversight in the default return value for InitMmCommonCommBuffer * Fix in VariablePolicyLib to allow ExtraInitRuntimeDxe to consume variables
V3 changes: * Address all non-unittest issues with ECC * Make additional style changes * Include section name in hunk headers in "ini-style" files * Remove requirement for the EdkiiPiSmmCommunicationsRegionTable driver (now allocates its own buffer) * Change names from VARIABLE_POLICY_PROTOCOL and gVariablePolicyProtocolGuid to EDKII_VARIABLE_POLICY_PROTOCOL and gEdkiiVariablePolicyProtocolGuid * Fix GCC warning about initializing externs * Add UNI strings for new PCD * Add patches for ArmVirtPkg, OvmfXen, and UefiPayloadPkg * Reorder patches according to Liming's feedback about adding to platforms before changing variable driver
V2 changes: * Fixed implementation for RuntimeDxe * Add PCD to block DisableVariablePolicy * Fix the DumpVariablePolicy pagination in SMM
Bret Barkelew (13): MdeModulePkg: Define the VariablePolicy protocol interface MdeModulePkg: Define the VariablePolicyLib MdeModulePkg: Define the VariablePolicyHelperLib MdeModulePkg: Define the VarCheckPolicyLib and SMM interface OvmfPkg: Add VariablePolicy engine to OvmfPkg platform EmulatorPkg: Add VariablePolicy engine to EmulatorPkg platform ArmVirtPkg: Add VariablePolicy engine to ArmVirtPkg platform UefiPayloadPkg: Add VariablePolicy engine to UefiPayloadPkg platform MdeModulePkg: Connect VariablePolicy business logic to VariableServices MdeModulePkg: Allow VariablePolicy state to delete protected variables SecurityPkg: Allow VariablePolicy state to delete authenticated variables MdeModulePkg: Change TCG MOR variables to use VariablePolicy MdeModulePkg: Drop VarLock from RuntimeDxe variable driver
MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c | 346 ++++++++ MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.c | 396 ++++++++++ MdeModulePkg/Library/VariablePolicyLib/VariablePolicyExtraInitNull.c | 46 ++ MdeModulePkg/Library/VariablePolicyLib/VariablePolicyExtraInitRuntimeDxe.c | 85 ++ MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c | 830 ++++++++++++++++++++ MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockDxe.c | 52 +- MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c | 60 +- MdeModulePkg/Universal/Variable/RuntimeDxe/VarCheck.c | 49 +- MdeModulePkg/Universal/Variable/RuntimeDxe/VariableDxe.c | 60 ++ MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c | 71 ++ MdeModulePkg/Universal/Variable/RuntimeDxe/VariablePolicySmmDxe.c | 573 ++++++++++++++ MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.c | 7 + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.c | 14 + SecurityPkg/Library/AuthVariableLib/AuthService.c | 30 +- ArmVirtPkg/ArmVirt.dsc.inc | 4 + EmulatorPkg/EmulatorPkg.dsc | 3 + MdeModulePkg/Include/Guid/VarCheckPolicyMmi.h | 54 ++ MdeModulePkg/Include/Library/VariablePolicyHelperLib.h | 164 ++++ MdeModulePkg/Include/Library/VariablePolicyLib.h | 207 +++++ MdeModulePkg/Include/Protocol/VariablePolicy.h | 157 ++++ MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.inf | 42 + MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.uni | 12 + MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf | 35 + MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.uni | 12 + MdeModulePkg/Library/VariablePolicyLib/ReadMe.md | 406 ++++++++++ MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf | 48 ++ MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.uni | 12 + MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.inf | 51 ++ MdeModulePkg/MdeModulePkg.ci.yaml | 4 +- MdeModulePkg/MdeModulePkg.dec | 26 +- MdeModulePkg/MdeModulePkg.dsc | 9 + MdeModulePkg/MdeModulePkg.uni | 7 + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf | 5 + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf | 4 + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf | 11 + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf | 4 + OvmfPkg/OvmfPkgIa32.dsc | 5 + OvmfPkg/OvmfPkgIa32X64.dsc | 5 + OvmfPkg/OvmfPkgX64.dsc | 5 + OvmfPkg/OvmfXen.dsc | 4 + SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf | 2 + UefiPayloadPkg/UefiPayloadPkgIa32.dsc | 4 + UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc | 4 + 43 files changed, 3845 insertions(+), 80 deletions(-) create mode 100644 MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c create mode 100644 MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.c create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyExtraInitNull.c create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyExtraInitRuntimeDxe.c create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c create mode 100644 MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c create mode 100644 MdeModulePkg/Universal/Variable/RuntimeDxe/VariablePolicySmmDxe.c create mode 100644 MdeModulePkg/Include/Guid/VarCheckPolicyMmi.h create mode 100644 MdeModulePkg/Include/Library/VariablePolicyHelperLib.h create mode 100644 MdeModulePkg/Include/Library/VariablePolicyLib.h create mode 100644 MdeModulePkg/Include/Protocol/VariablePolicy.h create mode 100644 MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.inf create mode 100644 MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.uni create mode 100644 MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf create mode 100644 MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.uni create mode 100644 MdeModulePkg/Library/VariablePolicyLib/ReadMe.md create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.inf create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.uni create mode 100644 MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLibRuntimeDxe.inf
-- 2.28.0.windows.1
|
|
Re: [VFR REST_STYLE PATCH v2 1/1] VfrSpecification: Add REST_STYLE

Abner Chang
Seems like I don’t have the write access to that repo.
Abner
toggle quoted messageShow quoted text
-----Original Message----- From: gaoliming [mailto:gaoliming@...] Sent: Thursday, November 12, 2020 9:35 PM To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) <abner.chang@...> Cc: 'Dandan Bi' <dandan.bi@...>; Wang, Nickle (HPS SW) <nickle.wang@...>; O'Hanley, Peter (EXL) <peter.ohanley@...> Subject: 回复: [edk2-devel] [VFR REST_STYLE PATCH v2 1/1] VfrSpecification: Add REST_STYLE
Directly push for it. Now, PR is only enabled in Edk2 Repo.
Thanks Liming
-----邮件原件----- 发件人: bounce+27952+67377+4905953+8761045@groups.io <bounce+27952+67377+4905953+8761045@groups.io> 代表 Abner Chang 发送时间: 2020年11月12日 15:31 收件人: gaoliming <gaoliming@...>; devel@edk2.groups.io 抄送: 'Dandan Bi' <dandan.bi@...>; Wang, Nickle (HPS SW) <nickle.wang@...>; O'Hanley, Peter (EXL) <peter.ohanley@...>
主题: Re: [edk2-devel] [VFR REST_STYLE PATCH v2 1/1] VfrSpecification: Add REST_STYLE
Hi Liming, the way to merge this change is create a PR then merge it directly?
Abner
-----Original Message----- From: gaoliming [mailto:gaoliming@...] Sent: Thursday, November 12, 2020 3:13 PM To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) <abner.chang@...> Cc: 'Dandan Bi' <dandan.bi@...>; Wang, Nickle (HPS SW) <nickle.wang@...>; O'Hanley, Peter (EXL) <peter.ohanley@...>
Subject: 回复: [edk2-devel] [VFR REST_STYLE PATCH v2 1/1] VfrSpecification:
Add REST_STYLE
Reviewed-by: Liming Gao <gaoliming@...>
-----邮件原件----- 发件人: bounce+27952+67207+4905953+8761045@groups.io <bounce+27952+67207+4905953+8761045@groups.io> 代表 Abner Chang
发送时间: 2020年11月10日 9:46 收件人: devel@edk2.groups.io 抄送: abner.chang@...; Liming Gao
<gaoliming@...>;
Dandan
Bi <dandan.bi@...>; Nickle Wang <nickle.wang@...>; Peter
O'Hanley <peter.ohanley@...> 主题: [edk2-devel] [VFR REST_STYLE PATCH v2 1/1] VfrSpecification: Add REST_STYLE
Add REST_STYLE to question flag
Signed-off-by: Abner Chang <abner.chang@...>
Cc: Liming Gao <gaoliming@...> Cc: Dandan Bi <dandan.bi@...> Cc: Nickle Wang <nickle.wang@...> Cc: Peter O'Hanley <peter.ohanley@...> --- 2_vfr_description_in_bnf/210_vfr_general_token_definition.md | 2
++
2_vfr_description_in_bnf/211_vfr_form_definition.md | 2 ++
2 files changed, 4 insertions(+)
diff --git a/2_vfr_description_in_bnf/210_vfr_general_token_definition.md b/2_vfr_description_in_bnf/210_vfr_general_token_definition.md index 7dc42f0..48057f5 100644 --- a/2_vfr_description_in_bnf/210_vfr_general_token_definition.md +++
b/2_vfr_description_in_bnf/210_vfr_general_token_definition.md
@@ -2,6 +2,7 @@ 2.10 VFR General Token Definition
Copyright (c) 2007-2017, Intel Corporation. All rights reserved.<BR> + (C) Copyright 2020 Hewlett Packard Enterprise Development + LP<BR>
Redistribution and use in source (original document form) and 'compiled'
forms (converted to PDF, epub, HTML and other formats) with or without @@ -117,6 +118,7 @@ questionheaderFlagsField ::= | "INTERACTIVE" | "RESET_REQUIRED" | "OPTIONS_ONLY" + | "REST_STYLE"
vfrStorageVarId ::= ( StringIdentifier "[" Number "]" ) diff --git a/2_vfr_description_in_bnf/211_vfr_form_definition.md b/2_vfr_description_in_bnf/211_vfr_form_definition.md index 2e63bdf..238436b 100644 --- a/2_vfr_description_in_bnf/211_vfr_form_definition.md +++ b/2_vfr_description_in_bnf/211_vfr_form_definition.md @@ -2,6 +2,7 @@ 2.11 VFR Form Definition
Copyright (c) 2007-2017, Intel Corporation. All rights reserved.<BR> + (C) Copyright 2020 Hewlett Packard Enterprise Development + LP<BR>
Redistribution and use in source (original document form) and 'compiled'
forms (converted to PDF, epub, HTML and other formats) with or without @@ -786,6 +787,7 @@ oneofoptionFlagsField ::= | "INTERACTIVE" | "RESET_REQUIRED" | "DEFAULT" + | "REST_STYLE" ```
#### BEHAVIORS AND RESTRICTIONS -- 2.21.0.windows.1
|
|
回复: 回复: [edk2-devel] [PATCH 1/1] MdePkg/BaseRngLibDxe: Add DXE_RUNTIME_DRIVER class to RngLib
Pete: This detail is enough. Reviewed-by: Liming Gao <gaoliming@...> Thanks Liming -----邮件原件----- 发件人: bounce+27952+67385+4905953+8761045@groups.io <bounce+27952+67385+4905953+8761045@groups.io> 代表 Pete Batard 发送时间: 2020年11月12日 20:10 收件人: gaoliming <gaoliming@...>; devel@edk2.groups.io; samer.el-haj-mahmoud@... 抄送: michael.d.kinney@...; zhiguang.liu@... 主题: Re: 回复: [edk2-devel] [PATCH 1/1] MdePkg/BaseRngLibDxe: Add DXE_RUNTIME_DRIVER class to RngLib
Hi Liming,
On 2020.11.12 01:52, gaoliming wrote:
I agree this library instance can be used for RUNTIME driver before boot to OS.
Can you let me know which runtime driver consumes it? It's OpenSslLib.
As per https://github.com/tianocore/edk2-platforms/commit/1e09147a01aeb45aa4 3e36923d96a1d6b0ec9106 we had to introduce a dependency to RngLib to keep OpenSslLib happy, and the build breaks in VariableRuntimeDxe since it depends on OpenSslLib which itself now depends on RngLib.
Here's the verbose build output that shows it:
Library instances of module [/usr/src/edk2/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRun timeDxe.inf] [AARCH64]: MemoryAllocationLib : /usr/src/edk2/MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocati onLib.inf BaseLib : /usr/src/edk2/MdePkg/Library/BaseLib/BaseLib.inf SynchronizationLib : /usr/src/edk2/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationL ib.inf UefiLib : /usr/src/edk2/MdePkg/Library/UefiLib/UefiLib.inf UefiBootServicesTableLib : /usr/src/edk2/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTa bleLib.inf BaseMemoryLib : /usr/src/edk2/MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOpt Dxe.inf DebugLib : /usr/src/edk2/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf UefiRuntimeLib : /usr/src/edk2/MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf DxeServicesTableLib : /usr/src/edk2/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf UefiDriverEntryPoint : /usr/src/edk2/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf PcdLib : /usr/src/edk2/MdePkg/Library/DxePcdLib/DxePcdLib.inf HobLib : /usr/src/edk2/MdePkg/Library/DxeHobLib/DxeHobLib.inf TpmMeasurementLib : /usr/src/edk2/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasur ementLib.inf AuthVariableLib : /usr/src/edk2/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf VarCheckLib : /usr/src/edk2/MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf NULL2 : /usr/src/edk2/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf NULL1 :
/usr/src/edk2/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf NULL4 : /usr/src/edk2/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf DevicePathLib : /usr/src/edk2/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf PrintLib : /usr/src/edk2/MdePkg/Library/BasePrintLib/BasePrintLib.inf BaseCryptLib : /usr/src/edk2/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf PlatformSecureLib : /usr/src/edk2/OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf UefiRuntimeServicesTableLib : /usr/src/edk2/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeSer vicesTableLib.inf OpensslLib : /usr/src/edk2/CryptoPkg/Library/OpensslLib/OpensslLib.inf IntrinsicLib : /usr/src/edk2/CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
build.py... /usr/src/edk2-platforms/Platform/RaspberryPi/RPi4/RPi4.dsc(...): error 1001: Module type [DXE_RUNTIME_DRIVER] is not supported by library instance [/usr/src/edk2/MdePkg/Library/DxeRngLib/DxeRngLib.inf] consumed by [/usr/src/edk2/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRun timeDxe.inf]
And, please make sure the consumer code runs in boot phase only. That's for Secure Boot, so I think we should be okay.
Regards,
/Pete
Thanks Liming
-----邮件原件----- 发件人: bounce+27952+67295+4905953+8761045@groups.io <bounce+27952+67295+4905953+8761045@groups.io> 代表 Samer El-Haj-Mahmoud 发送时间: 2020年11月12日 1:38 收件人: Pete Batard <pete@...>; devel@edk2.groups.io 抄送: michael.d.kinney@...; gaoliming@...; zhiguang.liu@... 主题: Re: [edk2-devel] [PATCH 1/1] MdePkg/BaseRngLibDxe: Add DXE_RUNTIME_DRIVER class to RngLib
Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@...>
-----Original Message----- From: Pete Batard <pete@...> Sent: Wednesday, November 4, 2020 2:04 PM To: devel@edk2.groups.io Cc: michael.d.kinney@...; gaoliming@...; zhiguang.liu@...; Samer El-Haj-Mahmoud <Samer.El-Haj- Mahmoud@...> Subject: [PATCH 1/1] MdePkg/BaseRngLibDxe: Add
DXE_RUNTIME_DRIVER
class to RngLib
The Raspberry Pi platform with Secure Boot enabled currently fails to build
with error:
Module type [DXE_RUNTIME_DRIVER] is not supported by library instance
[/home/appveyor/projects/rpi4/edk2/MdePkg/Library/DxeRngLib/DxeRngLi
b.inf]
Add the missing class to fix this issue.
Signed-off-by: Pete Batard <pete@...> --- MdePkg/Library/DxeRngLib/DxeRngLib.inf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MdePkg/Library/DxeRngLib/DxeRngLib.inf b/MdePkg/Library/DxeRngLib/DxeRngLib.inf index 68554ad21146..9c11959f8aeb 100644 --- a/MdePkg/Library/DxeRngLib/DxeRngLib.inf +++ b/MdePkg/Library/DxeRngLib/DxeRngLib.inf @@ -14,7 +14,7 @@ [Defines] FILE_GUID = FF9F84C5-A33E-44E3-9BB5-0D654B2D4149 MODULE_TYPE = DXE_DRIVER VERSION_STRING = 1.0 - LIBRARY_CLASS = RngLib|DXE_DRIVER UEFI_APPLICATION UEFI_DRIVER
+ LIBRARY_CLASS = RngLib|DXE_DRIVER DXE_RUNTIME_DRIVER UEFI_APPLICATION UEFI_DRIVER
[Packages] MdePkg/MdePkg.dec -- 2.21.0.windows.1 IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient,
please notify the sender immediately and do not disclose the contents
to any
other person, use it for any purpose, or store or copy the information
in any
medium. Thank you.
|
|
回复: [edk2-devel] [VFR REST_STYLE PATCH v2 1/1] VfrSpecification: Add REST_STYLE
Directly push for it. Now, PR is only enabled in Edk2 Repo. Thanks Liming -----邮件原件----- 发件人: bounce+27952+67377+4905953+8761045@groups.io <bounce+27952+67377+4905953+8761045@groups.io> 代表 Abner Chang 发送时间: 2020年11月12日 15:31 收件人: gaoliming <gaoliming@...>; devel@edk2.groups.io 抄送: 'Dandan Bi' <dandan.bi@...>; Wang, Nickle (HPS SW) <nickle.wang@...>; O'Hanley, Peter (EXL) <peter.ohanley@...> 主题: Re: [edk2-devel] [VFR REST_STYLE PATCH v2 1/1] VfrSpecification: Add REST_STYLE
Hi Liming, the way to merge this change is create a PR then merge it directly? Abner
-----Original Message----- From: gaoliming [mailto:gaoliming@...] Sent: Thursday, November 12, 2020 3:13 PM To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) <abner.chang@...> Cc: 'Dandan Bi' <dandan.bi@...>; Wang, Nickle (HPS SW) <nickle.wang@...>; O'Hanley, Peter (EXL) <peter.ohanley@...> Subject: 回复: [edk2-devel] [VFR REST_STYLE PATCH v2 1/1] VfrSpecification:
Add REST_STYLE
Reviewed-by: Liming Gao <gaoliming@...>
-----邮件原件----- 发件人: bounce+27952+67207+4905953+8761045@groups.io <bounce+27952+67207+4905953+8761045@groups.io> 代表 Abner Chang
发送时间: 2020年11月10日 9:46 收件人: devel@edk2.groups.io 抄送: abner.chang@...; Liming Gao <gaoliming@...>; Dandan
Bi <dandan.bi@...>; Nickle Wang <nickle.wang@...>; Peter O'Hanley <peter.ohanley@...> 主题: [edk2-devel] [VFR REST_STYLE PATCH v2 1/1] VfrSpecification: Add REST_STYLE
Add REST_STYLE to question flag
Signed-off-by: Abner Chang <abner.chang@...>
Cc: Liming Gao <gaoliming@...> Cc: Dandan Bi <dandan.bi@...> Cc: Nickle Wang <nickle.wang@...> Cc: Peter O'Hanley <peter.ohanley@...> --- 2_vfr_description_in_bnf/210_vfr_general_token_definition.md | 2 ++ 2_vfr_description_in_bnf/211_vfr_form_definition.md | 2 ++
2 files changed, 4 insertions(+)
diff --git a/2_vfr_description_in_bnf/210_vfr_general_token_definition.md b/2_vfr_description_in_bnf/210_vfr_general_token_definition.md index 7dc42f0..48057f5 100644 --- a/2_vfr_description_in_bnf/210_vfr_general_token_definition.md +++ b/2_vfr_description_in_bnf/210_vfr_general_token_definition.md @@ -2,6 +2,7 @@ 2.10 VFR General Token Definition
Copyright (c) 2007-2017, Intel Corporation. All rights reserved.<BR> + (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
Redistribution and use in source (original document form) and 'compiled'
forms (converted to PDF, epub, HTML and other formats) with or without @@ -117,6 +118,7 @@ questionheaderFlagsField ::= | "INTERACTIVE" | "RESET_REQUIRED" | "OPTIONS_ONLY" + | "REST_STYLE"
vfrStorageVarId ::= ( StringIdentifier "[" Number "]" ) diff --git a/2_vfr_description_in_bnf/211_vfr_form_definition.md b/2_vfr_description_in_bnf/211_vfr_form_definition.md index 2e63bdf..238436b 100644 --- a/2_vfr_description_in_bnf/211_vfr_form_definition.md +++ b/2_vfr_description_in_bnf/211_vfr_form_definition.md @@ -2,6 +2,7 @@ 2.11 VFR Form Definition
Copyright (c) 2007-2017, Intel Corporation. All rights reserved.<BR> + (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
Redistribution and use in source (original document form) and 'compiled'
forms (converted to PDF, epub, HTML and other formats) with or without @@ -786,6 +787,7 @@ oneofoptionFlagsField ::= | "INTERACTIVE" | "RESET_REQUIRED" | "DEFAULT" + | "REST_STYLE" ```
#### BEHAVIORS AND RESTRICTIONS -- 2.21.0.windows.1
|
|
Cancelled Event: TianoCore Design Meeting - APAC/NAMO - Friday, 13 November 2020
#cal-cancelled
devel@edk2.groups.io Calendar <noreply@...>
|
|
Re: 回复: [edk2-devel] [PATCH 1/1] MdePkg/BaseRngLibDxe: Add DXE_RUNTIME_DRIVER class to RngLib

Pete Batard
Hi Liming, On 2020.11.12 01:52, gaoliming wrote: I agree this library instance can be used for RUNTIME driver before boot to OS. Can you let me know which runtime driver consumes it? It's OpenSslLib. As per https://github.com/tianocore/edk2-platforms/commit/1e09147a01aeb45aa43e36923d96a1d6b0ec9106 we had to introduce a dependency to RngLib to keep OpenSslLib happy, and the build breaks in VariableRuntimeDxe since it depends on OpenSslLib which itself now depends on RngLib. Here's the verbose build output that shows it: Library instances of module [/usr/src/edk2/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf] [AARCH64]: MemoryAllocationLib : /usr/src/edk2/MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf BaseLib : /usr/src/edk2/MdePkg/Library/BaseLib/BaseLib.inf SynchronizationLib : /usr/src/edk2/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf UefiLib : /usr/src/edk2/MdePkg/Library/UefiLib/UefiLib.inf UefiBootServicesTableLib : /usr/src/edk2/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf BaseMemoryLib : /usr/src/edk2/MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf DebugLib : /usr/src/edk2/MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf UefiRuntimeLib : /usr/src/edk2/MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf DxeServicesTableLib : /usr/src/edk2/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf UefiDriverEntryPoint : /usr/src/edk2/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf PcdLib : /usr/src/edk2/MdePkg/Library/DxePcdLib/DxePcdLib.inf HobLib : /usr/src/edk2/MdePkg/Library/DxeHobLib/DxeHobLib.inf TpmMeasurementLib : /usr/src/edk2/SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf AuthVariableLib : /usr/src/edk2/SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf VarCheckLib : /usr/src/edk2/MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf NULL2 : /usr/src/edk2/MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf NULL1 : /usr/src/edk2/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf NULL4 : /usr/src/edk2/MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf DevicePathLib : /usr/src/edk2/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf PrintLib : /usr/src/edk2/MdePkg/Library/BasePrintLib/BasePrintLib.inf BaseCryptLib : /usr/src/edk2/CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf PlatformSecureLib : /usr/src/edk2/OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf UefiRuntimeServicesTableLib : /usr/src/edk2/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf OpensslLib : /usr/src/edk2/CryptoPkg/Library/OpensslLib/OpensslLib.inf IntrinsicLib : /usr/src/edk2/CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf build.py... /usr/src/edk2-platforms/Platform/RaspberryPi/RPi4/RPi4.dsc(...): error 1001: Module type [DXE_RUNTIME_DRIVER] is not supported by library instance [/usr/src/edk2/MdePkg/Library/DxeRngLib/DxeRngLib.inf] consumed by [/usr/src/edk2/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf] And, please make sure the consumer code runs in boot phase only. That's for Secure Boot, so I think we should be okay. Regards, /Pete Thanks Liming
-----邮件原件----- 发件人: bounce+27952+67295+4905953+8761045@groups.io <bounce+27952+67295+4905953+8761045@groups.io> 代表 Samer El-Haj-Mahmoud 发送时间: 2020年11月12日 1:38 收件人: Pete Batard <pete@...>; devel@edk2.groups.io 抄送: michael.d.kinney@...; gaoliming@...; zhiguang.liu@... 主题: Re: [edk2-devel] [PATCH 1/1] MdePkg/BaseRngLibDxe: Add DXE_RUNTIME_DRIVER class to RngLib
Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@...>
-----Original Message----- From: Pete Batard <pete@...> Sent: Wednesday, November 4, 2020 2:04 PM To: devel@edk2.groups.io Cc: michael.d.kinney@...; gaoliming@...; zhiguang.liu@...; Samer El-Haj-Mahmoud <Samer.El-Haj- Mahmoud@...> Subject: [PATCH 1/1] MdePkg/BaseRngLibDxe: Add DXE_RUNTIME_DRIVER class to RngLib
The Raspberry Pi platform with Secure Boot enabled currently fails to build
with error:
Module type [DXE_RUNTIME_DRIVER] is not supported by library instance
[/home/appveyor/projects/rpi4/edk2/MdePkg/Library/DxeRngLib/DxeRngLi b.inf]
Add the missing class to fix this issue.
Signed-off-by: Pete Batard <pete@...> --- MdePkg/Library/DxeRngLib/DxeRngLib.inf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MdePkg/Library/DxeRngLib/DxeRngLib.inf b/MdePkg/Library/DxeRngLib/DxeRngLib.inf index 68554ad21146..9c11959f8aeb 100644 --- a/MdePkg/Library/DxeRngLib/DxeRngLib.inf +++ b/MdePkg/Library/DxeRngLib/DxeRngLib.inf @@ -14,7 +14,7 @@ [Defines] FILE_GUID = FF9F84C5-A33E-44E3-9BB5-0D654B2D4149 MODULE_TYPE = DXE_DRIVER VERSION_STRING = 1.0 - LIBRARY_CLASS = RngLib|DXE_DRIVER UEFI_APPLICATION UEFI_DRIVER
+ LIBRARY_CLASS = RngLib|DXE_DRIVER DXE_RUNTIME_DRIVER UEFI_APPLICATION UEFI_DRIVER
[Packages] MdePkg/MdePkg.dec -- 2.21.0.windows.1 IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient,
please notify the sender immediately and do not disclose the contents to any
other person, use it for any purpose, or store or copy the information in any
medium. Thank you.
|
|
Re: [PATCH] uefi-sct:Add maintainer in Maintainers.txt

G Edhaya Chandran
toggle quoted messageShow quoted text
-----Original Message----- From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of G Edhaya Chandran via groups.io Sent: 11 November 2020 14:17 To: Barton Gao <gaojie@...>; devel@edk2.groups.io Cc: Eric Jin <eric.jin@...>; Samer El-Haj-Mahmoud <Samer.El-Haj- Mahmoud@...> Subject: Re: [edk2-devel] [PATCH] uefi-sct:Add maintainer in Maintainers.txt
Reviewed-by: G Edhaya Chandran<edhaya.chandran@...>
-----Original Message----- From: Barton Gao <gaojie@...> Sent: 11 November 2020 11:45 To: devel@edk2.groups.io Cc: G Edhaya Chandran <Edhaya.Chandran@...>; Eric Jin <eric.jin@...>; Samer El-Haj-Mahmoud <Samer.El-Haj- Mahmoud@...> Subject: [PATCH] uefi-sct:Add maintainer in Maintainers.txt
Request to add Barton Gao from Byosoft as maintainer of uefi-sct.
Cc: G Edhaya Chandran <Edhaya.Chandran@...> Cc: Eric Jin <eric.jin@...> Cc: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@...> Signed-off-by: Barton Gao <gaojie@...> --- uefi-sct/Maintainers.txt | 1 + 1 file changed, 1 insertion(+)
diff --git a/uefi-sct/Maintainers.txt b/uefi-sct/Maintainers.txt index c5f11c7d..61cb361f 100644 --- a/uefi-sct/Maintainers.txt +++ b/uefi-sct/Maintainers.txt @@ -41,6 +41,7 @@ UEFI-SCT:
M: Eric Jin <eric.jin@...> M: G Edhaya Chandran <Edhaya.Chandran@...> +M: Barton Gao <gaojie@...>
R: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@...>
-- 2.27.0.windows.1
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
|
|
[PATCH] Add support for building extra packages

Grant Likely
The build.sh script is very useful for setting up the build environment before calling the package build. Sometimes additional packages are needed when building the SCT. (e.g., it is useful to build ShellPkg). Refactor the build code to allow additional DSCs to be added to the build.
Signed-off-by: Grant Likely <grant.likely@...> --- uefi-sct/SctPkg/build.sh | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-)
diff --git a/uefi-sct/SctPkg/build.sh b/uefi-sct/SctPkg/build.sh index cad17ccd..e7c18fef 100755 --- a/uefi-sct/SctPkg/build.sh +++ b/uefi-sct/SctPkg/build.sh @@ -250,28 +250,20 @@ mkdir -p $DEST_DIR cp $EDK_TOOLS_PATH/Source/C/bin/GenBin $DEST_DIR/GenBin # -# Build the SCT package +# Build the packages needed for the SCT +# Set $DSC_EXTRA to any extra packages needed for the build # -build -p SctPkg/UEFI/UEFI_SCT.dsc -a $SCT_TARGET_ARCH -t $TARGET_TOOLS -b $SCT_BUILD $3 $4 $5 $6 $7 $8 $9 - -# Check if there is any error -status=$? -if test $status -ne 0 -then -echo Could not build the UEFI SCT package - exit -1 -fi - -build -p SctPkg/UEFI/IHV_SCT.dsc -a $SCT_TARGET_ARCH -t $TARGET_TOOLS -b $SCT_BUILD $3 $4 $5 $6 $7 $8 $9 - -# Check if there is any error -status=$? -if test $status -ne 0 -then -echo Could not build the IHV SCT package - exit -1 -fi - +for DSC in SctPkg/UEFI/UEFI_SCT.dsc SctPkg/UEFI/IHV_SCT.dsc $DSC_EXTRA +do + build -p $DSC -a $SCT_TARGET_ARCH -t $TARGET_TOOLS -b $SCT_BUILD $3 $4 $5 $6 $7 $8 $9 + # Check if there is any error + status=$? + if test $status -ne 0 + then + echo Could not build package $DSC + exit -1 + fi +done # # If the argument is clean, then don't have to generate Sct binary. -- 2.20.1
|
|
Re: [edk2-platforms] [PATCH v3-resend] SgiPkg/RdN1EdgeX2: Add missing reference to PcdChipCount
On 11/12/20 9:09 AM, Vijayenthiran Subramanian wrote: Hi all, On Wed, Oct 14, 2020 at 7:33 AM Vijayenthiran Subramanian <vijayenthiran.subramaniam@...> wrote:
Hi all,
On Tue, Oct 6, 2020 at 1:42 PM Vijayenthiran Subramaniam <vijayenthiran.subramaniam@...> wrote:
Commit e8fe2026dd79 (“Platform/ARM/SgiPkg: Use chip count constant on rdn1edgex2 platform”) used the PcdChipCount constant but did not declare its use in the ACPI table module. Fix this by listing it in the list of PCDs to be looked up.
Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@...> Reviewed-by: Thomas Abraham <thomas.abraham@...> Reviewed-by: Sami Mujawar <sami.mujawar@...> ---
Resending PATCH-v3 [1] with Reviewed-bys added.
[1]: https://edk2.groups.io/g/devel/topic/77339902
Changes since v2: - Rebased to latest master and repost.
Changes since v1: - Add commit id in commit message for which this patch fixes the build failure.
Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf index 974d9db543..d44f02ab0c 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf @@ -45,6 +45,8 @@ gArmSgiTokenSpaceGuid.PcdDramBlock2Base gArmSgiTokenSpaceGuid.PcdDramBlock2Size
+ gArmSgiTokenSpaceGuid.PcdChipCount + gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum gArmTokenSpaceGuid.PcdArmArchTimerIntrNum gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum -- 2.17.1 A kindly reminder for this patch.
Regards, Vijayenthiran A gentle reminder to take a look at this patch.
My apologies Pushed as 1a9cbd7fe9cc..867efd012b2f
|
|
Re: [PATCH v2 0/4] Add extra pci roots support for Arm
On 11/9/20 2:05 PM, Jiahui Cen wrote: Changes with v1 v1->v2: Separated into four patches. Factor the same logic parts into a new library. v1: https://edk2.groups.io/g/devel/topic/72723351#56901 BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3059 QEMU: https://lore.kernel.org/qemu-devel/20201103120157.2286-1-cenjiahui@huawei.com/ This patch series adds support for extra pci roots for ARM.
Why? In order to avoid duplicated codes, we introduce a new library PciHostBridgeUtilityLib which extracts common interfaces from OvmfPkg/PciHostBridgeLib. It provides conflicts informing and extra pci roots scanning. Using the utility lib, the uefi could scan for extra root buses and recognize multiple roots for ARM. Cc: Jordan Justen <jordan.l.justen@...> Cc: Laszlo Ersek <lersek@...> Cc: Ard Biesheuvel <ard.biesheuvel@...> Cc: Leif Lindholm <leif@...> Signed-off-by: Yubo Miao <miaoyubo@...> Signed-off-by: Jiahui Cen <cenjiahui@...> Yubo Miao (4): OvmfPkg: Extract functions form PciHostBridgeLib ArmVirtPkg: Use extracted PciHostBridgeUtilityLib OvmfPkg: Extract functions of extra pci roots ArmVirtPkg: Support extra pci roots ArmVirtPkg/ArmVirt.dsc.inc | 1 + OvmfPkg/OvmfPkgIa32.dsc | 1 + OvmfPkg/OvmfPkgIa32X64.dsc | 1 + OvmfPkg/OvmfPkgX64.dsc | 1 + OvmfPkg/OvmfXen.dsc | 1 + ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf | 5 + OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf | 1 + OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.inf | 51 ++++ OvmfPkg/Include/Library/PciHostBridgeUtilityLib.h | 98 +++++++ ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c | 221 ++++++++------- OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c | 234 +--------------- OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.c | 283 ++++++++++++++++++++ 12 files changed, 563 insertions(+), 335 deletions(-) create mode 100644 OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.inf create mode 100644 OvmfPkg/Include/Library/PciHostBridgeUtilityLib.h create mode 100644 OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.c
|
|
Re: [PATCH v2 0/2] OvmfPkg/Bhyve: Fix Bhyve build following breaking changes in OvmfPkg
Acked-by: Peter Grehan <grehan@...>
toggle quoted messageShow quoted text
Fix Bhyve following breaking changes in OvmfPkg. Follows suggestions from Laszlo in the v1 patch set. I also changed the INF version in ResetVector.inf to 1.29. Rebecca Cran (2): OvmfPkg/Bhyve: detach ResetVector from before the SEV-ES changes OvmfPkg/Bhyve: fix build breakage after SEV-ES changes OvmfPkg/Bhyve/BhyveX64.dsc | 3 +- OvmfPkg/Bhyve/BhyveX64.fdf | 2 +- OvmfPkg/Bhyve/ResetVector/ResetVector.inf | 38 +++++ .../Bhyve/ResetVector/Ia32/PageTables64.asm | 149 ++++++++++++++++++ OvmfPkg/Bhyve/ResetVector/ResetVector.nasmb | 68 ++++++++ 5 files changed, 258 insertions(+), 2 deletions(-) create mode 100644 OvmfPkg/Bhyve/ResetVector/ResetVector.inf create mode 100644 OvmfPkg/Bhyve/ResetVector/Ia32/PageTables64.asm create mode 100644 OvmfPkg/Bhyve/ResetVector/ResetVector.nasmb
|
|
Re: : Query regarding IsTextShdr inside Basetools
On 11/11/20 11:41 PM, Laszlo Ersek wrote: On 11/11/20 23:40, Laszlo Ersek wrote:
Ard, Liming,
can you please take a look?
Thanks! Laszlo Darn, I used Liming's old email address. Correcting it now. Sorry! Laszlo
On 11/10/20 14:07, Mukesh Ojha wrote:
Hi All,
I have a doubt about the check we have put inside IsTextShdr() .
STATIC BOOLEAN IsTextShdr ( Elf_Shdr *Shdr ) { return (BOOLEAN) ((Shdr->sh_flags & (SHF_WRITE | SHF_ALLOC)) == SHF_ALLOC); }
We are observing one issue where while generate EFI using GenFW in EDK2 because test/data section offset is different than calculated mCoffSectionsOffset when scanning sections. I run GenFW with a failure dll in my local after adding some logs into GenFW. and found that “mCoffSectionsOffset” for data section seems not to have expected value due to “.note.gnu.property” size. Because compiled dll has “.note.gnu.property” section with alloc flag and GenFW thinks that it’s a text section if alloc flag is set. So its size is added to the mCoffSectionsOffset.
Could you please give us an advice whether we can fix IsTextShdr() function like below ?
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c +++ b/BaseTools/Source/C/GenFw/Elf64Convert.c @@ -229,7 +229,7 @@ IsTextShdr ( Elf_Shdr *Shdr ) { - return (BOOLEAN) ((Shdr->sh_flags & (SHF_WRITE | SHF_ALLOC)) == SHF_ALLOC); + return (BOOLEAN) ((Shdr->sh_flags & (SHF_EXECINSTR | SHF_WRITE | SHF_ALLOC)) == (SHF_ALLOC | SHF_EXECINSTR));^
Was this ELF executable built using the GccBase.lds linker script? If so, we should fix it to disregard .note sections. If you are not using GccBase.lds, I'm afraid you are simply in unsupported territory - there are too many assumptions in GenFw that are not guaranteed to hold for arbitrary ELF executables. I don't think changing IsTextShdr() is the right approach here.
|
|
Re: [edk2-platforms] [PATCH v3-resend] SgiPkg/RdN1EdgeX2: Add missing reference to PcdChipCount
Vijayenthiran Subramaniam
Hi all, On Wed, Oct 14, 2020 at 7:33 AM Vijayenthiran Subramanian <vijayenthiran.subramaniam@...> wrote: Hi all,
On Tue, Oct 6, 2020 at 1:42 PM Vijayenthiran Subramaniam <vijayenthiran.subramaniam@...> wrote:
Commit e8fe2026dd79 (“Platform/ARM/SgiPkg: Use chip count constant on rdn1edgex2 platform”) used the PcdChipCount constant but did not declare its use in the ACPI table module. Fix this by listing it in the list of PCDs to be looked up.
Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@...> Reviewed-by: Thomas Abraham <thomas.abraham@...> Reviewed-by: Sami Mujawar <sami.mujawar@...> ---
Resending PATCH-v3 [1] with Reviewed-bys added.
[1]: https://edk2.groups.io/g/devel/topic/77339902
Changes since v2: - Rebased to latest master and repost.
Changes since v1: - Add commit id in commit message for which this patch fixes the build failure.
Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf index 974d9db543..d44f02ab0c 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf @@ -45,6 +45,8 @@ gArmSgiTokenSpaceGuid.PcdDramBlock2Base gArmSgiTokenSpaceGuid.PcdDramBlock2Size
+ gArmSgiTokenSpaceGuid.PcdChipCount + gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum gArmTokenSpaceGuid.PcdArmArchTimerIntrNum gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum -- 2.17.1 A kindly reminder for this patch.
Regards, Vijayenthiran
A gentle reminder to take a look at this patch. Regards, Vijayenthiran
|
|
Re: [VFR REST_STYLE PATCH v2 1/1] VfrSpecification: Add REST_STYLE

Abner Chang
Hi Liming, the way to merge this change is create a PR then merge it directly?
Abner
toggle quoted messageShow quoted text
-----Original Message----- From: gaoliming [mailto:gaoliming@...] Sent: Thursday, November 12, 2020 3:13 PM To: devel@edk2.groups.io; Chang, Abner (HPS SW/FW Technologist) <abner.chang@...> Cc: 'Dandan Bi' <dandan.bi@...>; Wang, Nickle (HPS SW) <nickle.wang@...>; O'Hanley, Peter (EXL) <peter.ohanley@...> Subject: 回复: [edk2-devel] [VFR REST_STYLE PATCH v2 1/1] VfrSpecification: Add REST_STYLE
Reviewed-by: Liming Gao <gaoliming@...>
-----邮件原件----- 发件人: bounce+27952+67207+4905953+8761045@groups.io <bounce+27952+67207+4905953+8761045@groups.io> 代表 Abner Chang 发送时间: 2020年11月10日 9:46 收件人: devel@edk2.groups.io 抄送: abner.chang@...; Liming Gao <gaoliming@...>; Dandan
Bi <dandan.bi@...>; Nickle Wang <nickle.wang@...>; Peter O'Hanley <peter.ohanley@...> 主题: [edk2-devel] [VFR REST_STYLE PATCH v2 1/1] VfrSpecification: Add REST_STYLE
Add REST_STYLE to question flag
Signed-off-by: Abner Chang <abner.chang@...>
Cc: Liming Gao <gaoliming@...> Cc: Dandan Bi <dandan.bi@...> Cc: Nickle Wang <nickle.wang@...> Cc: Peter O'Hanley <peter.ohanley@...> --- 2_vfr_description_in_bnf/210_vfr_general_token_definition.md | 2 ++ 2_vfr_description_in_bnf/211_vfr_form_definition.md | 2 ++ 2 files changed, 4 insertions(+)
diff --git a/2_vfr_description_in_bnf/210_vfr_general_token_definition.md b/2_vfr_description_in_bnf/210_vfr_general_token_definition.md index 7dc42f0..48057f5 100644 --- a/2_vfr_description_in_bnf/210_vfr_general_token_definition.md +++ b/2_vfr_description_in_bnf/210_vfr_general_token_definition.md @@ -2,6 +2,7 @@ 2.10 VFR General Token Definition
Copyright (c) 2007-2017, Intel Corporation. All rights reserved.<BR> + (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
Redistribution and use in source (original document form) and 'compiled'
forms (converted to PDF, epub, HTML and other formats) with or without @@ -117,6 +118,7 @@ questionheaderFlagsField ::= | "INTERACTIVE" | "RESET_REQUIRED" | "OPTIONS_ONLY" + | "REST_STYLE"
vfrStorageVarId ::= ( StringIdentifier "[" Number "]" ) diff --git a/2_vfr_description_in_bnf/211_vfr_form_definition.md b/2_vfr_description_in_bnf/211_vfr_form_definition.md index 2e63bdf..238436b 100644 --- a/2_vfr_description_in_bnf/211_vfr_form_definition.md +++ b/2_vfr_description_in_bnf/211_vfr_form_definition.md @@ -2,6 +2,7 @@ 2.11 VFR Form Definition
Copyright (c) 2007-2017, Intel Corporation. All rights reserved.<BR> + (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
Redistribution and use in source (original document form) and 'compiled'
forms (converted to PDF, epub, HTML and other formats) with or without @@ -786,6 +787,7 @@ oneofoptionFlagsField ::= | "INTERACTIVE" | "RESET_REQUIRED" | "DEFAULT" + | "REST_STYLE" ```
#### BEHAVIORS AND RESTRICTIONS -- 2.21.0.windows.1
|
|
回复: [PATCH] BaseTools: Fix BrotliCompress tool issue
Reviewed-by: Liming Gao <gaoliming@...> Tested-by: Liming Gao <gaoliming@...> Thanks Liming -----邮件原件----- 发件人: Yunhua Feng <fengyunhua@...> 发送时间: 2020年11月10日 10:41 收件人: devel@edk2.groups.io 抄送: Bob Feng <bob.c.feng@...>; Liming Gao <gaoliming@...>; Yuwei Chen <yuwei.chen@...> 主题: [PATCH] BaseTools: Fix BrotliCompress tool issue
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2946
This is the regression issue in BaseTools BrotliCompress after Brotli is changed to submodule. BrotliCompress should store the source size and scratch buffer size into the header of the compressed binary data. But now, BrotliCompress doesn't store them. So, BrotliDecompress can't work.
To fix this issue, BrotliCompress tool main() function should be provided. It needs to support the options of -e, -d, -o file, -g gap, -q level.
Cc: Bob Feng <bob.c.feng@...> Cc: Liming Gao <gaoliming@...> Cc: Yuwei Chen <yuwei.chen@...> Signed-off-by: Yunhua Feng <fengyunhua@...> --- .../WindowsLike/BrotliCompress.bat | 55 -- .../Source/C/BrotliCompress/BrotliCompress.c | 572 ++++++++++++++++++ BaseTools/Source/C/BrotliCompress/GNUmakefile | 4 +- BaseTools/Source/C/BrotliCompress/Makefile | 4 +- 4 files changed, 576 insertions(+), 59 deletions(-) delete mode 100644 BaseTools/BinWrappers/WindowsLike/BrotliCompress.bat create mode 100644 BaseTools/Source/C/BrotliCompress/BrotliCompress.c
diff --git a/BaseTools/BinWrappers/WindowsLike/BrotliCompress.bat b/BaseTools/BinWrappers/WindowsLike/BrotliCompress.bat deleted file mode 100644 index 788c99a130..0000000000 --- a/BaseTools/BinWrappers/WindowsLike/BrotliCompress.bat +++ /dev/null @@ -1,55 +0,0 @@ -@REM @file -@REM This script will exec Brotli tool with -e/-d options. -@REM -@REM Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR> -@REM SPDX-License-Identifier: BSD-2-Clause-Patent -@REM - -@echo off -@setlocal - -set QLT=-q 9 -w 22 -set ARGS= - -:Begin -if "%1"=="" goto End - -if "%1"=="-d" ( - set ARGS=%ARGS% %1 - shift - goto Begin -) - -if "%1"=="-e" ( - shift - goto Begin -) - -if "%1"=="-g" ( - set ARGS=%ARGS% %1 %2 - shift - shift - goto Begin -) - -if "%1"=="-o" ( - set ARGS=%ARGS% %1 %2 - shift - shift - goto Begin -) - -if "%1"=="-q" ( - set QLT=%1 %2 - shift - shift - goto Begin -) - -set ARGS=%ARGS% %1 -shift -goto Begin - -:End -Brotli %QLT% %ARGS% -@echo on diff --git a/BaseTools/Source/C/BrotliCompress/BrotliCompress.c b/BaseTools/Source/C/BrotliCompress/BrotliCompress.c new file mode 100644 index 0000000000..5a1400fda3 --- /dev/null +++ b/BaseTools/Source/C/BrotliCompress/BrotliCompress.c @@ -0,0 +1,572 @@ +/** @file + BrotliCompress Compress/Decompress tool (BrotliCompress) + + Copyright (c) 2020, ByoSoft Corporation. All rights reserved.<BR> + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +/* Command line interface for Brotli library. */ + +#include <errno.h> +#include <fcntl.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/stat.h> +#include <sys/types.h> +#include <time.h> + +#include "./brotli/c/common/constants.h" +#include "./brotli/c/common/version.h" +#include <brotli/decode.h> +#include <brotli/encode.h> + +#if !defined(_WIN32) +#include <unistd.h> +#include <utime.h> +#else +#include <io.h> +#include <share.h> +#include <sys/utime.h> + +#if !defined(__MINGW32__) +#define STDIN_FILENO _fileno(stdin) +#define STDOUT_FILENO _fileno(stdout) +#define S_IRUSR S_IREAD +#define S_IWUSR S_IWRITE +#endif + +#define fopen ms_fopen +#define open ms_open + +#if defined(_MSC_VER) && (_MSC_VER >= 1400) +#define fseek _fseeki64 +#define ftell _ftelli64 +#endif + +static FILE* ms_fopen(const char* FileName, const char* Mode) { + FILE* Result; + Result = NULL; + fopen_s(&Result, FileName, Mode); + return Result; +} + +static int ms_open(const char* FileName, int Oflag, int Pmode) { + int Result; + Result = -1; + _sopen_s(&Result, FileName, Oflag | O_BINARY, _SH_DENYNO, Pmode); + return Result; +} +#endif /* WIN32 */ + + +#ifndef _MAX_PATH +#define _MAX_PATH 500 +#endif + +#define DEFAULT_LGWIN 22 +#define DECODE_HEADER_SIZE 0x10 +#define GAP_MEM_BLOCK 0x1000 +size_t ScratchBufferSize = 0; +static const size_t kFileBufferSize = 1 << 19; + +static void Version(void) { + int Major; + int Minor; + int Patch; + Major = BROTLI_VERSION >> 24; + Minor = (BROTLI_VERSION >> 12) & 0xFFF; + Patch = BROTLI_VERSION & 0xFFF; + printf("BrotliCompress %d.%d.%d\n", Major, Minor, Patch); +} + +static void Usage() { + printf("Usage: %s [OPTION]... [FILE]...\n", __FILE__); + printf( +"Options:\n" +" -e, --compress compress\n" +" -d, --decompress decompress\n" +" -h, --help display this help and exit\n"); + printf( +" -o FILE, --output=FILE output file (only if 1 input file)\n"); + printf( +" -g NUM, --gap=NUM scratch memory gap level (1-16)\n"); + printf( +" -q NUM, --quality=NUM compression level (%d-%d)\n", + BROTLI_MIN_QUALITY, BROTLI_MAX_QUALITY); + printf( +" -v, --version display version and exit\n"); +} + +static int64_t FileSize(const char* Path) { + FILE *FileHandle; + int64_t RetVal; + FileHandle = fopen(Path, "rb"); + + if (FileHandle == NULL) { + printf ("Failed to open file [%s]\n", Path); + return -1; + } + if (fseek(FileHandle, 0L, SEEK_END) != 0) { + printf ("Failed to seek file [%s]\n", Path); + fclose(FileHandle); + return -1; + } + RetVal = ftell(FileHandle); + if (fclose(FileHandle) != 0) { + printf ("Failed to close file [%s]\n", Path); + return -1; + } + return RetVal; +} + +static BROTLI_BOOL HasMoreInput(FILE *FileHandle) { + return feof(FileHandle) ? BROTLI_FALSE : BROTLI_TRUE; +} + +int OpenFiles(char *InputFile, FILE **InHandle, char *OutputFile, FILE **OutHandle) { + *InHandle = NULL; + *OutHandle = NULL; + *InHandle = fopen(InputFile, "rb"); + if (*InHandle == NULL) { + printf("Failed to open input file [%s]\n", InputFile); + return BROTLI_FALSE; + } + + *OutHandle = fopen(OutputFile, "wb+"); + if (*OutHandle == NULL) { + printf("Failed to open output file [%s]\n", OutputFile); + fclose(*InHandle); + return BROTLI_FALSE; + } + return BROTLI_TRUE; +} + +int CompressFile(char *InputFile, uint8_t *InputBuffer, char *OutputFile, uint8_t *OutputBuffer, int Quality, int Gap) { + int64_t InputFileSize; + FILE *InputFileHandle; + FILE *OutputFileHandle; + BrotliEncoderState *EncodeState; + uint32_t LgWin; + BROTLI_BOOL IsEof; + size_t AvailableIn; + const uint8_t *NextIn; + size_t AvailableOut; + uint8_t *NextOut; + uint8_t *Input; + uint8_t *Output; + size_t OutSize; + uint32_t SizeHint; + BROTLI_BOOL IsOk; + AvailableIn = 0; + IsEof = BROTLI_FALSE; + Input = InputBuffer; + Output = OutputBuffer; + IsOk = BROTLI_TRUE; + LgWin = DEFAULT_LGWIN; + + InputFileSize = FileSize(InputFile); + + IsOk = OpenFiles(InputFile, &InputFileHandle, OutputFile, &OutputFileHandle); + if (!IsOk) { + return IsOk; + } + + fseek (OutputFileHandle, DECODE_HEADER_SIZE, SEEK_SET); + + EncodeState = BrotliEncoderCreateInstance(NULL, NULL, NULL); + if (!EncodeState) { + printf("Out of memory\n"); + IsOk = BROTLI_FALSE; + goto Finish; + } + BrotliEncoderSetParameter(EncodeState, BROTLI_PARAM_QUALITY, (uint32_t)Quality); + + if (InputFileSize >= 0) { + LgWin = BROTLI_MIN_WINDOW_BITS; + while (BROTLI_MAX_BACKWARD_LIMIT(LgWin) < InputFileSize) { + LgWin++; + if (LgWin == BROTLI_MAX_WINDOW_BITS) { + break; + } + } + } + BrotliEncoderSetParameter(EncodeState, BROTLI_PARAM_LGWIN, LgWin); + if (InputFileSize > 0) { + SizeHint = InputFileSize < (1 << 30)? (uint32_t)InputFileSize : (1u << 30); + BrotliEncoderSetParameter(EncodeState, BROTLI_PARAM_SIZE_HINT, SizeHint); + } + + AvailableIn = 0; + NextIn = NULL; + AvailableOut = kFileBufferSize; + NextOut = Output; + for (;;) { + if (AvailableIn == 0 && !IsEof) { + AvailableIn = fread(Input, 1, kFileBufferSize, InputFileHandle); + NextIn = Input; + if (ferror(InputFileHandle)) { + printf("Failed to read input [%s]\n", InputFile); + IsOk = BROTLI_FALSE; + goto Finish; + } + IsEof = !HasMoreInput(InputFileHandle); + } + + if (!BrotliEncoderCompressStream(EncodeState, + IsEof ? BROTLI_OPERATION_FINISH : BROTLI_OPERATION_PROCESS, + &AvailableIn, &NextIn, &AvailableOut, &NextOut, NULL)) { + printf("Failed to compress data [%s]\n", InputFile); + IsOk = BROTLI_FALSE; + goto Finish; + } + if (AvailableOut == 0) { + OutSize = (size_t)(NextOut - Output); + if (OutSize > 0) { + fwrite(Output, 1, OutSize, OutputFileHandle); + if (ferror(OutputFileHandle)) { + printf("Failed to write output [%s]\n", OutputFile); + IsOk = BROTLI_FALSE; + goto Finish; + } + } + AvailableOut = kFileBufferSize; + NextOut = Output; + } + if (BrotliEncoderIsFinished(EncodeState)) { + OutSize = (size_t)(NextOut - Output); + if (OutSize > 0) { + fwrite(Output, 1, OutSize, OutputFileHandle); + if (ferror(OutputFileHandle)) { + printf("Failed to write output [%s]\n", OutputFile); + IsOk = BROTLI_FALSE; + goto Finish; + } + AvailableOut = 0; + } + } + if (IsEof) { + break; + } + } + +Finish: + if (EncodeState) { + BrotliEncoderDestroyInstance(EncodeState); + } + if (InputFileHandle) { + fclose(InputFileHandle); + } + if (OutputFileHandle) { + fclose(OutputFileHandle); + } + return IsOk; +} + +/* Default BrotliAllocFunc */ +void* BrotliAllocFunc(void* Opaque, size_t Size) { + *(size_t *)Opaque = *(size_t *) Opaque + Size; + return malloc(Size); +} + +/* Default BrotliFreeFunc */ +void BrotliFreeFunc(void* Opaque, void* Address) { + free(Address); +} + +int DecompressFile(char *InputFile, uint8_t *InputBuffer, char *OutputFile, uint8_t *OutputBuffer, int Quality, int Gap) { + FILE *InputFileHandle; + FILE *OutputFileHandle; + BrotliDecoderState *DecoderState; + BrotliDecoderResult Result; + size_t AvailableIn; + const uint8_t *NextIn; + size_t AvailableOut; + uint8_t *NextOut; + uint8_t *Input; + uint8_t *Output; + size_t OutSize; + BROTLI_BOOL IsOk; + AvailableIn = 0; + Input = InputBuffer; + Output = OutputBuffer; + IsOk = BROTLI_TRUE; + + IsOk = OpenFiles(InputFile, &InputFileHandle, OutputFile, &OutputFileHandle); + if (!IsOk) { + return IsOk; + } + fseek(InputFileHandle, DECODE_HEADER_SIZE, SEEK_SET); + + DecoderState = BrotliDecoderCreateInstance(BrotliAllocFunc, BrotliFreeFunc, &ScratchBufferSize); + if (!DecoderState) { + printf("Out of memory\n"); + IsOk = BROTLI_FALSE; + goto Finish; + } + /* This allows decoding "large-window" streams. Though it creates + fragmentation (new builds decode streams that old builds don't), + it is better from used experience perspective. */ + BrotliDecoderSetParameter(DecoderState, BROTLI_DECODER_PARAM_LARGE_WINDOW, 1u); + + AvailableIn = 0; + NextIn = NULL; + AvailableOut = kFileBufferSize; + NextOut = Output; + Result = BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT; + for (;;) { + if (Result == BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT) { + if (!HasMoreInput(InputFileHandle)) { + printf("Corrupt input [%s]\n", InputFile); + IsOk = BROTLI_FALSE; + goto Finish; + } + AvailableIn = fread(Input, 1, kFileBufferSize, InputFileHandle); + NextIn = Input; + if (ferror(InputFileHandle)) { + printf("Failed to read input [%s]\n", InputFile); + IsOk = BROTLI_FALSE; + goto Finish; + } + } else if (Result == BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT) { + OutSize = (size_t) (NextOut - Output); + if (OutSize > 0) { + fwrite(Output, 1, OutSize, OutputFileHandle); + if (ferror(OutputFileHandle)) { + printf("Failed to write output [%s]\n", OutputFile); + IsOk = BROTLI_FALSE; + goto Finish; + } + } + AvailableOut = kFileBufferSize; + NextOut = Output; + } else if (Result == BROTLI_DECODER_RESULT_SUCCESS) { + OutSize = (size_t) (NextOut - Output); + if (OutSize > 0) { + fwrite(Output, 1, OutSize, OutputFileHandle); + if (ferror(OutputFileHandle)) { + printf("Failed to write output [%s]\n", OutputFile); + IsOk = BROTLI_FALSE; + goto Finish; + } + } + AvailableOut = 0; + if (AvailableIn != 0 || HasMoreInput(InputFileHandle)) { + printf("Corrupt input [%s]\n", InputFile); + IsOk = BROTLI_FALSE; + goto Finish; + } + } else { + printf("Corrupt input [%s]\n", InputFile); + IsOk = BROTLI_FALSE; + goto Finish; + } + if (!HasMoreInput(InputFileHandle) && Result == BROTLI_DECODER_RESULT_SUCCESS ) { + break; + } + Result = BrotliDecoderDecompressStream(DecoderState, &AvailableIn, &NextIn, &AvailableOut, &NextOut, 0); + } +Finish: + if (DecoderState) { + BrotliDecoderDestroyInstance(DecoderState); + } + if (InputFileHandle) { + fclose(InputFileHandle); + } + if (OutputFileHandle) { + fclose(OutputFileHandle); + } + return IsOk; +} + +int main(int argc, char** argv) { + BROTLI_BOOL CompressBool; + BROTLI_BOOL DecompressBool; + char *OutputFile; + char *InputFile; + char OutputTmpFile[_MAX_PATH]; + FILE *OutputHandle; + int Quality; + int Gap; + int OutputFileLength; + int InputFileLength; + int Ret; + size_t InputFileSize; + uint8_t *Buffer; + uint8_t *InputBuffer; + uint8_t *OutputBuffer; + int64_t Size; + + InputFile = NULL; + OutputFile = NULL; + CompressBool = BROTLI_FALSE; + DecompressBool = BROTLI_FALSE; + // + //Set default Quality and Gap + // + Quality = 9; + Gap = 1; + InputFileSize = 0; + Ret = 0; + + if (argc < 2) { + Usage(); + return 1; + } + if (strcmp(argv[1], "-h") == 0 || strcmp (argv[1], "--help") == 0 ) { + Usage(); + return 0; + } + if (strcmp(argv[1], "-v") == 0 || strcmp (argv[1], "--version") == 0 ) { + Version(); + return 0; + } + while (argc > 1) { + if (strcmp(argv[1], "-e") == 0 || strcmp(argv[1], "--compress") == 0 ) { + CompressBool = BROTLI_TRUE; + if (DecompressBool) { + printf("Can't use -e/--compress with -d/--decompess on the same time\n"); + return 1; + } + argc--; + argv++; + continue; + } + if (strcmp(argv[1], "-d") == 0 || strcmp(argv[1], "--decompress") == 0 ) { + DecompressBool = BROTLI_TRUE; + if (CompressBool) { + printf("Can't use -e/--compress with -d/--decompess on the same time\n"); + return 1; + } + argc--; + argv++; + continue; + } + if (strcmp(argv[1], "-o") == 0 || strncmp(argv[1], "--output", 8) == 0) { + if (strcmp(argv[1], "-o") == 0) { + OutputFileLength = strlen(argv[2]); + if (OutputFileLength > _MAX_PATH) { + printf ("The file path %s is too long\n", argv[2]); + return 1; + } + OutputFile = argv[2]; + if (OutputFile == NULL) { + fprintf(stderr, "Input file can't be null\n"); + return 1; + } + argc--; + argv++; + } else { + OutputFileLength = strlen(argv[1] - 9); + OutputFile = (char *)argv[1] + 9; + } + argc--; + argv++; + continue; + } + if (strcmp(argv[1], "-q") == 0 || strncmp(argv[1], "--quality", 9) == 0) { + if (strcmp(argv[1], "-q") == 0) { + Quality = strtol(argv[2], NULL, 16); + argc--; + argv++; + } else { + Quality = strtol((char *)argv[1] + 10, NULL, 16); + } + argc--; + argv++; + continue; + } + if (strcmp(argv[1], "-g") == 0 || strncmp(argv[1], "--gap", 5) == 0) { + if (strcmp(argv[1], "-g") == 0) { + Gap = strtol(argv[2], NULL, 16); + argc--; + argv++; + } else { + Gap = strtol((char *)argv[1] + 6, NULL, 16); + } + argc--; + argv++; + continue; + } + if (argc > 1) { + InputFileLength = strlen(argv[1]); + if (InputFileLength > _MAX_PATH - 1) { + printf ("The file path %s is too long\n", argv[2]); + return 1; + } + InputFile = argv[1]; + if (InputFile == NULL) { + printf("Input file can't be null\n"); + return 1; + } + argc--; + argv++; + } + } + + Buffer = (uint8_t*)malloc(kFileBufferSize * 2); + if (!Buffer) { + printf("Out of memory\n"); + goto Finish; + } + memset(Buffer, 0, kFileBufferSize*2); + InputBuffer = Buffer; + OutputBuffer = Buffer + kFileBufferSize; + if (CompressBool) { + // + // Compress file + // + Ret = CompressFile(InputFile, InputBuffer, OutputFile, OutputBuffer, Quality, Gap); + if (!Ret) { + printf ("Failed to compress file [%s]\n", InputFile); + goto Finish; + } + // + // Decompress file for get Outputfile size + // + strcpy (OutputTmpFile, OutputFile); + if (strlen(InputFile) + strlen(".tmp") < _MAX_PATH) { + strcat(OutputTmpFile, ".tmp"); + } else { + printf ("Output file path is too long[%s]\n", OutputFile); + Ret = BROTLI_FALSE; + goto Finish; + } + memset(Buffer, 0, kFileBufferSize*2); + Ret = DecompressFile(OutputFile, InputBuffer, OutputTmpFile, OutputBuffer, Quality, Gap); + if (!Ret) { + printf ("Failed to decompress file [%s]\n", OutputFile); + goto Finish; + } + remove (OutputTmpFile); + + // + // fill decoder header + // + InputFileSize = FileSize(InputFile); + Size = (int64_t)InputFileSize; + OutputHandle = fopen(OutputFile, "rb+"); /* open output_path file and add in head info */ + fwrite(&Size, 1, sizeof(int64_t), OutputHandle); + ScratchBufferSize += Gap * GAP_MEM_BLOCK; /* there is a memory gap between IA32 and X64 environment*/ + ScratchBufferSize += kFileBufferSize * 2; + Size = (int64_t) ScratchBufferSize; + fwrite(&Size, 1, sizeof(int64_t), OutputHandle); + if (fclose(OutputHandle) != 0) { + printf("Failed to close output file [%s]\n", OutputFile); + Ret = BROTLI_FALSE; + goto Finish; + } + } else { + Ret = DecompressFile(InputFile, InputBuffer, OutputFile, OutputBuffer, Quality, Gap); + if (!Ret) { + printf ("Failed to decompress file [%s]\n", InputFile); + goto Finish; + } + } + Finish: + if (Buffer != NULL) { + free (Buffer); + } + return !Ret; +} diff --git a/BaseTools/Source/C/BrotliCompress/GNUmakefile b/BaseTools/Source/C/BrotliCompress/GNUmakefile index 9544837263..b150e5dd2b 100644 --- a/BaseTools/Source/C/BrotliCompress/GNUmakefile +++ b/BaseTools/Source/C/BrotliCompress/GNUmakefile @@ -6,10 +6,10 @@ # MAKEROOT ?= ..
-APPNAME = Brotli +APPNAME = BrotliCompress
OBJECTS = \ - brotli/c/tools/brotli.o \ + BrotliCompress.o \ brotli/c/common/dictionary.o \ brotli/c/common/transform.o \ brotli/c/dec/bit_reader.o \ diff --git a/BaseTools/Source/C/BrotliCompress/Makefile b/BaseTools/Source/C/BrotliCompress/Makefile index b805ff1e58..038d1ec242 100644 --- a/BaseTools/Source/C/BrotliCompress/Makefile +++ b/BaseTools/Source/C/BrotliCompress/Makefile @@ -9,7 +9,7 @@ INC = -I .\brotli\c\include $(INC) CFLAGS = $(CFLAGS) /W2
-APPNAME = Brotli +APPNAME = BrotliCompress
#LIBS = $(LIB_PATH)\Common.lib
@@ -40,7 +40,7 @@ ENC_OBJ = \ brotli\c\enc\utf8_util.obj
OBJECTS = \ - brotli\c\tools\brotli.obj \ + BrotliCompress.obj \ $(COMMON_OBJ) \ $(DEC_OBJ) \ $(ENC_OBJ) -- 2.27.0.windows.1
|
|
Re: [PATCH] RedfishPkg: Use DSC include file
Reviewed-by: Nickle Wang <nickle.wang@...>
toggle quoted messageShow quoted text
-----Original Message----- From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Abner Chang Sent: Thursday, November 12, 2020 8:44 AM To: devel@edk2.groups.io Cc: Wang, Nickle (HPS SW) <nickle.wang@...>; O'Hanley, Peter (EXL) <peter.ohanley@...> Subject: [edk2-devel] [PATCH] RedfishPkg: Use DSC include file
- Include Redfish.dsc.inc in RedfishPkg.dsc. which consolidates the necessary components in Redfish.dsc.inc. - Remove unnecessary library instances from RedfishPkg.dsc. - Add build option in RedfishPkg.yaml.
Signed-off-by: Abner Chang <abner.chang@...> Cc: Nickle Wang <nickle.wang@...> Cc: Peter O'Hanley <peter.ohanley@...> --- RedfishPkg/RedfishPkg.ci.yaml | 3 ++- RedfishPkg/RedfishPkg.dsc | 10 +--------- 2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/RedfishPkg/RedfishPkg.ci.yaml b/RedfishPkg/RedfishPkg.ci.yaml index bb3b8b6746..20c297ad22 100644 --- a/RedfishPkg/RedfishPkg.ci.yaml +++ b/RedfishPkg/RedfishPkg.ci.yaml @@ -63,6 +63,7 @@ },
"Defines": { - "BLD_*_CONTINUOUS_INTEGRATION": "TRUE" + "BLD_*_CONTINUOUS_INTEGRATION": "TRUE", + "BLD_*_REDFISH_ENABLE": "TRUE" } } diff --git a/RedfishPkg/RedfishPkg.dsc b/RedfishPkg/RedfishPkg.dsc index c6e79f5645..94e7127bc6 100644 --- a/RedfishPkg/RedfishPkg.dsc +++ b/RedfishPkg/RedfishPkg.dsc @@ -23,21 +23,14 @@
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBo otServicesTableLib.inf UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib /UefiRuntimeServicesTableLib.inf - UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemo ryAllocationLib.inf DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf BaseLib|MdePkg/Library/BaseLib/BaseLib.inf BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf - SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchroniz ationLib.inf PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf DebugLib|MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/Bas eDebugPrintErrorLevelLib.inf - PostCodeLib|MdePkg/Library/BasePostCodeLibPort80/BasePostCodeLibPort 80.inf PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf - PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/Base PeCoffGetEntryPointLib.inf - DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTabl eLib.inf - DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf - ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/Dx eReportStatusCodeLib.inf
RedfishPlatformHostInterfaceLib|RedfishPkg/Library/PlatformHostInterface LibNull/PlatformHostInterfaceLibNull.inf
[LibraryClasses.ARM, LibraryClasses.AARCH64] @@ -51,5 +44,4 @@ [Components]
RedfishPkg/Library/PlatformHostInterfaceLibNull/PlatformHostInterfaceLibN ull.inf
- RedfishPkg/RestJsonStructureDxe/RestJsonStructureDxe.inf - RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.inf + !include RedfishPkg/Redfish.dsc.inc -- 2.17.1
|
|
回复: [edk2-devel] [VFR REST_STYLE PATCH v2 1/1] VfrSpecification: Add REST_STYLE
Reviewed-by: Liming Gao <gaoliming@...> -----邮件原件----- 发件人: bounce+27952+67207+4905953+8761045@groups.io <bounce+27952+67207+4905953+8761045@groups.io> 代表 Abner Chang 发送时间: 2020年11月10日 9:46 收件人: devel@edk2.groups.io 抄送: abner.chang@...; Liming Gao <gaoliming@...>; Dandan Bi <dandan.bi@...>; Nickle Wang <nickle.wang@...>; Peter O'Hanley <peter.ohanley@...> 主题: [edk2-devel] [VFR REST_STYLE PATCH v2 1/1] VfrSpecification: Add REST_STYLE
Add REST_STYLE to question flag
Signed-off-by: Abner Chang <abner.chang@...>
Cc: Liming Gao <gaoliming@...> Cc: Dandan Bi <dandan.bi@...> Cc: Nickle Wang <nickle.wang@...> Cc: Peter O'Hanley <peter.ohanley@...> --- 2_vfr_description_in_bnf/210_vfr_general_token_definition.md | 2 ++ 2_vfr_description_in_bnf/211_vfr_form_definition.md | 2 ++ 2 files changed, 4 insertions(+)
diff --git a/2_vfr_description_in_bnf/210_vfr_general_token_definition.md b/2_vfr_description_in_bnf/210_vfr_general_token_definition.md index 7dc42f0..48057f5 100644 --- a/2_vfr_description_in_bnf/210_vfr_general_token_definition.md +++ b/2_vfr_description_in_bnf/210_vfr_general_token_definition.md @@ -2,6 +2,7 @@ 2.10 VFR General Token Definition
Copyright (c) 2007-2017, Intel Corporation. All rights reserved.<BR> + (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
Redistribution and use in source (original document form) and 'compiled' forms (converted to PDF, epub, HTML and other formats) with or without @@ -117,6 +118,7 @@ questionheaderFlagsField ::= | "INTERACTIVE" | "RESET_REQUIRED" | "OPTIONS_ONLY" + | "REST_STYLE"
vfrStorageVarId ::= ( StringIdentifier "[" Number "]" ) diff --git a/2_vfr_description_in_bnf/211_vfr_form_definition.md b/2_vfr_description_in_bnf/211_vfr_form_definition.md index 2e63bdf..238436b 100644 --- a/2_vfr_description_in_bnf/211_vfr_form_definition.md +++ b/2_vfr_description_in_bnf/211_vfr_form_definition.md @@ -2,6 +2,7 @@ 2.11 VFR Form Definition
Copyright (c) 2007-2017, Intel Corporation. All rights reserved.<BR> + (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
Redistribution and use in source (original document form) and 'compiled' forms (converted to PDF, epub, HTML and other formats) with or without @@ -786,6 +787,7 @@ oneofoptionFlagsField ::= | "INTERACTIVE" | "RESET_REQUIRED" | "DEFAULT" + | "REST_STYLE" ```
#### BEHAVIORS AND RESTRICTIONS -- 2.21.0.windows.1
|
|
[PATCH v2] NetworkPkg: Add NETWORK_HTTP_ENABLE macro

Abner Chang
BZ:2917
Add NETWORK_HTTP_ENABLE macro and separate HttpDxe and HttpUtilitiesDxe drivers from HTTP_NETWORK_HTTP_BOOT_ENABLE macro.
Current NETWORK_HTTP_BOOT_ENABLE macro is defined to enable HTTP boot feature in POST, this macro is not only enabling HTTP Boot related modules but also enabling other generic HTTP modules such as HttpDxe, HttpUtilitiesDxe and DnsDxe. These HTTP base drivers would not be only used by HTTP boot when we introduce the use case of Redfish implementation over HTTP to edk2. We should have a dedicate macro to enable generic HTTP functions on Network stack and additionally provide NETWORK_HTTP_BOOT_ENABLE for HTTP boot functionality for the use case that platform doesn't require HTTP boot.
Signed-off-by: Abner Chang <abner.chang@...> Cc: Maciej Rabeda <maciej.rabeda@...> Cc: Jiaxin Wu <jiaxin.wu@...> Cc: Siyuan Fu <siyuan.fu@...> Cc: Laszlo Ersek <lersek@...> Cc: Nickle Wang <nickle.wang@...> Cc: Peter O'Hanley <peter.ohanley@...> --- NetworkPkg/Network.fdf.inc | 5 ++++- NetworkPkg/NetworkComponents.dsc.inc | 5 ++++- NetworkPkg/NetworkDefines.dsc.inc | 9 +++++++++ NetworkPkg/NetworkPkg.ci.yaml | 1 + 4 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/NetworkPkg/Network.fdf.inc b/NetworkPkg/Network.fdf.inc index 803a0d64fd..8a662ad1de 100644 --- a/NetworkPkg/Network.fdf.inc +++ b/NetworkPkg/Network.fdf.inc @@ -46,10 +46,13 @@ INF NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf !endif - !if $(NETWORK_HTTP_BOOT_ENABLE) == TRUE + !if ($(NETWORK_HTTP_BOOT_ENABLE) == TRUE) OR ($(NETWORK_HTTP_ENABLE) == TRUE) INF NetworkPkg/DnsDxe/DnsDxe.inf INF NetworkPkg/HttpDxe/HttpDxe.inf INF NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf + !endif + + !if $(NETWORK_HTTP_BOOT_ENABLE) == TRUE INF NetworkPkg/HttpBootDxe/HttpBootDxe.inf !endif diff --git a/NetworkPkg/NetworkComponents.dsc.inc b/NetworkPkg/NetworkComponents.dsc.inc index 40cb8ee18e..21cb62082f 100644 --- a/NetworkPkg/NetworkComponents.dsc.inc +++ b/NetworkPkg/NetworkComponents.dsc.inc @@ -48,10 +48,13 @@ NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf !endif - !if $(NETWORK_HTTP_BOOT_ENABLE) == TRUE + !if ($(NETWORK_HTTP_BOOT_ENABLE) == TRUE) OR ($(NETWORK_HTTP_ENABLE) == TRUE) NetworkPkg/DnsDxe/DnsDxe.inf NetworkPkg/HttpDxe/HttpDxe.inf NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf + !endif + + !if $(NETWORK_HTTP_BOOT_ENABLE) == TRUE NetworkPkg/HttpBootDxe/HttpBootDxe.inf !endif diff --git a/NetworkPkg/NetworkDefines.dsc.inc b/NetworkPkg/NetworkDefines.dsc.inc index a442d1b157..6f274582a8 100644 --- a/NetworkPkg/NetworkDefines.dsc.inc +++ b/NetworkPkg/NetworkDefines.dsc.inc @@ -15,12 +15,14 @@ # DEFINE NETWORK_IP4_ENABLE = TRUE # DEFINE NETWORK_IP6_ENABLE = TRUE # DEFINE NETWORK_TLS_ENABLE = TRUE +# DEFINE NETWORK_HTTP_ENABLE = TRUE # DEFINE NETWORK_HTTP_BOOT_ENABLE = TRUE # DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE # DEFINE NETWORK_ISCSI_ENABLE = TRUE # DEFINE NETWORK_VLAN_ENABLE = TRUE # # Copyright (c) 2019, Intel Corporation. All rights reserved.<BR> +# (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR> # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -73,6 +75,13 @@ DEFINE NETWORK_TLS_ENABLE = TRUE !endif +!ifndef NETWORK_HTTP_ENABLE + # + # This flag is to enable or disable HTTP(S) feature. + # + DEFINE NETWORK_HTTP_ENABLE = TRUE +!endif + !ifndef NETWORK_HTTP_BOOT_ENABLE # # This flag is to enable or disable HTTP(S) boot feature. diff --git a/NetworkPkg/NetworkPkg.ci.yaml b/NetworkPkg/NetworkPkg.ci.yaml index 1a3ab71792..66b74cfe9a 100644 --- a/NetworkPkg/NetworkPkg.ci.yaml +++ b/NetworkPkg/NetworkPkg.ci.yaml @@ -71,6 +71,7 @@ "BLD_*_NETWORK_IP4_ENABLE": "TRUE", "BLD_*_NETWORK_IP6_ENABLE": "TRUE", "BLD_*_NETWORK_TLS_ENABLE": "TRUE", + "BLD_*_NETWORK_HTTP_ENABLE": "TRUE", "BLD_*_NETWORK_HTTP_BOOT_ENABLE": "TRUE", "BLD_*_NETWORK_ISCSI_ENABLE": "TRUE", } -- 2.17.1
|
|