Re: [edk2] [PATCH v3] MdeModulePkg:Fix a robustness issue of Mnp Driver

2016-02-26 Thread Ye, Ting
The updated patch looks good to me. Reviewed-by: Ye Ting -Original Message- From: Zhang, Lubo Sent: Friday, February 26, 2016 2:51 PM To: Wu, Jiaxin ; edk2-devel@lists.01.org Cc: Ye, Ting ; Fu, Siyuan

Re: [edk2] [PATCH] MdePkg: Add UEFI2.6 HII Image Ex and Image Decoder protocol definition.

2016-02-26 Thread Bi, Dandan
Hi Cecil, I have some comments for this patch: For EFI_HII_IMAGE_DECODER_PROTOCOL: (1) There is a typo, it is EFI_HII_IMAGE_DECODER_PROTOCOL not EFI_HII_IMAGE_DECO(R)DER_PROTOCOL, please double check to remove all the incorrect case. (2) EFI_HII_IMAGE_DECODER_PROTOCOL_GUID is not

Re: [edk2] [RFC 0/3] Rework the pl061 driver for better readability

2016-02-26 Thread Haojian Zhuang
在 02/10/2016 11:55 PM, Leif Lindholm 写道: Apologies to Haojian for not giving any feedback on his set of significant improvements to the pl061 GPIO controller driver. I found myself unable to review his modifications due to the complexity of the original driver, so I decided to refactor it ...

Re: [edk2] best way to load a shell app to another address?

2016-02-26 Thread Andrew Fish
> On Feb 26, 2016, at 11:53 AM, Stephen Polkowski wrote: > > Hi guys, > > I have an embedded OS that wants to live at the top of system memory. > Normally, a shell is app is loaded in the middle of system memory. > > Is there a Protocol function to load a

Re: [edk2] [PATCH 0/9] enhance mmc

2016-02-26 Thread Leif Lindholm
Hi Haojian, On Fri, Feb 26, 2016 at 05:27:47PM +0800, Haojian Zhuang wrote: > * Wait OCR busy bit free according to eMMC spec. > * Define ECSD structure. > * Add interface to set IO bus width and speed. > * Support to access multiple blocks. This is a substantial contribution, and on inspection

[edk2] [PATCH] UefiCpuPkg/Cpuid: Fix GCC build error

