[edk2] [PATCH v2 2/5] MdeModulePkg/DxeCapsuleLibFmp: permit ProcessCapsules () to be called once

2018-06-07 Thread Ard Biesheuvel
Permit ProcessCapsules () to be called only a single time, after EndOfDxe. This allows platforms that are able to update system firmware after EndOfDxe (e.g., because the flash ROM is not locked down) to do so at a time when a non-trusted console is up and running, and progress can be reported to t

[edk2] [PATCH v2 5/5] ArmPkg/ArmSmcPsciResetSystemLib: implement fallback for warm reboot

2018-06-07 Thread Ard Biesheuvel
Implement ResetSystemLib's EnterS3WithImmediateWake() routine using a jump back to the PEI entry point with interrupts and MMU+caches disabled. This is only possible at boot time, when we are sure that the current CPU is the only one up and running. Also, it depends on the platform whether the PEI

[edk2] [PATCH v2 4/5] ArmPkg/PlatformBootManagerLib: call ProcessCapsules() only once

2018-06-07 Thread Ard Biesheuvel
ARM platforms have no restriction on when a system firmware update capsule can be applied, and so it is not necessary to call ProcessCapsules() twice. So let's drop the first invocation that occurs before EndOfDxe, so that capsule updates will be applied when the console is up and able to provide p

[edk2] [PATCH v2 3/5] MdeModulePkg/DxeCapsuleLibFmp: pass progress callback only if it works

2018-06-07 Thread Ard Biesheuvel
If the first call to UpdateImageProgress() fails, there is no point in passing a pointer to it to Fmp->SetImage(), since it is highly unlikely to succeed on any subsequent calls. This permits the FMP implementation to fall back to an alternate means of providing feedback to the user, e.g., via the

[edk2] [PATCH v2 1/5] MdeModulePkg/CapsulePei: clean Dcache before consuming capsule data

2018-06-07 Thread Ard Biesheuvel
When capsule updates are staged for processing after a warm reboot, they are copied into memory with the MMU and caches enabled. When the capsule PEI gets around to coalescing the capsule, the MMU and caches may still be disabled, and so on architectures where uncached accesses are incoherent with

[edk2] [PATCH v2 0/5] MdeModulePkg ArmPkg: support for persistent capsules and progress reporting

