Re: [edk2] [PATCH] MdeModulePkg/UdfDxe: Remove negative comparison of unsigned number

2017-09-12 Thread Paulo Alcantara
On September 13, 2017 2:08:54 AM GMT-03:00, "Zeng, Star" wrote: >I do not understand the context of the code. >The change is good to fix the build failure, but I want to ask a >question before I gave Rb. :) > >Is it possible ReadFileInfo->FilePosition less than

Re: [edk2] [PATCH] MdeModulePkg/UdfDxe: Remove negative comparison of unsigned number

2017-09-12 Thread Zeng, Star
I do not understand the context of the code. The change is good to fix the build failure, but I want to ask a question before I gave Rb. :) Is it possible ReadFileInfo->FilePosition less than FilePosition? Thanks, Star -Original Message- From: Paulo Alcantara [mailto:pca...@zytor.com]

[edk2] [PATCH] MdeModulePkg/UdfDxe: Remove negative comparison of unsigned number

2017-09-12 Thread Paulo Alcantara
This patch gets rid of a negative comparison of an UINT64 type (Offset) as it'll never evaluate to true. Cc: Star Zeng Cc: Eric Dong Cc: Ruiyu Ni Cc: Dandan Bi Contributed-under: TianoCore Contribution

Re: [edk2] [PATCH v2 3/3] MdeModulePkg/UdfDxe: Add type cast to fix build failure in VS tools

2017-09-12 Thread Paulo Alcantara
Hi, On 13/09/2017 00:31, Zeng, Star wrote: Could you help send the patch quickly? As it breaks some platforms build and blocks others' development on that platform, for example Nt32. Yep. Sorry for the delay. I'll send it shortly. Thanks! Paulo Thanks, Star -Original Message-

Re: [edk2] StartImage() return value an error or return code ?

2017-09-12 Thread David F.
But what if you're running some unknown app that you don't know the return code format in the ExitData? It seems to just read that the ExitData will be some text followed by some binary data. On Mon, Sep 11, 2017 at 12:43 AM, Gao, Liming wrote: > Per UEFI spec,

Re: [edk2] [PATCH v2 3/3] MdeModulePkg/UdfDxe: Add type cast to fix build failure in VS tools

2017-09-12 Thread Zeng, Star
Could you help send the patch quickly? As it breaks some platforms build and blocks others' development on that platform, for example Nt32. Thanks, Star -Original Message- From: Paulo Alcantara [mailto:pca...@zytor.com] Sent: Tuesday, September 12, 2017 9:03 PM To: Zeng, Star

Re: [edk2] [PATCH] MdeModulePkg/PciBusDxe: GetBarAttributes() returns Host address

2017-09-12 Thread Ni, Ruiyu
I am going to hold the patch. Unless some real issue is exposed using current PciBus driver, I will not make any change to current implementation. Thanks/Ray > -Original Message- > From: Benjamin Herrenschmidt [mailto:b...@au1.ibm.com] > Sent: Wednesday, September 13, 2017 7:38 AM >

Re: [edk2] [PATCH 1/2] MdeModulePkg/UdfDxe: reject reserved values in ICB.Flags[2:0]

2017-09-12 Thread Ni, Ruiyu
Reviewed-by: Ruiyu Ni Thanks/Ray > -Original Message- > From: Laszlo Ersek [mailto:ler...@redhat.com] > Sent: Wednesday, September 13, 2017 6:26 AM > To: edk2-devel-01 > Cc: Ard Biesheuvel ; Dong, Eric >

[edk2] Spi/MvSpiDxe likely NullPtrException

2017-09-12 Thread methavanitpong.pipat
Hi, MvSpiDxe.c:MvSpiTransfer() attempts load data into DataInPtr, which is a possibly NULL pointer. https://github.com/tianocore/edk2-platforms/blob/master/Platform/Marvell/Drivers/Spi/MvSpiDxe.c#L228 / SNIP / for (Iterator = 0; Iterator < SPI_TIMEOUT;

[edk2] [PATCH 0/2] MdeModulePkg: UDF fixes and cleanups, round 2

2017-09-12 Thread Laszlo Ersek
Repo: https://github.com/lersek/edk2.git Branch: udf_fixes_cleanups_round2 Once these patches are sufficiently reviewed, please don't wait for me to commit them. Further UdfDxe issues should be please reported in the TianoCore Bugzilla. Cc: Ard Biesheuvel Cc: Eric

