Re: [edk2] [PATCH 1/6] MdePkg UefiLib: Add new EfiFindAcpiTableBySignature() API

2018-09-02 Thread Ni, Ruiyu
I prefer S2. Single interface is more easy for consumer to remember how to use. Thanks/Ray > -Original Message- > From: Yao, Jiewen > Sent: Monday, September 3, 2018 2:15 PM > To: Zeng, Star ; Ni, Ruiyu ; > Kinney, Michael D > Cc: edk2-devel@lists.01.org; Younas khan ; > Gao, Liming > S

Re: [edk2] [PATCH 1/6] MdePkg UefiLib: Add new EfiFindAcpiTableBySignature() API

2018-09-02 Thread Yao, Jiewen
I prefer S1. I believe that the EfiLocateNextAcpiTable() can also be used in S1. > -Original Message- > From: Zeng, Star > Sent: Monday, September 3, 2018 2:12 PM > To: Ni, Ruiyu ; Yao, Jiewen ; > Kinney, > Michael D > Cc: edk2-devel@lists.01.org; Younas khan ; > Gao, Liming ; Zeng, Sta

Re: [edk2] [PATCH 1/6] MdePkg UefiLib: Add new EfiFindAcpiTableBySignature() API

2018-09-02 Thread Zeng, Star
Thanks. Ok, please help and we can have good and flexible interface(s) for both producer and consumer. First, there are two cases we need to consider. 1. Single table, like FADT, FACS, DSDT, etc. 2. Multiple tables, like SSDT, etc. Then, we have two solutions. S1: One interface for single table

Re: [edk2] [PATCH 1/6] MdePkg UefiLib: Add new EfiFindAcpiTableBySignature() API

2018-09-02 Thread Ni, Ruiyu
That's fine to be in UefiLib. It's already a combo library. But I do recommend we think about how to handle multiple tables with same signature. When we are adding new APIs, we not only need to evaluate the existing real case, but also we need to generalize the real cases and try to think about

Re: [edk2] [PATCH 0/4] Add PEI Stack Guard feature

2018-09-02 Thread Wang, Jian J
Here're the tests I've done: * Emulate stack overflow by calling a function recursively, for all BSP and APs, and check the RSP and CR2 to see if they're close in exception message. * OS boot (x64): Fedora 26, Ubuntu 18.04, Windows 10, Windows 7 (Platform: OVMF) Regards, Jian From: edk2-devel

[edk2] [PATCH 7/7] MdeModulePkg/SdMmcPciHcDxe: Execute card detect only for RemovableSlot

2018-09-02 Thread Marcin Wojtas
Some devices can be non removable (such as eMMC) and checking Present State Register on host controller may falsely return an information that device is not present. Execute this check conditionally on the SloType field value. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by:

[edk2] [PATCH 5/7] MdeModulePkg/SdMmcPciHcDxe: Adjust eMMC clock and bus width sequence

2018-09-02 Thread Marcin Wojtas
According to JESD84-B50-1 chapter A.6 (documentation about eMMC4.5 standard) step "Changing the data bus width" (A.6.3) should be execute after step "Switching to high-speed mode" (A.6.2). This patch fixes the bus-width/clock-setting sequence in EmmcSwitchToHighSpeed (). Contributed-under: TianoC

[edk2] [PATCH 4/7] MdeModulePkg/SdMmcPciHcDxe: Allow overriding base clock frequency

2018-09-02 Thread Marcin Wojtas
From: Tomasz Michalec Some SdMmc host controllers are run by clocks with different frequency than it is reflected in Capabilities Register 1. Because the bitfield is only 8 bits wide, a maximum value that could be obtained from hardware is 255MHz. In case the actual frequency exceeds 255MHz, the

[edk2] [PATCH 2/7] MdeModulePkg/SdMmcPciHcDxe: Add UhsSignaling to SdMmcOverride protocol

2018-09-02 Thread Marcin Wojtas
From: Tomasz Michalec Some SD Host Controlers use different values in Host Control 2 Register to select UHS Mode. This patch adds new UhsSignaling callback to the SdMmcOverride protocol. UHS signaling configuration is moved to a common, default routine (SdMmcHcUhsSignaling), which is called when

[edk2] [PATCH 6/7] MdeModulePkg/SdMmcPciHcDxe: Fix SdMmcHcReset to set only necesery bits

2018-09-02 Thread Marcin Wojtas
From: Tomasz Michalec SdMmcHcReset used to set all bits of Software Reset Register to 1 including reserved ones. Now only first bit is set which means "Software Reset for All". Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas --- MdeModulePkg/Bus/Pci/SdMmcP

[edk2] [platforms: PATCH 4/7] Marvell/Armada70x0Db: Introduce board description library

2018-09-02 Thread Marcin Wojtas
From: Tomasz Michalec This patch implements ArmadaBoarDescLib library for Armada7040 Development Board and add to it ArmadaBoardDescSdMmcGet function with description of connected Xenon host controllers. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas --- P