2018-06-07 Thread Ard Biesheuvel
This is the delta of code required to implement PersistAcrossReset on ARM systems, and to wire up the capsule handling routines in a way that makes the new progress reporting code do something meaningful on such platforms. Changes since v1: - incorporate Star's feedback (#1, #2) - add Leif's ack (

Re: [edk2] [PATCH 2/5] MdeModulePkg/DxeCapsuleLibFmp: permit ProcessCapsules () to be called once

2018-06-07 Thread Ard Biesheuvel
On 8 June 2018 at 04:57, Zeng, Star wrote: > Without the patch, PopulateCapsuleInConfigurationTable is only run at first > round. > With the patch, PopulateCapsuleInConfigurationTable is only run at last round. > > Is that expected? > Yes. Otherwise, I need two global BOOLEANs to keep track of t

Re: [edk2] [PATCH 1/5] MdeModulePkg/CapsulePei: clean Dcache before consuming capsule data

2018-06-07 Thread Ard Biesheuvel
On 8 June 2018 at 08:21, Zeng, Star wrote: > My thought is like below, FYR. > Thanks. That works for me. I will update the patch. > === > 8bf218e00d8bd5c4f01c83f3d16c636140d32fda > .../Universal/CapsulePei/Common/CapsuleCoalesce.c | 37 > ++

Re: [edk2] [PATCH 1/5] MdeModulePkg/CapsulePei: clean Dcache before consuming capsule data

2018-06-07 Thread Zeng, Star
My thought is like below, FYR. === 8bf218e00d8bd5c4f01c83f3d16c636140d32fda .../Universal/CapsulePei/Common/CapsuleCoalesce.c | 37 +++--- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/MdeModulePkg/Universal/Capsul

Re: [edk2] [PATCH 1/5] MdeModulePkg/CapsulePei: clean Dcache before consuming capsule data

2018-06-07 Thread Ard Biesheuvel
On 8 June 2018 at 04:53, Zeng, Star wrote: > I suggest to use goto/adjust code to have one place for both paths to perform > cache maintenance (with comments). > Something like this? @@ -253,6 +254,7 @@ ValidateCapsuleByMemoryResource ( ) { UINTN Index; + BOOLEAN F

Re: [edk2] [PATCH] CorebootModulePkg/CbSupportDxe: Remove SCI_EN setting

2018-06-07 Thread You, Benjamin
Hi Matt, Thanks. I've submitted patch v2 based on your feedbacks. - ben > From: Matt Delco [mailto:de...@google.com] > Sent: Friday, June 8, 2018 1:07 AM > To: Ma, Maurice > Cc: You, Benjamin ; Agyeman, Prince > ; edk2-devel@lists.01.org > Subject: Re: [PATCH] CorebootModulePkg/CbSupportDxe:

[edk2] [PATCH v2] CorebootModulePkg/CbSupportDxe: Remove SCI_EN setting

2018-06-07 Thread Benjamin You
Current implemenation sets PM1_CNT.SCI_EN bit at ReadyToBoot event. However, this should not be done because this causes OS to skip triggering FADT.SMI_CMD, which leads to the functions implemented in the SMI handler being omitted. This issue was identified by Matt Delco . The fix does the follow

Re: [edk2] [PATCH v2] BaseTools/GenFw: Add X64 GOTPCREL Support to GenFw

2018-06-07 Thread Andrew Fish
Zenith, Stupid question, I'm not trying to derail the code review. In a static lib world like EFI, I can't figure out why we need support for GOT PC REL addressing modes? I say that as I would think they would be relocation entries in object files, and then the final link would happen and t

Re: [edk2] [Patch] BaseTools: Fix Section header size larger than elf file size bug

2018-06-07 Thread Gao, Liming
Reviewed-by: Liming Gao > -Original Message- > From: Zhu, Yonghong > Sent: Thursday, June 7, 2018 10:09 AM > To: edk2-devel@lists.01.org > Cc: Feng, YunhuaX ; Gao, Liming > Subject: [Patch] BaseTools: Fix Section header size larger than elf file size > bug > > From: Yunhua Feng > > A

Re: [edk2] [Patch] BaseTools: Check elf sections alignment with MAX_COFF_ALIGNMENT

2018-06-07 Thread Gao, Liming
Reviewed-by: Liming Gao > -Original Message- > From: Zhu, Yonghong > Sent: Thursday, June 7, 2018 10:03 AM > To: edk2-devel@lists.01.org > Cc: Feng, YunhuaX ; Gao, Liming > Subject: [Patch] BaseTools: Check elf sections alignment with > MAX_COFF_ALIGNMENT > > From: Yunhua Feng > > Ad

Re: [edk2] [PATCH] MdeModulePkg/EmmcDxe: demote DEBUG print to DEBUG_BLKIO

2018-06-07 Thread Zeng, Star
Good patch. Another choice is to use DEBUG_VERBOSE. We see other driver uses DEBUG_VERBOSE for BlockIo service (Hao can comment on that). We'd better to align them for consistency. Thanks, Star -Original Message- From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Friday, June 8, 2018

Re: [edk2] [PATCH 2/5] MdeModulePkg/DxeCapsuleLibFmp: permit ProcessCapsules () to be called once

2018-06-07 Thread Zeng, Star
Without the patch, PopulateCapsuleInConfigurationTable is only run at first round. With the patch, PopulateCapsuleInConfigurationTable is only run at last round. Is that expected? Jiewen, could you help check whether the patch meets the original design purpose or any security concern? Thanks,

Re: [edk2] [PATCH 1/5] MdeModulePkg/CapsulePei: clean Dcache before consuming capsule data

2018-06-07 Thread Zeng, Star
I suggest to use goto/adjust code to have one place for both paths to perform cache maintenance (with comments). Thanks, Star -Original Message- From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] Sent: Thursday, June 7, 2018 7:08 PM To: edk2-devel@lists.01.org Cc: leif.lindh...@lin

[edk2] [Patch] BaseTools/UPT: Update the import statement to use StringUtils

2018-06-07 Thread Yonghong Zhu
The patch 5a57246eab80 Rename String to StringUtils, but it didn't update the UPT Tool for the import statement which cause UPT tool break. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/UPT/GenMetaFile/GenDecFile.py | 4 ++--

Re: [edk2] [PATCH] BaseTools/GenFw: Add X64 GOTPCREL Support to GenFw

2018-06-07 Thread Shi, Steven
Next week is OK, take your time. I appreciate the test cases with build steps, thanks! BTW, I'm not sure where is the right place in edk2 to submit a patch's test cases, but I do welcome the test case contribution. Steven Shi Intel\SSG\STO\UEFI Firmware Tel: +86 021-61166522 iNet: 821-6522 >

Re: [edk2] OSFC 2018

2018-06-07 Thread Philipp Deppenwiese
Yes. On 07.06.2018 17:56, Rafael Machado wrote: > Nice initiative! > > Will the presentations be recorded and posted at youtube? > > Thanks > Rafael R. Machado > > Em ter, 5 de jun de 2018 às 09:10, Philipp Deppenwiese > mailto:zaolin.dais...@gmail.com>> escreveu: > > Dear Ladies and Gentleme

Re: [edk2] [PATCH] MdeModulePkg/EmmcDxe: demote DEBUG print to DEBUG_BLKIO

2018-06-07 Thread Laszlo Ersek
On 06/07/18 11:10, Ard Biesheuvel wrote: > Lower the priority of the DEBUG print in EmmcReadWrite(), which > is emitted for each read or write operation to the eMMC device, > which clutters up the log output of builds created with DEBUG_INFO > enabled. > > Suggested-by: Pipat Methavanitpong > Con

Re: [edk2] [PATCH] MdePkg/BaseIoLibIntrinsic: make BaseIoLibIntrinsic safe for ArmVirt/KVM

2018-06-07 Thread Laszlo Ersek
On 06/07/18 12:46, Ard Biesheuvel wrote: > KVM on ARM refuses to decode load/store instructions used to perform > I/O to emulated devices, and instead relies on the exception syndrome > information to describe the operand register, access size, etc. > This is only possible for instructions that hav

Re: [edk2] [PATCH] CorebootModulePkg/CbSupportDxe: Remove SCI_EN setting

2018-06-07 Thread Matt Delco
Thanks for working on this. I did a quick test to confirm that things still work okay. The code change looks fine though there's some optional optimizations to consider: The new code added to CbParseFadtInfo() is mostly to add debug checks but I think it'll still result in a IO port access in a

Re: [edk2] [PATCH] ArmPkg/ArmDisassemblerLib: fix check for MSR instruction

2018-06-07 Thread Michael Zimmermann
yes I'll do that next time. Thanks for the hint. Thanks Michael On Thu, Jun 7, 2018 at 9:10 AM Ard Biesheuvel wrote: > > On 7 June 2018 at 07:08, Michael Zimmermann wrote: > > CC the arm maintainers > > On Thu, Jun 7, 2018 at 7:07 AM Michael Zimmermann > > wrote: > >> > >> From: M1cha > >> > >

Re: [edk2] [PATCH] ArmPkg/CompilerIntrinsicsLib: fix GCC8 warning for __aeabi_memcpy aliases

2018-06-07 Thread Michael Zimmermann
Hi Ard, yes that fixes the problem too and looks much better, thx! On Thu, Jun 7, 2018 at 9:05 AM Ard Biesheuvel wrote: > > On 7 June 2018 at 07:47, Michael Zimmermann wrote: > > This was the warning(shown for __aeabi_memcpy, __aeabi_memcpy4 and > > __aeabi_memcpy8): > > ArmPkg/Library/Compiler

Re: [edk2] [PATCH] MdePkg/BaseIoLibIntrinsic: make BaseIoLibIntrinsic safe for ArmVirt/KVM

2018-06-07 Thread Laszlo Ersek
On 06/07/18 17:09, Ard Biesheuvel wrote: > On 7 June 2018 at 17:08, Gao, Liming wrote: >> Ard: >> If this library instance is specific to ARM emulator with KVM, how about >> add it into ArmVirtPkg? >> > > Laszlo, do you want to take this question? Certainly. Liming, in commit b6d11d7c4678, w

Re: [edk2] [PATCH] MdePkg/BaseIoLibIntrinsic: make BaseIoLibIntrinsic safe for ArmVirt/KVM

2018-06-07 Thread Leif Lindholm
This addresses all of the items I mentioned in my review of the previous solution to this problem, so for me: Reviewed-by: Leif Lindholm On Thu, Jun 07, 2018 at 12:46:45PM +0200, Ard Biesheuvel wrote: > KVM on ARM refuses to decode load/store instructions used to perform > I/O to emulated device

Re: [edk2] [PATCH edk2-platforms 0/2] DeveloperBox: prepare for expanding the capsule payload

2018-06-07 Thread Ard Biesheuvel
On 7 June 2018 at 17:08, Ard Biesheuvel wrote: > We intend to start distributing firmware update capsules that include the SCP > firmware partition. In order to allow for more flexibility regarding whether > a capsule contains this piece or not, update the flash access routines and > the flash par

Re: [edk2] OSFC 2018

2018-06-07 Thread Rafael Machado
Nice initiative! Will the presentations be recorded and posted at youtube? Thanks Rafael R. Machado Em ter, 5 de jun de 2018 às 09:10, Philipp Deppenwiese < zaolin.dais...@gmail.com> escreveu: > Dear Ladies and Gentlemen, > > We invite you to the Open Source Firmware Conference 2018 > ( www.osf

Re: [edk2] [Patch] CryptoPkg PeiCryptLib: Enable SHA384/512 support

2018-06-07 Thread Long, Qin
Hi, Chao, The update from NULL to real wrapper looks good to me. Please also update the "Note" part in this INF's comment before your commit, since SHA384/512 was noted as "not supported" before. Reviewed-by: Long Qin Best Regards & Thanks, LONG, Qin > -Original Message- > From: edk

Re: [edk2] [PATCH] CorebootModulePkg/CbSupportDxe: Remove SCI_EN setting

2018-06-07 Thread Ma, Maurice
It looks good to me. Reviewed-by: Maurice Ma -Original Message- From: You, Benjamin Sent: Thursday, June 7, 2018 1:19 To: edk2-devel@lists.01.org Cc: Ma, Maurice ; Agyeman, Prince ; de...@google.com Subject: [PATCH] CorebootModulePkg/CbSupportDxe: Remove SCI_EN setting Current impleme

Re: [edk2] [PATCH] MdePkg/BaseIoLibIntrinsic: make BaseIoLibIntrinsic safe for ArmVirt/KVM

2018-06-07 Thread Ard Biesheuvel
On 7 June 2018 at 17:08, Gao, Liming wrote: > Ard: > If this library instance is specific to ARM emulator with KVM, how about > add it into ArmVirtPkg? > Laszlo, do you want to take this question? >> -Original Message- >> From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] >> Sen

Re: [edk2] [PATCH] MdePkg/BaseIoLibIntrinsic: make BaseIoLibIntrinsic safe for ArmVirt/KVM

2018-06-07 Thread Gao, Liming
Ard: If this library instance is specific to ARM emulator with KVM, how about add it into ArmVirtPkg? Thanks Liming > -Original Message- > From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] > Sent: Thursday, June 7, 2018 6:47 PM > To: edk2-devel@lists.01.org > Cc: ler...@redhat.com