[edk2] [PATCH 1/2] MdeModulePkg/UdfDxe: reject reserved values in ICB.Flags[2:0]

2017-09-12 Thread Laszlo Ersek
The ECMA-167 standard (3rd Edition, June 1997) reserves values 4 through 7 in the ICB.Flags[2:0] bit-field for future standardization; see "14.6 ICB Tag" / "14.6.8 Flags (RBP 18)". https://www.ecma-international.org/publications/standards/Ecma-167.htm The switch (RecordingFlags) statement in

[edk2] [PATCH 2/2] MdeModulePkg/UdfDxe: suppress incorrect compiler warning in ReadFile()

2017-09-12 Thread Laszlo Ersek
When building the driver for DEBUG/RELEASE, GCC48/GCC49 warn about ReadFile() possibly using "BytesLeft" without initializing it first. This is not the case. The reads of "BytesLeft" are only reachable if (ReadFileInfo->Flags == READ_FILE_SEEK_AND_READ). But, in that case, we also set "BytesLeft"

Re: [edk2] [PATCH 0/5] MdeModulePkg: UDF fixes and cleanups

2017-09-12 Thread Laszlo Ersek
On 09/12/17 17:38, Ard Biesheuvel wrote: > On 12 September 2017 at 03:14, Laszlo Ersek wrote: >> On 09/10/17 02:12, Laszlo Ersek wrote: >>> Repo: https://github.com/lersek/edk2.git >>> Branch: udf_fixes_cleanups >>> >>> Patches #2, #3 and #4 are needed (and enough) for me to

Re: [edk2] [PATCH] MdeModulePkg/PciBusDxe: GetBarAttributes() returns Host address

2017-09-12 Thread Laszlo Ersek
On 09/12/17 17:49, Ard Biesheuvel wrote: > On 12 September 2017 at 01:40, Laszlo Ersek wrote: >> On 09/12/17 08:44, Ard Biesheuvel wrote: >>> On 12 September 2017 at 06:01, Ni, Ruiyu wrote: Laszlo, Your understanding is: DeviceAddress =

Re: [edk2] [PATCH] MdeModulePkg/PciBusDxe: GetBarAttributes() returns Host address

2017-09-12 Thread Ard Biesheuvel
On 12 September 2017 at 01:40, Laszlo Ersek wrote: > On 09/12/17 08:44, Ard Biesheuvel wrote: >> On 12 September 2017 at 06:01, Ni, Ruiyu wrote: >>> Laszlo, >>> Your understanding is: DeviceAddress = HostAddress + >>> AddressTranslationOffset >>> But my

Re: [edk2] [PATCH 0/5] MdeModulePkg: UDF fixes and cleanups

2017-09-12 Thread Ard Biesheuvel
On 12 September 2017 at 03:14, Laszlo Ersek wrote: > On 09/10/17 02:12, Laszlo Ersek wrote: >> Repo: https://github.com/lersek/edk2.git >> Branch: udf_fixes_cleanups >> >> Patches #2, #3 and #4 are needed (and enough) for me to build OVMF for >> IA32 and X64 with clang-3.8,

Re: [edk2] [PATCH v2 3/3] MdeModulePkg/UdfDxe: Add type cast to fix build failure in VS tools

2017-09-12 Thread Paulo Alcantara
Hi, On 9/12/2017 6:39 AM, Zeng, Star wrote: There is change(type cast to INT64) below in this patch. After check, we found the " if (Offset < 0) " should be always false comparison as Offset is UINT64 type. I have suggested Dandan to remove this change(type case to INT64) at v3 patch series

Re: [edk2] [PATCH] MdeModulePkg/UdfDxe: Fix NULL pointer dereference

2017-09-12 Thread Laszlo Ersek
On 09/12/17 03:30, Paulo Alcantara wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=704 > > For root directory, the FID (File Identifier Descriptor) pointer is > accessible through PRIVATE_UDF_FILE_DATA.Root, whereas non-root > directory and regular files, their FIDs are accessible

Re: [edk2] [PATCH 0/3] ArmVirtPkg: add HTTP_BOOT_ENABLE and UsbMassStorageDxe