[edk2] [PATCH 3/7] MdeModulePkg/SdMmcPciHcDxe: Add SwitchClockFreqPost to SdMmcOverride

2018-09-02 Thread Marcin Wojtas
From: Tomasz Michalec Some SD Host Controlers need to do additional opperations after clock frequency switch. This patch add new callback to SdMmcOverride protocol. The SwitchClockFreqPost callback is called after EmmcSwitchClockFreq and SdMmcHcClockSupply. Contributed-under: TianoCore Contribu

[edk2] [platforms: PATCH 6/7] Marvell/Drivers: MvBoardDesc: Extend information for SdMmc

2018-09-02 Thread Marcin Wojtas
From: Tomasz Michalec Extend MvBoardDescSdMmcGet function to fill MV_BOARD_SDMMC_DESC with Xenon specific info obtained from ArmadaBoardDescLib. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas --- Silicon/Marvell/Drivers/BoardDesc/MvBoardDescDxe.inf | 1 +

[edk2] [platforms: PATCH 5/7] Marvell/Armada80x0Db: Introduce board description library

2018-09-02 Thread Marcin Wojtas
From: Tomasz Michalec This patch implements ArmadaBoarDescLib library for Armada8040 Development Board and add to it ArmadaBoardDescSdMmcGet function with description of connected Xenon host controllers. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas --- P

[edk2] [platforms: PATCH 2/7] Marvell/Library: ArmadaBoardDescLib: Extend SDMMC information

2018-09-02 Thread Marcin Wojtas
From: Tomasz Michalec Added fields specific for Xenon host controller and declaration of ArmadaBoardDescSdMmcGet function. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas --- Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h | 17 - 1 fil

[edk2] [platforms: PATCH 0/7] Armada7k8k Xenon driver rework

2018-09-02 Thread Marcin Wojtas
Hi, This patchset adds one improvement for the Synquacer controller, so that it can handle any SdMmcOverride protocol extending in future. Other than that a huge rework of the Xenon SdMmc controller is done - main changes: - Describe per-board configration using MvBoardDescLib infrastructure - Use

[edk2] [platforms: PATCH 3/7] SolidRun/Armada80x0McBin: Introduce board description library

2018-09-02 Thread Marcin Wojtas
From: Tomasz Michalec This patch implements ArmadaBoarDescLib library for Armada80x0McBin comunity board and add to it ArmadaBoardDescSdMmcGet function with description of connected Xenon host controllers. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas ---

[edk2] [PATCH 1/7] MdeModulePkg/SdMmcPciHcDxe: Fix HS200 operation

2018-09-02 Thread Marcin Wojtas
When switching to any of high speed modes (HS, HS200, HS400) there is need to set HS_ENABLE bit in Host Control 1 register which allow Host Controller to output CMD and DAT lines on both edges of clock. In Linux it is done after switching bus width in sdhci_set_ios(). Also according to JESD84-B50-

[edk2] [platforms: PATCH 1/7] Silicon/SynQuacer/PlatformDxe: Modify initialization of SdMmcOverride

2018-09-02 Thread Marcin Wojtas
From: Tomasz Michalec This patch changes way the EDKII_SD_MMC_OVERRIDE protocol sturcture is allocated. Using AllocateZeroPool and then seting callbacks in the structure allow driver to be immune to adding new callbacks in SdMmcOveride protocol in future. Contributed-under: TianoCore Contributio

[edk2] [PATCH 0/7] SdMmc fixes and SdMmcOverride extension

2018-09-02 Thread Marcin Wojtas
Hi, This patchset extends SdMmcOverride protocol with new callbacks: * UhsSignaling - allow writing custom values to HostControl2 register * SwitchClockFreqPost - perform additional opperations after clock switch * BaseClockFreq - allow overriding base clock frequency Also a couple of fixes for MM

Re: [edk2] [PATCH 0/4] Add PEI Stack Guard feature

2018-09-02 Thread Yao, Jiewen
Hi Would you please add more description on what test has been done for this patch? Thank you Yao Jiewen > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] > Sent: Monday, September 3, 2018 11:16 AM > To: edk2-devel@lists.01.org > Subject: [edk2] [PATCH 0/4]

[edk2] [PATCH] MdePkg: Update the comments in dec

2018-09-02 Thread shenglei
Correct the directory of a header file in comments. Cc: Michael D Kinney Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: shenglei Reviewed-by: Liming Gao --- MdePkg/MdePkg.dec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdePkg/MdeP

Re: [edk2] [PATCH 6/6] UefiCpuPkg PiSmmCpuDxeSmm: Use new EfiFindAcpiTableBySignature()