[edk2] [PATCH edk2-platforms 2/2] Silicon/NorFlashSynQuacerLib: describe entire firmware region as FV

2018-06-07 Thread Ard Biesheuvel
In order to allow for more flexibility when updating parts of the firmware via capsule update, expand the description of the code FV to cover the entire 4 MB region at the base of the NOR flash. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- Silicon/Soc

[edk2] [PATCH edk2-platforms 0/2] DeveloperBox: prepare for expanding the capsule payload

2018-06-07 Thread Ard Biesheuvel
We intend to start distributing firmware update capsules that include the SCP firmware partition. In order to allow for more flexibility regarding whether a capsule contains this piece or not, update the flash access routines and the flash partition descriptions so we can update any part of the fir

[edk2] [PATCH edk2-platforms 1/2] Silicon/SynQuacerPlatformFlashAccessLib: relax FV address check

2018-06-07 Thread Ard Biesheuvel
In commit 913fdda9f4b9 ("Silicon/SynQuacerPlatformFlashAccessLib: don't dereference FVB header fields"), we dropped all accesses to FVB header field, which was necessary because the flash partition may not in fact contain such a header. Instead, only an exact match on the base address of the FV com

Re: [edk2] [PATCH 4/5] ArmPkg/PlatformBootManagerLib: call ProcessCapsules() only once