2017-09-12 Thread Laszlo Ersek
On 09/12/17 08:48, Ard Biesheuvel wrote: > On 11 September 2017 at 22:08, Laszlo Ersek wrote: >> Repo: https://github.com/lersek/edk2.git >> Branch: armvirt_http_usbstor >> >> I was... ugh... experimenting with "stuff" over the weekend, and >> realized these were missing. >>

Re: [edk2] [PATCH edk2-platforms 13/14] Silicon/Socionext: add driver for SPI NOR flash

2017-09-12 Thread methavanitpong.pipat
> -Original Message- > From: Leif Lindholm [mailto:leif.lindh...@linaro.org] > Sent: Tuesday, September 12, 2017 5:39 PM > To: Methavanitpong, Pipat/メタワニットポン ピパット > > Cc: edk2-devel@lists.01.org; masahisa.koj...@linaro.org; >

[edk2] Partition Driver started multiple times.

2017-09-12 Thread Ramesh R .
Hi, Is there any reason why are we starting the partition driver again for the same partition if it's already started. if (Status == EFI_ALREADY_STARTED) { return EFI_SUCCESS; } Thanks, Ramesh ___ edk2-devel mailing list

Re: [edk2] [PATCH 3/5] MdeModulePkg/UdfDxe: replace zero-init of local variables with ZeroMem()

2017-09-12 Thread Laszlo Ersek
On 09/12/17 11:38, Ni, Ruiyu wrote: > Star, > Sizeof is an operator, not a function, like + or -. Not having () is ok. Ugh, just seeing this now :) So what should I do now? If Star agrees, I would prefer *not* to add the parens. If Star insists, I can add them. Thanks Laszlo >> -Original

Re: [edk2] [PATCH 3/5] MdeModulePkg/UdfDxe: replace zero-init of local variables with ZeroMem()

2017-09-12 Thread Laszlo Ersek
On 09/12/17 10:55, Zeng, Star wrote: > Reviewed-by: Star Zeng > > BTW: How about to use "sizeof ()" instead of "sizeof"? "sizeof" is a unary operator. The parentheses are mandatory when sizeof is used with a type name, but when the operand of sizeof is an expression, the

Re: [edk2] [PATCH v3 1/3] MdeModulePkg/UdfDxe: Add type cast to fix build failure in VS tools

2017-09-12 Thread Ni, Ruiyu
Reviewed-by: Ruiyu Ni Thanks/Ray > -Original Message- > From: Bi, Dandan > Sent: Tuesday, September 12, 2017 4:56 PM > To: edk2-devel@lists.01.org > Cc: Dong, Eric ; Paulo Alcantara ; > Ni, Ruiyu ; Zeng, Star

Re: [edk2] [PATCH v3 2/3] MdeModulePkg/UdfDxe: Initialize the array after declaration

2017-09-12 Thread Ni, Ruiyu
Reviewed-by: Ruiyu Ni Thanks/Ray > -Original Message- > From: Bi, Dandan > Sent: Tuesday, September 12, 2017 4:56 PM > To: edk2-devel@lists.01.org > Cc: Dong, Eric ; Paulo Alcantara ; > Ni, Ruiyu ; Zeng, Star

Re: [edk2] [PATCH v3 3/3] MdeModulePkg/PartitionDxe: Initialize the array after declaration

2017-09-12 Thread Ni, Ruiyu
Reviewed-by: Ruiyu Ni Thanks/Ray > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > Dandan Bi > Sent: Tuesday, September 12, 2017 4:56 PM > To: edk2-devel@lists.01.org > Cc: Ni, Ruiyu ; Dong, Eric

Re: [edk2] [PATCH 3/5] MdeModulePkg/UdfDxe: replace zero-init of local variables with ZeroMem()

2017-09-12 Thread Ni, Ruiyu
Star, Sizeof is an operator, not a function, like + or -. Not having () is ok. Thanks/Ray > -Original Message- > From: Zeng, Star > Sent: Tuesday, September 12, 2017 4:55 PM > To: Laszlo Ersek ; edk2-devel-01 de...@lists.01.org> > Cc: Ard Biesheuvel

Re: [edk2] [PATCH v2 3/3] MdeModulePkg/UdfDxe: Add type cast to fix build failure in VS tools