2018-09-02 Thread Zeng, Star
Thanks Laszlo. :) Star -Original Message- From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Saturday, September 1, 2018 4:34 AM To: Zeng, Star ; edk2-devel@lists.01.org Cc: Ni, Ruiyu ; Dong, Eric ; Younas khan ; Gao, Liming ; Yao, Jiewen ; Kinney, Michael D Subject: Re: [edk2] [PATCH

Re: [edk2] [PATCH 1/6] MdePkg UefiLib: Add new EfiFindAcpiTableBySignature() API

2018-09-02 Thread Zeng, Star
Good idea. I did consider DSDT and multiple SSDTs cases. But I did not find any real case for them. So I made the code simply for current cases, and the code can be easily enhanced later for DSDT, a new API can be added later for multiple SSDTs. About adding the new API in UefiLib VS new librar

[edk2] [PATCH 1/4] MdeModulePkg/DxeIpl: disable paging before creating new page table

2018-09-02 Thread Jian J Wang
PEI Stack Guard needs to enable paging before DxeIpl. This might cause #GP in the transition from 32-bit PEI to 64-bit DXE due to the code trying to write CR3 register with PML4 page table while the processor is enabled with PAE paging. Simply disabling paging before updating CR3 can solve this co

[edk2] [PATCH 4/4] UefiCpuPkg/CpuMpPei: support stack guard feature

2018-09-02 Thread Jian J Wang
This feature is the same as Stack Guard enabled in driver CpuDxe but applies to PEI phase. Due to the specialty in PEI module dispatching, this driver is changed to do the actual initialization in notify callback of event gEfiPeiMemoryDiscoveredPpiGuid. This can let the stack guard apply to as most

[edk2] [PATCH 0/4] Add PEI Stack Guard feature

2018-09-02 Thread Jian J Wang
This patch series try to add PEI Stack Guard feature. Please refer to following trackers for details. The machanism behind this feature is the same as Stack Guard for UEFI drivers, and similiar implementation is also employed. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1126 https://

[edk2] [PATCH 3/4] UefiCpuPkg/MpInitLib: fix register restore issue in AP wakeup

2018-09-02 Thread Jian J Wang
The conflict issues are introduced by Stack Guard feature enabled for PEI. The first is CR0 which should be restored after CR3 and CR4. Another is TR which should not be passed from BSP to AP during init phase. Cc: Eric Dong Cc: Laszlo Ersek Cc: Ruiyu Ni Cc: Jiewen Yao Cc: Star Zeng Cc: "War

[edk2] [PATCH 2/4] UefiCpuPkg/CpuExceptionHandlerLib: support stack switch for PEI exceptions

2018-09-02 Thread Jian J Wang
Stack Guard needs to setup stack switch capability to allow exception handler to be called with good stack if stack overflow is detected. This patch update InitializeCpuExceptionHandlersEx() to allow pass extra initialization data used to setup exception stack switch for specified exceptions. Cc:

[edk2] [Patch] BaseTool: Variable Merge.

2018-09-02 Thread BobCF
If Structure PCD and Normal Pcd refer to the same variable, do variable merge. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng Cc: Liming Gao --- BaseTools/Source/Python/AutoGen/AutoGen.py | 3 +- BaseTools/Source/Python/AutoGen/GenVar.py | 71 +

[edk2] [Patch][edk2-platforms/devel-IntelAtomProcessorE3900] BIOS Logo Change.

2018-09-02 Thread zwei4
Add board specific code to show OEM specific logo. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: David Wei CC: Mike Wu CC: Mang Guo --- .../Board/AuroraGlacier/BoardInitPostMem/BoardInit.c | 1 + .../Board/AuroraGlacier/BoardInitPostMem/BoardInitPost

[edk2] [PATCH] EmulatorPkg/PlatformBmLib: Fix GCC build failure

2018-09-02 Thread Ruiyu Ni
Some local variables are initialized but never used. GCC complains about that. The patch fixes this issue. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Dandan Bi --- EmulatorPkg/Library/PlatformBmLib/PlatformBmMemoryTest.c | 14 -- 1 file chang

Re: [edk2] [PATCH 2/2] UefiCpuPkg/CpuExceptionHandlerLib: Avoid calling PEI services from AP

2018-09-02 Thread Wang, Jian J
Validated-by: Jian J Wang Reviewed-by: Jian J Wang > -Original Message- > From: Ni, Ruiyu > Sent: Friday, August 31, 2018 4:36 PM > To: edk2-devel@lists.01.org > Cc: Wang, Jian J ; Fan Jeff > Subject: [PATCH 2/2] UefiCpuPkg/CpuExceptionHandlerLib: Avoid calling PEI > services from AP >

[edk2] [Patch] BaseTools: Involve Dec default value to calculate Maxsize

2018-09-02 Thread BobCF
Involve Dec default value to calculate Maxsize for structure PCD Cc: Liming Gao Cc: Yonghong Zhu Cc: Jaben Carsey Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng --- .../Source/Python/Workspace/BuildClassObject.py| 34 +++--- 1 file changed,