2016-02-26 Thread Hao Wu
define PRINT_BIT_FIELD(Variable, FieldName) \ Print (L"%5a%42a: %x\n", #Variable, #FieldName, \ ##Variable.Bits.##FieldName); The above definition in UefiCpuPkg/Application/Cpuid/Cpuid.c will cause GCC build error. Fix it with: define PRINT_BIT_FIELD(Variable, FieldName) \ Print

[edk2] [PATCH 9/9] MmcDxe: expand to support multiple blocks

2016-02-26 Thread Haojian Zhuang
Make use of DMA to transfer multiple blocks at one time. It could improve the performance on MMC/SD driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang --- EmbeddedPkg/Include/Protocol/MmcHost.h| 6 +

[edk2] [PATCH 7/9] MmcDxe: Fix uninitialized mediaid for SD

2016-02-26 Thread Haojian Zhuang
When SD card is used, mediaid is not initialized and used directly. So fix it. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang --- EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c | 7 ++- 1 file changed, 6 insertions(+), 1

Re: [edk2] [Patch 4/4] MdeModulePkg/Bds: Support booting from remote file system.

2016-02-26 Thread Wang, Sunny (HPS SW)
This one looks good to me. Reviewed-by: Sunny Wang -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Ruiyu Ni Sent: Wednesday, February 24, 2016 3:40 PM To: edk2-devel@lists.01.org Cc: Ruiyu Ni; Siyuan Fu Subject: [edk2] [Patch

[edk2] [PATCH] EmbeddedPkg/AndroidFastboot: fix size with 64bit

2016-02-26 Thread Haojian Zhuang
Since there's percentage calcution, multiply on 32bit variable will cause overflow. So fix the variables as 64bit. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhangfei Gao Signed-off-by: Haojian Zhuang ---

[edk2] [PATCH 2/2] EmbeddedPkg: FastbootUsb: add string descriptors

2016-02-26 Thread Haojian Zhuang
Support both manufacturer and product string descriptors. Otherwise, the manufacturer and product sub nodes won't be created in sysfs directory of linux host. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang ---

[edk2] [PATCH 0/2] fix the index in usb string descriptor

2016-02-26 Thread Haojian Zhuang
Set the right value of Manufacturer, Product and SerialNumber in usb string descriptor. Haojian Zhuang (2): EmbeddedPkg: FastbootUsb: set serial number as 3 EmbeddedPkg: FastbootUsb: add string descriptors .../Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsb.c | 6 +++--- 1

[edk2] [PATCH 1/2] EmbeddedPkg: FastbootUsb: set serial number as 3

2016-02-26 Thread Haojian Zhuang
Set serial number as 3. If the serial number is 0, fastboot won't load real serial number from descriptor at all. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang ---

[edk2] [PATCH] ArmVExpressFastBoot: Add support for sparse Images

2016-02-26 Thread Haojian Zhuang
From: Riku Voipio Add support for current Fastboot Sparse images. Tested to be able to flash both a a small image (60MB) And a large 1.5GB image. The code in it's current form doesn't do many checks, so no defences against corrupt images. ArmVExpressFastBoot is obviously

[edk2] [PATCH v3] MdeModulePkg/PciHostBridge: Don't assume resources are fully NonExistent

2016-02-26 Thread Laszlo Ersek
From: Ruiyu Ni The patch removes the assumption that the resources claimed by root bridges should not exist. Because resources might have been added: 1. by platform modules either in PEI through resource HOB, or in DXE, before the PCI host bridge driver runs. 2. Resources

Re: [edk2] [PATCH v2] MdeModulePkg: RegularExpressionDxe: support free(NULL)

2016-02-26 Thread Laszlo Ersek
Cinnamon, can you please R-b this version as well? It is trivial, I just wanted to be real clean in this fix. Thanks Laszlo On 02/25/16 11:22, Laszlo Ersek wrote: > The ISO C standard says about free(), > > If ptr is a null pointer, no action occurs. > > This is not true of the FreePool()

Re: [edk2] [Patch] MdeModulePkg/PciHostBridge: Refine function header comments.

2016-02-26 Thread Laszlo Ersek
On 02/25/16 04:13, Qiu, Shumin wrote: > Reviewed-by: Qiu Shumin Committed as 63b90643afb19f84e4cd3681a9a402ec65b1cf8d. Thanks Laszlo > > -Original Message- > From: Ni, Ruiyu > Sent: Thursday, February 25, 2016 9:14 AM > To: edk2-devel@lists.01.org > Cc: Ni,

Re: [edk2] [Patch] MdeModulePkg/PciHostBridge: Refine function header comments.

2016-02-26 Thread Ni, Ruiyu
Thank you! Regards, Ray >-Original Message- >From: Laszlo Ersek [mailto:ler...@redhat.com] >Sent: Friday, February 26, 2016 8:30 PM >To: Qiu, Shumin ; Ni, Ruiyu ; >edk2-devel@lists.01.org > >Subject: Re: [edk2] [Patch]

[edk2] [PATCH 01/17] MdeModulePkg: PciHostBridgeDxe: don't assume extended config space

2016-02-26 Thread Laszlo Ersek
The "PcAtChipsetPkg/PciHostBridgeDxe" driver hard-codes the [0x00..0xFF] range as valid config space offsets, in the RootBridgeIoCheckParameter() function -- see the MAX_PCI_REG_ADDRESS macro. This driver uses IO ports 0xCF8 / 0xCFC to access PCI config space. The (soon to be removed)

Re: [edk2] [PATCH 00/17] Port OvmfPkg to MdeModulePkg/Bus/Pci/PciHostBridgeDxe

2016-02-26 Thread Ni, Ruiyu
Laszlo, Thanks for the quick porting, to verify the core PciHostBridge driver's flexibility. I didn't see any issues in your platform changes and sent some R-b for some of them which I felt very confident about. The only concern I have is your change to add a new field Pci to describe the PCI

Re: [edk2] [PATCH 11/17] OvmfPkg: PciHostBridgeLib: clear RootBus->DmaAbove4G

2016-02-26 Thread Ni, Ruiyu
Reviewed-by: Ruiyu Ni >-Original Message- >From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Laszlo >Ersek >Sent: Saturday, February 27, 2016 8:24 AM >To: edk2-devel-01 >Cc: Ni, Ruiyu ; Justen,

Re: [edk2] [PATCH 17/17] OvmfPkg: switch to MdeModulePkg/Bus/Pci/PciHostBridgeDxe

2016-02-26 Thread Ni, Ruiyu
Reviewed-by: Ruiyu Ni >-Original Message- >From: Laszlo Ersek [mailto:ler...@redhat.com] >Sent: Saturday, February 27, 2016 8:24 AM >To: edk2-devel-01 >Cc: Justen, Jordan L ; Ni, Ruiyu >;

[edk2] [PATCH 15/17] OvmfPkg: PciHostBridgeLib: initialize RootBus->DevicePath

2016-02-26 Thread Laszlo Ersek
We copy the code from InitRootBridge() [OvmfPkg/PciHostBridgeDxe/PciHostBridge.c], with a slight change: the device path is allocated separately now. This is the final field to initialize in PCI_ROOT_BRIDGE. The type EFI_PCI_ROOT_BRIDGE_DEVICE_PATH is renamed to OVMF_PCI_ROOT_BRIDGE_DEVICE_PATH.

[edk2] [PATCH 13/17] OvmfPkg: PciHostBridgeLib: set bus, IO and 32-bit MMIO windows in RootBus

2016-02-26 Thread Laszlo Ersek
The bus aperture is copied verbatim from InitRootBridge() [OvmfPkg/PciHostBridgeDxe/PciHostBridge.c]. The IO and 32-bit MMIO apertures are matched to PlatformPei's settings. PciHostBridgeLibDxe expects PciHostBridgeLib instances to advertize the exact apertures. Cc: Jordan Justen

[edk2] [PATCH 17/17] OvmfPkg: switch to MdeModulePkg/Bus/Pci/PciHostBridgeDxe

2016-02-26 Thread Laszlo Ersek
The old driver is retained for now; it remains available with "-D USE_OLD_PCI_HOST". This is because I'd like to involve end users and downstreams in testing the new drier, but also allow them to switch back to the old driver at the first sight of trouble, while we debug the new driver in

[edk2] [PATCH 09/17] OvmfPkg: PciHostBridgeLib: set RootBus->Segment

2016-02-26 Thread Laszlo Ersek
This is the first of the patches that set the fields of PCI_ROOT_BRIDGE. The structure is zero-filled as a precaution for later field additions. Here we set the Segment member explicitly to zero (so that any later customization can be easier). Cc: Jordan Justen Cc:

[edk2] [PATCH 08/17] OvmfPkg: PciHostBridgeLib: implement PciHostBridgeFreeRootBridges()

2016-02-26 Thread Laszlo Ersek
This function has no counterpart in OvmfPkg/PciHostBridgeDxe/, but the PciHostBridgeLib class requires it. Cc: Jordan Justen Cc: Ruiyu Ni Cc: Marcel Apfelbaum Contributed-under: TianoCore Contribution Agreement 1.0

[edk2] [PATCH 06/17] OvmfPkg: clone PciHostBridgeLib from MdeModulePkg's Null instance

2016-02-26 Thread Laszlo Ersek
In this patch we clone "MdeModulePkg/Library/PciHostBridgeLibNull" for customization under OvmfPkg. Differences relative to a verbatim copy: - the Null suffix is dropped from file names, - the UNI file is dropped, together with the corresponding MODULE_UNI_FILE reference in the INF file, - the

[edk2] [PATCH 02/17] MdeModulePkg: PciHostBridgeLibNull: rewrap source to 79 characters

2016-02-26 Thread Laszlo Ersek
Cc: Jordan Justen Cc: Ruiyu Ni Cc: Marcel Apfelbaum Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- MdeModulePkg/Library/PciHostBridgeLibNull/PciHostBridgeLibNull.inf |

[edk2] [PATCH 14/17] OvmfPkg: PciHostBridgeLib: set PCI config space boundaries

2016-02-26 Thread Laszlo Ersek
In "OvmfPkg/PciHostBridgeDxe/PciRootBridgeIo.c", the RootBridgeIoCheckParameter() function hard-codes them as [0x00..0xFF] (see the MAX_PCI_REG_ADDRESS macro), which matches OVMF's 0xCF8 / 0xCFC config access method. The "MdeModulePkg/Bus/Pci/PciHostBridgeDxe" driver abstracts away config space

[edk2] [PATCH 11/17] OvmfPkg: PciHostBridgeLib: clear RootBus->DmaAbove4G

2016-02-26 Thread Laszlo Ersek
When this BOOLEAN member is FALSE, and the caller tries to set up a DMA transfer between a PCI device and a host buffer not entirely under 4GB, then "MdeModulePkg/Bus/Pci/PciHostBridgeDxe" sets up a bounce buffer under 4GB, in the implementation of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL.Map(). Since

[edk2] [PATCH 12/17] OvmfPkg: PciHostBridgeLib: set RootBus->AllocationAttributes

2016-02-26 Thread Laszlo Ersek
InitRootBridge() in "OvmfPkg/PciHostBridgeDxe/PciHostBridge.c" passes the EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM allocation attribute to RootBridgeConstructor(); we should do the same here. >From "MdePkg/Include/Protocol/PciHostBridgeResourceAllocation.h": /// If this bit is set, then the PCI Root

[edk2] [PATCH 10/17] OvmfPkg: PciHostBridgeLib: set supported and initial attributes in RootBus

2016-02-26 Thread Laszlo Ersek
These settings are copied from the RootBridgeConstructor() function, file "OvmfPkg/PciHostBridgeDxe/PciRootBridgeIo.c". Cc: Jordan Justen Cc: Ruiyu Ni Cc: Marcel Apfelbaum Contributed-under: TianoCore Contribution Agreement 1.0

[edk2] [PATCH 05/17] OvmfPkg: factor the MMIO aperture shared by all PCI root bridges into PCDs

2016-02-26 Thread Laszlo Ersek
Going forward, two modules will need to know about the aperture: PlatformPei (as before), and OVMF's upcoming PciHostBridgeLib instance (because the core PciHostBridgeDxe driver requires the library to state the exact apertures for all root bridges). On QEMU, all root bridges share the same MMIO

Re: [edk2] [PATCH] ShellPkg: Fix unexpected behavior of mouse cursor in Editor.

2016-02-26 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey > -Original Message- > From: Qiu, Shumin > Sent: Thursday, February 25, 2016 10:54 PM > To: edk2-devel@lists.01.org > Cc: Qiu, Shumin ; Carsey, Jaben > ; Ni, Ruiyu >

[edk2] [PATCH 4/4] ArmPlatformPkg: PL061 - rewrite the hardware interaction

2016-02-26 Thread Leif Lindholm
The PL061 GPIO controller is a bit of an anachronism, and the existing driver does nothing to hide this - leading to it being very tricky to read. Rewrite it to document (in comments and code) what is actually happening, and fix some bugs in the process. Contributed-under: TianoCore Contribution

[edk2] [PATCH 0/4] Rework the pl061 driver for better readability

2016-02-26 Thread Leif Lindholm
On trying to review some really useful improvements to the PL061 driver, I found myself failing due to the unreadability of the existing code. This series reworks the existing driver in preparation for the improvements. Changes since RFC: - Rework the initialization code based on feedback from

Re: [edk2] [PATCH 0/4] Rework the pl061 driver for better readability

2016-02-26 Thread Ard Biesheuvel
On 26 February 2016 at 17:16, Leif Lindholm wrote: > On trying to review some really useful improvements to the PL061 driver, > I found myself failing due to the unreadability of the existing code. > This series reworks the existing driver in preparation for the >

[edk2] [PATCH 1/4] ArmPlatformPkg: PL061 - reformat copyright statement.

2016-02-26 Thread Leif Lindholm
The copyright statement in PL061Gpio.c would not fit on a normal terminal screen. Break lines at <= 80 characters. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Leif Lindholm --- ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c | 6 +++--- 1

Re: [edk2] [PATCH v3] MdeModulePkg/PciHostBridge: Don't assume resources are fully NonExistent

2016-02-26 Thread Ni, Ruiyu
Will you start to change the OVMF platform to use the core PciHostBridge next week? I am still not quite sure it's the only gap:) Regards, Ray >-Original Message- >From: Laszlo Ersek [mailto:ler...@redhat.com] >Sent: Friday, February 26, 2016 8:34 PM >To: Ni, Ruiyu

Re: [edk2] [Patch 3/4] MdeModulePkg/Bds: Support short-form URI boot.

2016-02-26 Thread Ni, Ruiyu
Sunny, For a short-form URI device path, it's like Uri(...)\End. We cannot get the parent handle from such short-form URI device path. So we have to use EfiBootManagerConnectAll(). Regards, Ray >-Original Message- >From: Wang, Sunny (HPS SW) [mailto:sunnyw...@hpe.com] >Sent: Friday,

Re: [edk2] [PATCH v2 0/2] RAM disk driver implementation

2016-02-26 Thread El-Haj-Mahmoud, Samer
Series Reviewed-by: Samer El-Haj-Mahmoud -Original Message- From: Hao Wu [mailto:hao.a...@intel.com] Sent: Thursday, February 25, 2016 11:14 PM To: edk2-devel@lists.01.org; feng.t...@intel.com; sigmaepsilo...@gmail.com; El-Haj-Mahmoud, Samer

Re: [edk2] [PATCH v2] MdeModulePkg: RegularExpressionDxe: support free(NULL)

2016-02-26 Thread Laszlo Ersek
On 02/26/16 18:16, Shia, Cinnamon wrote: > Hi Lazlo and David, > > Thanks for your explanation. :) > > Reviewed-By: Cinnamon Shia Thank you, pushed as ffbb5ae3ba7da2ece8dbf116b1eb0718c346d19b. Laszlo > > Thanks, > Cinnamon Shia > > -Original Message- > From:

Re: [edk2] [PATCH 0/4] Rework the pl061 driver for better readability

2016-02-26 Thread Ryan Harkin
On 26 February 2016 at 16:21, Ard Biesheuvel wrote: > On 26 February 2016 at 17:16, Leif Lindholm wrote: >> On trying to review some really useful improvements to the PL061 driver, >> I found myself failing due to the unreadability of the

Re: [edk2] [PATCH v2] MdeModulePkg: RegularExpressionDxe: support free(NULL)

2016-02-26 Thread Laszlo Ersek
On 02/26/16 17:43, Shia, Cinnamon wrote: > Hi Laszlo, > > Sorry for the late response. > If the code to do type casting is removed, is EvalOnce still needed? The type > of the input parameter of FreePool is (VOID *) the same as EvalOnce. > > Something like: > > #define free(p) \ >

Re: [edk2] [PATCH v4] DuetPkg-PciBusNoEnumerationDxe: Fix stack overflow

2016-02-26 Thread Bjorge, Erik C
Reviewed-by: Erik Bjorge > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > Lee Leahy > Sent: Thursday, February 25, 2016 6:08 PM > To: Ni, Ruiyu ; Bjorge, Erik C > ;

Re: [edk2] [PATCH v2] MdeModulePkg: RegularExpressionDxe: support free(NULL)

2016-02-26 Thread Shia, Cinnamon
Hi Laszlo, Sorry for the late response. If the code to do type casting is removed, is EvalOnce still needed? The type of the input parameter of FreePool is (VOID *) the same as EvalOnce. Something like: #define free(p) \ do { \ if (p != NULL) { \

Re: [edk2] [PATCH v2] MdeModulePkg: RegularExpressionDxe: support free(NULL)

2016-02-26 Thread David Woodhouse
On Fri, 2016-02-26 at 16:43 +, Shia, Cinnamon wrote: > > #define free(p) \ >   do {  \ >     if (p != NULL) { \ >   FreePool (p);  \ >    }   \ >  } while (FALSE) Now consider a line of code which invokes this as    free(myPointer++);

Re: [edk2] [PATCH v2] MdeModulePkg: RegularExpressionDxe: support free(NULL)

2016-02-26 Thread Ryan Harkin
Hi Laszlo, On 25 February 2016 at 10:22, Laszlo Ersek wrote: > The ISO C standard says about free(), > > If ptr is a null pointer, no action occurs. > > This is not true of the FreePool() interface of the MemoryAllocationLib > class: > > Buffer must have been allocated on