2017-09-12 Thread Zeng, Star
Hi Paulo, There is change(type cast to INT64) below in this patch. After check, we found the " if (Offset < 0) " should be always false comparison as Offset is UINT64 type. I have suggested Dandan to remove this change(type case to INT64) at v3 patch series

Re: [edk2] [PATCH v3 0/3] Fix VS tool chain build failure

2017-09-12 Thread Zeng, Star
Reviewed-by: Star Zeng and pushed the patches at https://github.com/tianocore/edk2/compare/1f4807074005...c05cae55ebd8. I also picked up the Reviewed-by of Paulo at https://lists.01.org/pipermail/edk2-devel/2017-September/014490.html when pushing the patches. I also fixed

Re: [edk2] [PATCH 2/5] MdeModulePkg/UdfDxe: don't return unset Status if INLINE_DATA req succeeds

2017-09-12 Thread Zeng, Star
Reviewed-by: Star Zeng -Original Message- From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Sunday, September 10, 2017 8:13 AM To: edk2-devel-01 Cc: Ard Biesheuvel ; Dong, Eric ; Paulo

[edk2] [PATCH v3 3/3] MdeModulePkg/PartitionDxe: Initialize the array after declaration

2017-09-12 Thread Dandan Bi
Initialize the array DescriptorLBAs[] after declaration to fix non-constant aggregate initializer warning in VS tool chains. Cc: Eric Dong Cc: Paulo Alcantara Cc: Ruiyu Ni Cc: Star Zeng Contributed-under:

[edk2] [PATCH v3 2/3] MdeModulePkg/UdfDxe: Initialize the array after declaration

2017-09-12 Thread Dandan Bi
Initialize the array DescriptorLBAs[] after declaration to fix non-constant aggregate initializer warning in VS tool chains. Cc: Eric Dong Cc: Paulo Alcantara Cc: Ruiyu Ni Cc: Star Zeng Contributed-under:

[edk2] [PATCH v3 1/3] MdeModulePkg/UdfDxe: Add type cast to fix build failure in VS tools

2017-09-12 Thread Dandan Bi
V3: Remove one unnecessay type cast in patch 1. Codes: if (FilePosition + ExtentLength > ReadFileInfo->FilePosition) { Offset = ReadFileInfo->FilePosition - FilePosition; if (Offset < 0) { Offset = -(Offset) } ... } offset is UINT64 can not < 0, so the code logic may have some issue. and

[edk2] [PATCH v3 0/3] Fix VS tool chain build failure

2017-09-12 Thread Dandan Bi
V3: Remove one unnecessay type cast in patch 1. Dandan Bi (3): MdeModulePkg/UdfDxe: Add type cast to fix build failure in VS tools MdeModulePkg/UdfDxe: Initialize the array after declaration MdeModulePkg/PartitionDxe: Initialize the array after declaration

Re: [edk2] [PATCH 3/5] MdeModulePkg/UdfDxe: replace zero-init of local variables with ZeroMem()

2017-09-12 Thread Zeng, Star
Reviewed-by: Star Zeng BTW: How about to use "sizeof ()" instead of "sizeof"? Thanks, Star -Original Message- From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Sunday, September 10, 2017 8:13 AM To: edk2-devel-01 Cc: Ard Biesheuvel

Re: [edk2] [PATCH 5/5] MdeModulePkg/PartitionDxe: remove always false comparison

2017-09-12 Thread Zeng, Star
Reviewed-by: Star Zeng -Original Message- From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Sunday, September 10, 2017 8:13 AM To: edk2-devel-01 Cc: Ard Biesheuvel ; Dong, Eric ; Paulo

Re: [edk2] Question on Iscsi Behavior

2017-09-12 Thread Karunakar P
Hi Ting Ye, Thank you very much for your info. Thanks, karunakar -Original Message- From: Ye, Ting [mailto:ting...@intel.com] Sent: Tuesday, September 12, 2017 1:49 PM To: Karunakar P; edk2-devel@lists.01.org Subject: RE: [edk2] Question on Iscsi Behavior Hi Karunakar, In "Enabled"

Re: [edk2] [PATCH 4/5] MdeModulePkg/PartitionDxe: don't divide 64-bit values with C operators