2018-06-07 Thread Leif Lindholm
On Thu, Jun 07, 2018 at 01:08:11PM +0200, Ard Biesheuvel wrote: > ARM platforms have no restriction on when a system firmware update > capsule can be applied, and so it is not necessary to call > ProcessCapsules() twice. So let's drop the first invocation that > occurs before EndOfDxe, so that caps

Re: [edk2] [PATCH] ArmPkg/ArmSmcPsciResetSystemLib: implement fallback for warm reboot

2018-06-07 Thread Leif Lindholm
On Thu, Jun 07, 2018 at 08:57:04AM +0200, Ard Biesheuvel wrote: > On 6 June 2018 at 15:29, Laszlo Ersek wrote: > > On 06/06/18 14:37, Ard Biesheuvel wrote: > >> Implement ResetSystemLib's EnterS3WithImmediateWake() routine using > >> a jump back to the PEI entry point with interrupts and MMU+cache

[edk2] [Patch] CryptoPkg PeiCryptLib: Enable SHA384/512 support

2018-06-07 Thread Zhang, Chao B
Enable SHA384/512 support in PEI phase. Cc: Long Qin Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chao Zhang Signed-off-by: Zhang, Chao B --- CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CryptoP

Re: [edk2] [platforms PATCH 1/1] Marvell/Drivers: Pp2Dxe: Fix cleaning of the BM pools

