Re: [edk2] [edk2-announce] March Community Meeting
Sure, no problem. I added "BRT" timezone to the North America / Europe meeting. The Asia/Pacific meeting is at midnight in São Paulo, so I didn't bother to add it there. :) Cheers, Stephano On 3/1/2019 9:32 AM, Rafael Machado wrote: Hi Stephano Could you please add at the https://www.tianocore.org/monthly-meeting page the South America TZ (São Paulo if possible ) , in case these calendar items are still being used? Thanks and Regards Rafael ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] EmulatorPkg/Sec: Don't install TemporaryRamSupport PPI
On 2019-03-02 04:11:11, Ray Ni wrote: > TemporaryRamSupport PPI is called by PeiCore to migrate temporary > memory from permanent memory. But the implementation assumes > ebp/rbp contains the original esp/rsp value when migrating which > is not always true the compiler optimization is turned on. > A real boot failure is seen using GCC5. > In fact, below commit in year 2013 enhanced PeiCore to migrate > the memory without calling TemporaryRamSupport PPI. > SHA-1: 0f9ebb321638e9142ab3bdcc19000c49bb83b9ba > * Add support for PI1.2.1 TempRam Done PPI. > > So this patch removes TemporaryRamSupport PPI implementation from > EmulatorPkg/Sec module to fix the boot failure when using GCC5. I don't think we should just hide the known bug with the TemporaryRamSupport PPI implementation in the PEI Core. I would agree that we should make this change after addressing that. -Jordan > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ray Ni > Cc: Jordan Justen > Cc: Andrew Fish > --- > EmulatorPkg/Sec/Ia32/SwitchRam.S | 95 -- > EmulatorPkg/Sec/Ia32/SwitchRam.asm | 94 - > EmulatorPkg/Sec/Ia32/TempRam.c | 65 > EmulatorPkg/Sec/Sec.c | 61 +-- > EmulatorPkg/Sec/Sec.h | 14 + > EmulatorPkg/Sec/Sec.inf| 15 + > EmulatorPkg/Sec/X64/SwitchRam.S| 72 -- > EmulatorPkg/Sec/X64/SwitchRam.asm | 76 > 8 files changed, 5 insertions(+), 487 deletions(-) > delete mode 100644 EmulatorPkg/Sec/Ia32/SwitchRam.S > delete mode 100644 EmulatorPkg/Sec/Ia32/SwitchRam.asm > delete mode 100644 EmulatorPkg/Sec/Ia32/TempRam.c > delete mode 100644 EmulatorPkg/Sec/X64/SwitchRam.S > delete mode 100644 EmulatorPkg/Sec/X64/SwitchRam.asm > > diff --git a/EmulatorPkg/Sec/Ia32/SwitchRam.S > b/EmulatorPkg/Sec/Ia32/SwitchRam.S > deleted file mode 100644 > index 39304daef1..00 > --- a/EmulatorPkg/Sec/Ia32/SwitchRam.S > +++ /dev/null > @@ -1,95 +0,0 @@ > -#-- > -# > -# Copyright (c) 2007, Intel Corporation. All rights reserved. > -# This program and the accompanying materials > -# are licensed and made available under the terms and conditions of the BSD > License > -# which accompanies this distribution. The full text of the license may be > found at > -# http:#opensource.org/licenses/bsd-license.php > -# > -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, > -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR > IMPLIED. > -# > -# Module Name: > -# > -# Stack.asm > -# > -# Abstract: > -# > -# Switch the stack from temporary memory to permenent memory. > -# > -#-- > - > - .text > - > - > -//-- > -// VOID > -// EFIAPI > -// SecSwitchStack ( > -// UINT32 TemporaryMemoryBase, > -// UINT32 PermenentMemoryBase > -// )// > -//-- > -ASM_GLOBAL ASM_PFX(SecSwitchStack) > -ASM_PFX(SecSwitchStack): > -# > -# Save three register: eax, ebx, ecx > -# > -push %eax > -push %ebx > -push %ecx > -push %edx > - > -# > -# !!CAUTION!! this function address's is pushed into stack after > -# migration of whole temporary memory, so need save it to permenent > -# memory at first! > -# > - > -movl 20(%esp), %ebx# Save the first parameter > -movl 24(%esp), %ecx# Save the second parameter > - > -# > -# Save this function's return address into permenent memory at first. > -# Then, Fixup the esp point to permenent memory > -# > - > -movl %esp, %eax > -subl %ebx, %eax > -addl %ecx, %eax > -movl (%esp), %edx # copy pushed register's value to > permenent memory > -movl %edx, (%eax) > -movl 4(%esp), %edx > -movl %edx, 4(%eax) > -movl 8(%esp), %edx > -movl %edx, 8(%eax) > -movl 12(%esp), %edx > -movl %edx, 12(%eax) > -movl 16(%esp), %edx > -movl %edx, 16(%eax) > -movl %eax, %esp # From now, esp is pointed to > permenent memory > - > -# > -# Fixup the ebp point to permenent memory > -# > -#ifndef __APPLE__ > -movl %ebp, %eax > -subl %ebx, %eax > -addl %ecx, %eax > -movl %eax, %ebp # From now, ebp is pointed to > permenent memory > - > -# > -# Fixup callee's ebp point for PeiDispatch > -# > -movl (%ebp), %eax > -subl %ebx, %eax > -addl %ecx, %eax > -movl %eax, (%ebp)# From now, Temporary's PPI caller's > stack is in permenent memory > -#endif > - > -pop %edx > -pop %ecx > -pop %ebx > -pop %eax > -ret > - > diff --git
Re: [edk2] [PATCH] MdeModulePkg/SdMmcPciHcDxe: Add V3 64b DMA Support
Ashish: This seems a feature. Now, we are in Hard Feature Freeze. So, it will not be added until edk2-stable201903 tag is created at 2019-03-08. Thanks Liming > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Ashish > Singhal > Sent: Saturday, March 2, 2019 2:30 AM > To: edk2-devel@lists.01.org > Cc: Wu, Hao A ; Ashish Singhal > Subject: [edk2] [PATCH] MdeModulePkg/SdMmcPciHcDxe: Add V3 64b DMA Support > > Driver was supporting only 32b DMA support for V3 controllers. Add > support for 64b DMA as well for completeness. > > For V4.0 64b support, driver was looking at incorrect capability > register bit. Fix for that is present as well. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ashish Singhal > --- > MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c | 10 +- > MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h | 6 +- > MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c | 199 > ++--- > MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h | 29 ++- > 4 files changed, 170 insertions(+), 74 deletions(-) > > diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c > b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c > index b474f8d..9b7b88c 100644 > --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c > +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c > @@ -6,7 +6,7 @@ > >It would expose EFI_SD_MMC_PASS_THRU_PROTOCOL for upper layer use. > > - Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. > + Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved. >Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved. >This program and the accompanying materials >are licensed and made available under the terms and conditions of the BSD > License > @@ -666,8 +666,12 @@ SdMmcPciHcDriverBindingStart ( > // If any of the slots does not support 64b system bus > // do not enable 64b DMA in the PCI layer. > // > -if (Private->Capability[Slot].SysBus64V3 == 0 && > -Private->Capability[Slot].SysBus64V4 == 0) { > +if ((Private->ControllerVersion[Slot] == SD_MMC_HC_CTRL_VER_300 && > + Private->Capability[Slot].SysBus64V3 == 0) || > +(Private->ControllerVersion[Slot] == SD_MMC_HC_CTRL_VER_400 && > + Private->Capability[Slot].SysBus64V3 == 0) || > +(Private->ControllerVersion[Slot] >= SD_MMC_HC_CTRL_VER_410 && > + Private->Capability[Slot].SysBus64V4 == 0)) { >Support64BitDma = FALSE; > } > > diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h > b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h > index 1bb701a..68d8a5c 100644 > --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h > +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h > @@ -2,7 +2,7 @@ > >Provides some data structure definitions used by the SD/MMC host > controller driver. > > -Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. > +Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved. > Copyright (c) 2015, Intel Corporation. All rights reserved. > This program and the accompanying materials > are licensed and made available under the terms and conditions of the BSD > License > @@ -145,13 +145,15 @@ typedef struct { >EFI_PHYSICAL_ADDRESSDataPhy; >VOID*DataMap; >SD_MMC_HC_TRANSFER_MODE Mode; > + SD_MMC_HC_ADMA_LEGTHLength; > >EFI_EVENT Event; >BOOLEAN Started; >UINT64 Timeout; > >SD_MMC_HC_ADMA_32_DESC_LINE *Adma32Desc; > - SD_MMC_HC_ADMA_64_DESC_LINE *Adma64Desc; > + SD_MMC_HC_ADMA_64_V3_DESC_LINE *Adma64V3Desc; > + SD_MMC_HC_ADMA_64_V4_DESC_LINE *Adma64V4Desc; >EFI_PHYSICAL_ADDRESSAdmaDescPhy; >VOID*AdmaMap; >UINT32 AdmaPages; > diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c > b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c > index d73fa10..a6d2395 100644 > --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c > +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c > @@ -6,7 +6,7 @@ > >It would expose EFI_SD_MMC_PASS_THRU_PROTOCOL for upper layer use. > > - Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. > + Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved. >Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved. >This program and the accompanying materials >are licensed and made available under the terms and conditions of the BSD > License > @@ -1010,18 +1010,32 @@ SdMmcHcInitV4Enhancements ( >if (ControllerVer >= SD_MMC_HC_CTRL_VER_400) { > HostCtrl2 = SD_MMC_HC_V4_EN; > // > -// Check if V4 64bit support is available > +// Check if
[edk2] [PATCH] EmulatorPkg/Sec: Don't install TemporaryRamSupport PPI
TemporaryRamSupport PPI is called by PeiCore to migrate temporary memory from permanent memory. But the implementation assumes ebp/rbp contains the original esp/rsp value when migrating which is not always true the compiler optimization is turned on. A real boot failure is seen using GCC5. In fact, below commit in year 2013 enhanced PeiCore to migrate the memory without calling TemporaryRamSupport PPI. SHA-1: 0f9ebb321638e9142ab3bdcc19000c49bb83b9ba * Add support for PI1.2.1 TempRam Done PPI. So this patch removes TemporaryRamSupport PPI implementation from EmulatorPkg/Sec module to fix the boot failure when using GCC5. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ray Ni Cc: Jordan Justen Cc: Andrew Fish --- EmulatorPkg/Sec/Ia32/SwitchRam.S | 95 -- EmulatorPkg/Sec/Ia32/SwitchRam.asm | 94 - EmulatorPkg/Sec/Ia32/TempRam.c | 65 EmulatorPkg/Sec/Sec.c | 61 +-- EmulatorPkg/Sec/Sec.h | 14 + EmulatorPkg/Sec/Sec.inf| 15 + EmulatorPkg/Sec/X64/SwitchRam.S| 72 -- EmulatorPkg/Sec/X64/SwitchRam.asm | 76 8 files changed, 5 insertions(+), 487 deletions(-) delete mode 100644 EmulatorPkg/Sec/Ia32/SwitchRam.S delete mode 100644 EmulatorPkg/Sec/Ia32/SwitchRam.asm delete mode 100644 EmulatorPkg/Sec/Ia32/TempRam.c delete mode 100644 EmulatorPkg/Sec/X64/SwitchRam.S delete mode 100644 EmulatorPkg/Sec/X64/SwitchRam.asm diff --git a/EmulatorPkg/Sec/Ia32/SwitchRam.S b/EmulatorPkg/Sec/Ia32/SwitchRam.S deleted file mode 100644 index 39304daef1..00 --- a/EmulatorPkg/Sec/Ia32/SwitchRam.S +++ /dev/null @@ -1,95 +0,0 @@ -#-- -# -# Copyright (c) 2007, Intel Corporation. All rights reserved. -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http:#opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# -# Module Name: -# -# Stack.asm -# -# Abstract: -# -# Switch the stack from temporary memory to permenent memory. -# -#-- - - .text - - -//-- -// VOID -// EFIAPI -// SecSwitchStack ( -// UINT32 TemporaryMemoryBase, -// UINT32 PermenentMemoryBase -// )// -//-- -ASM_GLOBAL ASM_PFX(SecSwitchStack) -ASM_PFX(SecSwitchStack): -# -# Save three register: eax, ebx, ecx -# -push %eax -push %ebx -push %ecx -push %edx - -# -# !!CAUTION!! this function address's is pushed into stack after -# migration of whole temporary memory, so need save it to permenent -# memory at first! -# - -movl 20(%esp), %ebx# Save the first parameter -movl 24(%esp), %ecx# Save the second parameter - -# -# Save this function's return address into permenent memory at first. -# Then, Fixup the esp point to permenent memory -# - -movl %esp, %eax -subl %ebx, %eax -addl %ecx, %eax -movl (%esp), %edx # copy pushed register's value to permenent memory -movl %edx, (%eax) -movl 4(%esp), %edx -movl %edx, 4(%eax) -movl 8(%esp), %edx -movl %edx, 8(%eax) -movl 12(%esp), %edx -movl %edx, 12(%eax) -movl 16(%esp), %edx -movl %edx, 16(%eax) -movl %eax, %esp # From now, esp is pointed to permenent memory - -# -# Fixup the ebp point to permenent memory -# -#ifndef __APPLE__ -movl %ebp, %eax -subl %ebx, %eax -addl %ecx, %eax -movl %eax, %ebp # From now, ebp is pointed to permenent memory - -# -# Fixup callee's ebp point for PeiDispatch -# -movl (%ebp), %eax -subl %ebx, %eax -addl %ecx, %eax -movl %eax, (%ebp)# From now, Temporary's PPI caller's stack is in permenent memory -#endif - -pop %edx -pop %ecx -pop %ebx -pop %eax -ret - diff --git a/EmulatorPkg/Sec/Ia32/SwitchRam.asm b/EmulatorPkg/Sec/Ia32/SwitchRam.asm deleted file mode 100644 index 731ee0ffdb..00 --- a/EmulatorPkg/Sec/Ia32/SwitchRam.asm +++ /dev/null @@ -1,94 +0,0 @@ -;-- -; -; Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved. -; This program and the accompanying materials -; are licensed and made available under the terms and conditions of the BSD License -; which accompanies this distribution. The full