2017-09-12 Thread Zeng, Star
Reviewed-by: Star Zeng I am not sure whether the other patches in this series has been reviewed or not. Since this patch is fixing build break, I think we can have this patch pushed first after reviewed. And really appreciate that. :) Thanks, Star -Original

Re: [edk2] [PATCH] MdeModulePkg/PciBusDxe: GetBarAttributes() returns Host address

2017-09-12 Thread Laszlo Ersek
On 09/12/17 08:44, Ard Biesheuvel wrote: > On 12 September 2017 at 06:01, Ni, Ruiyu wrote: >> Laszlo, >> Your understanding is: DeviceAddress = HostAddress + AddressTranslationOffset >> But my patch assumes: HostAddress = DeviceAddress + AddressTranslationOffset >> >> They are

Re: [edk2] [PATCH edk2-platforms 13/14] Silicon/Socionext: add driver for SPI NOR flash

2017-09-12 Thread Leif Lindholm
On Tue, Sep 12, 2017 at 01:41:34AM +, methavanitpong.pi...@socionext.com wrote: > > -Original Message- > > From: Leif Lindholm [mailto:leif.lindh...@linaro.org] > > Sent: Tuesday, September 12, 2017 4:13 AM > > To: Ard Biesheuvel > > Cc:

Re: [edk2] [PATCH 4/5] MdeModulePkg/PartitionDxe: don't divide 64-bit values with C operators

2017-09-12 Thread Ni, Ruiyu
Reviewed-by: Ruiyu Ni Thanks/Ray > -Original Message- > From: Laszlo Ersek [mailto:ler...@redhat.com] > Sent: Tuesday, September 12, 2017 3:59 PM > To: Bi, Dandan ; edk2-devel-01 de...@lists.01.org> > Cc: Ni, Ruiyu ; Dong,

Re: [edk2] [PATCH 4/5] MdeModulePkg/PartitionDxe: don't divide 64-bit values with C operators

2017-09-12 Thread Laszlo Ersek
On 09/12/17 07:41, Bi, Dandan wrote: > Hi Laszlo, > > When do you plan to push this patch? IA32 build is blocked for this issue now. I was ready to push the series yesterday; I just hoped I'd get review feedback from MdeModulePkg maintainers as well, and/or from Ray, in one or two days. These

Re: [edk2] [Patch] BaseTools: add support for BIOS build with binary cache

2017-09-12 Thread Gao, Liming
Reviewed-by: Liming Gao >-Original Message- >From: Zhu, Yonghong >Sent: Monday, September 04, 2017 4:44 PM >To: edk2-devel@lists.01.org >Cc: Gao, Liming >Subject: [Patch] BaseTools: add support for BIOS build with binary cache > >Add three new

Re: [edk2] [Patch] Build spec: add description for build with binary cache

2017-09-12 Thread Gao, Liming
Reviewed-by: Liming Gao >-Original Message- >From: Zhu, Yonghong >Sent: Monday, September 04, 2017 4:43 PM >To: edk2-devel@lists.01.org >Cc: Gao, Liming ; Kinney, Michael D >; Shaw, Kevin W

Re: [edk2] Fwd: StartImage with Secure Boot on Self-Signed App

2017-09-12 Thread Gao, Liming
You can load and start the image based on PeCoffLib APIs in BasePeCoffLib instead of LoadImage() and StartImage() service. >-Original Message- >From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of >David F. >Sent: Friday, September 08, 2017 11:34 PM >To: Gary Lin

Re: [edk2] [PATCH 0/3] ArmVirtPkg: add HTTP_BOOT_ENABLE and UsbMassStorageDxe

2017-09-12 Thread Ard Biesheuvel
On 11 September 2017 at 22:08, Laszlo Ersek wrote: > Repo: https://github.com/lersek/edk2.git > Branch: armvirt_http_usbstor > > I was... ugh... experimenting with "stuff" over the weekend, and > realized these were missing. > > Cc: Ard Biesheuvel

Re: [edk2] [PATCH] MdeModulePkg/PciBusDxe: GetBarAttributes() returns Host address

2017-09-12 Thread Ard Biesheuvel
On 12 September 2017 at 06:01, Ni, Ruiyu wrote: > Laszlo, > Your understanding is: DeviceAddress = HostAddress + AddressTranslationOffset > But my patch assumes: HostAddress = DeviceAddress + AddressTranslationOffset > > They are totally different. If I follow your