2018-06-07 Thread Ard Biesheuvel
On 7 June 2018 at 14:55, Marcin Wojtas wrote: > Hitherto mechanism of using static flag indicating > Buffer Manager disabled state was wrong and resulted > in cleaning only one controller's pools. This caused > bad page state when OS booted and attempted to > use the buffers. > > This patch implem

[edk2] [platforms PATCH 1/1] Marvell/Drivers: Pp2Dxe: Fix cleaning of the BM pools

2018-06-07 Thread Marcin Wojtas
Hitherto mechanism of using static flag indicating Buffer Manager disabled state was wrong and resulted in cleaning only one controller's pools. This caused bad page state when OS booted and attempted to use the buffers. This patch implements a fix, ensuring all controllers will clean the Buffer M

[edk2] [PATCH v2] BaseTools/GenFw: Add X64 GOTPCREL Support to GenFw

2018-06-07 Thread Zenith432
Adds support for the following X64 ELF relocations to GenFw R_X86_64_GOTPCREL R_X86_64_GOTPCRELX R_X86_64_REX_GOTPCRELX CC: Shi Steven CC: Yonghong Zhu CC: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zenith432 --- BaseTools/Source/C/GenFw/Elf64Conv

Re: [edk2] [PATCH] BaseTools/GenFw: Add X64 GOTPCREL Support to GenFw

2018-06-07 Thread Zenith432
There is a mistake in sign in the patch I posted = diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/GenFw/Elf64Convert.c --- a/BaseTools/Source/C/GenFw/Elf64Convert.c +++ b/BaseTools/Source/C/GenFw/Elf64Convert.c @@ -962,7 +962,7 @@ WriteSections64 ( Verb

[edk2] [PATCH edk2-platforms 2/3] Platform/Socionext/DeveloperBox: switch to PersistAcrossReset capsules

2018-06-07 Thread Ard Biesheuvel
Switch to the more common flavor of firmware update capsules that are only staged by the UpdateCapsule() service, and dispatched and processed after a warm reboot. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- Platform/Socionext/DeveloperBox/DeveloperB

[edk2] [PATCH edk2-platforms 3/3] Silicon/SynQuacerPlatformFlashAccessLib: replace progress indication

2018-06-07 Thread Ard Biesheuvel
Replace the home cooked progress indication with calls into the new (*Progress)() argument to PerformFlashWriteWithProgress(), which allows the flash access routine to report progress via a platform provided callback. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesh

[edk2] [PATCH edk2-platforms 0/3] DeveloperBox capsule update changes for progress reporting

2018-06-07 Thread Ard Biesheuvel
These patches reimplement graphical progress reporting during capsule update. They depend on MdeModulePkg and ArmPkg changes currently under review. Patch #1 adds support for dispatching PersistAcrossReset capsules. This requires a warm reboot implementation which is being proposed for ArmPkg. Pa

[edk2] [PATCH edk2-platforms 1/3] Platform/Socionext/DeveloperBox: add support for persistent capsules

2018-06-07 Thread Ard Biesheuvel
Add support for PersistAcrossReset capsules, by setting the associated PCD, and by enabling the warm reboot implementation that reenters PEI with interrupts, caches and MMU disabled. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- Platform/Socionext/Deve

Re: [edk2] [PATCH edk2-platforms 00/12] Hisilicon/D0x: Switch to generic PciHostBridge

2018-06-07 Thread Ard Biesheuvel
On 17 April 2018 at 03:20, Guo Heyi wrote: > Hi Ard, > > I tested mm -io on D05, for root bridge 4 with CPU IO address starting from > 0x8_abff, and it worked; both mm -io 0x8abff and mm 0x8abff > provided > the same output. It seems there is no other limit for 64bit IO address after

[edk2] [PATCH 1/5] MdeModulePkg/CapsulePei: clean Dcache before consuming capsule data

2018-06-07 Thread Ard Biesheuvel
When capsule updates are staged for processing after a warm reboot, they are copied into memory with the MMU and caches enabled. When the capsule PEI gets around to coalescing the capsule, the MMU and caches may still be disabled, and so on architectures where uncached accesses are incoherent with

[edk2] [PATCH 4/5] ArmPkg/PlatformBootManagerLib: call ProcessCapsules() only once

2018-06-07 Thread Ard Biesheuvel
ARM platforms have no restriction on when a system firmware update capsule can be applied, and so it is not necessary to call ProcessCapsules() twice. So let's drop the first invocation that occurs before EndOfDxe, so that capsule updates will be applied when the console is up and able to provide p

[edk2] [PATCH 0/5] MdeModulePkg ArmPkg: support for persistent capsules and progress reporting

2018-06-07 Thread Ard Biesheuvel
This is the delta of code required to implement PersistAcrossReset on ARM systems, and to wire up the capsule handling routines in a way that makes the new progress reporting code do something meaningful on such platforms. Patch #1 ensures that the capsule data which is preserved in DRAM across a

[edk2] [PATCH 2/5] MdeModulePkg/DxeCapsuleLibFmp: permit ProcessCapsules () to be called once

2018-06-07 Thread Ard Biesheuvel
Permit ProcessCapsules () to be called only a single time, after EndOfDxe. This allows platforms that are able to update system firmware after EndOfDxe (e.g., because the flash ROM is not locked down) to do so at a time when a non-trusted console is up and running, and progress can be reported to t

[edk2] [PATCH 3/5] MdeModulePkg/DxeCapsuleLibFmp: pass progress callback only if it works

2018-06-07 Thread Ard Biesheuvel
If the first call to UpdateImageProgress() fails, there is no point in passing a pointer to it to Fmp->SetImage(), since it is highly unlikely to succeed on any subsequent calls. This permits the FMP implementation to fall back to an alternate means of providing feedback to the user, e.g., via the

[edk2] [PATCH 5/5] ArmPkg/ArmSmcPsciResetSystemLib: implement fallback for warm reboot

2018-06-07 Thread Ard Biesheuvel
Implement ResetSystemLib's EnterS3WithImmediateWake() routine using a jump back to the PEI entry point with interrupts and MMU+caches disabled. This is only possible at boot time, when we are sure that the current CPU is the only one up and running. Also, it depends on the platform whether the PEI

[edk2] [PATCH] MdePkg/BaseIoLibIntrinsic: make BaseIoLibIntrinsic safe for ArmVirt/KVM

2018-06-07 Thread Ard Biesheuvel
KVM on ARM refuses to decode load/store instructions used to perform I/O to emulated devices, and instead relies on the exception syndrome information to describe the operand register, access size, etc. This is only possible for instructions that have a single input/output register (as opposed to o

Re: [edk2] [PATCH] ArmVirtPkg: implement KVM safe IoLib instance

2018-06-07 Thread Ard Biesheuvel
On 5 June 2018 at 15:04, Laszlo Ersek wrote: > On 06/05/18 13:05, Ard Biesheuvel wrote: >> KVM on ARM refuses to decode load/store instructions used to perform >> I/O to emulated devices, and instead relies on the exception syndrome >> information to describe the operand register, access size, etc

Re: [edk2] [PATCH] MdeModulePkg/CapsulePei: clean Dcache before consuming capsule data

2018-06-07 Thread Ard Biesheuvel
On 7 June 2018 at 12:27, Zeng, Star wrote: > I think checking validity is other code's responsibility, after that the new > code to perform cache maintenance. They are separated. > I prefer to cover both paths. > OK, fair enough. > > Thanks, > Star > -Original Message- > From: edk2-dev

Re: [edk2] [PATCH] MdeModulePkg/CapsulePei: clean Dcache before consuming capsule data

2018-06-07 Thread Zeng, Star
I think checking validity is other code's responsibility, after that the new code to perform cache maintenance. They are separated. I prefer to cover both paths. Thanks, Star -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Ard Biesheuvel Sent: T

Re: [edk2] [PATCH] MdeModulePkg/CapsulePei: clean Dcache before consuming capsule data

2018-06-07 Thread Ard Biesheuvel
On 7 June 2018 at 12:12, Zeng, Star wrote: > Since capsule data pointer may be invalid (for example, point to MMIO), we > enhanced code to validate the capsule by memory resource HOB, and *recommend* > platform/silicon (memory reference code) to report memory resource HOB before > capsule coale

Re: [edk2] [PATCH] MdeModulePkg/CapsulePei: clean Dcache before consuming capsule data

2018-06-07 Thread Zeng, Star
Since capsule data pointer may be invalid (for example, point to MMIO), we enhanced code to validate the capsule by memory resource HOB, and *recommend* platform/silicon (memory reference code) to report memory resource HOB before capsule coalescing. To consider and compatible with some platform

Re: [edk2] [PATCH] MdeModulePkg/CapsulePei: clean Dcache before consuming capsule data

2018-06-07 Thread Ard Biesheuvel
On 7 June 2018 at 11:46, Zeng, Star wrote: > Ok, I want to know whether others have some idea, so let's wait some time? > > About the code change, I have three minor comments below. > 1. I suggest adding some code comment for the new line code. OK > 2. There are two paths in ValidateCapsuleByMem

Re: [edk2] [PATCH] MdeModulePkg/CapsulePei: clean Dcache before consuming capsule data

2018-06-07 Thread Zeng, Star
Ok, I want to know whether others have some idea, so let's wait some time? About the code change, I have three minor comments below. 1. I suggest adding some code comment for the new line code. 2. There are two paths in ValidateCapsuleByMemoryResource() to return TRUE, should the new line code be

[edk2] [PATCH] MdeModulePkg/EmmcDxe: demote DEBUG print to DEBUG_BLKIO

2018-06-07 Thread Ard Biesheuvel
Lower the priority of the DEBUG print in EmmcReadWrite(), which is emitted for each read or write operation to the eMMC device, which clutters up the log output of builds created with DEBUG_INFO enabled. Suggested-by: Pipat Methavanitpong Contributed-under: TianoCore Contribution Agreement 1.1 Si

[edk2] [PATCH] CorebootModulePkg/CbSupportDxe: Remove SCI_EN setting

2018-06-07 Thread Benjamin You
Current implemenation sets PM1_CNT.SCI_EN bit at ReadyToBoot event. However, this should not be done because this causes OS to skip triggering FADT.SMI_CMD, which leads to the functions implemented in the SMI handler being omitted. This issue was identified by Matt Delco . The fix does the follow

Re: [edk2] [Patch] DSC Spec: Update two typo and definition

2018-06-07 Thread Gao, Liming
Reviewed-by: Liming Gao >-Original Message- >From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of >Yonghong Zhu >Sent: Wednesday, June 06, 2018 3:09 PM >To: edk2-devel@lists.01.org >Cc: Kinney, Michael D ; Shaw, Kevin W >; Gao, Liming >Subject: [edk2] [Patch] DSC Spec:

Re: [edk2] [Patch] Build spec: Add a Common PCD rules section for build report

2018-06-07 Thread Gao, Liming
Reviewed-by: Liming Gao >-Original Message- >From: Zhu, Yonghong >Sent: Tuesday, June 05, 2018 8:18 PM >To: edk2-devel@lists.01.org >Cc: Gao, Liming ; Kinney, Michael D >; Shaw, Kevin W >Subject: [Patch] Build spec: Add a Common PCD rules section for build report > >1. Add a Common PCD r

Re: [edk2] [Patch 1/5] Build Spec: Add !error statement support

2018-06-07 Thread Gao, Liming
Reviewed-by: Liming Gao >-Original Message- >From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of >Yonghong Zhu >Sent: Thursday, May 31, 2018 8:56 AM >To: edk2-devel@lists.01.org >Cc: Kinney, Michael D ; Shaw, Kevin W >; Gao, Liming >Subject: [edk2] [Patch 1/5] Build Sp

Re: [edk2] [PATCH] ArmPkg/ArmDisassemblerLib: fix check for MSR instruction

2018-06-07 Thread Ard Biesheuvel
On 7 June 2018 at 07:08, Michael Zimmermann wrote: > CC the arm maintainers > On Thu, Jun 7, 2018 at 7:07 AM Michael Zimmermann > wrote: >> >> From: M1cha >> Could you please use the same 'from' name+address as in the signoff? That saves me the hassle of fixing it up manually. >> GCC8 reported

Re: [edk2] [PATCH] ArmPkg/CompilerIntrinsicsLib: fix GCC8 warning for __aeabi_memcpy aliases

2018-06-07 Thread Ard Biesheuvel
On 7 June 2018 at 07:47, Michael Zimmermann wrote: > This was the warning(shown for __aeabi_memcpy, __aeabi_memcpy4 and > __aeabi_memcpy8): > ArmPkg/Library/CompilerIntrinsicsLib/memcpy.c:42:6: error: '__aeabi_memcpy8' > alias between functions of incompatible types 'void(void > *, const void *,