Re: [edk2] [PATCH 1/1] ArmPkg/Include: Add standard SMC and SVC function IDs for MM interface.

2017-09-22 Thread Supreeth Venkatesh
On Fri, 2017-09-22 at 22:45 +0100, Achin Gupta wrote:
> Hi Supreeth,
> 
> On Fri, Sep 22, 2017 at 08:25:39PM +0100, Supreeth Venkatesh wrote:
> > 
> > This patch adds a list of function IDs that fall under the standard
> > SMC range as defined in
> > http://infocenter.arm.com/help/topic/com.arm.doc.den0060a/DEN0060A_
> > ARM_MM_Interface_Specification.pdf.
> > 
> > SMCs associated with Management Mode are in the range 0xC440 -
> > 0xC45f (64 bit) and 0x8440 - 0x845f (32 bit).
> > 
> > The function(s) available to the normal world:
> > 1. Request services from the secure MM environment using
> > MM_COMMUNICATE.
> > 
> > SVCs are in the range 0xC460 - 0xC47f.
> > The functions available to the secure MM partition:
> > 1. Signal completion of MM event handling.
> > 2. Set/Get memory attributes for a memory region at runtime.
> > 3. Get version number of secure partition manager.
> > 
> > Also, it defines memory attributes and MM return codes.
> The SVCs in the 0xC460 - 0xC47f range are not a part of the
> MM interface
> specification. At the moment, these are used to implement an
> interface between
> ARM TF in EL3 and S-EL0. These should go into a separate patch that
> introduces
> them as an ARM TF ABI.
> 
> cheers,
> Achin

Thanks for taking a look at it. This was added in ArmStdSmc.h
deliberately to request comments/feedback. I don't think SVC defines
belong in this file at all. It should have its own header file.

Since it is specific to MM (S-EL0) - EL3 communication, I am tempted to
create a new header file  named "ArmMmSvc.h" and put in
ArmPkg/Include/IndustryStandard folder.

Comments - Maintainers/Anyone? 
> 
> > 
> > 
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Achin Gupta 
> > Signed-off-by: Supreeth Venkatesh 
> > ---
> >  ArmPkg/Include/IndustryStandard/ArmStdSmc.h | 46
> > -
> >  1 file changed, 45 insertions(+), 1 deletion(-)
> > 
> > diff --git a/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
> > b/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
> > index 593a3ce729..a625bc2048 100644
> > --- a/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
> > +++ b/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
> > @@ -1,6 +1,6 @@
> >  /** @file
> >  *
> > -*  Copyright (c) 2012-2014, ARM Limited. All rights reserved.
> > +*  Copyright (c) 2012-2017, ARM Limited. All rights reserved.
> >  *
> >  *  This program and the accompanying materials
> >  *  are licensed and made available under the terms and conditions
> > of the BSD License
> > @@ -40,6 +40,50 @@
> >  #define ARM_SMC_STD_REVISION_MAJOR0x0
> >  #define ARM_SMC_STD_REVISION_MINOR0x1
> > 
> > +
> > +/*
> > + * Management Mode (MM) calls cover a subset of the Standard
> > Service Call range.
> > + * The list below is not exhaustive.
> > + */
> > +#define ARM_SMC_ID_MM_VERSION_AARCH32  0x8440
> > +#define ARM_SMC_ID_MM_VERSION_AARCH64  0xC440
> > +
> > +// Request service from secure standalone MM environment
> > +#define ARM_SMC_ID_MM_COMMUNICATE_AARCH32  0x8441
> > +#define ARM_SMC_ID_MM_COMMUNICATE_AARCH64  0xC441
> > +
> > +/*
> > + * SVC IDs to allow the MM secure partition to initialise itself,
> > handle
> > + * delegated events and request the Secure partition manager to
> > perform
> > + * privileged operations on its behalf.
> > + */
> > +#define ARM_SVC_ID_SPM_VERSION_AARCH64 0xC460
> > +#define ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64   0xC461
> > +#define ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES_AARCH64   0xC464
> > +#define ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES_AARCH64   0xC465
> > +
> > +#define SET_MEM_ATTR_DATA_PERM_MASK   0x3
> > +#define SET_MEM_ATTR_DATA_PERM_SHIFT0
> > +#define SET_MEM_ATTR_DATA_PERM_NO_ACCESS0
> > +#define SET_MEM_ATTR_DATA_PERM_RW   1
> > +#define SET_MEM_ATTR_DATA_PERM_RO   3
> > +
> > +#define SET_MEM_ATTR_CODE_PERM_MASK   0x1
> > +#define SET_MEM_ATTR_CODE_PERM_SHIFT2
> > +#define SET_MEM_ATTR_CODE_PERM_X0
> > +#define SET_MEM_ATTR_CODE_PERM_XN   1
> > +
> > +#define SET_MEM_ATTR_MAKE_PERM_REQUEST(d_perm,
> > c_perm)\
> > +c_perm) & SET_MEM_ATTR_CODE_PERM_MASK) <<
> > SET_MEM_ATTR_CODE_PERM_SHIFT) | \
> > +(( (d_perm) & SET_MEM_ATTR_DATA_PERM_MASK) <<
> > SET_MEM_ATTR_DATA_PERM_SHIFT))
> > +
> > +/* MM return error codes */
> > +#define ARM_SMC_MM_RET_SUCCESS  0
> > +#define ARM_SMC_MM_RET_NOT_SUPPORTED   -1
> > +#define ARM_SMC_MM_RET_INVALID_PARAMS  -2
> > +#define ARM_SMC_MM_RET_DENIED  -3
> > +#define ARM_SMC_MM_RET_NO_MEMORY   -4
> > +
> >  /*
> >   * Power State Coordination Interface (PSCI) calls cover a subset
> > of the
> >   * Standard Service Call range.
> > --
> > 2.14.1
> > 
___
edk2-devel mailing list

[edk2] [PATCH 1/1] ArmPkg/Include: Add standard SMC and SVC function IDs for MM interface.

2017-09-22 Thread Supreeth Venkatesh
This patch adds a list of function IDs that fall under the standard
SMC range as defined in
http://infocenter.arm.com/help/topic/com.arm.doc.den0060a/DEN0060A_ARM_MM_Interface_Specification.pdf.

SMCs associated with Management Mode are in the range 0xC440 -
0xC45f (64 bit) and 0x8440 - 0x845f (32 bit).

The function(s) available to the normal world:
1. Request services from the secure MM environment using MM_COMMUNICATE.

SVCs are in the range 0xC460 - 0xC47f.
The functions available to the secure MM partition:
1. Signal completion of MM event handling.
2. Set/Get memory attributes for a memory region at runtime.
3. Get version number of secure partition manager.

Also, it defines memory attributes and MM return codes.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Achin Gupta 
Signed-off-by: Supreeth Venkatesh 
---
 ArmPkg/Include/IndustryStandard/ArmStdSmc.h | 46 -
 1 file changed, 45 insertions(+), 1 deletion(-)

diff --git a/ArmPkg/Include/IndustryStandard/ArmStdSmc.h 
b/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
index 593a3ce729..a625bc2048 100644
--- a/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
+++ b/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
@@ -1,6 +1,6 @@
 /** @file
 *
-*  Copyright (c) 2012-2014, ARM Limited. All rights reserved.
+*  Copyright (c) 2012-2017, ARM Limited. All rights reserved.
 *
 *  This program and the accompanying materials
 *  are licensed and made available under the terms and conditions of the BSD 
License
@@ -40,6 +40,50 @@
 #define ARM_SMC_STD_REVISION_MAJOR0x0
 #define ARM_SMC_STD_REVISION_MINOR0x1
 
+
+/*
+ * Management Mode (MM) calls cover a subset of the Standard Service Call 
range.
+ * The list below is not exhaustive.
+ */
+#define ARM_SMC_ID_MM_VERSION_AARCH32  0x8440
+#define ARM_SMC_ID_MM_VERSION_AARCH64  0xC440
+
+// Request service from secure standalone MM environment
+#define ARM_SMC_ID_MM_COMMUNICATE_AARCH32  0x8441
+#define ARM_SMC_ID_MM_COMMUNICATE_AARCH64  0xC441
+
+/*
+ * SVC IDs to allow the MM secure partition to initialise itself, handle
+ * delegated events and request the Secure partition manager to perform
+ * privileged operations on its behalf.
+ */
+#define ARM_SVC_ID_SPM_VERSION_AARCH64 0xC460
+#define ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64   0xC461
+#define ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES_AARCH64   0xC464
+#define ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES_AARCH64   0xC465
+
+#define SET_MEM_ATTR_DATA_PERM_MASK   0x3
+#define SET_MEM_ATTR_DATA_PERM_SHIFT0
+#define SET_MEM_ATTR_DATA_PERM_NO_ACCESS0
+#define SET_MEM_ATTR_DATA_PERM_RW   1
+#define SET_MEM_ATTR_DATA_PERM_RO   3
+
+#define SET_MEM_ATTR_CODE_PERM_MASK   0x1
+#define SET_MEM_ATTR_CODE_PERM_SHIFT2
+#define SET_MEM_ATTR_CODE_PERM_X0
+#define SET_MEM_ATTR_CODE_PERM_XN   1
+
+#define SET_MEM_ATTR_MAKE_PERM_REQUEST(d_perm, c_perm) 
   \
+c_perm) & SET_MEM_ATTR_CODE_PERM_MASK) << 
SET_MEM_ATTR_CODE_PERM_SHIFT) | \
+(( (d_perm) & SET_MEM_ATTR_DATA_PERM_MASK) << 
SET_MEM_ATTR_DATA_PERM_SHIFT))
+
+/* MM return error codes */
+#define ARM_SMC_MM_RET_SUCCESS  0
+#define ARM_SMC_MM_RET_NOT_SUPPORTED   -1
+#define ARM_SMC_MM_RET_INVALID_PARAMS  -2
+#define ARM_SMC_MM_RET_DENIED  -3
+#define ARM_SMC_MM_RET_NO_MEMORY   -4
+
 /*
  * Power State Coordination Interface (PSCI) calls cover a subset of the
  * Standard Service Call range.
-- 
2.14.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 1/1] ArmPkg/Include: Add standard SMC and SVC function IDs for MM interface.

2017-09-22 Thread Ard Biesheuvel
On 22 September 2017 at 15:12, Supreeth Venkatesh
 wrote:
> On Fri, 2017-09-22 at 22:45 +0100, Achin Gupta wrote:
>> Hi Supreeth,
>>
>> On Fri, Sep 22, 2017 at 08:25:39PM +0100, Supreeth Venkatesh wrote:
>> >
>> > This patch adds a list of function IDs that fall under the standard
>> > SMC range as defined in
>> > http://infocenter.arm.com/help/topic/com.arm.doc.den0060a/DEN0060A_
>> > ARM_MM_Interface_Specification.pdf.
>> >
>> > SMCs associated with Management Mode are in the range 0xC440 -
>> > 0xC45f (64 bit) and 0x8440 - 0x845f (32 bit).
>> >
>> > The function(s) available to the normal world:
>> > 1. Request services from the secure MM environment using
>> > MM_COMMUNICATE.
>> >
>> > SVCs are in the range 0xC460 - 0xC47f.
>> > The functions available to the secure MM partition:
>> > 1. Signal completion of MM event handling.
>> > 2. Set/Get memory attributes for a memory region at runtime.
>> > 3. Get version number of secure partition manager.
>> >
>> > Also, it defines memory attributes and MM return codes.
>> The SVCs in the 0xC460 - 0xC47f range are not a part of the
>> MM interface
>> specification. At the moment, these are used to implement an
>> interface between
>> ARM TF in EL3 and S-EL0. These should go into a separate patch that
>> introduces
>> them as an ARM TF ABI.
>>
>> cheers,
>> Achin
>
> Thanks for taking a look at it. This was added in ArmStdSmc.h
> deliberately to request comments/feedback. I don't think SVC defines
> belong in this file at all. It should have its own header file.
>
> Since it is specific to MM (S-EL0) - EL3 communication, I am tempted to
> create a new header file  named "ArmMmSvc.h" and put in
> ArmPkg/Include/IndustryStandard folder.
>
> Comments - Maintainers/Anyone?

If these are only used for SVC calls from S-EL0, then yes, they should
be in a separate header file.
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] multiple paddings in the same PCI resource tree

2017-09-22 Thread Laszlo Ersek
Hi Ray,

I ran into an interesting problem, while working on
"OvmfPkg/PciHotPlugInitDxe":

It is an assertion failure in CalculateResourceAperture(), in
"MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c":

> VOID
> CalculateResourceAperture (
>   IN PCI_RESOURCE_NODE*Bridge
>   )
> {
>   UINT64Aperture;
>   LIST_ENTRY*CurrentLink;
>   PCI_RESOURCE_NODE *Node;
>   UINT64PaddingAperture;
>   UINT64Offset;
>
>   Aperture= 0;
>   PaddingAperture = 0;
>
>   if (Bridge == NULL) {
> return ;
>   }
>
>   if (Bridge->ResType == PciBarTypeIo16) {
>
> CalculateApertureIo16 (Bridge);
> return ;
>   }
>
>   //
>   // Assume the bridge is aligned
>   //
>   for ( CurrentLink = GetFirstNode (>ChildList)
>   ; !IsNull (>ChildList, CurrentLink)
>   ; CurrentLink = GetNextNode (>ChildList, CurrentLink)
>   ) {
>
> Node = RESOURCE_NODE_FROM_LINK (CurrentLink);
> if (Node->ResourceUsage == PciResUsagePadding) {
>   ASSERT (PaddingAperture == 0);
>   PaddingAperture = Node->Length;
>   continue;
> }

The ASSERT() was added in commit c7e7613e09ff ("MdeModulePkg: Fix a
PciBusDxe hot plug bug", 2015-11-03), which makes the argument that:

Correct behavior is to reserve the bigger one between the padding
resource and the actual occupied resource.

While I totally agree with that statement, I don't think the ASSERT() is
correct. The ASSERT() assumes that every resource tree  -- Mem32Node,
PMem32Node, Mem64Node, PMem64Node, IoNode -- will contain at most one
padding.

I think this assumption can be broken easily; the DegradeResource()
function merges resource trees for a number of reasons. For example,

- if the Hot Plug Init Protocol requests, for a bridge,

  - both 2MB non-prefetchable 32-bit MMIO reservation

  - and 2MB prefetchable 32-bit MMIO reservation,

- and the root bridge reported EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM,

then DegradeResource() will merge the PMem32 padding as well into the
Mem32 tree (not just BARs of devices behind the bridge), while the Mem32
tree already has a Mem32 padding. Thus the Mem32 tree will end up with
two paddings.

Other degradations are possible too, which can lead to the same
situation:

- For example 64-bit -> 32-bit degradation.

- Or we can imagine a recursive situation where we have two bridges
  down-stream from an upstream bridge, the first downstream bridge wants
  a PMem32 padding, while the second downstream bridge wants a Mem32
  padding. On the level of the upstream bridge, I believe these two
  paddings will be merged into the same resource tree (in case of
  EFI_PCI_HOST_BRIDGE_COMBINE_MEM_PMEM).

My question is if the problem is easy enough for me to fix:

(a) Should I replace the ASSERT() and the assignment with summation?

  PaddingAperture += Node->Length;

(b) Should I replace them with a MAX() search?

  PaddingAperture = MAX (PaddingAperture, Node->Length);

(c) Is the fix more complicated than (a) and (b)?

I think the correct solution is (b), in the spirit of your commit
c7e7613e09ff, but I'm not sure if any other parts of PciBusDxe need to
be updated for (b).

Thanks!
Laszlo
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 1/1] ArmPkg/Include: Add standard SMC and SVC function IDs for MM interface.

2017-09-22 Thread Achin Gupta
Hi Supreeth,

On Fri, Sep 22, 2017 at 08:25:39PM +0100, Supreeth Venkatesh wrote:
> This patch adds a list of function IDs that fall under the standard
> SMC range as defined in
> http://infocenter.arm.com/help/topic/com.arm.doc.den0060a/DEN0060A_ARM_MM_Interface_Specification.pdf.
>
> SMCs associated with Management Mode are in the range 0xC440 -
> 0xC45f (64 bit) and 0x8440 - 0x845f (32 bit).
>
> The function(s) available to the normal world:
> 1. Request services from the secure MM environment using MM_COMMUNICATE.
>
> SVCs are in the range 0xC460 - 0xC47f.
> The functions available to the secure MM partition:
> 1. Signal completion of MM event handling.
> 2. Set/Get memory attributes for a memory region at runtime.
> 3. Get version number of secure partition manager.
>
> Also, it defines memory attributes and MM return codes.

The SVCs in the 0xC460 - 0xC47f range are not a part of the MM interface
specification. At the moment, these are used to implement an interface between
ARM TF in EL3 and S-EL0. These should go into a separate patch that introduces
them as an ARM TF ABI.

cheers,
Achin

>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Achin Gupta 
> Signed-off-by: Supreeth Venkatesh 
> ---
>  ArmPkg/Include/IndustryStandard/ArmStdSmc.h | 46 
> -
>  1 file changed, 45 insertions(+), 1 deletion(-)
>
> diff --git a/ArmPkg/Include/IndustryStandard/ArmStdSmc.h 
> b/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
> index 593a3ce729..a625bc2048 100644
> --- a/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
> +++ b/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
> @@ -1,6 +1,6 @@
>  /** @file
>  *
> -*  Copyright (c) 2012-2014, ARM Limited. All rights reserved.
> +*  Copyright (c) 2012-2017, ARM Limited. All rights reserved.
>  *
>  *  This program and the accompanying materials
>  *  are licensed and made available under the terms and conditions of the BSD 
> License
> @@ -40,6 +40,50 @@
>  #define ARM_SMC_STD_REVISION_MAJOR0x0
>  #define ARM_SMC_STD_REVISION_MINOR0x1
>
> +
> +/*
> + * Management Mode (MM) calls cover a subset of the Standard Service Call 
> range.
> + * The list below is not exhaustive.
> + */
> +#define ARM_SMC_ID_MM_VERSION_AARCH32  0x8440
> +#define ARM_SMC_ID_MM_VERSION_AARCH64  0xC440
> +
> +// Request service from secure standalone MM environment
> +#define ARM_SMC_ID_MM_COMMUNICATE_AARCH32  0x8441
> +#define ARM_SMC_ID_MM_COMMUNICATE_AARCH64  0xC441
> +
> +/*
> + * SVC IDs to allow the MM secure partition to initialise itself, handle
> + * delegated events and request the Secure partition manager to perform
> + * privileged operations on its behalf.
> + */
> +#define ARM_SVC_ID_SPM_VERSION_AARCH64 0xC460
> +#define ARM_SVC_ID_SP_EVENT_COMPLETE_AARCH64   0xC461
> +#define ARM_SVC_ID_SP_GET_MEM_ATTRIBUTES_AARCH64   0xC464
> +#define ARM_SVC_ID_SP_SET_MEM_ATTRIBUTES_AARCH64   0xC465
> +
> +#define SET_MEM_ATTR_DATA_PERM_MASK   0x3
> +#define SET_MEM_ATTR_DATA_PERM_SHIFT0
> +#define SET_MEM_ATTR_DATA_PERM_NO_ACCESS0
> +#define SET_MEM_ATTR_DATA_PERM_RW   1
> +#define SET_MEM_ATTR_DATA_PERM_RO   3
> +
> +#define SET_MEM_ATTR_CODE_PERM_MASK   0x1
> +#define SET_MEM_ATTR_CODE_PERM_SHIFT2
> +#define SET_MEM_ATTR_CODE_PERM_X0
> +#define SET_MEM_ATTR_CODE_PERM_XN   1
> +
> +#define SET_MEM_ATTR_MAKE_PERM_REQUEST(d_perm, c_perm)   
>  \
> +c_perm) & SET_MEM_ATTR_CODE_PERM_MASK) << 
> SET_MEM_ATTR_CODE_PERM_SHIFT) | \
> +(( (d_perm) & SET_MEM_ATTR_DATA_PERM_MASK) << 
> SET_MEM_ATTR_DATA_PERM_SHIFT))
> +
> +/* MM return error codes */
> +#define ARM_SMC_MM_RET_SUCCESS  0
> +#define ARM_SMC_MM_RET_NOT_SUPPORTED   -1
> +#define ARM_SMC_MM_RET_INVALID_PARAMS  -2
> +#define ARM_SMC_MM_RET_DENIED  -3
> +#define ARM_SMC_MM_RET_NO_MEMORY   -4
> +
>  /*
>   * Power State Coordination Interface (PSCI) calls cover a subset of the
>   * Standard Service Call range.
> --
> 2.14.1
>
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 0/3] Maintainers.txt updates for OvmfPkg/ArmVirtPkg

2017-09-22 Thread Ard Biesheuvel
On 22 September 2017 at 10:45, Jordan Justen  wrote:
> On 2017-09-22 04:13:48, Laszlo Ersek wrote:
>> On 09/22/17 12:15, Leif Lindholm wrote:
>> > - Add Ard Biesheuvel as a maintainer for ArmVirtPkg.
>>
>> s/ArmVirtPkg/OvmfPkg/
>>
>> (The actual patch matches your intent; it's only the above typo that
>> doesn't.)
>>
>> > - Add Anthony Perard and Julien Grall as Xen reviewers for OvmfPkg,
>> >   and Julien as reviewer for ArmVirtPkg.
>>
>> Highly appreciated!
>>
>> > Leif Lindholm (3):
>> >   Maintainers.txt: add Ard Biesheuvel as OvmfPkg maintainer
>> >   Maintainers.txt: add Xen reviewers to OvmfPkg
>> >   Maintainers.txt: add Xen reviewer for ArmVirtPkg
>> >
>> >  Maintainers.txt | 4 
>> >  1 file changed, 4 insertions(+)
>> >
>>
>> series
>> Reviewed-by: Laszlo Ersek 
>
> Series Reviewed-by: Jordan Justen 

Series Reviewed-by: Ard Biesheuvel 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] SNP transmit print

2017-09-22 Thread Udit Kumar
Thanks Meenakshi for digging a bit more 

If we have use like below 
Library/DxeNetLib/DxeNetLib.c
Status = Snp->Transmit (Snp, 0, Length, Packet, NULL, NULL, NULL);
if ((Status != EFI_SUCCESS) && (Status != EFI_NOT_READY)) {
  Status = EFI_DEVICE_ERROR;
  break;
}
Then, we can simple put print when Status is EFI_DEVICE_ERROR;

But with below We are retrying once ☹ ,  What I think if first time if you got 
error 
EFI_NOT_READY, then after MnpRecycleTxBuf we likely not to get this error. 
I am not 100% sure here. 

What I think, in MdeModulePkg/Universal/Network/SnpDxe/Transmit.c 
Have print only for EFI_NOT_READY. 
And in MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c, print error as well 
for second case. 
Hope this helps 

Thanks
Udit

> -Original Message-
> From: Meenakshi Aggarwal
> Sent: Friday, September 22, 2017 3:56 PM
> To: Udit Kumar ; edk2-devel@lists.01.org
> Cc: feng.t...@intel.com; star.z...@intel.com
> Subject: RE: SNP transmit print
> 
> Hi Udit,
> 
> Yes, I think we should print this message is Status is EFI_DEVICE_ERROR 
> because
> in case of EFI_NOT_READY, we are retrying:
> 
>   //
>   // Transmit the packet through SNP.
>   //
>   Status = Snp->Transmit (
>   Snp,
>   HeaderSize,
>   Length,
>   Packet,
>   TxData->SourceAddress,
>   TxData->DestinationAddress,
>   
>   );
>   if (Status == EFI_NOT_READY) {
> Status = MnpRecycleTxBuf (MnpDeviceData);
> if (EFI_ERROR (Status)) {
>   Token->Status = EFI_DEVICE_ERROR;
>   goto SIGNAL_TOKEN;
> }
> 
> DEBUG ((EFI_D_ERROR, "Snp->Transmit  retry\n"));
> Status = Snp->Transmit (
> Snp,
> HeaderSize,
> Length,
> Packet,
> TxData->SourceAddress,
> TxData->DestinationAddress,
> 
> );
>   }
> 
> (MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c)
> 
> 
> Please suggest if we can remove this print in case of BUSY status.
> 
> Thanks,
> Meenakshi
> 
> > -Original Message-
> > From: Udit Kumar
> > Sent: Thursday, September 21, 2017 5:21 PM
> > To: Meenakshi Aggarwal ; edk2-
> > de...@lists.01.org
> > Subject: RE: SNP transmit print
> >
> > I think these error prints should be check against Status
> >
> > Regards
> > Udit
> >
> > > -Original Message-
> > > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf
> > > Of Meenakshi Aggarwal
> > > Sent: Thursday, September 21, 2017 3:36 PM
> > > To: edk2-devel@lists.01.org
> > > Subject: [edk2] SNP transmit print
> > >
> > > Hi,
> > >
> > >
> > > While performing tftp using PCI interface, below message is coming
> > > continuously:
> > >
> > > Snp->undi.transmit()  8000h:4h
> > >
> > > Snp->undi.transmit()  8000h:4h
> > > [==> ]   34812 Kb
> > > Snp->undi.transmit()  8000h:4h
> > >
> > > Snp->undi.transmit()  8000h:4h
> > >
> > > Snp->undi.transmit()  8000h:4h
> > >
> > > Snp->undi.transmit()  8000h:4h
> > >
> > >
> > > It is coming from file
> > "MdeModulePkg/Universal/Network/SnpDxe/Transmit.c"
> > >
> > >   DEBUG (
> > > (EFI_D_ERROR,
> > > "\nSnp->undi.transmit()  %xh:%xh\n",
> > > Snp->Cdb.StatFlags,
> > > Snp->Cdb.StatCode)
> > > );
> > >
> > >
> > > I want to know if it is really an error message because tftp and
> > > ping are working perfectly, but this error message is coming.
> > >
> > >
> > > Thanks,
> > > Meenakshi
> > >
> > >
> > >
> > > ___
> > > edk2-devel mailing list
> > > edk2-devel@lists.01.org
> > > https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [RFC 1/6] ConfigPkg: add new package for holding common config fragments

2017-09-22 Thread Laszlo Ersek
On 09/21/17 02:05, Ard Biesheuvel wrote:
> On 20 September 2017 at 10:27, Leif Lindholm  wrote:
>> Start with common networking options.
>>
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Leif Lindholm 
>> ---
>>  ConfigPkg/Network/Network.dsc.inc | 92 
>> +++
>>  ConfigPkg/Network/Network.fdf.inc | 47 
>>  2 files changed, 139 insertions(+)
>>  create mode 100644 ConfigPkg/Network/Network.dsc.inc
>>  create mode 100644 ConfigPkg/Network/Network.fdf.inc
>>
>> diff --git a/ConfigPkg/Network/Network.dsc.inc 
>> b/ConfigPkg/Network/Network.dsc.inc
>> new file mode 100644
>> index 00..8c53350deb
>> --- /dev/null
>> +++ b/ConfigPkg/Network/Network.dsc.inc
>> @@ -0,0 +1,92 @@
>> +## @file
>> +#
>> +# Copyright (c) 2017, Linaro ltd. 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.
>> +#
>> +##
>> +
>> +
>> +
>> +#
>> +# Library Class section
>> +#
>> +
>> +[LibraryClasses]
>> +  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
>> +  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
>> +  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
>> +  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
>> +
> 
> Now that you have made a clean spot: any reason we shouldn't do
> 
> DpcLib   |MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
> IpIoLib  |MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
> NetLib   |MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
> UdpIoLib |MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
> 
> ?

Do you mean the nicer visual layout / alignment?

Thanks
Laszlo
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] ShellPkg/dmpstore: Show name of known variable vendor GUID

2017-09-22 Thread Laszlo Ersek
Hi,

this patch breaks the GCC48 build:

On 09/18/17 08:42, Ruiyu Ni wrote:
> From: Huajing Li 
> 
> Change "dmpstore" to show name of known variable vendor GUID.
> The name is got from ShellProtocol.GetGuidName().
> 
> Cc: Jaben Carsey 
> Reviewed-by: Ruiyu Ni 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Huajing Li 
> ---
>  ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c  | 17 
> +
>  .../UefiShellDebug1CommandsLib.uni  |  1 +
>  2 files changed, 14 insertions(+), 4 deletions(-)
> 
> diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c 
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
> index aeffc89b19..062ab5dc3a 100644
> --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
> +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
> @@ -424,6 +424,7 @@ CascadeProcessVariables (
>CHAR16*AttrString;
>CHAR16*HexString;
>EFI_STATUSSetStatus;
> +  CHAR16*GuidName;
>  
>if (ShellGetExecutionBreakFlag()) {
>  return (SHELL_ABORTED);
> @@ -521,10 +522,18 @@ CascadeProcessVariables (
>  Status = EFI_OUT_OF_RESOURCES;
>}
>  } else {
> -  ShellPrintHiiEx (
> --1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_HEADER_LINE), 
> gShellDebug1HiiHandle,
> -AttrString, , FoundVarName, DataSize
> -);
> +  Status = gEfiShellProtocol->GetGuidName(, );

ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c:525:66: error: passing 
argument 2 of 'gEfiShellProtocol->GetGuidName' from incompatible pointer type 
[-Werror=incompatible-pointer-types]
   Status = gEfiShellProtocol->GetGuidName(, );
  ^
ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c:525:66: note: expected 
'const CHAR16 ** {aka const short unsigned int **}' but argument is of type 
'CHAR16 ** {aka short unsigned int **}'

It was reported by Gerd's Jenkins CI.

Thanks
Laszlo

> +  if (EFI_ERROR (Status)) {
> +ShellPrintHiiEx (
> +  -1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_HEADER_LINE), 
> gShellDebug1HiiHandle,
> +  AttrString, , FoundVarName, DataSize
> +  );
> +  } else {
> +ShellPrintHiiEx (
> +  -1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_HEADER_LINE2), 
> gShellDebug1HiiHandle,
> +  AttrString, GuidName, FoundVarName, DataSize
> +  );
> +  }
>DumpHex (2, 0, DataSize, DataBuffer);
>  }
>  SHELL_FREE_NON_NULL (AttrString);
> diff --git 
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni 
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni
> index f733a67f0b..b6a133a454 100644
> --- 
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni
> +++ 
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni
> @@ -385,6 +385,7 @@
>  #string STR_DMPSTORE_LOAD_GEN_FAIL #language en-US "%H%s%N: Failed to 
> set variable %H%s%N: %r.\r\n"
>  #string STR_DMPSTORE_LOAD_BAD_FILE #language en-US "%H%s%N: Incorrect 
> file format.\r\n"
>  #string STR_DMPSTORE_HEADER_LINE   #language en-US "Variable %H%s%N 
> '%H%g%N:%H%s%N' DataSize = 0x%02x\r\n"
> +#string STR_DMPSTORE_HEADER_LINE2  #language en-US "Variable %H%s%N 
> '%H%s%N:%H%s%N' DataSize = 0x%02x\r\n"
>  #string STR_DMPSTORE_DELETE_LINE   #language en-US "Delete variable 
> '%H%g%N:%H%s%N': %r\r\n"
>  #string STR_DMPSTORE_NO_VAR_FOUND  #language en-US "%H%s%N: No matching 
> variables found.\r\n"
>  #string STR_DMPSTORE_NO_VAR_FOUND_SFO  #language en-US 
> "VariableInfo,\"\",\"\",\"\",\"\",\"\"\r\n"
> 

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] 答复: [PATCH edk2-non-osi v3 6/7] Hisilicon/D05: Update binary file

2017-09-22 Thread Leif Lindholm
On Fri, Sep 22, 2017 at 09:36:48AM +, Huangming (Mark) wrote:
> See below reply please
> 
> -邮件原件-
> 发件人: Leif Lindholm [mailto:leif.lindh...@linaro.org] 
> 发送时间: 2017年9月21日 21:00
> 收件人: Heyi Guo 
> 抄送: linaro-u...@lists.linaro.org; edk2-devel@lists.01.org; 
> graeme.greg...@linaro.org; ard.biesheu...@linaro.org; Guoheyi 
> ; wanghuiqiang ; Huangming 
> (Mark) ; zhangjinsong (A) ; 
> wai...@126.com
> 主题: Re: [PATCH edk2-non-osi v3 6/7] Hisilicon/D05: Update binary file
> 
> On Thu, Sep 21, 2017 at 06:59:51PM +0800, Heyi Guo wrote:
> > Fix bug 3061: D05(before EC) boot hangs at "Need Reset";
> > 
> > Update binary file for edk2 upgrade.
> >   1. Replace UncachedMemoryAllocationLib with DmaLib;
> >   2. Remove ArmCpuLib dependenc;
> >   3. Remove ConvertToPhysicalAddress;
> > 
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Ming Huang 
> > ---
> >  Platform/Hisilicon/D05/Drivers/GetInfoFromBmc/GetInfoFromBmc.efi   
> > | Bin 19552 -> 5024 bytes
> >  Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfaceDxe/IpmiInterfaceDxe.efi  
> > | Bin 25696 -> 7680 bytes
> >  Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfacePei/IpmiInterfacePei.efi  
> > | Bin 22528 -> 5344 bytes
> >  Platform/Hisilicon/D05/Drivers/IpmiMiscOpDxe/IpmiMiscOp.efi
> > | Bin 23136 -> 5280 bytes
> >  Platform/Hisilicon/D05/Drivers/IpmiWatchdogDxe/IpmiWatchdogDxe.efi 
> > | Bin 15968 -> 2592 bytes
> >  Platform/Hisilicon/D05/Drivers/OhciDxe/NativeOhci.efi  
> > | Bin 48000 -> 23328 bytes
> >  
> > Platform/Hisilicon/D05/Drivers/ReportPciePlugDidVidToBmc/ReportPciePlugDidVidToBmc.efi
> >  | Bin 21536 -> 4032 bytes
> >  Platform/Hisilicon/D05/Drivers/SFC/SFCDriver.efi   
> > | Bin 262144 -> 262144 bytes
> >  Platform/Hisilicon/D05/Drivers/Sas/SasDriverDxe.efi
> > | Bin 230912 -> 116288 bytes
> >  Platform/Hisilicon/D05/Drivers/Sm750Dxe/SmiGraphicsOutput.efi  
> > | Bin 35904 -> 18592 bytes
> >  Platform/Hisilicon/D05/Drivers/TransferSmbiosInfo/TransSmbiosInfo.efi  
> > | Bin 16576 -> 4288 bytes
> >  Platform/Hisilicon/D05/Library/OemAddressMapD05/OemAddressMapD05.lib   
> > | Bin 42136 -> 52968 bytes
> >  Platform/Hisilicon/D05/MemoryInitPei/MemoryInit.efi
> > | Bin 273312 -> 152576 bytes
> 
> >  Platform/Hisilicon/D05/Sec/FVMAIN_SEC.Fv   
> > | Bin 262144 -> 262144 bytes
> >  Platform/Hisilicon/D05/bl1.bin 
> > | Bin 12296 -> 14344 bytes
> >  Platform/Hisilicon/D05/fip.bin 
> > | Bin 41493 -> 41493 bytes
> 
> Like for D03 - I guess this means ARM Trusted Firmware update. Can it be a 
> separate patch and describe the commit hash it was produced from?
> -- FVMAIN_SEC.Fv use some edk2 lib, so it is related with edk2 update.
> I will make sepatate patch for Other two bin files.

Understood. Yes, please do so.

> Do you mean that I should add commitId in the separate patch ? like "126aef8"?

Yes, please.

> Does the (bugs.linaro.org) 3061 fix also belong to these files?
> -- Yes

OK, then please delete that note from commit message in this patch and
add it in the new one. Please include the full URL to the bug.

Regards,

Leif
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] MTFTP file transfer timeout error

2017-09-22 Thread Vabhav Sharma
Hi All,
I am facing timeout error with file transfer using tftp on UEFI shell with ARM 
based SoCs
Command used: tftp -s  -i   

File transfer with file size greater 50 or 60 MB is returning timeout(Also 
depends on type of file like data file, ASCII file, boot sector)

I verified by playing around with blocksize from 32K to 42K for different file 
size(100MB,200MB,500MB) and identify that increasing the block size for large 
file size helps with successful transfer.
File transfer is always successful with 1K blocksize but file transfer time is 
increased.

Please suggest if there is any link between block size with file size or anyone 
faced such issue? I assume expectation is to use any blocksize from 
512(default) to 64K.

Regards,
Vabhav
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH 1/3] Maintainers.txt: add Ard Biesheuvel as OvmfPkg maintainer

2017-09-22 Thread Leif Lindholm
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Leif Lindholm 
---
 Maintainers.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Maintainers.txt b/Maintainers.txt
index f8ba169edd..c6095266a8 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -194,6 +194,7 @@ OvmfPkg
 W: http://www.tianocore.org/ovmf/
 M: Jordan Justen 
 M: Laszlo Ersek 
+M: Ard Biesheuvel 
 S: Maintained
 
 PcAtChipsetPkg
-- 
2.11.0

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH 0/3] Maintainers.txt updates for OvmfPkg/ArmVirtPkg

2017-09-22 Thread Leif Lindholm
- Add Ard Biesheuvel as a maintainer for ArmVirtPkg.
- Add Anthony Perard and Julien Grall as Xen reviewers for OvmfPkg,
  and Julien as reviewer for ArmVirtPkg.

Leif Lindholm (3):
  Maintainers.txt: add Ard Biesheuvel as OvmfPkg maintainer
  Maintainers.txt: add Xen reviewers to OvmfPkg
  Maintainers.txt: add Xen reviewer for ArmVirtPkg

 Maintainers.txt | 4 
 1 file changed, 4 insertions(+)

-- 
2.11.0
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] SNP transmit print

2017-09-22 Thread Meenakshi Aggarwal
Hi Udit,

Yes, I think we should print this message is Status is EFI_DEVICE_ERROR because 
in case of EFI_NOT_READY, we are retrying:

  //
  // Transmit the packet through SNP.
  //
  Status = Snp->Transmit (
  Snp,
  HeaderSize,
  Length,
  Packet,
  TxData->SourceAddress,
  TxData->DestinationAddress,
  
  );
  if (Status == EFI_NOT_READY) {
Status = MnpRecycleTxBuf (MnpDeviceData);
if (EFI_ERROR (Status)) {
  Token->Status = EFI_DEVICE_ERROR;
  goto SIGNAL_TOKEN;
}

DEBUG ((EFI_D_ERROR, "Snp->Transmit  retry\n"));
Status = Snp->Transmit (
Snp,
HeaderSize,
Length,
Packet,
TxData->SourceAddress,
TxData->DestinationAddress,

);
  }

(MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c)


Please suggest if we can remove this print in case of BUSY status.

Thanks,
Meenakshi

> -Original Message-
> From: Udit Kumar
> Sent: Thursday, September 21, 2017 5:21 PM
> To: Meenakshi Aggarwal ; edk2-
> de...@lists.01.org
> Subject: RE: SNP transmit print
> 
> I think these error prints should be check against Status
> 
> Regards
> Udit
> 
> > -Original Message-
> > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> > Meenakshi Aggarwal
> > Sent: Thursday, September 21, 2017 3:36 PM
> > To: edk2-devel@lists.01.org
> > Subject: [edk2] SNP transmit print
> >
> > Hi,
> >
> >
> > While performing tftp using PCI interface, below message is coming
> > continuously:
> >
> > Snp->undi.transmit()  8000h:4h
> >
> > Snp->undi.transmit()  8000h:4h
> > [==> ]   34812 Kb
> > Snp->undi.transmit()  8000h:4h
> >
> > Snp->undi.transmit()  8000h:4h
> >
> > Snp->undi.transmit()  8000h:4h
> >
> > Snp->undi.transmit()  8000h:4h
> >
> >
> > It is coming from file
> "MdeModulePkg/Universal/Network/SnpDxe/Transmit.c"
> >
> >   DEBUG (
> > (EFI_D_ERROR,
> > "\nSnp->undi.transmit()  %xh:%xh\n",
> > Snp->Cdb.StatFlags,
> > Snp->Cdb.StatCode)
> > );
> >
> >
> > I want to know if it is really an error message because tftp and ping
> > are working perfectly, but this error message is coming.
> >
> >
> > Thanks,
> > Meenakshi
> >
> >
> >
> > ___
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH 3/3] Maintainers.txt: add Xen reviewer for ArmVirtPkg

2017-09-22 Thread Leif Lindholm
Add Julien Grall as a reviewer for ArmVirtPkg for the purpose of
reviewing patches affecting Xen.

Cc: Julien Grall 

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Leif Lindholm 
---
 Maintainers.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Maintainers.txt b/Maintainers.txt
index d27e0351bc..ffac89e796 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -75,6 +75,7 @@ ArmVirtPkg
 W: https://github.com/tianocore/tianocore.github.io/wiki/ArmVirtPkg
 M: Laszlo Ersek 
 M: Ard Biesheuvel 
+R: Julien Grall 
 
 BaseTools
 W: https://github.com/tianocore/tianocore.github.io/wiki/BaseTools
-- 
2.11.0

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 0/3] Maintainers.txt updates for OvmfPkg/ArmVirtPkg

2017-09-22 Thread Laszlo Ersek
On 09/22/17 12:15, Leif Lindholm wrote:
> - Add Ard Biesheuvel as a maintainer for ArmVirtPkg.

s/ArmVirtPkg/OvmfPkg/

(The actual patch matches your intent; it's only the above typo that
doesn't.)

> - Add Anthony Perard and Julien Grall as Xen reviewers for OvmfPkg,
>   and Julien as reviewer for ArmVirtPkg.

Highly appreciated!

> Leif Lindholm (3):
>   Maintainers.txt: add Ard Biesheuvel as OvmfPkg maintainer
>   Maintainers.txt: add Xen reviewers to OvmfPkg
>   Maintainers.txt: add Xen reviewer for ArmVirtPkg
> 
>  Maintainers.txt | 4 
>  1 file changed, 4 insertions(+)
> 

series
Reviewed-by: Laszlo Ersek 

Thank you,
Laszlo
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH 1/2] MdePkg PiFirmwareFile.h: Add FFS_ATTRIB_DATA_ALIGNMENT_2 definition

2017-09-22 Thread Star Zeng
Follow PI 1.6 spec to add FFS_ATTRIB_DATA_ALIGNMENT_2 definition for
FFS alignment extended to support maximum 16MB.

Cc: Liming Gao 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng 
---
 MdePkg/Include/Pi/PiFirmwareFile.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/MdePkg/Include/Pi/PiFirmwareFile.h 
b/MdePkg/Include/Pi/PiFirmwareFile.h
index 734344430aa6..b982c9eda3b6 100644
--- a/MdePkg/Include/Pi/PiFirmwareFile.h
+++ b/MdePkg/Include/Pi/PiFirmwareFile.h
@@ -1,7 +1,7 @@
 /** @file
   The firmware file related definitions in PI.
 
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2017, 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 that accompanies this distribution.
 The full text of the license may be found at
@@ -11,7 +11,7 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS 
IS" BASIS,
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
   @par Revision Reference:
-  PI Version 1.4.
+  PI Version 1.6.
 
 **/
 
@@ -86,6 +86,7 @@ typedef UINT8 EFI_FFS_FILE_STATE;
 /// FFS File Attributes.
 ///
 #define FFS_ATTRIB_LARGE_FILE 0x01
+#define FFS_ATTRIB_DATA_ALIGNMENT_2   0x02
 #define FFS_ATTRIB_FIXED  0x04
 #define FFS_ATTRIB_DATA_ALIGNMENT 0x38
 #define FFS_ATTRIB_CHECKSUM   0x40
-- 
2.7.0.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH 0/2] Follow PI 1.6 to support FFS_ATTRIB_DATA_ALIGNMENT_2

2017-09-22 Thread Star Zeng
The BaseTools update patch has been sent at
https://lists.01.org/pipermail/edk2-devel/2017-September/015027.html.

Cc: Liming Gao 
Cc: Yonghong Zhu 

Star Zeng (2):
  MdePkg PiFirmwareFile.h: Add FFS_ATTRIB_DATA_ALIGNMENT_2 definition
  MdeModulePkg Core: Support FFS_ATTRIB_DATA_ALIGNMENT_2

 MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c | 37 ++---
 MdeModulePkg/Core/Pei/FwVol/FwVol.c | 35 +--
 MdePkg/Include/Pi/PiFirmwareFile.h  |  5 +++--
 3 files changed, 52 insertions(+), 25 deletions(-)

--
2.7.0.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH 2/2] MdeModulePkg Core: Support FFS_ATTRIB_DATA_ALIGNMENT_2

2017-09-22 Thread Star Zeng
Follow PI 1.6 spec to support FFS_ATTRIB_DATA_ALIGNMENT_2 for
FFS alignment extended to support maximum 16MB.

Cc: Liming Gao 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng 
---
 MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c | 37 ++---
 MdeModulePkg/Core/Pei/FwVol/FwVol.c | 35 +--
 2 files changed, 49 insertions(+), 23 deletions(-)

diff --git a/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c 
b/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c
index 00e0d7d289ec..c59c384f5c75 100644
--- a/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c
+++ b/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c
@@ -1,7 +1,7 @@
 /** @file
   Implements functions to read firmware file
 
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2017, 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
@@ -16,18 +16,27 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 #include "FwVolDriver.h"
 
 /**
-Required Alignment Alignment Value in FFS Alignment Value 
in
-(bytes)Attributes Field   Firmware Volume 
Interfaces
-10 0
-16   1 4
-128  2 7
-512  3 9
-1 KB 4 10
-4 KB 5 12
-32 KB6 15
-64 KB7 16
+Required Alignment   Alignment Value in FFS   FFS_ATTRIB_DATA_ALIGNMENT2   
Alignment Value in
+(bytes)  Attributes Field in FFS Attributes Field  
Firmware Volume Interfaces
+1   0  0   
 0
+16  1  0   
 4
+128 2  0   
 7
+512 3  0   
 9
+1 KB4  0   
 10
+4 KB5  0   
 12
+32 KB   6  0   
 15
+64 KB   7  0   
 16
+128 KB  0  1   
 17
+256 KB  1  1   
 18
+512 KB  2  1   
 19
+1 MB3  1   
 20
+2 MB4  1   
 21
+4 MB5  1   
 22
+8 MB6  1   
 23
+16 MB   7  1   
 24
 **/
 UINT8 mFvAttributes[] = {0, 4, 7, 9, 10, 12, 15, 16};
+UINT8 mFvAttributes2[] = {17, 18, 19, 20, 21, 22, 23, 24};
 
 /**
   Convert the FFS File Attributes to FV File Attributes
@@ -48,7 +57,11 @@ FfsAttributes2FvFileAttributes (
   DataAlignment = (UINT8) ((FfsAttributes & FFS_ATTRIB_DATA_ALIGNMENT) >> 3);
   ASSERT (DataAlignment < 8);
 
-  FileAttribute = (EFI_FV_FILE_ATTRIBUTES) mFvAttributes[DataAlignment];
+  if ((FfsAttributes & FFS_ATTRIB_DATA_ALIGNMENT_2) != 0) {
+FileAttribute = (EFI_FV_FILE_ATTRIBUTES) mFvAttributes2[DataAlignment];
+  } else {
+FileAttribute = (EFI_FV_FILE_ATTRIBUTES) mFvAttributes[DataAlignment];
+  }
 
   if ((FfsAttributes & FFS_ATTRIB_FIXED) == FFS_ATTRIB_FIXED) {
 FileAttribute |= EFI_FV_FILE_ATTRIB_FIXED;
diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c 
b/MdeModulePkg/Core/Pei/FwVol/FwVol.c
index 0bbb86d95819..c90a70b5f799 100644
--- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c
+++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c
@@ -75,18 +75,27 @@ EFI_PEI_PPI_DESCRIPTOR  mPeiFfs3FvPpiList = {
 };
 
 /**
-Required Alignment Alignment Value in FFS Alignment Value 
in
-(bytes)Attributes Field   Firmware Volume 
Interfaces
-1

Re: [edk2] [RFC 0/6] Create central repository for boilerplate configuration

2017-09-22 Thread Laszlo Ersek
On 09/20/17 23:09, Leif Lindholm wrote:
> On Wed, Sep 20, 2017 at 08:14:59PM +0200, Laszlo Ersek wrote:

>> (2) Replacing a build define called FOOBAR with CONFIG_FOOBAR will break
>> all downstream build scripts. Is the CONFIG_ prefix a requirement?
> 
> It was explicitly intended to break compatibility, to ensure we didn't
> end up with things accidentally working until something unrelated
> changed in the future.

Interesting idea. I guess we could try to reach out to all of the
"repeat builders" of OVMF.

> 
>> (3) I think PCDs should not be included in ConfigPkg DSC include files,
>> even if several platforms set the same value. The set of libraries and
>> driver modules commonly used for a given feature is mostly constant
>> across platforms (and it is easy to extend, incrementally); but I don't
>> think the same holds for PCDs. Especially if a user wants to change a
>> PCD for one platform but not the other. Even if repeated settings for a
>> PCD worked (all on the same level of "specificity"), I'd find the result
>> confusing.
> 
> Also a subject for discussion.
> My intent was that if most of the open source platforms had an
> override on the default of a particular Pcd, we could override it in
> the config fragments without changing the .dec (and affecting
> non-public ports).

Right, that's great...

> Individual platforms can still override (again).

... but this "again" part is what confuses me (assuming it would
technically work). We'd have a PCD default in the .dec, then a setting
in the central .dsc.inc that ultimately qualifies as a platform-level
setting, and finally a setting in the actual platform .dsc, which *also*
qualifies as a platform-level setting. IOW, one in the .dec, and two in
the (final) .dsc.

I have no clue if this works, but even if it does, the priority could
depend on the order of inclusion, which I find confusing.

Liming, Yonghong, can you guys please comment on this?

Thanks!
Laszlo
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] Repeated condition check

2017-09-22 Thread Santhapur Naveen
Hello guys,

Any update?

Thank you
Naveen

-Original Message-
From: Santhapur Naveen 
Sent: Wednesday, September 20, 2017 12:05 PM
To: edk2-devel@lists.01.org
Subject: Repeated condition check

Hi all,

There is a redundant condition check in the API PxeBcIcmp6ErrorDpcHandle()

VOID
EFIAPI
PxeBcIcmp6ErrorDpcHandle (
  IN VOID *Context
  )
{
 ...

  if (Type != ICMP_V6_DEST_UNREACHABLE &&
  Type != ICMP_V6_PACKET_TOO_BIG &&
-Type != ICMP_V6_PACKET_TOO_BIG &&
+Type != ICMP_V6_TIME_EXCEEDED &&
  Type != ICMP_V6_PARAMETER_PROBLEM) {
//
// The type of the receveid packet should be an ICMP6 error message.
//
gBS->SignalEvent (RxData->RecycleSignal);
goto ON_EXIT;
  }
  ...
}

Unfortunately, some error checking tools were not able to capture this.
Please confirm and take the necessary action.

Thank you
Naveen
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH] SecurityPkg\SmmTcg2PhysicalPresenceLib.c Handle reserved or unimplemented PP Operation

2017-09-22 Thread Zhang, Chao B
Several PP operations < 128(Vendor Specific) are reserved or unimplemented.
Follow TCG PC Client Platform Physical Presence Interface Specification to 
return
not implemented.
https://trustedcomputinggroup.org/wp-content/uploads/Physical-Presence-Interface_1-30_0-52.pdf

Cc: Jiewen Yao 
Cc: Star Zeng 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang 
---
 .../SmmTcg2PhysicalPresenceLib.c   | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git 
a/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c 
b/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c
index ba4db11..6061453 100644
--- 
a/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c
+++ 
b/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c
@@ -10,7 +10,7 @@
   Tcg2PhysicalPresenceLibSubmitRequestToPreOSFunction() and 
Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction()
   will receive untrusted input and do validation.
 
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2017, 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 
@@ -291,6 +291,7 @@ Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction (
   }
   break;
 
+case TCG2_PHYSICAL_PRESENCE_NO_ACTION:
 case TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_CLEAR_TRUE:
   RequestConfirmed = TRUE;
   break;
@@ -336,12 +337,11 @@ Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction (
   break;
 
 default:
-  if (OperationRequest <= TCG2_PHYSICAL_PRESENCE_NO_ACTION_MAX) {
-RequestConfirmed = TRUE;
-  } else {
-if (OperationRequest < 
TCG2_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION) {
-  return TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED;
-}
+  if (OperationRequest < TCG2_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION) 
{
+//
+// TCG PP spec defined operations that are reserved or un-implemented
+//
+return TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED;
   }
   break;
   }
-- 
1.9.5.msysgit.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Patch] ShellPkg: Update the parameter type to match function interface in DmpStore

2017-09-22 Thread Ni, Ruiyu
Reviewed-by: Ruiyu Ni 

Thanks/Ray

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Liming Gao
> Sent: Friday, September 22, 2017 2:36 PM
> To: edk2-devel@lists.01.org
> Cc: Ni, Ruiyu 
> Subject: [edk2] [Patch] ShellPkg: Update the parameter type to match
> function interface in DmpStore
> 
> This fix can resolve CLANG38 build failure.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Liming Gao 
> Cc: Ruiyu Ni 
> ---
>  ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
> index 062ab5d..c2b60fe 100644
> --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
> +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
> @@ -522,7 +522,7 @@ CascadeProcessVariables (
>  Status = EFI_OUT_OF_RESOURCES;
>}
>  } else {
> -  Status = gEfiShellProtocol->GetGuidName(,
> );
> +  Status = gEfiShellProtocol->GetGuidName(, (CONST
> CHAR16 **) );
>if (EFI_ERROR (Status)) {
>  ShellPrintHiiEx (
>-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_HEADER_LINE),
> gShellDebug1HiiHandle,
> --
> 2.8.0.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] 答复: Shell input redirection question

2017-09-22 Thread Tiger Liu
Hi, experts:
How about mm command?

I tried to use mm command in a script, but failed.
I wrote a script such as below:
mm 80 68 -w 1 -IO -n

Then I run this script, but failed.

Thanks
-邮件原件-
发件人: Tiger Liu
发送时间: 2017年9月22日 9:22
收件人: 'Carsey, Jaben'; jim.dai...@dell.com
抄送: edk2-devel@lists.01.org
主题: Re: [edk2] Shell input redirection question

Hi, All:
Thanks for your suggestions.
Appreciate it.

Thanks

best wishes,
-邮件原件-
发件人: Carsey, Jaben [mailto:jaben.car...@intel.com]
发送时间: 2017年9月21日 22:13
收件人: jim.dai...@dell.com
抄送: edk2-devel@lists.01.org; Tiger Liu
主题: RE: [edk2] Shell input redirection question

The SHELL_PARAMETERS_PROTOCOL used by the pci command lists both the command 
line and the StdIn for the command.  I think that you could check the StdIn for 
the file specified and then change the behavior.

If we really require a parameter to enable some sort of file input mode, the 
spec says that implementers can freely add -_ parameters.  In the past 
these have even been moved to standard parameters in future versions of the 
spec (-_exit is an example that springs to mind for me).

I also agree that your sample NSH file is definitely the quickest way to get a 
solution in this case.

-Jaben

> -Original Message-
> From: jim.dai...@dell.com [mailto:jim.dai...@dell.com]
> Sent: Thursday, September 21, 2017 6:32 AM
> To: Carsey, Jaben 
> Cc: edk2-devel@lists.01.org; tiger...@zhaoxin.com
> Subject: RE: [edk2] Shell input redirection question
> Importance: High
>
> I think the technicality here is that given "pci < inputfile", no
> parameters are passed to the pci command, so it should, according to
> the spec, display all the devices.
>
> Another problem may be that in the "pci < inputfile" case, the pci
> command has no way to know that its input is being redirected and that
> it should behave differently than normal. I may be wrong about that
> point; I know it is possible, but it might require some sort of
> generic change or addition to the shell's behavior.
>
> A different tack would be to add (in a future spec version) a command
> line argument that simply indicated to pci that its input (commands)
> are in some file (e.g. "pci -cmdfile inputfile"). Of course, if that
> were to happen, the new spec should also specify the format of the
> command file's content.
>
> A simple way to do what Tiger was trying and that works right now is
> to create a shell script instead of an input file:
>
> @echo -off
> pci 00 00 01 -i
> pci 00 00 02 -i
>
> Regards,
> Jim
>
> -Original Message-
> From: Carsey, Jaben [mailto:jaben.car...@intel.com]
> Sent: Thursday, September 21, 2017 8:11 AM
> To: Dailey, Jim ; tiger...@zhaoxin.com
> Cc: edk2-devel@lists.01.org
> Subject: RE: [edk2] Shell input redirection question
>
> If the requirement for PCI to display the information when there are
> no parameters present, I see no reason that it could not also use a file for 
> input.
> i.e. "pci" must act according to the spec, but "pci < inputfile" is not 
> prohibited.
> I think that as no code currently uses PCI with file input as long as
> current behavior still works it should be fine.
>
> I would think that would be a great improvement for the PCI command.
>
> -Jaben
>
> > -Original Message-
> > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf
> > Of jim.dai...@dell.com
> > Sent: Thursday, September 21, 2017 4:52 AM
> > To: tiger...@zhaoxin.com
> > Cc: edk2-devel@lists.01.org
> > Subject: Re: [edk2] Shell input redirection question
> > Importance: High
> >
> > The shell's pci command was not written to read from standard input.
> > It expects all its input on the command line.
> >
> > I would say in general that if you execute a command and pass it no
> > parameters, and it then prompts you in some way for input, then that
> > command will likely accept input redirected from a file.
> >
> > If you execute pci without any parameters, it simply lists all the
> > devices in the system and terminates, so it clearly is not prepared
> > to read from standard input (or a redirected file).
> >
> > It is strictly up to whomever writes a program/command whether they
> > do so in a manner that allows it to accept input from standard
> > input. For example, I have written a grep utility for the shell that
> > expects one or more filenames to search to be on the command line;
> > however, if there are no filenames on the command line, the utility
> > searches standard input.
> >
> > Regards,
> > Jim
> >
> > -Original Message-
> > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf
> > Of Tiger Liu
> > Sent: Thursday, September 21, 2017 1:11 AM
> > To: edk2-devel@lists.01.org
> > Subject: [edk2] Shell input redirection question
> >
> > Hi, experts:
> > I have a question about input redirection in Shell environment.
> >
> > Take pci command as sample.
> > I wrote a txt file(file name is : 

Re: [edk2] [PATCH 1/1] OvmfPkg/QemuBootOrderLib: recognize "usb-storage" devices in XHCI ports

2017-09-22 Thread Laszlo Ersek
On 09/15/17 00:02, Ard Biesheuvel wrote:
> On 14 September 2017 at 08:37, Laszlo Ersek  wrote:
>> The feature is primarily useful for modern AARCH64 guests that have no
>> built-in virtio block / SCSI drivers; as on "qemu-system-aarch64 -M virt",
>> there are no IDE or AHCI controllers that could be used as fallback. XHCI
>> is available in "-M virt" however, and because XHCI predates AARCH64 by
>> several years, said guests are expected to have built-in drivers for it.
>>
>> Other device models ("usb-uas", "usb-bot") are out of scope for now,
>> similarly to USB1.x (UHCI) and USB2 (EHCI) host controllers, and similarly
>> to USB hubs (which are USB1.1 only). In particular, port mapping between
>> EHCI and companion UHCI controllers is very complex; it even leads to PCI
>> slot/function differences between the OpenFirmware device paths exported
>> by QEMU and the the UEFI device paths generated by edk2.
>>
>> The number of ports on the XHCI controller defaults to 4, but it can be
>> raised via the "p3" property to 15. In addition, several XHCI controllers
>> can be grouped into a single-slot, multi-function PCI device. These allow
>> for a good number of usb-storage devices, while their desired boot order
>> remains recognizable to this patch.
>>
>> In the example below, we create two XHCI controllers, grouped into PCI
>> slot 00:02 as functions 0 and 1. Both controllers are given 15 ports. We
>> attach a "usb-storage" device to controller 1 at port 3 (ports are 1-based
>> in QEMU, 0-based in edk2), and attach another "usb-storage" device to
>> controller 2 at port 9.
>>
>> QEMU command line options (NB. they apply equally to aarch64/virt and
>> x86_64/{i440fx,q35}):
>>
>>   -device qemu-xhci,id=xhci1,p3=15,addr=02.0,multifunction=on \
>>   -device qemu-xhci,id=xhci2,p3=15,addr=02.1 \
>>   \
>>   -drive id=disk1,if=none,format=qcow2,$DISK1_OPTIONS \
>>   -drive id=disk2,if=none,format=qcow2,$DISK2_OPTIONS \
>>   \
>>   -device usb-storage,drive=disk1,bus=xhci1.0,port=3,bootindex=1 \
>>   -device usb-storage,drive=disk2,bus=xhci2.0,port=9,bootindex=2 \
>>
>> Libvirt domain XML fragment:
>>
>>   
>> >  domain='0x' bus='0x00' slot='0x02' function='0x0'
>>  multifunction='on'/>
>>   
>>   
>> >  domain='0x' bus='0x00' slot='0x02' function='0x1'/>
>>   
>>
>>   
>> 
>> 
>> 
>> 
>> 
>>   
>>   
>> 
>> 
>> 
>> 
>> 
>>   
>>
>> Cc: Ard Biesheuvel 
>> Cc: Gerd Hoffmann 
>> Cc: Jordan Justen 
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Laszlo Ersek 
> 
> Acked-by: Ard Biesheuvel 

Commit f9c59fa44ae2.

Thanks!
Laszlo
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] ShellPkg/DmpStore: fix GCC/CLANG build failure

2017-09-22 Thread Ard Biesheuvel


On 22 Sep 2017, at 06:34, Laszlo Ersek  wrote:

>> ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c:525:66: error:
>> passing argument 2 of 'gEfiShellProtocol->GetGuidName' from incompatible
>> pointer type [-Werror=incompatible-pointer-types]
>> 
>>  Status = gEfiShellProtocol->GetGuidName(, );
>> ^
>> ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c:525:66: note:
>> expected 'const CHAR16 ** {aka const short unsigned int **}' but
>> argument is of type 'CHAR16 ** {aka short unsigned int **}'
> 
> Pointer-to-(pointer-to-CHAR16) and pointer-to-(pointer-to-const-CHAR16)
> are incompatible types; GCC and CLANG are right to complain.
> 
> Cc: Ard Biesheuvel 
> Cc: Jaben Carsey 
> Cc: Ruiyu Ni 
> Cc: Steven Shi 
> Reported-by: Jenkins Build Host 
> Reported-by: Steven Shi 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=716
> Fixes: 09e8678380aaaf0a5ef59179ff59e0a045d1b0bf
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
>I'm going to push this as soon as I get an R-b from anyone.
> 

Reviewed-by: Ard Biesheuvel 

>Thanks
>Laszlo
> 
> ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c 
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
> index 062ab5dc3a9a..5791da9acc8c 100644
> --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
> +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
> @@ -424,7 +424,7 @@ CascadeProcessVariables (
>   CHAR16*AttrString;
>   CHAR16*HexString;
>   EFI_STATUSSetStatus;
> -  CHAR16*GuidName;
> +  CONST CHAR16  *GuidName;
> 
>   if (ShellGetExecutionBreakFlag()) {
> return (SHELL_ABORTED);
> -- 
> 2.14.1.3.gb7cf6e02401b
> 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] SNP transmit print

2017-09-22 Thread Zeng, Star
Cc Ting, Siyuan and Jiaxin.

Thanks,
Star
-Original Message-
From: Udit Kumar [mailto:udit.ku...@nxp.com] 
Sent: Friday, September 22, 2017 7:04 PM
To: Meenakshi Aggarwal ; edk2-devel@lists.01.org
Cc: Tian, Feng ; Zeng, Star 
Subject: RE: SNP transmit print

Thanks Meenakshi for digging a bit more 

If we have use like below
Library/DxeNetLib/DxeNetLib.c
Status = Snp->Transmit (Snp, 0, Length, Packet, NULL, NULL, NULL);
if ((Status != EFI_SUCCESS) && (Status != EFI_NOT_READY)) {
  Status = EFI_DEVICE_ERROR;
  break;
}
Then, we can simple put print when Status is EFI_DEVICE_ERROR;

But with below We are retrying once ☹ ,  What I think if first time if you got 
error EFI_NOT_READY, then after MnpRecycleTxBuf we likely not to get this 
error. 
I am not 100% sure here. 

What I think, in MdeModulePkg/Universal/Network/SnpDxe/Transmit.c
Have print only for EFI_NOT_READY. 
And in MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c, print error as well for 
second case. 
Hope this helps 

Thanks
Udit

> -Original Message-
> From: Meenakshi Aggarwal
> Sent: Friday, September 22, 2017 3:56 PM
> To: Udit Kumar ; edk2-devel@lists.01.org
> Cc: feng.t...@intel.com; star.z...@intel.com
> Subject: RE: SNP transmit print
> 
> Hi Udit,
> 
> Yes, I think we should print this message is Status is 
> EFI_DEVICE_ERROR because in case of EFI_NOT_READY, we are retrying:
> 
>   //
>   // Transmit the packet through SNP.
>   //
>   Status = Snp->Transmit (
>   Snp,
>   HeaderSize,
>   Length,
>   Packet,
>   TxData->SourceAddress,
>   TxData->DestinationAddress,
>   
>   );
>   if (Status == EFI_NOT_READY) {
> Status = MnpRecycleTxBuf (MnpDeviceData);
> if (EFI_ERROR (Status)) {
>   Token->Status = EFI_DEVICE_ERROR;
>   goto SIGNAL_TOKEN;
> }
> 
> DEBUG ((EFI_D_ERROR, "Snp->Transmit  retry\n"));
> Status = Snp->Transmit (
> Snp,
> HeaderSize,
> Length,
> Packet,
> TxData->SourceAddress,
> TxData->DestinationAddress,
> 
> );
>   }
> 
> (MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c)
> 
> 
> Please suggest if we can remove this print in case of BUSY status.
> 
> Thanks,
> Meenakshi
> 
> > -Original Message-
> > From: Udit Kumar
> > Sent: Thursday, September 21, 2017 5:21 PM
> > To: Meenakshi Aggarwal ; edk2- 
> > de...@lists.01.org
> > Subject: RE: SNP transmit print
> >
> > I think these error prints should be check against Status
> >
> > Regards
> > Udit
> >
> > > -Original Message-
> > > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On 
> > > Behalf Of Meenakshi Aggarwal
> > > Sent: Thursday, September 21, 2017 3:36 PM
> > > To: edk2-devel@lists.01.org
> > > Subject: [edk2] SNP transmit print
> > >
> > > Hi,
> > >
> > >
> > > While performing tftp using PCI interface, below message is coming
> > > continuously:
> > >
> > > Snp->undi.transmit()  8000h:4h
> > >
> > > Snp->undi.transmit()  8000h:4h
> > > [==> ]   34812 Kb
> > > Snp->undi.transmit()  8000h:4h
> > >
> > > Snp->undi.transmit()  8000h:4h
> > >
> > > Snp->undi.transmit()  8000h:4h
> > >
> > > Snp->undi.transmit()  8000h:4h
> > >
> > >
> > > It is coming from file
> > "MdeModulePkg/Universal/Network/SnpDxe/Transmit.c"
> > >
> > >   DEBUG (
> > > (EFI_D_ERROR,
> > > "\nSnp->undi.transmit()  %xh:%xh\n",
> > > Snp->Cdb.StatFlags,
> > > Snp->Cdb.StatCode)
> > > );
> > >
> > >
> > > I want to know if it is really an error message because tftp and 
> > > ping are working perfectly, but this error message is coming.
> > >
> > >
> > > Thanks,
> > > Meenakshi
> > >
> > >
> > >
> > > ___
> > > edk2-devel mailing list
> > > edk2-devel@lists.01.org
> > > https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 0/2] OvmfPkg/VirtioNetDxe: update TechNotes, log message at ExitBootServices

2017-09-22 Thread Laszlo Ersek
On 09/15/17 10:57, Laszlo Ersek wrote:
> Repo:   https://github.com/lersek/edk2.git
> Branch: vnet_technotes_exitboot_after_map
> 
> Cc: Brijesh Singh 
> Cc: Jordan Justen 
> 
> Laszlo Ersek (2):
>   OvmfPkg/VirtioNetDxe: document Rx/Tx allocs and mappings on
> Init/Shutdown
>   OvmfPkg/VirtioNetDxe: log debug message in VirtioNetExitBoot()
> 
>  OvmfPkg/VirtioNetDxe/TechNotes.txt | 12 
>  OvmfPkg/VirtioNetDxe/Events.c  |  1 +
>  2 files changed, 9 insertions(+), 4 deletions(-)
> 

Commit range f9c59fa44ae2..d83defe0df34.

Thanks!
Laszlo
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH] ShellPkg/DmpStore: fix GCC/CLANG build failure

2017-09-22 Thread Laszlo Ersek
> ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c:525:66: error:
> passing argument 2 of 'gEfiShellProtocol->GetGuidName' from incompatible
> pointer type [-Werror=incompatible-pointer-types]
>
>   Status = gEfiShellProtocol->GetGuidName(, );
>  ^
> ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c:525:66: note:
> expected 'const CHAR16 ** {aka const short unsigned int **}' but
> argument is of type 'CHAR16 ** {aka short unsigned int **}'

Pointer-to-(pointer-to-CHAR16) and pointer-to-(pointer-to-const-CHAR16)
are incompatible types; GCC and CLANG are right to complain.

Cc: Ard Biesheuvel 
Cc: Jaben Carsey 
Cc: Ruiyu Ni 
Cc: Steven Shi 
Reported-by: Jenkins Build Host 
Reported-by: Steven Shi 
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=716
Fixes: 09e8678380aaaf0a5ef59179ff59e0a045d1b0bf
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---

Notes:
I'm going to push this as soon as I get an R-b from anyone.

Thanks
Laszlo

 ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
index 062ab5dc3a9a..5791da9acc8c 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
@@ -424,7 +424,7 @@ CascadeProcessVariables (
   CHAR16*AttrString;
   CHAR16*HexString;
   EFI_STATUSSetStatus;
-  CHAR16*GuidName;
+  CONST CHAR16  *GuidName;
 
   if (ShellGetExecutionBreakFlag()) {
 return (SHELL_ABORTED);
-- 
2.14.1.3.gb7cf6e02401b

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v3] CryptoPkg: Add new API to retrieve commonName of X.509 certificate

2017-09-22 Thread Laszlo Ersek
On 09/21/17 05:50, Ye, Ting wrote:
> Hi Qin,
> 
> I think we might add OPTIONAL attribute to CommonName, as NULL is an valid 
> input for this API.
> In function description, I think we need update below statement to "if *** 
> and *CommonNameSize is 0."
> 
>  "If CommonName is not NULL and CommonNameSize is 0."
> 
> Others are good to me.
> 
> Reviewed-by: Ye Ting 

With those updates, the X509GetCommonName() interface looks good to me
as well.

I didn't check the implementation.

Acked-by: Laszlo Ersek 

Thanks!
Laszlo
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 6/6] OvmfPkg/QemuVideoDxe: Bypass NULL pointer detection during VBE SHIM installing

2017-09-22 Thread Laszlo Ersek
This patch looks great to me, I would like to request a few small updates:

On 09/21/17 07:20, Jian J Wang wrote:
> QemuVideoDxe driver will install VBE SHIM into page 0. If NULL pointer

(1) please replace the word "install" with "link".

The VBE Shim is technically installed into the "real-mode" C segment,
only the int 0x10 vector lives in page 0.

> detection is enabled, this driver will fail to load. NULL pointer detection
> bypassing code is added to prevent such problem during boot.
> 
> Please note that Windows 7 will try to access VBE SHIM during boot if it's
> installed, and then cause boot failure. This can be fixed by setting BIT7
> of PcdNullPointerDetectionPropertyMask to disable NULL pointer detection
> after EndOfDxe. As far as we know, there's no other OSs has such issue.

This is not a request, just a comment: I verified the default value in
the .dec, and I see it is 0. So there's no need to post an additional
patch for the OVMF DSC files, in order to set BIT7.

> 
> Cc: Star Zeng 
> Cc: Eric Dong 
> Cc: Laszlo Ersek 
> Cc: Jiewen Yao 
> Cc: Michael Kinney 
> Cc: Jordan Justen 
> Cc: Ayellet Wolman 
> Suggested-by: Ayellet Wolman 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Jian J Wang 
> ---
>  OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf |  2 ++
>  OvmfPkg/QemuVideoDxe/VbeShim.c| 22 ++
>  2 files changed, 24 insertions(+)
> 
> diff --git a/OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf 
> b/OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf
> index 577e07b0a8..8078232ded 100644
> --- a/OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf
> +++ b/OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf
> @@ -67,6 +67,7 @@
>UefiBootServicesTableLib
>UefiDriverEntryPoint
>UefiLib
> +  DxeServicesTableLib
>  
>  [Protocols]
>gEfiDriverSupportedEfiVersionProtocolGuid # PROTOCOL ALWAYS_PRODUCED
> @@ -77,3 +78,4 @@
>  [Pcd]
>gOptionRomPkgTokenSpaceGuid.PcdDriverSupportedEfiVersion
>gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdNullPointerDetectionPropertyMask
> diff --git a/OvmfPkg/QemuVideoDxe/VbeShim.c b/OvmfPkg/QemuVideoDxe/VbeShim.c
> index e45a08e887..c3fb6d8d3c 100644
> --- a/OvmfPkg/QemuVideoDxe/VbeShim.c
> +++ b/OvmfPkg/QemuVideoDxe/VbeShim.c
> @@ -21,10 +21,13 @@
>WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
>  **/
>  
> +#include 

(2) Question: what exactly is this necessary for?

(I would think that "DxeServicesTableLib.h" gave you everything you
needed, but I could be wrong.)

>  #include 
>  #include 
>  #include 
>  #include 
> +#include 
> +
>  #include 
>  
>  #include "Qemu.h"
> @@ -74,11 +77,21 @@ InstallVbeShim (
>UINT8*Ptr;
>UINTNPrinted;
>VBE_MODE_INFO*VbeModeInfo;
> +  EFI_STATUS   Status;
>  
>Segment0 = 0x0;
>SegmentC = 0xC;
>SegmentF = 0xF;
>  
> +  //
> +  // Disable NULL pointer detection temporarily. Otherwise the installation
> +  // will fail due to the lack of memory access right.
> +  //
> +  if ((PcdGet8 (PcdNullPointerDetectionPropertyMask) & (BIT0|BIT7)) == BIT0) 
> {
> +Status = gDS->SetMemorySpaceAttributes (0, EFI_PAGES_TO_SIZE (1), 0);
> +ASSERT_EFI_ERROR (Status);
> +  }
> +

(3) Please hoist the

  Segment0Pages = 1;

assignment from below, and use it in the SetMemorySpaceAttributes()
call, for the "Length" argument.

(4) Please use the variable "Segment0" as the "BaseAddress" argument.

(5) The Attributes=0 argument surprises me, and the end of this patch
seems to confirm that I'm right to be surprised :)

Instead of setting 0, can you please
- first get the original attributes with GetMemorySpaceDescriptor(),
- then clear only the attributes here that prevent read/write access,
- and at the end of the function, restore the original attributes?

I think this can be done without dynamic memory allocation, you just
need a local EFI_GCD_MEMORY_SPACE_DESCRIPTOR object.

>//
>// Attempt to cover the real mode IVT with an allocation. This is a UEFI
>// driver, hence the arch protocols have been installed previously. Among
> @@ -304,5 +317,14 @@ InstallVbeShim (
>Int0x10->Segment = (UINT16) ((UINT32)SegmentC >> 4);
>Int0x10->Offset  = (UINT16) ((UINTN) (VbeModeInfo + 1) - SegmentC);
>  
> +  //
> +  // Get NULL pointer detection back
> +  //
> +  if ((PcdGet8 (PcdNullPointerDetectionPropertyMask) & (BIT0|BIT7)) == BIT0) 
> {
> +Status = gDS->SetMemorySpaceAttributes (0, EFI_PAGES_TO_SIZE(1),
> +EFI_MEMORY_RP);
> +ASSERT_EFI_ERROR (Status);
> +  }
> +
>DEBUG ((EFI_D_INFO, "%a: VBE shim installed\n", __FUNCTION__));
>  }
> 

(6) The InstallVbeShim() function actually contains *two* earlier 

Re: [edk2] [PATCH 00/14] Refine output of "dh"

2017-09-22 Thread Laszlo Ersek
On 09/22/17 07:50, Ruiyu Ni wrote:
> The patches refine the output of "dh":
> 1. Support more detailed dump for some protocols.
> 2. Refine the output by changing the hilight, indent, EOL
> 
> Huajing Li (13):
>   ShellPkg/dh: display all the protocol names in a single line
>   ShellPkg/dh: change the key information color from blue to hilight
>   ShellPkg/dh: fix the error display "Child Controllers" to "Managing".
>   ShellPkg/dh: Display the protocol instance pointer value for "-v"
>   ShellPkg/dh: Modify the dump of "ImageDevicePath" and "DevicePath"
>   ShellPkg/dh: Modify the dump of LoadedImage protocol
>   ShellPkg/dh: Modify the dump of BusSpecificDriverOverride protocol
>   ShellPkg/dh: Modify the dump of BlockIo protocol
>   ShellPkg/dh: Modify the dump of DebugSupport protocol
>   ShellPkg/dh: Modify the dump of GraphicsOutput protocol
>   ShellPkg/dh: Modify the dump of PciIo protocol
>   ShellPkg/dh: Modify the dump of UsbIo protocol
>   ShellPkg/dh: Modify the dump of UsbIo protocol
> 
> Ruiyu Ni (1):
>   ShellPkg/dh: Refine the dump output
> 
>  .../UefiHandleParsingLib/UefiHandleParsingLib.c| 472 
> +++--
>  .../UefiHandleParsingLib/UefiHandleParsingLib.h|   3 +-
>  .../UefiHandleParsingLib/UefiHandleParsingLib.inf  |   3 +-
>  .../UefiHandleParsingLib/UefiHandleParsingLib.uni  | 127 +++---
>  ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c  |  55 ++-
>  .../UefiShellDriver1CommandsLib.uni|  42 +-
>  6 files changed, 572 insertions(+), 130 deletions(-)
> 

Thanks for working on this, Ray, the DH command is the Swiss Army knife
of the UEFI shell. :) I use it all the time.

Laszlo
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [Patch] ShellPkg: Update the parameter type to match function interface in DmpStore

2017-09-22 Thread Liming Gao
This fix can resolve CLANG38 build failure.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao 
Cc: Ruiyu Ni 
---
 ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
index 062ab5d..c2b60fe 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
@@ -522,7 +522,7 @@ CascadeProcessVariables (
 Status = EFI_OUT_OF_RESOURCES;
   }
 } else {
-  Status = gEfiShellProtocol->GetGuidName(, );
+  Status = gEfiShellProtocol->GetGuidName(, (CONST CHAR16 
**) );
   if (EFI_ERROR (Status)) {
 ShellPrintHiiEx (
   -1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_HEADER_LINE), 
gShellDebug1HiiHandle,
-- 
2.8.0.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 00/14] Refine output of "dh"

2017-09-22 Thread Carsey, Jaben
For series.  Good changes all. DH is a lifesaver.

Reviewed-by: Jaben Carsey 

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Ruiyu Ni
> Sent: Thursday, September 21, 2017 10:50 PM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [PATCH 00/14] Refine output of "dh"
> Importance: High
> 
> The patches refine the output of "dh":
> 1. Support more detailed dump for some protocols.
> 2. Refine the output by changing the hilight, indent, EOL
> 
> Huajing Li (13):
>   ShellPkg/dh: display all the protocol names in a single line
>   ShellPkg/dh: change the key information color from blue to hilight
>   ShellPkg/dh: fix the error display "Child Controllers" to "Managing".
>   ShellPkg/dh: Display the protocol instance pointer value for "-v"
>   ShellPkg/dh: Modify the dump of "ImageDevicePath" and "DevicePath"
>   ShellPkg/dh: Modify the dump of LoadedImage protocol
>   ShellPkg/dh: Modify the dump of BusSpecificDriverOverride protocol
>   ShellPkg/dh: Modify the dump of BlockIo protocol
>   ShellPkg/dh: Modify the dump of DebugSupport protocol
>   ShellPkg/dh: Modify the dump of GraphicsOutput protocol
>   ShellPkg/dh: Modify the dump of PciIo protocol
>   ShellPkg/dh: Modify the dump of UsbIo protocol
>   ShellPkg/dh: Modify the dump of UsbIo protocol
> 
> Ruiyu Ni (1):
>   ShellPkg/dh: Refine the dump output
> 
>  .../UefiHandleParsingLib/UefiHandleParsingLib.c| 472
> +++--
>  .../UefiHandleParsingLib/UefiHandleParsingLib.h|   3 +-
>  .../UefiHandleParsingLib/UefiHandleParsingLib.inf  |   3 +-
>  .../UefiHandleParsingLib/UefiHandleParsingLib.uni  | 127 +++---
>  ShellPkg/Library/UefiShellDriver1CommandsLib/Dh.c  |  55 ++-
>  .../UefiShellDriver1CommandsLib.uni|  42 +-
>  6 files changed, 572 insertions(+), 130 deletions(-)
> 
> --
> 2.12.2.windows.2
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH edk2-platforms v4 11/11] Hisilicon: Fix the drivers use the same GUID issue

2017-09-22 Thread Heyi Guo
The drivers build from separate sources, their GUID should
be different.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Heyi Guo 
Reviewed-by: Leif Lindholm 
---
 Platform/Hisilicon/D02/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf 
| 2 +-
 Platform/Hisilicon/D02/Drivers/SFC/SfcDxeDriver.inf
| 2 +-
 Platform/Hisilicon/D02/MemoryInitPei/MemoryInitPeim.inf
| 2 +-
 Platform/Hisilicon/D05/Drivers/GetInfoFromBmc/GetInfoFromBmc.inf   
| 2 +-
 Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfaceDxe/IpmiInterfaceDxe.inf  
| 2 +-
 Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfacePei/IpmiInterfacePei.inf  
| 2 +-
 Platform/Hisilicon/D05/Drivers/IpmiMiscOpDxe/IpmiMiscOpDxe.inf 
| 2 +-
 Platform/Hisilicon/D05/Drivers/IpmiWatchdogDxe/IpmiWatchdogDxe.inf 
| 2 +-
 Platform/Hisilicon/D05/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf 
| 2 +-
 Platform/Hisilicon/D05/Drivers/OhciDxe/OhciDxe.inf 
| 2 +-
 
Platform/Hisilicon/D05/Drivers/ReportPciePlugDidVidToBmc/ReportPciePlugDidVidToBmc.inf
 | 2 +-
 Platform/Hisilicon/D05/Drivers/SFC/SfcDxeDriver.inf
| 2 +-
 Platform/Hisilicon/D05/Drivers/Sas/SasDxeDriver.inf
| 2 +-
 Platform/Hisilicon/D05/Drivers/Sm750Dxe/UefiSmi.inf
| 2 +-
 Platform/Hisilicon/D05/Drivers/TransferSmbiosInfo/TransSmbiosInfo.inf  
| 2 +-
 Platform/Hisilicon/D05/Library/OemAddressMapD05/OemAddressMapD05.inf   
| 2 +-
 Platform/Hisilicon/D05/MemoryInitPei/MemoryInitPeim.inf
| 2 +-
 Silicon/Hisilicon/Hi1610/Library/Hi1610Serdes/Hi1610SerdesLib.inf  
| 2 +-
 Silicon/Hisilicon/Hi1610/Library/LpcLib/LpcLib.inf 
| 2 +-
 
Silicon/Hisilicon/Hi1610/Library/PlatformSysCtrlLibHi1610/PlatformSysCtrlLibHi1610.inf
 | 2 +-
 Silicon/Hisilicon/Hi1616/Library/Hi1616Serdes/Hi1616SerdesLib.inf  
| 2 +-
 
Silicon/Hisilicon/Pv660/Library/PlatformSysCtrlLibPv660/PlatformSysCtrlLibPv660.inf
| 2 +-
 Silicon/Hisilicon/Pv660/Library/Pv660Serdes/Pv660SerdesLib.inf 
| 2 +-
 23 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/Platform/Hisilicon/D02/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf 
b/Platform/Hisilicon/D02/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf
index 8376bbd..8b9ee1d 100644
--- a/Platform/Hisilicon/D02/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf
+++ b/Platform/Hisilicon/D02/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf
@@ -17,7 +17,7 @@
 [Defines]
   INF_VERSION= 0x00010019
   BASE_NAME  = SnpPV600Dxe
-  FILE_GUID  = 3246F154-3612-4803-BD4E-4104D7EF944A
+  FILE_GUID  = 1AB373EB-2CD7-4D5C-9C39-D31845B67F5E
   MODULE_TYPE= UEFI_DRIVER
   VERSION_STRING = 1.0
 
diff --git a/Platform/Hisilicon/D02/Drivers/SFC/SfcDxeDriver.inf 
b/Platform/Hisilicon/D02/Drivers/SFC/SfcDxeDriver.inf
index e10275a..02a4d7f 100644
--- a/Platform/Hisilicon/D02/Drivers/SFC/SfcDxeDriver.inf
+++ b/Platform/Hisilicon/D02/Drivers/SFC/SfcDxeDriver.inf
@@ -16,7 +16,7 @@
 [Defines]
   INF_VERSION= 0x00010005
   BASE_NAME  = SFCDriver
-  FILE_GUID  = FC5651CA-55D8-4fd2-B6D3-A284D993ABA2
+  FILE_GUID  = 02C6BAAE-6E43-4910-8084-60D5045729A0
   MODULE_TYPE= DXE_DRIVER
   VERSION_STRING = 1.0
   ENTRY_POINT= SFCInitialize
diff --git a/Platform/Hisilicon/D02/MemoryInitPei/MemoryInitPeim.inf 
b/Platform/Hisilicon/D02/MemoryInitPei/MemoryInitPeim.inf
index c221de9..0095c82 100644
--- a/Platform/Hisilicon/D02/MemoryInitPei/MemoryInitPeim.inf
+++ b/Platform/Hisilicon/D02/MemoryInitPei/MemoryInitPeim.inf
@@ -18,7 +18,7 @@
 [Defines]
   INF_VERSION= 0x00010005
   BASE_NAME  = MemoryInit
-  FILE_GUID  = c61ef796-b50d-4f98-9f78-4f6f79d800d5
+  FILE_GUID  = A311058D-0993-4C05-A3EC-16CC0801C1A0
   MODULE_TYPE= PEIM
   VERSION_STRING = 1.0
 
diff --git a/Platform/Hisilicon/D05/Drivers/GetInfoFromBmc/GetInfoFromBmc.inf 
b/Platform/Hisilicon/D05/Drivers/GetInfoFromBmc/GetInfoFromBmc.inf
index 20e2f05..1a2bd01 100644
--- a/Platform/Hisilicon/D05/Drivers/GetInfoFromBmc/GetInfoFromBmc.inf
+++ b/Platform/Hisilicon/D05/Drivers/GetInfoFromBmc/GetInfoFromBmc.inf
@@ -16,7 +16,7 @@
 [Defines]
   INF_VERSION= 0x00010019
   BASE_NAME  = GetInfoFromBmc
-  FILE_GUID  = 43B59C81-9C5F-4021-B0F2-947DB839B781
+  

[edk2] [PATCH edk2-platforms v4 10/11] Hisilicon/D05: Fix bug 3061

2017-09-22 Thread Heyi Guo
From: Ming Huang 

Fix bug 3061(bugs.linaro.org):
D05(before EC) boot hangs at "Need Reset";

If the D05 is before EC, then speed of i2c reduce to 100k.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang 
Signed-off-by: Heyi Guo 
---
 Platform/Hisilicon/D05/Sec/FVMAIN_SEC.Fv | Bin 262144 -> 262144 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/Platform/Hisilicon/D05/Sec/FVMAIN_SEC.Fv 
b/Platform/Hisilicon/D05/Sec/FVMAIN_SEC.Fv
index 
16500b78c3bfd03288aa61d8014354266b5e31ae..ab6ea8308032930b0c730c6098b74be31a21a394
 100644
GIT binary patch
literal 262144
zcmeFad3;sXx}SoG_@3t$LYp%1O|QQ`L}KYQ5zIuu^F&5JgawlR#TF
zw)Fs&7TXdATR2y3i=f164MVS1y=@Ib?QpLrAz%xwN^l@*$?yHy!^zGT?ET)~_xt!x%c
z>u08zr~eEfhBmt>X9aI~Q8-DVX~gHKyh4`8R&$mYFVKo4fw*J$vY?+~7Zb
zoH^LhJ6bhyPie#)e#DrX7{92o)i3;%F@>a3Xx^H%#~i(Vxp`~wo@m}hd#rf8+L*FF
z(Y#@MK5dzmQ}~secxxoftZX8@KWvgYgiABb;U?rw?EmJcZ+$qRYyb}0j(6oij
zv{2YgD>I?S3S$y|z*hpB!S8fn_rvp#OtX@$h(rjOSsZ%kwOFKa#QWXTl;$$^pIZxMCxh~W!bIR+!?A&7mh8;B~+8j4#Y})|SRgavu0nx5w
z*;PkVVJmqv`W(6Q$xTPdlkiuQUMgIW{4+Y~`5T^1A+tq1733G)Yd%DV8EU3Rk@+5B
z^1gE4((K%IOR{t8`^8>rLVwU?KFkWH%G9{t#Q}IXv5}WPhcwX<0VfM!P8Pl_smH
znvB@#Z6>`IW41)@@%)%}$cV(aZugJTCc#JgKCWjK@jr1E#9tx6Az|`?NWGW
zclW9zcm8^#Y-K1*=r)_9cP}^QZk~)g3X4qozAbx;2Zs-o!F(OKHE%-p<~3D
z=32s(8R^9HBNv-(wcz#CuQJO_i(pfamikd0$uP}Mnir5}?Pl}V9m`GLP|_H>r!;ry
z9@7Rq16|q_p6G^)p`EyAEk9$1@*KKHGCC*=l}%eXlxz=|kJHxeDTCp
z?a4H`aIb{@lm$VY`1MJp0?6>wfx8An#37yIo4Xh
zpdA5iC3;j)|N2o!nvhZH*1x8gChoC);nx@J3CSm3y2#e=#Pr23{ZN;F*q+xa!ZuF?
zKTEw-Y=_J6P0N@`*s$ErFJ+}Cux1Y?z4v2d=^ci*!7^Jm%$_;1(u7}(g~E*;`1TSL
zI)oi+X5Bnu;!OOI4ZlJ1=L_>3Use7jw_SM$UO7895gUy)(EbBj;f@U`Jqq6{!H#8D
z9u;haiB1yFbP@r;KiV-G(*n(Nqadc?8m8uzI>
zV$6)?=EEW9;b{Abw>F!xx@CX
zp^Uw9J~7`%(=z7P%_pY+AEwjd^0m17we5t?2ivQzK}jt}NZQ{}z+zSZWgc>P(`Ywz~GN
zwew?{kF<7|n&!i~=$}2=_S1H|4KhjL7Ua=SOnusJAKnK3#cksJVM!dC+HYzo9
zc;lHlW~D7RJdn1lFqw(-*;XJMCj?yTH=)v+}UQP{)U%2lU)3q<0k=Qqc
zXDPqQ;l#cXJTv0?`>rs}`v&)J6t}|WxZ#P{XgC=k47-aFgc+;`4={j(y>3V$$
zc^wkJu)P$SBjOi!oDsip|5@=151bRf@bxjo2Zc8Mj(T`39PJ|QglzYv3#ROrj-|#r
zR7F`lOMUOdGfdmDhQ2OJ*<@vyNt_dCe3-iUu3M*%Ont_-L(SFMxw3=WYT05*$V_Sr
z4=itg+$6q%9ox={HrL-=JF#|{nHcTv-m3Q0vB6H;2FC{E9qpJyes+cv9pt}*{CAN5
z4)Wg-j^}rf{|@rsLH;STUinsjIp6{pBa8eD%GVS(^_2w9i-H`9kKVt~uG8KB#^)~tIZ*Kb0
zd+LueqFvvm|6NfWZSDswYU-B1VrGwTvA*=93R8N>

Re: [edk2] [Patch] ShellPkg: Update the parameter type to match function interface in DmpStore

2017-09-22 Thread Carsey, Jaben
Liming,  I agree this works, but I think Laszlo's change to make the GuidName a 
CONST CHAR makes more sense.

Jaben

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Liming Gao
> Sent: Thursday, September 21, 2017 11:36 PM
> To: edk2-devel@lists.01.org
> Cc: Ni, Ruiyu 
> Subject: [edk2] [Patch] ShellPkg: Update the parameter type to match
> function interface in DmpStore
> Importance: High
> 
> This fix can resolve CLANG38 build failure.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Liming Gao 
> Cc: Ruiyu Ni 
> ---
>  ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
> index 062ab5d..c2b60fe 100644
> --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
> +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
> @@ -522,7 +522,7 @@ CascadeProcessVariables (
>  Status = EFI_OUT_OF_RESOURCES;
>}
>  } else {
> -  Status = gEfiShellProtocol->GetGuidName(,
> );
> +  Status = gEfiShellProtocol->GetGuidName(, (CONST
> CHAR16 **) );
>if (EFI_ERROR (Status)) {
>  ShellPrintHiiEx (
>-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_HEADER_LINE),
> gShellDebug1HiiHandle,
> --
> 2.8.0.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH edk2-non-osi v4 10/10] Hisilicon: Fix the drivers use the same GUID issue

2017-09-22 Thread Heyi Guo
The drivers build from separate sources, their GUID should
be different.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Heyi Guo 
Reviewed-by: Leif Lindholm 
---
 Platform/Hisilicon/D02/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf 
| 2 +-
 Platform/Hisilicon/D02/Drivers/SFC/SfcDxeDriver.inf
| 2 +-
 Platform/Hisilicon/D02/MemoryInitPei/MemoryInitPeim.inf
| 2 +-
 Platform/Hisilicon/D05/Drivers/GetInfoFromBmc/GetInfoFromBmc.inf   
| 2 +-
 Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfaceDxe/IpmiInterfaceDxe.inf  
| 2 +-
 Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfacePei/IpmiInterfacePei.inf  
| 2 +-
 Platform/Hisilicon/D05/Drivers/IpmiMiscOpDxe/IpmiMiscOpDxe.inf 
| 2 +-
 Platform/Hisilicon/D05/Drivers/IpmiWatchdogDxe/IpmiWatchdogDxe.inf 
| 2 +-
 Platform/Hisilicon/D05/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf 
| 2 +-
 Platform/Hisilicon/D05/Drivers/OhciDxe/OhciDxe.inf 
| 2 +-
 
Platform/Hisilicon/D05/Drivers/ReportPciePlugDidVidToBmc/ReportPciePlugDidVidToBmc.inf
 | 2 +-
 Platform/Hisilicon/D05/Drivers/SFC/SfcDxeDriver.inf
| 2 +-
 Platform/Hisilicon/D05/Drivers/Sas/SasDxeDriver.inf
| 2 +-
 Platform/Hisilicon/D05/Drivers/Sm750Dxe/UefiSmi.inf
| 2 +-
 Platform/Hisilicon/D05/Drivers/TransferSmbiosInfo/TransSmbiosInfo.inf  
| 2 +-
 Platform/Hisilicon/D05/Library/OemAddressMapD05/OemAddressMapD05.inf   
| 2 +-
 Platform/Hisilicon/D05/MemoryInitPei/MemoryInitPeim.inf
| 2 +-
 Silicon/Hisilicon/Hi1610/Library/Hi1610Serdes/Hi1610SerdesLib.inf  
| 2 +-
 Silicon/Hisilicon/Hi1610/Library/LpcLib/LpcLib.inf 
| 2 +-
 
Silicon/Hisilicon/Hi1610/Library/PlatformSysCtrlLibHi1610/PlatformSysCtrlLibHi1610.inf
 | 2 +-
 Silicon/Hisilicon/Hi1616/Library/Hi1616Serdes/Hi1616SerdesLib.inf  
| 2 +-
 
Silicon/Hisilicon/Pv660/Library/PlatformSysCtrlLibPv660/PlatformSysCtrlLibPv660.inf
| 2 +-
 Silicon/Hisilicon/Pv660/Library/Pv660Serdes/Pv660SerdesLib.inf 
| 2 +-
 23 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/Platform/Hisilicon/D02/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf 
b/Platform/Hisilicon/D02/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf
index 8376bbd..8b9ee1d 100644
--- a/Platform/Hisilicon/D02/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf
+++ b/Platform/Hisilicon/D02/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf
@@ -17,7 +17,7 @@
 [Defines]
   INF_VERSION= 0x00010019
   BASE_NAME  = SnpPV600Dxe
-  FILE_GUID  = 3246F154-3612-4803-BD4E-4104D7EF944A
+  FILE_GUID  = 1AB373EB-2CD7-4D5C-9C39-D31845B67F5E
   MODULE_TYPE= UEFI_DRIVER
   VERSION_STRING = 1.0
 
diff --git a/Platform/Hisilicon/D02/Drivers/SFC/SfcDxeDriver.inf 
b/Platform/Hisilicon/D02/Drivers/SFC/SfcDxeDriver.inf
index e10275a..02a4d7f 100644
--- a/Platform/Hisilicon/D02/Drivers/SFC/SfcDxeDriver.inf
+++ b/Platform/Hisilicon/D02/Drivers/SFC/SfcDxeDriver.inf
@@ -16,7 +16,7 @@
 [Defines]
   INF_VERSION= 0x00010005
   BASE_NAME  = SFCDriver
-  FILE_GUID  = FC5651CA-55D8-4fd2-B6D3-A284D993ABA2
+  FILE_GUID  = 02C6BAAE-6E43-4910-8084-60D5045729A0
   MODULE_TYPE= DXE_DRIVER
   VERSION_STRING = 1.0
   ENTRY_POINT= SFCInitialize
diff --git a/Platform/Hisilicon/D02/MemoryInitPei/MemoryInitPeim.inf 
b/Platform/Hisilicon/D02/MemoryInitPei/MemoryInitPeim.inf
index c221de9..0095c82 100644
--- a/Platform/Hisilicon/D02/MemoryInitPei/MemoryInitPeim.inf
+++ b/Platform/Hisilicon/D02/MemoryInitPei/MemoryInitPeim.inf
@@ -18,7 +18,7 @@
 [Defines]
   INF_VERSION= 0x00010005
   BASE_NAME  = MemoryInit
-  FILE_GUID  = c61ef796-b50d-4f98-9f78-4f6f79d800d5
+  FILE_GUID  = A311058D-0993-4C05-A3EC-16CC0801C1A0
   MODULE_TYPE= PEIM
   VERSION_STRING = 1.0
 
diff --git a/Platform/Hisilicon/D05/Drivers/GetInfoFromBmc/GetInfoFromBmc.inf 
b/Platform/Hisilicon/D05/Drivers/GetInfoFromBmc/GetInfoFromBmc.inf
index 20e2f05..1a2bd01 100644
--- a/Platform/Hisilicon/D05/Drivers/GetInfoFromBmc/GetInfoFromBmc.inf
+++ b/Platform/Hisilicon/D05/Drivers/GetInfoFromBmc/GetInfoFromBmc.inf
@@ -16,7 +16,7 @@
 [Defines]
   INF_VERSION= 0x00010019
   BASE_NAME  = GetInfoFromBmc
-  FILE_GUID  = 43B59C81-9C5F-4021-B0F2-947DB839B781
+  

Re: [edk2] [PATCH v3 1/2] MdePkg: Add UDF volume structure definitions

2017-09-22 Thread Paulo Alcantara

Ruiyu,

On 9/21/2017 11:50 PM, Ni, Ruiyu wrote:

Paulo,
Comments below:

#define UDF_TAG_ID(_Tag) \
   (UDF_VOLUME_DESCRIPTOR_ID)((_Tag)->TagIdentifier)
1. I prefer to remove the UDF_TAG_ID macro. Adding type-cast to get TAG_ID is 
very straightforward.


Right. I'll remove it.

  
#define UDF_LVD_REVISION(_Lv) \

   *(UINT16 *)(UINTN)(_Lv)->DomainIdentifier.IdentifierSuffix
typedef struct {
   UINT8   Flags;
   UINT8   Identifier[23];
   UINT8   IdentifierSuffix[8];
} UDF_ENTITY_ID;
2. Entity structure is defined by ECMA-167 spec and re-used by UDF spec.
  I think since we are creating UDF structure in udf.h, how about using the 
below
  structure layout and removing the UDF_LVD_REVISION macro:
  Typedef struct {
UINT8   Flags;
UINT8   Identifier[23];
UINT16 UdfRevision;
UINT8   DomainFlags;
UINT8   Reserved[5];
 } UDF_ENTITY_ID;


Much better! Thanks for looking into that.

The UDF 2.60 specification says:

> UDF classifies Entity Identifiers into 4 separate types. Each type 
has > its own Suffix Type for the Identifier Suffix field. The 4 types are:

>
>  Domain Entity Identifiers with a Domain Identifier Suffix
>  UDF Entity Identifierswith a UDF Identifier Suffix
>  Implementation Entity Identifiers with an Implementation Identifier 
Suffix

>  Application Entity Identifierswith an Application Identifier Suffix

Given that, I think an union would be more appropriate.

E.g.,

typedef struct {
  UINT8   Flags;
  UINT8   Identifier[23];
  union {
struct {
  UINT16  UdfRevision;
  UINT8   DomainFlags;
  UINT8   Reversed[5];
} DomainIdentifier;
struct {
  UINT16  UdfRevision;
  UINT8   OSClass;
  UINT8   OSIdentifier;
  UINT8   Reserved[4];
} EntityIdentifier;
struct {
  UINT8   OSClass;
  UINT8   OSIdentifier;
  UINT8   ImplementationUseArea[6];
} ImplementationEntityIdentifier;
struct {
  UINT8   ApplicationUseArea[8];
} ApplicationEntityIdentifier;
UINT8 IdentifierSuffix[8];
  };
} UDF_ENTITY_ID;

Do you agree with me? Or that wouldn't be necessary?

Thanks!
Paulo



I am not sure if there are other structures that are defined in ECMA spec and
re-used by UDF spec. I think we can apply the similar rules to those structures
as well.

Thanks/Ray


-Original Message-
From: Paulo Alcantara [mailto:pca...@zytor.com]
Sent: Thursday, September 21, 2017 2:16 AM
To: edk2-devel@lists.01.org
Cc: Paulo Alcantara ; Kinney, Michael D
; Gao, Liming ; Laszlo
Ersek ; Ni, Ruiyu 
Subject: [PATCH v3 1/2] MdePkg: Add UDF volume structure definitions

This patch adds a few more UDF volume structures in order to detect an UDF
file system which is supported by current EDK2 UDF file system
implementation in Partition driver.

Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Laszlo Ersek 
Cc: Ruiyu Ni 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Paulo Alcantara 
---
  MdePkg/Include/IndustryStandard/Udf.h | 63 ++--
  1 file changed, 59 insertions(+), 4 deletions(-)

diff --git a/MdePkg/Include/IndustryStandard/Udf.h
b/MdePkg/Include/IndustryStandard/Udf.h
index 0febb4bcda..002e87e150 100644
--- a/MdePkg/Include/IndustryStandard/Udf.h
+++ b/MdePkg/Include/IndustryStandard/Udf.h
@@ -24,11 +24,28 @@
  #define UDF_LOGICAL_SECTOR_SIZE   ((UINT64)(1ULL <<
UDF_LOGICAL_SECTOR_SHIFT))
  #define UDF_VRS_START_OFFSET  ((UINT64)(16ULL <<
UDF_LOGICAL_SECTOR_SHIFT))

-#define _GET_TAG_ID(_Pointer) \
-  (((UDF_DESCRIPTOR_TAG *)(_Pointer))->TagIdentifier)
+typedef enum {
+  UdfPrimaryVolumeDescriptor = 1,
+  UdfAnchorVolumeDescriptorPointer = 2,
+  UdfVolumeDescriptorPointer = 3,
+  UdfImplemenationUseVolumeDescriptor = 4,
+  UdfPartitionDescriptor = 5,
+  UdfLogicalVolumeDescriptor = 6,
+  UdfUnallocatedSpaceDescriptor = 7,
+  UdfTerminatingDescriptor = 8,
+  UdfLogicalVolumeIntegrityDescriptor = 9,
+  UdfFileSetDescriptor = 256,
+  UdfFileIdentifierDescriptor = 257,
+  UdfAllocationExtentDescriptor = 258,
+  UdfFileEntry = 261,
+  UdfExtendedFileEntry = 266,
+} UDF_VOLUME_DESCRIPTOR_ID;

-#define IS_AVDP(_Pointer) \
-  ((BOOLEAN)(_GET_TAG_ID (_Pointer) == 2))
+#define UDF_TAG_ID(_Tag) \
+  (UDF_VOLUME_DESCRIPTOR_ID)((_Tag)->TagIdentifier)
+
+#define UDF_LVD_REVISION(_Lv) \
+  *(UINT16 *)(UINTN)(_Lv)->DomainIdentifier.IdentifierSuffix

  #pragma pack(1)

@@ -49,12 +66,50 @@ typedef struct {
  } UDF_EXTENT_AD;

  typedef struct {
+  UINT8   CharacterSetType;
+  UINT8   CharacterSetInfo[63];
+} UDF_CHAR_SPEC;
+
+typedef struct {
+  UINT8   Flags;
+  UINT8   

[edk2] [PATCH edk2-platforms v4 05/11] Hisilicon: Update Trusted Firmware binary

2017-09-22 Thread Heyi Guo
From: Ming Huang 

The Trusted Firmware binary was produced from the commit hash:
"14c7bdf"

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang 
Signed-off-by: Heyi Guo 
---
 Platform/Hisilicon/D03/bl1.bin | Bin 14336 -> 14336 bytes
 Platform/Hisilicon/D03/fip.bin | Bin 45601 -> 62513 bytes
 2 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/Platform/Hisilicon/D03/bl1.bin b/Platform/Hisilicon/D03/bl1.bin
index 
7bf0698f8414f606c9a03d08c28e1ae6a7e2eee5..cdaa74390fd53dc309d2f18c9dda333602b6
 100644
GIT binary patch
literal 14336
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

[edk2] [PATCH edk2-platforms v4 09/11] Hisilicon/D05: Update Trusted Firmware binary

2017-09-22 Thread Heyi Guo
From: Ming Huang 

The Trusted Firmware binary was produced from the commit hash:
"14c7bdf"

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang 
Signed-off-by: Heyi Guo 
---
 Platform/Hisilicon/D05/bl1.bin | Bin 12296 -> 14344 bytes
 Platform/Hisilicon/D05/fip.bin | Bin 41493 -> 41493 bytes
 2 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/Platform/Hisilicon/D05/bl1.bin b/Platform/Hisilicon/D05/bl1.bin
index 
f207cd9b77ab856d9a1fc1e53c32adfb104aed9b..7341476e296bb1fbd4fa12a890e7140b0ff7ba0f
 100644
GIT binary patch
literal 14344
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

[edk2] [PATCH edk2-non-osi v4 05/10] Hisilicon/D05/Net: Update Snp driver

2017-09-22 Thread Heyi Guo
1. Replace SnpPV660Dxe with SnpPV600Dxe;
2. Add SnpPlatform:
 Install protocol to enable nic port which are using.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang 
Signed-off-by: Heyi Guo 
---
 Platform/Hisilicon/D05/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.efi | Bin 0 -> 
28544 bytes
 Platform/Hisilicon/D05/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf |  24 
+
 Platform/Hisilicon/D05/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.efi | Bin 56512 -> 
0 bytes
 Platform/Hisilicon/D05/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.inf |  27 

 Platform/Hisilicon/D05/Drivers/Net/SnpPlatform/SnpPlatform.efi | Bin 0 -> 3392 
bytes
 Platform/Hisilicon/D05/Drivers/Net/SnpPlatform/SnpPlatform.inf |  24 
+
 6 files changed, 48 insertions(+), 27 deletions(-)

diff --git a/Platform/Hisilicon/D05/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.efi 
b/Platform/Hisilicon/D05/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.efi
new file mode 100644
index 000..bc7942a
Binary files /dev/null and 
b/Platform/Hisilicon/D05/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.efi differ
diff --git a/Platform/Hisilicon/D05/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf 
b/Platform/Hisilicon/D05/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf
new file mode 100644
index 000..90e478d
--- /dev/null
+++ b/Platform/Hisilicon/D05/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf
@@ -0,0 +1,24 @@
+#/** @file
+#
+#Copyright (c) 2017, Hisilicon Limited. All rights reserved.
+#Copyright (c) 2017, Linaro Limited. 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.
+#
+#**/
+
+[Defines]
+  INF_VERSION= 0x00010019
+  BASE_NAME  = SnpPV600Dxe
+  FILE_GUID  = 3247F15F-3612-4803-BD4E-4104D7EF944A
+  MODULE_TYPE= DXE_DRIVER
+  VERSION_STRING = 1.0
+
+[Binaries.AARCH64]
+  PE32|SnpPV600Dxe.efi|*
diff --git a/Platform/Hisilicon/D05/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.efi 
b/Platform/Hisilicon/D05/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.efi
deleted file mode 100644
index c54538f..000
Binary files a/Platform/Hisilicon/D05/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.efi 
and /dev/null differ
diff --git a/Platform/Hisilicon/D05/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.inf 
b/Platform/Hisilicon/D05/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.inf
deleted file mode 100644
index 98cc3b8..000
--- a/Platform/Hisilicon/D05/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.inf
+++ /dev/null
@@ -1,27 +0,0 @@
-#/** @file
-#
-#Copyright (c) 2016, Hisilicon Limited. All rights reserved.
-#Copyright (c) 2016-2017, Linaro Limited. 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.
-#
-#**/
-
-[Defines]
-  INF_VERSION= 0x00010019
-  BASE_NAME  = SnpPV600Dxe
-  FILE_GUID  = 85F85FDE-FDA1-465A-B22E-488F1A6F966C
-  MODULE_TYPE= UEFI_DRIVER
-  VERSION_STRING = 1.0
-
-  ENTRY_POINT= InitializeSnpPV600Driver
-  UNLOAD_IMAGE   = SnpPV600Unload
-
-[Binaries]
-  PE32|SnpPV600Dxe.efi|*
diff --git a/Platform/Hisilicon/D05/Drivers/Net/SnpPlatform/SnpPlatform.efi 
b/Platform/Hisilicon/D05/Drivers/Net/SnpPlatform/SnpPlatform.efi
new file mode 100644
index 000..42c26de
Binary files /dev/null and 
b/Platform/Hisilicon/D05/Drivers/Net/SnpPlatform/SnpPlatform.efi differ
diff --git a/Platform/Hisilicon/D05/Drivers/Net/SnpPlatform/SnpPlatform.inf 
b/Platform/Hisilicon/D05/Drivers/Net/SnpPlatform/SnpPlatform.inf
new file mode 100644
index 000..10b2003
--- /dev/null
+++ b/Platform/Hisilicon/D05/Drivers/Net/SnpPlatform/SnpPlatform.inf
@@ -0,0 +1,24 @@
+#/** @file
+#
+#Copyright (c) 2017, Hisilicon Limited. All rights reserved.
+#Copyright (c) 2017, Linaro Limited. 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 

[edk2] [PATCH edk2-non-osi v4 04/10] Hisilicon: Update Trusted Firmware binary

2017-09-22 Thread Heyi Guo
From: Ming Huang 

The Trusted Firmware binary was produced from the commit hash:
"14c7bdf"

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang 
Signed-off-by: Heyi Guo 
---
 Platform/Hisilicon/D03/bl1.bin | Bin 14336 -> 14336 bytes
 Platform/Hisilicon/D03/fip.bin | Bin 45601 -> 62513 bytes
 2 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/Platform/Hisilicon/D03/bl1.bin b/Platform/Hisilicon/D03/bl1.bin
index 7bf0698..cdaa743 100644
Binary files a/Platform/Hisilicon/D03/bl1.bin and 
b/Platform/Hisilicon/D03/bl1.bin differ
diff --git a/Platform/Hisilicon/D03/fip.bin b/Platform/Hisilicon/D03/fip.bin
index 913d40d..ae4ed1a 100644
Binary files a/Platform/Hisilicon/D03/fip.bin and 
b/Platform/Hisilicon/D03/fip.bin differ
-- 
1.9.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH edk2-platforms v4 07/11] Hisilicon/D05/Sas: Add SasPlatform

2017-09-22 Thread Heyi Guo
Install protocol to enable sas port which is using and
transmit base address info of sas port to SasDriverDxe.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang 
Signed-off-by: Heyi Guo 
---
 Platform/Hisilicon/D05/Drivers/SasPlatform/SasPlatform.efi | Bin 0 -> 3424 
bytes
 Platform/Hisilicon/D05/Drivers/SasPlatform/SasPlatform.inf |  24 

 2 files changed, 24 insertions(+)

diff --git a/Platform/Hisilicon/D05/Drivers/SasPlatform/SasPlatform.efi 
b/Platform/Hisilicon/D05/Drivers/SasPlatform/SasPlatform.efi
new file mode 100644
index 
..d2685abd0f8373fc50c69837fc9a555389bfaed1
GIT binary patch
literal 3424
zcmbVNZ%iE55ue??18hh`;S30x-d%`lmslLZ7))aK9{*^B-3DuRdmxBfiTnvX@
zx2~N9OBD)jl=Gj|a;y6IXXP))bF^-C^ARbBNHAk%(4z_wbsRgEz*8?v$tz5
zPSUD=((cTg_h#PAZ)V-B>;DqDk)bcN^B!?N$I6g%mqGc
zxWMrD=un^7+L!z2;up;Gzd-(ZVi()T!qGgUuYBHy$COnLb)Oi5F2~GqS~Sy~i%6~P
z3Je7xG;o0r7R}rzpk6uH-Pa#X`)c{jG;?5IW9IyE_|zGiTkD|cW-jUX6^ebE==>V!
zuW94AZizaRiX-MGq5C0EDuuDlT%oUZh$!^J3FXzrPQ<_?HJi4>x-L6)uAh{m@IHQD
zkzyKAjXOugy+plD3i;X266}5*Hpxbv*jKMgRFhPwQ%cYE^#r1QO
zwwrPM)tqwj9NQyoHe(#9jC2R~-H;t)kpfZgw9_&0G0O%JlwJk%-EI
z!ZwE#jcgbCl2Q^AIlxO6x+e|uDXalc#_a

[edk2] [PATCH edk2-platforms v4 06/11] Hisilicon/D05/Net: Update Snp driver

2017-09-22 Thread Heyi Guo
1. Replace SnpPV660Dxe with SnpPV600Dxe;
2. Add SnpPlatform:
 Install protocol to enable nic port which are using.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang 
Signed-off-by: Heyi Guo 
---
 Platform/Hisilicon/D05/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.efi | Bin 0 -> 
28544 bytes
 Platform/Hisilicon/D05/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf |  24 
+
 Platform/Hisilicon/D05/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.efi | Bin 56512 -> 
0 bytes
 Platform/Hisilicon/D05/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.inf |  27 

 Platform/Hisilicon/D05/Drivers/Net/SnpPlatform/SnpPlatform.efi | Bin 0 -> 3392 
bytes
 Platform/Hisilicon/D05/Drivers/Net/SnpPlatform/SnpPlatform.inf |  24 
+
 6 files changed, 48 insertions(+), 27 deletions(-)

diff --git a/Platform/Hisilicon/D05/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.efi 
b/Platform/Hisilicon/D05/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.efi
new file mode 100644
index 
..bc7942a3e1338f08328c6a571c811cd1b69762d0
GIT binary patch
literal 28544
zcmeHweSDPFmH6oF-$@dBbu2czBFY8Nr0qM^JIdSwrbNPYJPoV@`6TDdDWsQ
z%p_T*;;&^8g<`i%cqy3yUsgdF+g%5-TerHqnkc{@O``!j^V_Afg#c$?yApUXmw6
zsI9yE`TYLa_!;hf?mhS1bI&>V+;h*p&*KeWmrwl{_|z?j8`fMa(h}8%3y?c5SIT%*
zL|-5hNH?q2@EJe*~tqsege*!*JtME6?+sd7ko7i|+o6aUs&>2Yfu@mtMu%8-BL4|zi#oy1tkqy8+}z+W$D
zBY(8);rwPte&6Kb@|GO(FB{_?$-}pDB%6HvNR#aGxsnZuck?+hzUn!q9+w{by-Tv0
z)@K}|8_b?O^RtkK%QXhB`xRGy19x~tik*b6eT28dDK$5Ru42QF-p6e?B!Bc
zNwOiwV~uH2e{GuVxeUKR)A-O9DLB@V8Q2^b{l0XJL0s{#`}5?!aOHyFS7p$KZN
zt=s7ktkKWl||Ab@A+&!oUoEjAW(5pE394%EAlZbu3+X3sUAsS7Ss7rs#i-uWWn
zrJ)a|oRv4pQ_A_{W;K#rs71~eNpkRW_)U`}`TUWll$_MmXj`W2`ClFZk1mY9H%T@q
zN}$^ho-G5d`Xp+#AL`iy(_q(n15-ZJ@q$~<_{|@>?T?(hm9#O*GNAY|b#e
zo=js-B$Z<7e|FRZ{r?=sp`cyc1=7$DJ!JVe44uj;c^rK_kuI^^OxZ91zMTReJT93D
z{*?>>28OOK7d+6%bB^VdWTjCrb4oV)v{=CXnb03xvSAZ=xcLPo**wFXbDUp
zj(yX3X?R;1ctJGGLC{4xkS_b#rqh^v;0Nd4$77|T2y_!h9VZQGS3rmKK&{BLOUbi-
z^l`XZ35Bgb9zQ#{?HZnriSbWGEeUJ2B;jSYWb({axqO_-O*nD`Xvv^d!ej{nJ5DLN&)}kLv{V
zw9$<+1#<^{;n-J$@6@wfz}sAmm%8>b>`g+;9oDmEA9Sf2x}+xu+f99={R!k#>qJ^F
zHq$q(XWd$qYV-Y41#A0=q(WCm}G9*%sJD00p=g$40eJ;^J#r6ZA8?uF0hbaanPV}f1iGB&)g!VeyACU?V`bd;2W

[edk2] [PATCH edk2-non-osi v4 07/10] Hisilicon/D05: Update binary file

2017-09-22 Thread Heyi Guo
From: Ming Huang 

Update binary file for edk2 upgrade.
1. Replace UncachedMemoryAllocationLib with DmaLib;
2. Remove ArmCpuLib dependenc;
3. Remove ConvertToPhysicalAddress;

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang 
Signed-off-by: Heyi Guo 
---
 Platform/Hisilicon/D05/Drivers/GetInfoFromBmc/GetInfoFromBmc.efi   
| Bin 19552 -> 5024 bytes
 Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfaceDxe/IpmiInterfaceDxe.efi  
| Bin 25696 -> 7680 bytes
 Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfacePei/IpmiInterfacePei.efi  
| Bin 22528 -> 5344 bytes
 Platform/Hisilicon/D05/Drivers/IpmiMiscOpDxe/IpmiMiscOp.efi
| Bin 23136 -> 5280 bytes
 Platform/Hisilicon/D05/Drivers/IpmiWatchdogDxe/IpmiWatchdogDxe.efi 
| Bin 15968 -> 2592 bytes
 Platform/Hisilicon/D05/Drivers/OhciDxe/NativeOhci.efi  
| Bin 48000 -> 23328 bytes
 
Platform/Hisilicon/D05/Drivers/ReportPciePlugDidVidToBmc/ReportPciePlugDidVidToBmc.efi
 | Bin 21536 -> 4032 bytes
 Platform/Hisilicon/D05/Drivers/SFC/SFCDriver.efi   
| Bin 262144 -> 262144 bytes
 Platform/Hisilicon/D05/Drivers/Sas/SasDriverDxe.efi
| Bin 230912 -> 116288 bytes
 Platform/Hisilicon/D05/Drivers/Sm750Dxe/SmiGraphicsOutput.efi  
| Bin 35904 -> 18592 bytes
 Platform/Hisilicon/D05/Drivers/TransferSmbiosInfo/TransSmbiosInfo.efi  
| Bin 16576 -> 4288 bytes
 Platform/Hisilicon/D05/Library/OemAddressMapD05/OemAddressMapD05.lib   
| Bin 42136 -> 52968 bytes
 Platform/Hisilicon/D05/MemoryInitPei/MemoryInit.efi
| Bin 273312 -> 152576 bytes
 Silicon/Hisilicon/Hi1616/Library/Hi1616Serdes/Hi1616SerdesLib.lib  
| Bin 707246 -> 726884 bytes
 
Silicon/Hisilicon/Hi1616/Library/PlatformSysCtrlLibHi1616/PlatformSysCtrlLibHi1616.lib
 | Bin 358602 -> 344310 bytes
 15 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/Platform/Hisilicon/D05/Drivers/GetInfoFromBmc/GetInfoFromBmc.efi 
b/Platform/Hisilicon/D05/Drivers/GetInfoFromBmc/GetInfoFromBmc.efi
index 6f117e2..a0fa8c8 100644
Binary files a/Platform/Hisilicon/D05/Drivers/GetInfoFromBmc/GetInfoFromBmc.efi 
and b/Platform/Hisilicon/D05/Drivers/GetInfoFromBmc/GetInfoFromBmc.efi differ
diff --git 
a/Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfaceDxe/IpmiInterfaceDxe.efi 
b/Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfaceDxe/IpmiInterfaceDxe.efi
index 139658c..9b4e23e 100644
Binary files 
a/Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfaceDxe/IpmiInterfaceDxe.efi and 
b/Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfaceDxe/IpmiInterfaceDxe.efi 
differ
diff --git 
a/Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfacePei/IpmiInterfacePei.efi 
b/Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfacePei/IpmiInterfacePei.efi
index c3d28ec..5bf6ded 100644
Binary files 
a/Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfacePei/IpmiInterfacePei.efi and 
b/Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfacePei/IpmiInterfacePei.efi 
differ
diff --git a/Platform/Hisilicon/D05/Drivers/IpmiMiscOpDxe/IpmiMiscOp.efi 
b/Platform/Hisilicon/D05/Drivers/IpmiMiscOpDxe/IpmiMiscOp.efi
index 96d1680..3092139 100644
Binary files a/Platform/Hisilicon/D05/Drivers/IpmiMiscOpDxe/IpmiMiscOp.efi and 
b/Platform/Hisilicon/D05/Drivers/IpmiMiscOpDxe/IpmiMiscOp.efi differ
diff --git a/Platform/Hisilicon/D05/Drivers/IpmiWatchdogDxe/IpmiWatchdogDxe.efi 
b/Platform/Hisilicon/D05/Drivers/IpmiWatchdogDxe/IpmiWatchdogDxe.efi
index 029ce97..ece5615 100644
Binary files 
a/Platform/Hisilicon/D05/Drivers/IpmiWatchdogDxe/IpmiWatchdogDxe.efi and 
b/Platform/Hisilicon/D05/Drivers/IpmiWatchdogDxe/IpmiWatchdogDxe.efi differ
diff --git a/Platform/Hisilicon/D05/Drivers/OhciDxe/NativeOhci.efi 
b/Platform/Hisilicon/D05/Drivers/OhciDxe/NativeOhci.efi
index dcabce2..9e7dd0e 100644
Binary files a/Platform/Hisilicon/D05/Drivers/OhciDxe/NativeOhci.efi and 
b/Platform/Hisilicon/D05/Drivers/OhciDxe/NativeOhci.efi differ
diff --git 
a/Platform/Hisilicon/D05/Drivers/ReportPciePlugDidVidToBmc/ReportPciePlugDidVidToBmc.efi
 
b/Platform/Hisilicon/D05/Drivers/ReportPciePlugDidVidToBmc/ReportPciePlugDidVidToBmc.efi
index da85b0b..2be627f 100644
Binary files 
a/Platform/Hisilicon/D05/Drivers/ReportPciePlugDidVidToBmc/ReportPciePlugDidVidToBmc.efi
 and 
b/Platform/Hisilicon/D05/Drivers/ReportPciePlugDidVidToBmc/ReportPciePlugDidVidToBmc.efi
 differ
diff --git a/Platform/Hisilicon/D05/Drivers/SFC/SFCDriver.efi 
b/Platform/Hisilicon/D05/Drivers/SFC/SFCDriver.efi
index 02ea2b1..52d6107 100644
Binary files a/Platform/Hisilicon/D05/Drivers/SFC/SFCDriver.efi and 
b/Platform/Hisilicon/D05/Drivers/SFC/SFCDriver.efi differ
diff --git a/Platform/Hisilicon/D05/Drivers/Sas/SasDriverDxe.efi 

[edk2] [PATCH edk2-non-osi v4 08/10] Hisilicon/D05: Update Trusted Firmware binary

2017-09-22 Thread Heyi Guo
From: Ming Huang 

The Trusted Firmware binary was produced from the commit hash:
"14c7bdf"

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang 
Signed-off-by: Heyi Guo 
---
 Platform/Hisilicon/D05/bl1.bin | Bin 12296 -> 14344 bytes
 Platform/Hisilicon/D05/fip.bin | Bin 41493 -> 41493 bytes
 2 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/Platform/Hisilicon/D05/bl1.bin b/Platform/Hisilicon/D05/bl1.bin
index f207cd9..7341476 100644
Binary files a/Platform/Hisilicon/D05/bl1.bin and 
b/Platform/Hisilicon/D05/bl1.bin differ
diff --git a/Platform/Hisilicon/D05/fip.bin b/Platform/Hisilicon/D05/fip.bin
index 0952662..496a9b8 100644
Binary files a/Platform/Hisilicon/D05/fip.bin and 
b/Platform/Hisilicon/D05/fip.bin differ
-- 
1.9.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH edk2-non-osi v4 09/10] Hisilicon/D05: Fix bug 3061

2017-09-22 Thread Heyi Guo
From: Ming Huang 

Fix bug 3061(bugs.linaro.org):
D05(before EC) boot hangs at "Need Reset";

If the D05 is before EC, then speed of i2c reduce to 100k.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang 
Signed-off-by: Heyi Guo 
---
 Platform/Hisilicon/D05/Sec/FVMAIN_SEC.Fv | Bin 262144 -> 262144 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/Platform/Hisilicon/D05/Sec/FVMAIN_SEC.Fv 
b/Platform/Hisilicon/D05/Sec/FVMAIN_SEC.Fv
index 16500b7..ab6ea83 100644
Binary files a/Platform/Hisilicon/D05/Sec/FVMAIN_SEC.Fv and 
b/Platform/Hisilicon/D05/Sec/FVMAIN_SEC.Fv differ
-- 
1.9.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH edk2-non-osi v4 06/10] Hisilicon/D05/Sas: Add SasPlatform

2017-09-22 Thread Heyi Guo
Install protocol to enable sas port which is using and
transmit base address info of sas port to SasDriverDxe.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang 
Signed-off-by: Heyi Guo 
---
 Platform/Hisilicon/D05/Drivers/SasPlatform/SasPlatform.efi | Bin 0 -> 3424 
bytes
 Platform/Hisilicon/D05/Drivers/SasPlatform/SasPlatform.inf |  24 

 2 files changed, 24 insertions(+)

diff --git a/Platform/Hisilicon/D05/Drivers/SasPlatform/SasPlatform.efi 
b/Platform/Hisilicon/D05/Drivers/SasPlatform/SasPlatform.efi
new file mode 100644
index 000..d2685ab
Binary files /dev/null and 
b/Platform/Hisilicon/D05/Drivers/SasPlatform/SasPlatform.efi differ
diff --git a/Platform/Hisilicon/D05/Drivers/SasPlatform/SasPlatform.inf 
b/Platform/Hisilicon/D05/Drivers/SasPlatform/SasPlatform.inf
new file mode 100644
index 000..0d747a1
--- /dev/null
+++ b/Platform/Hisilicon/D05/Drivers/SasPlatform/SasPlatform.inf
@@ -0,0 +1,24 @@
+#/** @file
+#
+#Copyright (c) 2017, Hisilicon Limited. All rights reserved.
+#Copyright (c) 2017, Linaro Limited. 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.
+#
+#**/
+
+[Defines]
+  INF_VERSION= 0x00010019
+  BASE_NAME  = SasPlatform
+  FILE_GUID  = 102D8FC9-20a4-42EB-aC14-1C98BA5b26A4
+  MODULE_TYPE= DXE_DRIVER
+  VERSION_STRING = 1.0
+
+[Binaries.AARCH64]
+  PE32|SasPlatform.efi|*
-- 
1.9.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH edk2-non-osi v4 00/10] Update D03/D05 binary for edk2 update and bug fix.

2017-09-22 Thread Heyi Guo
Code can also be found in github:
https://github.com/hisilicon/OpenPlatformPkg.git
branch:  rp-1710-osi-v4

Note: Maybe There are some bug in NonDiscoverablePciDeviceDxe.
D05/3 console hang at boot, It's boot successfully by switch the 
VirtualEhciPciIo with old one.


Heyi Guo (5):
  Hisilicon/D03/Net: Update Snp driver
  Hisilicon/D03/Sas: Add SasPlatform
  Hisilicon/D05/Net: Update Snp driver
  Hisilicon/D05/Sas: Add SasPlatform
  Hisilicon: Fix the drivers use the same GUID issue

Ming Huang (5):
  Hisilicon/D03: Update binary file
  Hisilicon: Update Trusted Firmware binary
  Hisilicon/D05: Update binary file
  Hisilicon/D05: Update Trusted Firmware binary
  Hisilicon/D05: Fix bug 3061

 Platform/Hisilicon/D02/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf 
|   2 +-
 Platform/Hisilicon/D02/Drivers/SFC/SfcDxeDriver.inf
|   2 +-
 Platform/Hisilicon/D02/MemoryInitPei/MemoryInitPeim.inf
|   2 +-
 Platform/Hisilicon/D03/Drivers/GetInfoFromBmc/GetInfoFromBmc.efi   
| Bin 21696 -> 4768 bytes
 Platform/Hisilicon/D03/Drivers/Ipmi/IpmiInterfacePei/IpmiInterfacePei.efi  
| Bin 22208 -> 4672 bytes
 Platform/Hisilicon/D03/Drivers/Ipmi/ipmiInterfaceDxe/IpmiInterfaceDxe.efi  
| Bin 25440 -> 6784 bytes
 Platform/Hisilicon/D03/Drivers/IpmiMiscOpDxe/IpmiMiscOp.efi
| Bin 23712 -> 4896 bytes
 Platform/Hisilicon/D03/Drivers/IpmiWatchdogDxe/IpmiWatchdogDxe.efi 
| Bin 18080 -> 2304 bytes
 Platform/Hisilicon/D03/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.efi 
| Bin 0 -> 26688 bytes
 Platform/Hisilicon/D03/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf 
|  24 +
 Platform/Hisilicon/D03/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.efi 
| Bin 56832 -> 0 bytes
 Platform/Hisilicon/D03/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.inf 
|  27 
 Platform/Hisilicon/D03/Drivers/Net/SnpPlatform/SnpPlatform.efi 
| Bin 0 -> 3040 bytes
 Platform/Hisilicon/D03/Drivers/Net/SnpPlatform/SnpPlatform.inf 
|  24 +
 Platform/Hisilicon/D03/Drivers/OhciDxe/NativeOhci.efi  
| Bin 48352 -> 21664 bytes
 
Platform/Hisilicon/D03/Drivers/ReportPciePlugDidVidToBmc/ReportPciePlugDidVidToBmc.efi
 | Bin 22112 -> 3712 bytes
 Platform/Hisilicon/D03/Drivers/SFC/SFCDriver.efi   
| Bin 262144 -> 262144 bytes
 Platform/Hisilicon/D03/Drivers/Sas/SasDriverDxe.efi
| Bin 208288 -> 98144 bytes
 Platform/Hisilicon/D03/Drivers/SasPlatform/SasPlatform.efi 
| Bin 0 -> 3040 bytes
 Platform/Hisilicon/D03/Drivers/SasPlatform/SasPlatform.inf 
|  24 +
 Platform/Hisilicon/D03/Drivers/Sm750Dxe/SmiGraphicsOutput.efi  
| Bin 36480 -> 17728 bytes
 Platform/Hisilicon/D03/Drivers/TransferSmbiosInfo/TransSmbiosInfo.efi  
| Bin 21408 -> 4000 bytes
 Platform/Hisilicon/D03/Library/OemAddressMap2P/OemAddressMap2P.lib 
| Bin 19486 -> 20550 bytes
 Platform/Hisilicon/D03/MemoryInitPei/MemoryInit.efi
| Bin 161280 -> 90272 bytes
 Platform/Hisilicon/D03/Sec/FVMAIN_SEC.Fv   
| Bin 262144 -> 262144 bytes
 Platform/Hisilicon/D03/bl1.bin 
| Bin 14336 -> 14336 bytes
 Platform/Hisilicon/D03/fip.bin 
| Bin 45601 -> 62513 bytes
 Platform/Hisilicon/D05/Drivers/GetInfoFromBmc/GetInfoFromBmc.efi   
| Bin 19552 -> 5024 bytes
 Platform/Hisilicon/D05/Drivers/GetInfoFromBmc/GetInfoFromBmc.inf   
|   2 +-
 Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfaceDxe/IpmiInterfaceDxe.efi  
| Bin 25696 -> 7680 bytes
 Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfaceDxe/IpmiInterfaceDxe.inf  
|   2 +-
 Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfacePei/IpmiInterfacePei.efi  
| Bin 22528 -> 5344 bytes
 Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfacePei/IpmiInterfacePei.inf  
|   2 +-
 Platform/Hisilicon/D05/Drivers/IpmiMiscOpDxe/IpmiMiscOp.efi
| Bin 23136 -> 5280 bytes
 Platform/Hisilicon/D05/Drivers/IpmiMiscOpDxe/IpmiMiscOpDxe.inf 
|   2 +-
 Platform/Hisilicon/D05/Drivers/IpmiWatchdogDxe/IpmiWatchdogDxe.efi 
| Bin 15968 -> 2592 bytes
 Platform/Hisilicon/D05/Drivers/IpmiWatchdogDxe/IpmiWatchdogDxe.inf 
|   2 +-
 Platform/Hisilicon/D05/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.efi 
| Bin 0 -> 28544 bytes
 Platform/Hisilicon/D05/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf   

[edk2] [PATCH edk2-platforms v4 00/11] Update D03/D05 binary for edk2 update and bug fix.

2017-09-22 Thread Heyi Guo
Code can also be found in github:
https://github.com/hisilicon/OpenPlatformPkg.git
branch: rp-1710-platforms-v4

Note: Maybe There are some bug in NonDiscoverablePciDeviceDxe.
D05/3 console hang at boot, It's boot successfully by switch the 
VirtualEhciPciIo with old one.

Heyi Guo (5):
  Hisilicon/D03/Net: Update Snp driver
  Hisilicon/D03/Sas: Add SasPlatform
  Hisilicon/D05/Net: Update Snp driver
  Hisilicon/D05/Sas: Add SasPlatform
  Hisilicon: Fix the drivers use the same GUID issue

Leif Lindholm (1):
  Platforms: add ARM Juno system controller firmware

Ming Huang (5):
  Hisilicon/D03: Update binary file
  Hisilicon: Update Trusted Firmware binary
  Hisilicon/D05: Update binary file
  Hisilicon/D05: Update Trusted Firmware binary
  Hisilicon/D05: Fix bug 3061

 Platform/ARM/Juno/License.txt  
| 361 
 Platform/ARM/Juno/bl0.bin  
| Bin 0 -> 4172 bytes
 Platform/ARM/Juno/bl30.bin 
| Bin 0 -> 55204 bytes
 Platform/Hisilicon/D02/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf 
|   2 +-
 Platform/Hisilicon/D02/Drivers/SFC/SfcDxeDriver.inf
|   2 +-
 Platform/Hisilicon/D02/MemoryInitPei/MemoryInitPeim.inf
|   2 +-
 Platform/Hisilicon/D03/Drivers/GetInfoFromBmc/GetInfoFromBmc.efi   
| Bin 21696 -> 4768 bytes
 Platform/Hisilicon/D03/Drivers/Ipmi/IpmiInterfacePei/IpmiInterfacePei.efi  
| Bin 22208 -> 4672 bytes
 Platform/Hisilicon/D03/Drivers/Ipmi/ipmiInterfaceDxe/IpmiInterfaceDxe.efi  
| Bin 25440 -> 6784 bytes
 Platform/Hisilicon/D03/Drivers/IpmiMiscOpDxe/IpmiMiscOp.efi
| Bin 23712 -> 4896 bytes
 Platform/Hisilicon/D03/Drivers/IpmiWatchdogDxe/IpmiWatchdogDxe.efi 
| Bin 18080 -> 2304 bytes
 Platform/Hisilicon/D03/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.efi 
| Bin 0 -> 26688 bytes
 Platform/Hisilicon/D03/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf 
|  24 ++
 Platform/Hisilicon/D03/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.efi 
| Bin 56832 -> 0 bytes
 Platform/Hisilicon/D03/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.inf 
|  27 --
 Platform/Hisilicon/D03/Drivers/Net/SnpPlatform/SnpPlatform.efi 
| Bin 0 -> 3040 bytes
 Platform/Hisilicon/D03/Drivers/Net/SnpPlatform/SnpPlatform.inf 
|  24 ++
 Platform/Hisilicon/D03/Drivers/OhciDxe/NativeOhci.efi  
| Bin 48352 -> 21664 bytes
 
Platform/Hisilicon/D03/Drivers/ReportPciePlugDidVidToBmc/ReportPciePlugDidVidToBmc.efi
 | Bin 22112 -> 3712 bytes
 Platform/Hisilicon/D03/Drivers/SFC/SFCDriver.efi   
| Bin 262144 -> 262144 bytes
 Platform/Hisilicon/D03/Drivers/Sas/SasDriverDxe.efi
| Bin 208288 -> 98144 bytes
 Platform/Hisilicon/D03/Drivers/SasPlatform/SasPlatform.efi 
| Bin 0 -> 3040 bytes
 Platform/Hisilicon/D03/Drivers/SasPlatform/SasPlatform.inf 
|  24 ++
 Platform/Hisilicon/D03/Drivers/Sm750Dxe/SmiGraphicsOutput.efi  
| Bin 36480 -> 17728 bytes
 Platform/Hisilicon/D03/Drivers/TransferSmbiosInfo/TransSmbiosInfo.efi  
| Bin 21408 -> 4000 bytes
 Platform/Hisilicon/D03/Library/OemAddressMap2P/OemAddressMap2P.lib 
| Bin 19486 -> 20550 bytes
 Platform/Hisilicon/D03/MemoryInitPei/MemoryInit.efi
| Bin 161280 -> 90272 bytes
 Platform/Hisilicon/D03/Sec/FVMAIN_SEC.Fv   
| Bin 262144 -> 262144 bytes
 Platform/Hisilicon/D03/bl1.bin 
| Bin 14336 -> 14336 bytes
 Platform/Hisilicon/D03/fip.bin 
| Bin 45601 -> 62513 bytes
 Platform/Hisilicon/D05/Drivers/GetInfoFromBmc/GetInfoFromBmc.efi   
| Bin 19552 -> 5024 bytes
 Platform/Hisilicon/D05/Drivers/GetInfoFromBmc/GetInfoFromBmc.inf   
|   2 +-
 Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfaceDxe/IpmiInterfaceDxe.efi  
| Bin 25696 -> 7680 bytes
 Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfaceDxe/IpmiInterfaceDxe.inf  
|   2 +-
 Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfacePei/IpmiInterfacePei.efi  
| Bin 22528 -> 5344 bytes
 Platform/Hisilicon/D05/Drivers/Ipmi/IpmiInterfacePei/IpmiInterfacePei.inf  
|   2 +-
 Platform/Hisilicon/D05/Drivers/IpmiMiscOpDxe/IpmiMiscOp.efi
| Bin 23136 -> 5280 bytes
 Platform/Hisilicon/D05/Drivers/IpmiMiscOpDxe/IpmiMiscOpDxe.inf 
|   2 +-
 

[edk2] [PATCH edk2-non-osi v4 02/10] Hisilicon/D03/Sas: Add SasPlatform

2017-09-22 Thread Heyi Guo
Install protocol to enable sas port which is using and
transmit base address info of sas port to SasDriverDxe.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang 
Signed-off-by: Heyi Guo 
---
 Platform/Hisilicon/D03/Drivers/SasPlatform/SasPlatform.efi | Bin 0 -> 3040 
bytes
 Platform/Hisilicon/D03/Drivers/SasPlatform/SasPlatform.inf |  24 

 2 files changed, 24 insertions(+)

diff --git a/Platform/Hisilicon/D03/Drivers/SasPlatform/SasPlatform.efi 
b/Platform/Hisilicon/D03/Drivers/SasPlatform/SasPlatform.efi
new file mode 100644
index 000..4255641
Binary files /dev/null and 
b/Platform/Hisilicon/D03/Drivers/SasPlatform/SasPlatform.efi differ
diff --git a/Platform/Hisilicon/D03/Drivers/SasPlatform/SasPlatform.inf 
b/Platform/Hisilicon/D03/Drivers/SasPlatform/SasPlatform.inf
new file mode 100644
index 000..0d747a1
--- /dev/null
+++ b/Platform/Hisilicon/D03/Drivers/SasPlatform/SasPlatform.inf
@@ -0,0 +1,24 @@
+#/** @file
+#
+#Copyright (c) 2017, Hisilicon Limited. All rights reserved.
+#Copyright (c) 2017, Linaro Limited. 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.
+#
+#**/
+
+[Defines]
+  INF_VERSION= 0x00010019
+  BASE_NAME  = SasPlatform
+  FILE_GUID  = 102D8FC9-20a4-42EB-aC14-1C98BA5b26A4
+  MODULE_TYPE= DXE_DRIVER
+  VERSION_STRING = 1.0
+
+[Binaries.AARCH64]
+  PE32|SasPlatform.efi|*
-- 
1.9.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH edk2-non-osi v4 03/10] Hisilicon/D03: Update binary file

2017-09-22 Thread Heyi Guo
From: Ming Huang 

Update binary file for edk2 upgrade.
1. Replace UncachedMemoryAllocationLib with DmaLib;
2. Remove ArmCpuLib dependenc;
3. Remove ConvertToPhysicalAddress;

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang 
Signed-off-by: Heyi Guo 
---
 Platform/Hisilicon/D03/Drivers/GetInfoFromBmc/GetInfoFromBmc.efi   
| Bin 21696 -> 4768 bytes
 Platform/Hisilicon/D03/Drivers/Ipmi/IpmiInterfacePei/IpmiInterfacePei.efi  
| Bin 22208 -> 4672 bytes
 Platform/Hisilicon/D03/Drivers/Ipmi/ipmiInterfaceDxe/IpmiInterfaceDxe.efi  
| Bin 25440 -> 6784 bytes
 Platform/Hisilicon/D03/Drivers/IpmiMiscOpDxe/IpmiMiscOp.efi
| Bin 23712 -> 4896 bytes
 Platform/Hisilicon/D03/Drivers/IpmiWatchdogDxe/IpmiWatchdogDxe.efi 
| Bin 18080 -> 2304 bytes
 Platform/Hisilicon/D03/Drivers/OhciDxe/NativeOhci.efi  
| Bin 48352 -> 21664 bytes
 
Platform/Hisilicon/D03/Drivers/ReportPciePlugDidVidToBmc/ReportPciePlugDidVidToBmc.efi
 | Bin 22112 -> 3712 bytes
 Platform/Hisilicon/D03/Drivers/SFC/SFCDriver.efi   
| Bin 262144 -> 262144 bytes
 Platform/Hisilicon/D03/Drivers/Sas/SasDriverDxe.efi
| Bin 208288 -> 98144 bytes
 Platform/Hisilicon/D03/Drivers/Sm750Dxe/SmiGraphicsOutput.efi  
| Bin 36480 -> 17728 bytes
 Platform/Hisilicon/D03/Drivers/TransferSmbiosInfo/TransSmbiosInfo.efi  
| Bin 21408 -> 4000 bytes
 Platform/Hisilicon/D03/Library/OemAddressMap2P/OemAddressMap2P.lib 
| Bin 19486 -> 20550 bytes
 Platform/Hisilicon/D03/MemoryInitPei/MemoryInit.efi
| Bin 161280 -> 90272 bytes
 Platform/Hisilicon/D03/Sec/FVMAIN_SEC.Fv   
| Bin 262144 -> 262144 bytes
 Silicon/Hisilicon/Hi1610/Library/Hi1610Serdes/Hi1610SerdesLib.lib  
| Bin 603524 -> 587188 bytes
 Silicon/Hisilicon/Hi1610/Library/IpmiCmdLib/IpmiCmdLib.lib 
| Bin 247176 -> 210280 bytes
 Silicon/Hisilicon/Hi1610/Library/LpcLib/LpcLib.lib 
| Bin 13998 -> 13958 bytes
 
Silicon/Hisilicon/Hi1610/Library/PlatformSysCtrlLibHi1610/PlatformSysCtrlLibHi1610.lib
 | Bin 305230 -> 297590 bytes
 Silicon/Hisilicon/Hi1610/Library/Uart/LpcSerialPortLib/LpcSerialPortLib.lib
| Bin 17022 -> 16942 bytes
 19 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/Platform/Hisilicon/D03/Drivers/GetInfoFromBmc/GetInfoFromBmc.efi 
b/Platform/Hisilicon/D03/Drivers/GetInfoFromBmc/GetInfoFromBmc.efi
index 269243a..12640f2 100644
Binary files a/Platform/Hisilicon/D03/Drivers/GetInfoFromBmc/GetInfoFromBmc.efi 
and b/Platform/Hisilicon/D03/Drivers/GetInfoFromBmc/GetInfoFromBmc.efi differ
diff --git 
a/Platform/Hisilicon/D03/Drivers/Ipmi/IpmiInterfacePei/IpmiInterfacePei.efi 
b/Platform/Hisilicon/D03/Drivers/Ipmi/IpmiInterfacePei/IpmiInterfacePei.efi
index c197895..d2565c8 100644
Binary files 
a/Platform/Hisilicon/D03/Drivers/Ipmi/IpmiInterfacePei/IpmiInterfacePei.efi and 
b/Platform/Hisilicon/D03/Drivers/Ipmi/IpmiInterfacePei/IpmiInterfacePei.efi 
differ
diff --git 
a/Platform/Hisilicon/D03/Drivers/Ipmi/ipmiInterfaceDxe/IpmiInterfaceDxe.efi 
b/Platform/Hisilicon/D03/Drivers/Ipmi/ipmiInterfaceDxe/IpmiInterfaceDxe.efi
index 6201971..0d8ff52 100644
Binary files 
a/Platform/Hisilicon/D03/Drivers/Ipmi/ipmiInterfaceDxe/IpmiInterfaceDxe.efi and 
b/Platform/Hisilicon/D03/Drivers/Ipmi/ipmiInterfaceDxe/IpmiInterfaceDxe.efi 
differ
diff --git a/Platform/Hisilicon/D03/Drivers/IpmiMiscOpDxe/IpmiMiscOp.efi 
b/Platform/Hisilicon/D03/Drivers/IpmiMiscOpDxe/IpmiMiscOp.efi
index 7409fcb..b85c19b 100644
Binary files a/Platform/Hisilicon/D03/Drivers/IpmiMiscOpDxe/IpmiMiscOp.efi and 
b/Platform/Hisilicon/D03/Drivers/IpmiMiscOpDxe/IpmiMiscOp.efi differ
diff --git a/Platform/Hisilicon/D03/Drivers/IpmiWatchdogDxe/IpmiWatchdogDxe.efi 
b/Platform/Hisilicon/D03/Drivers/IpmiWatchdogDxe/IpmiWatchdogDxe.efi
index a9238b1..89c4b5b 100644
Binary files 
a/Platform/Hisilicon/D03/Drivers/IpmiWatchdogDxe/IpmiWatchdogDxe.efi and 
b/Platform/Hisilicon/D03/Drivers/IpmiWatchdogDxe/IpmiWatchdogDxe.efi differ
diff --git a/Platform/Hisilicon/D03/Drivers/OhciDxe/NativeOhci.efi 
b/Platform/Hisilicon/D03/Drivers/OhciDxe/NativeOhci.efi
index 0a0d9d5..e1970fd 100644
Binary files a/Platform/Hisilicon/D03/Drivers/OhciDxe/NativeOhci.efi and 
b/Platform/Hisilicon/D03/Drivers/OhciDxe/NativeOhci.efi differ
diff --git 
a/Platform/Hisilicon/D03/Drivers/ReportPciePlugDidVidToBmc/ReportPciePlugDidVidToBmc.efi
 
b/Platform/Hisilicon/D03/Drivers/ReportPciePlugDidVidToBmc/ReportPciePlugDidVidToBmc.efi
index 12b2af7..0572a71 100644
Binary files 
a/Platform/Hisilicon/D03/Drivers/ReportPciePlugDidVidToBmc/ReportPciePlugDidVidToBmc.efi
 and 

[edk2] [PATCH edk2-platforms v4 02/11] Hisilicon/D03/Net: Update Snp driver

2017-09-22 Thread Heyi Guo
1. Replace SnpPV660Dxe with SnpPV600Dxe;
2. Add SnpPlatform:
 Install protocol to enable nic port which are using.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang 
Signed-off-by: Heyi Guo 
---
 Platform/Hisilicon/D03/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.efi | Bin 0 -> 
26688 bytes
 Platform/Hisilicon/D03/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf |  24 
+
 Platform/Hisilicon/D03/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.efi | Bin 56832 -> 
0 bytes
 Platform/Hisilicon/D03/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.inf |  27 

 Platform/Hisilicon/D03/Drivers/Net/SnpPlatform/SnpPlatform.efi | Bin 0 -> 3040 
bytes
 Platform/Hisilicon/D03/Drivers/Net/SnpPlatform/SnpPlatform.inf |  24 
+
 6 files changed, 48 insertions(+), 27 deletions(-)

diff --git a/Platform/Hisilicon/D03/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.efi 
b/Platform/Hisilicon/D03/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.efi
new file mode 100644
index 
..8ce6a6d610be59ddf9c8c54f9c788adb784f9525
GIT binary patch
literal 26688
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

[edk2] [PATCH edk2-non-osi v4 01/10] Hisilicon/D03/Net: Update Snp driver

2017-09-22 Thread Heyi Guo
1. Replace SnpPV660Dxe with SnpPV600Dxe;
2. Add SnpPlatform:
 Install protocol to enable nic port which are using.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang 
Signed-off-by: Heyi Guo 
---
 Platform/Hisilicon/D03/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.efi | Bin 0 -> 
26688 bytes
 Platform/Hisilicon/D03/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf |  24 
+
 Platform/Hisilicon/D03/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.efi | Bin 56832 -> 
0 bytes
 Platform/Hisilicon/D03/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.inf |  27 

 Platform/Hisilicon/D03/Drivers/Net/SnpPlatform/SnpPlatform.efi | Bin 0 -> 3040 
bytes
 Platform/Hisilicon/D03/Drivers/Net/SnpPlatform/SnpPlatform.inf |  24 
+
 6 files changed, 48 insertions(+), 27 deletions(-)

diff --git a/Platform/Hisilicon/D03/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.efi 
b/Platform/Hisilicon/D03/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.efi
new file mode 100644
index 000..8ce6a6d
Binary files /dev/null and 
b/Platform/Hisilicon/D03/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.efi differ
diff --git a/Platform/Hisilicon/D03/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf 
b/Platform/Hisilicon/D03/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf
new file mode 100644
index 000..90e478d
--- /dev/null
+++ b/Platform/Hisilicon/D03/Drivers/Net/SnpPV600Dxe/SnpPV600Dxe.inf
@@ -0,0 +1,24 @@
+#/** @file
+#
+#Copyright (c) 2017, Hisilicon Limited. All rights reserved.
+#Copyright (c) 2017, Linaro Limited. 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.
+#
+#**/
+
+[Defines]
+  INF_VERSION= 0x00010019
+  BASE_NAME  = SnpPV600Dxe
+  FILE_GUID  = 3247F15F-3612-4803-BD4E-4104D7EF944A
+  MODULE_TYPE= DXE_DRIVER
+  VERSION_STRING = 1.0
+
+[Binaries.AARCH64]
+  PE32|SnpPV600Dxe.efi|*
diff --git a/Platform/Hisilicon/D03/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.efi 
b/Platform/Hisilicon/D03/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.efi
deleted file mode 100644
index eb69403..000
Binary files a/Platform/Hisilicon/D03/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.efi 
and /dev/null differ
diff --git a/Platform/Hisilicon/D03/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.inf 
b/Platform/Hisilicon/D03/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.inf
deleted file mode 100644
index 204ef17..000
--- a/Platform/Hisilicon/D03/Drivers/Net/SnpPV660Dxe/SnpPV600Dxe.inf
+++ /dev/null
@@ -1,27 +0,0 @@
-#/** @file
-#
-#Copyright (c) 2016, Hisilicon Limited. All rights reserved.
-#Copyright (c) 2016-2017, Linaro Limited. 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.
-#
-#**/
-
-[Defines]
-  INF_VERSION= 0x00010005
-  BASE_NAME  = SnpPV600Dxe
-  FILE_GUID  = 92D37768-571C-48d9-BEF5-9744AE2FDAF4
-  MODULE_TYPE= UEFI_DRIVER
-  VERSION_STRING = 1.0
-
-  ENTRY_POINT= InitializeSnpPV600Driver
-  UNLOAD_IMAGE   = SnpPV600Unload
-
-[Binaries]
-  PE32|SnpPV600Dxe.efi|*
diff --git a/Platform/Hisilicon/D03/Drivers/Net/SnpPlatform/SnpPlatform.efi 
b/Platform/Hisilicon/D03/Drivers/Net/SnpPlatform/SnpPlatform.efi
new file mode 100644
index 000..5e7d8bd
Binary files /dev/null and 
b/Platform/Hisilicon/D03/Drivers/Net/SnpPlatform/SnpPlatform.efi differ
diff --git a/Platform/Hisilicon/D03/Drivers/Net/SnpPlatform/SnpPlatform.inf 
b/Platform/Hisilicon/D03/Drivers/Net/SnpPlatform/SnpPlatform.inf
new file mode 100644
index 000..10b2003
--- /dev/null
+++ b/Platform/Hisilicon/D03/Drivers/Net/SnpPlatform/SnpPlatform.inf
@@ -0,0 +1,24 @@
+#/** @file
+#
+#Copyright (c) 2017, Hisilicon Limited. All rights reserved.
+#Copyright (c) 2017, Linaro Limited. 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 

[edk2] [PATCH edk2-platforms v4 03/11] Hisilicon/D03/Sas: Add SasPlatform

2017-09-22 Thread Heyi Guo
Install protocol to enable sas port which is using and
transmit base address info of sas port to SasDriverDxe.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang 
Signed-off-by: Heyi Guo 
---
 Platform/Hisilicon/D03/Drivers/SasPlatform/SasPlatform.efi | Bin 0 -> 3040 
bytes
 Platform/Hisilicon/D03/Drivers/SasPlatform/SasPlatform.inf |  24 

 2 files changed, 24 insertions(+)

diff --git a/Platform/Hisilicon/D03/Drivers/SasPlatform/SasPlatform.efi 
b/Platform/Hisilicon/D03/Drivers/SasPlatform/SasPlatform.efi
new file mode 100644
index 
..42556410b60c5edae4bb3814d97f9c2a2569a08b
GIT binary patch
literal 3040
zcmcImU2IfU5T1MQRyLHtE!_eEw7Vcb7VIuiT1#8@Y=49YD5SgkAP;QWRw1-h+Jb2L
zxmyx7)DRbnB#_9KpTyl*9~2aPVSyMmKDAil8@v3Nn3_mi8hTN>esj0m-tvSRPjdIn
z%$b=p^Ua)dcH@{
zPda&+dWO6d8OE%r-P;4e35-Qgxx
z*^g=P1OwesbT6(aZ;6*6XHnOFM|Cr_8X>=uhX(z$P^;mYDMeKp$CI;B`3;p
z4!3zCh%pr_a^*ZZ-yy`u`Fdc-Ujn{4

Re: [edk2] [PATCH] ShellPkg/DmpStore: fix GCC/CLANG build failure

2017-09-22 Thread Laszlo Ersek
On 09/22/17 16:00, Carsey, Jaben wrote:
> Reviewed-by: Jaben Carsey 

Thank you both; pushed as commit ba30d5f05121.
Laszlo

>> -Original Message-
>> From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
>> Sent: Friday, September 22, 2017 6:44 AM
>> To: Laszlo Ersek 
>> Cc: edk2-devel@lists.01.org; Carsey, Jaben ; Ni,
>> Ruiyu ; Shi, Steven 
>> Subject: Re: [PATCH] ShellPkg/DmpStore: fix GCC/CLANG build failure
>> Importance: High
>>
>>
>>
>> On 22 Sep 2017, at 06:34, Laszlo Ersek  wrote:
>>
 ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c:525:66:
>> error:
 passing argument 2 of 'gEfiShellProtocol->GetGuidName' from
>> incompatible
 pointer type [-Werror=incompatible-pointer-types]

  Status = gEfiShellProtocol->GetGuidName(,
>> );
 ^
 ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c:525:66:
>> note:
 expected 'const CHAR16 ** {aka const short unsigned int **}' but
 argument is of type 'CHAR16 ** {aka short unsigned int **}'
>>>
>>> Pointer-to-(pointer-to-CHAR16) and pointer-to-(pointer-to-const-CHAR16)
>>> are incompatible types; GCC and CLANG are right to complain.
>>>
>>> Cc: Ard Biesheuvel 
>>> Cc: Jaben Carsey 
>>> Cc: Ruiyu Ni 
>>> Cc: Steven Shi 
>>> Reported-by: Jenkins Build Host 
>>> Reported-by: Steven Shi 
>>> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=716
>>> Fixes: 09e8678380aaaf0a5ef59179ff59e0a045d1b0bf
>>> Contributed-under: TianoCore Contribution Agreement 1.1
>>> Signed-off-by: Laszlo Ersek 
>>> ---
>>>
>>> Notes:
>>>I'm going to push this as soon as I get an R-b from anyone.
>>>
>>
>> Reviewed-by: Ard Biesheuvel 
>>
>>>Thanks
>>>Laszlo
>>>
>>> ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
>> b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
>>> index 062ab5dc3a9a..5791da9acc8c 100644
>>> --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
>>> +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
>>> @@ -424,7 +424,7 @@ CascadeProcessVariables (
>>>   CHAR16*AttrString;
>>>   CHAR16*HexString;
>>>   EFI_STATUSSetStatus;
>>> -  CHAR16*GuidName;
>>> +  CONST CHAR16  *GuidName;
>>>
>>>   if (ShellGetExecutionBreakFlag()) {
>>> return (SHELL_ABORTED);
>>> --
>>> 2.14.1.3.gb7cf6e02401b
>>>
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
> 

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] ShellPkg/DmpStore: fix GCC/CLANG build failure

2017-09-22 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey 

> -Original Message-
> From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
> Sent: Friday, September 22, 2017 6:44 AM
> To: Laszlo Ersek 
> Cc: edk2-devel@lists.01.org; Carsey, Jaben ; Ni,
> Ruiyu ; Shi, Steven 
> Subject: Re: [PATCH] ShellPkg/DmpStore: fix GCC/CLANG build failure
> Importance: High
> 
> 
> 
> On 22 Sep 2017, at 06:34, Laszlo Ersek  wrote:
> 
> >> ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c:525:66:
> error:
> >> passing argument 2 of 'gEfiShellProtocol->GetGuidName' from
> incompatible
> >> pointer type [-Werror=incompatible-pointer-types]
> >>
> >>  Status = gEfiShellProtocol->GetGuidName(,
> );
> >> ^
> >> ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c:525:66:
> note:
> >> expected 'const CHAR16 ** {aka const short unsigned int **}' but
> >> argument is of type 'CHAR16 ** {aka short unsigned int **}'
> >
> > Pointer-to-(pointer-to-CHAR16) and pointer-to-(pointer-to-const-CHAR16)
> > are incompatible types; GCC and CLANG are right to complain.
> >
> > Cc: Ard Biesheuvel 
> > Cc: Jaben Carsey 
> > Cc: Ruiyu Ni 
> > Cc: Steven Shi 
> > Reported-by: Jenkins Build Host 
> > Reported-by: Steven Shi 
> > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=716
> > Fixes: 09e8678380aaaf0a5ef59179ff59e0a045d1b0bf
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Laszlo Ersek 
> > ---
> >
> > Notes:
> >I'm going to push this as soon as I get an R-b from anyone.
> >
> 
> Reviewed-by: Ard Biesheuvel 
> 
> >Thanks
> >Laszlo
> >
> > ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
> > index 062ab5dc3a9a..5791da9acc8c 100644
> > --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
> > +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
> > @@ -424,7 +424,7 @@ CascadeProcessVariables (
> >   CHAR16*AttrString;
> >   CHAR16*HexString;
> >   EFI_STATUSSetStatus;
> > -  CHAR16*GuidName;
> > +  CONST CHAR16  *GuidName;
> >
> >   if (ShellGetExecutionBreakFlag()) {
> > return (SHELL_ABORTED);
> > --
> > 2.14.1.3.gb7cf6e02401b
> >
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 2/3] Maintainers.txt: add Xen reviewers to OvmfPkg

2017-09-22 Thread Anthony PERARD
On Fri, Sep 22, 2017 at 11:15:09AM +0100, Leif Lindholm wrote:
> A lack of reviewers with Xen experience for OvmfPkg has been expressed.
> The Xen community has put forward two volunteers.
> 
> Cc: Anthony Perard 
> Cc: Julien Grall 
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Leif Lindholm 

Acked-by: Anthony PERARD 

> ---
>  Maintainers.txt | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt
> index c6095266a8..d27e0351bc 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -195,6 +195,8 @@ W: http://www.tianocore.org/ovmf/
>  M: Jordan Justen 
>  M: Laszlo Ersek 
>  M: Ard Biesheuvel 
> +R: Anthony Perard 
> +R: Julien Grall 
>  S: Maintained
>  
>  PcAtChipsetPkg

-- 
Anthony PERARD
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 6/6] OvmfPkg/QemuVideoDxe: Bypass NULL pointer detection during VBE SHIM installing

2017-09-22 Thread Laszlo Ersek
On 09/22/17 13:50, Laszlo Ersek wrote:
> This patch looks great to me, I would like to request a few small
> updates:
>
> On 09/21/17 07:20, Jian J Wang wrote:
>> QemuVideoDxe driver will install VBE SHIM into page 0. If NULL pointer
>
> (1) please replace the word "install" with "link".
>
> The VBE Shim is technically installed into the "real-mode" C segment,
> only the int 0x10 vector lives in page 0.
>
>> detection is enabled, this driver will fail to load. NULL pointer detection
>> bypassing code is added to prevent such problem during boot.
>>
>> Please note that Windows 7 will try to access VBE SHIM during boot if it's
>> installed, and then cause boot failure. This can be fixed by setting BIT7
>> of PcdNullPointerDetectionPropertyMask to disable NULL pointer detection
>> after EndOfDxe. As far as we know, there's no other OSs has such issue.
>
> This is not a request, just a comment: I verified the default value in
> the .dec, and I see it is 0. So there's no need to post an additional
> patch for the OVMF DSC files, in order to set BIT7.

Actually, let me take a step back, and re-think the necessity of all
this work for QemuVideoDxe!

The facts are:

(1) The *only* purpose of the VBE Shim is to allow Windows 7 to boot in
pure UEFI mode (i.e. without a CSM).

(2) If I understand correctly, you guys have verified that Windows 7
cannot boot with the page0 protection enabled, *regardless* of what we
do in QemuVideoDxe. Can you confirm this please?

With the above in mind, let's consider the effects of the
"PcdNullPointerDetectionPropertyMask" bits:

* BIT0 clear:
  - The page0 protection is completely disabled.
  - This patch does nothing, in effect.
  - The VBE Shim works.
  - Windows 7 boots.

* BIT0 set, BIT7 also set:
  - The page0 protection is disabled in the DXE core at the end of DXE.
  - This patch does nothing, in effect.
  - The VBE Shim works, because it is a UEFI driver, and it connects its
devices (and installs the shim) after End-of-Dxe, at which point
page0 protection is no longer in effect.
  - Windows 7 boots fine, again because it is loaded after End-of-Dxe.

* BIT0 set, BIT7 clear:
  - The page0 protection is never disabled until the OS (loader)
installs its own page tables.
  - This patch enables the VBE Shim to work, by temporarily disabling
page0 protection.
  - However, Windows 7 will fail to boot nonetheless, because it cannot
cope with page0 protection. (This is fact (2).)

Now, if you consider fact (1) as well: given that Windows 7 cannot boot
with page0 protection enabled *anyway*, why mess with the VBE Shim at
all?

How about the following patch instead:

> diff --git a/OvmfPkg/QemuVideoDxe/VbeShim.c b/OvmfPkg/QemuVideoDxe/VbeShim.c
> index e45a08e8873f..8ba5522cde3c 100644
> --- a/OvmfPkg/QemuVideoDxe/VbeShim.c
> +++ b/OvmfPkg/QemuVideoDxe/VbeShim.c
> @@ -75,6 +75,20 @@ InstallVbeShim (
>UINTNPrinted;
>VBE_MODE_INFO*VbeModeInfo;
>
> +  if ((PcdGet8 (PcdNullPointerDetectionPropertyMask) & (BIT0|BIT7)) == BIT0) 
> {
> +DEBUG ((
> +  DEBUG_WARN,
> +  "%a: page 0 protected, not installing VBE shim\n",
> +  __FUNCTION__
> +  ));
> +DEBUG ((
> +  DEBUG_WARN,
> +  "%a: page 0 protection prevents Windows 7 from booting anyway\n",
> +  __FUNCTION__
> +  ));
> +return;
> +  }
> +
>Segment0 = 0x0;
>SegmentC = 0xC;
>SegmentF = 0xF;

Thanks!
Laszlo
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH 1/2] ArmPlatformPkg: Store initial timer value

2017-09-22 Thread evan . lloyd
From: Alexei Fedorov 

This commit adds support for storing initial timer value
logged at the beginning of firmware image execution.
This timer value is required for firmware basic boot performance
data record referenced by Firmware Performance Data Table (FPDT).

Change-Id: Ic93bd3e509053e818187bcc153de493050e794aa
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Alexei Fedorov 
---
 ArmPlatformPkg/PrePi/PeiMPCore.inf  |  3 ++-
 ArmPlatformPkg/PrePi/PeiUniCore.inf |  3 ++-
 ArmPlatformPkg/PrePi/PrePi.c| 10 +-
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/ArmPlatformPkg/PrePi/PeiMPCore.inf 
b/ArmPlatformPkg/PrePi/PeiMPCore.inf
index 
4ce4a52784726a89fd09228fcd52aa1e6f87c85f..636049d4f44d29092bc9748caa99371d6538c554
 100644
--- a/ArmPlatformPkg/PrePi/PeiMPCore.inf
+++ b/ArmPlatformPkg/PrePi/PeiMPCore.inf
@@ -1,7 +1,7 @@
 #/** @file
 #
 #  (C) Copyright 2015 Hewlett-Packard Development Company, L.P.
-#  Copyright (c) 2011-2014, ARM Ltd. All rights reserved.
+#  Copyright (c) 2011-2017, ARM Ltd. All rights reserved.
 #
 #  This program and the accompanying materials
 #  are licensed and made available under the terms and conditions of the BSD 
License
@@ -68,6 +68,7 @@ [Ppis]
 
 [Guids]
   gArmMpCoreInfoGuid
+  gEfiFirmwarePerformanceGuid
 
 [FeaturePcd]
   gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob
diff --git a/ArmPlatformPkg/PrePi/PeiUniCore.inf 
b/ArmPlatformPkg/PrePi/PeiUniCore.inf
index 
85114af7d1a8c37ea941a0714de697dc2bef754d..f37ddec9d13dad75882a186816b5ecb8856c7c86
 100644
--- a/ArmPlatformPkg/PrePi/PeiUniCore.inf
+++ b/ArmPlatformPkg/PrePi/PeiUniCore.inf
@@ -1,7 +1,7 @@
 #/** @file
 #
 #  (C) Copyright 2015 Hewlett-Packard Development Company, L.P.
-#  Copyright (c) 2011-2014, ARM Ltd. All rights reserved.
+#  Copyright (c) 2011-2017, ARM Ltd. All rights reserved.
 #
 #  This program and the accompanying materials
 #  are licensed and made available under the terms and conditions of the BSD 
License
@@ -67,6 +67,7 @@ [Ppis]
 
 [Guids]
   gArmMpCoreInfoGuid
+  gEfiFirmwarePerformanceGuid
 
 [FeaturePcd]
   gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob
diff --git a/ArmPlatformPkg/PrePi/PrePi.c b/ArmPlatformPkg/PrePi/PrePi.c
index 
e548ccace09730b78851b987d7b902a5bb7a84c5..e5016ea45359f74e7688adb2504784070dde0dce
 100644
--- a/ArmPlatformPkg/PrePi/PrePi.c
+++ b/ArmPlatformPkg/PrePi/PrePi.c
@@ -1,6 +1,6 @@
 /** @file
 *
-*  Copyright (c) 2011-2014, ARM Limited. All rights reserved.
+*  Copyright (c) 2011-2017, ARM Limited. All rights reserved.
 *
 *  This program and the accompanying materials
 *  are licensed and made available under the terms and conditions of the BSD 
License
@@ -24,6 +24,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 #include "PrePi.h"
@@ -86,6 +87,7 @@ PrePiMain (
   CHAR8 Buffer[100];
   UINTN CharCount;
   UINTN StacksSize;
+  FIRMWARE_SEC_PERFORMANCE  Performance;
 
   // If ensure the FD is either part of the System Memory or totally outside 
of the System Memory (XIP)
   ASSERT (IS_XIP() ||
@@ -146,6 +148,12 @@ PrePiMain (
 }
   }
 
+  // Store timer value logged at the beginning of firmware image execution
+  Performance.ResetEnd = GetTimeInNanoSecond (StartTimeStamp);
+
+  // Build SEC Performance Data Hob
+  BuildGuidDataHob (, , sizeof 
(Performance));
+
   // Set the Boot Mode
   SetBootMode (ArmPlatformGetBootMode ());
 
-- 
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH 0/2] Add FPDT Acpi table

2017-09-22 Thread evan . lloyd
From: EvanLloyd 


Paired patches for edk2 and edk2-platforms that add an FPDT
acpi table.
This is useful for monitoring firmware performance, etc.


Alexei Fedorov (1):
  ArmPlatformPkg: Store initial timer value

 ArmPlatformPkg/PrePi/PeiMPCore.inf  |  3 ++-
 ArmPlatformPkg/PrePi/PeiUniCore.inf |  3 ++-
 ArmPlatformPkg/PrePi/PrePi.c| 10 +-
 3 files changed, 13 insertions(+), 3 deletions(-)

See https://github.com/EvanLloyd/tianocore/tree/164_FPDT_v1

Alexei Fedorov (1):
  ARM/JunoPkg: Add support for FPDT table.

 Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 9 -
 Platform/ARM/JunoPkg/ArmJuno.dsc | 9 +
 Platform/ARM/JunoPkg/ArmJuno.fdf | 6 ++
 3 files changed, 23 insertions(+), 1 deletion(-)

See https://github.com/EvanLloyd/edk2-platforms/tree/164_FPDT_v1

-- 
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH 2/2] [edk2-platforms] ARM/JunoPkg: Add support for FPDT table.

2017-09-22 Thread evan . lloyd
From: Alexei Fedorov 

This commmit adds support for building FPDT table
with firmware basic boot performance record data.

Change-Id: Ib62b7c829e7891769f88e747343d4fed846e1acb
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Alexei Fedorov 
---
 Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 9 -
 Platform/ARM/JunoPkg/ArmJuno.dsc | 9 +
 Platform/ARM/JunoPkg/ArmJuno.fdf | 6 ++
 3 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc 
b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
index 
25cdc60737b5b8e6bbc608115db6436278b8026a..8bcb84869c841e4698f2897713bc5fc2d0af1ce0
 100644
--- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
+++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
@@ -153,7 +153,7 @@ [LibraryClasses.common]
   CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf
   
CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
 
-  
ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
+  
ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf
 
 [LibraryClasses.common.SEC]
   
ArmPlatformSecExtraActionLib|ArmPlatformPkg/Library/DebugSecExtraActionLib/DebugSecExtraActionLib.inf
@@ -303,6 +303,11 @@ [PcdsFeatureFlag.common]
 
   gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE
 
+  ## Indicates if S3 performance data will be supported in ACPI FPDT table.
+  #   TRUE  - S3 performance data will be supported in ACPI FPDT table.
+  #   FALSE - S3 performance data will not be supported in ACPI FPDT table.
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwarePerformanceDataTableS3Support|FALSE
+
 [PcdsFixedAtBuild.common]
   gArmPlatformTokenSpaceGuid.PcdFirmwareVendor|"ARM Versatile Express"
 !ifdef $(FIRMWARE_VER)
@@ -353,6 +358,8 @@ [PcdsFixedAtBuild.common]
   #  DEBUG_ERROR 0x8000  // Error
   gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x800F
 
+  gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
+
   gEmbeddedTokenSpaceGuid.PcdEmbeddedAutomaticBootCommand|""
   gEmbeddedTokenSpaceGuid.PcdEmbeddedDefaultTextColor|0x07
   gEmbeddedTokenSpaceGuid.PcdEmbeddedMemVariableStoreSize|0x1
diff --git a/Platform/ARM/JunoPkg/ArmJuno.dsc b/Platform/ARM/JunoPkg/ArmJuno.dsc
index 
72eab8b5be22a5516b243b2b5e70f6b919854707..df74627a65764ef3eb5488c7288e55e58959ea57
 100644
--- a/Platform/ARM/JunoPkg/ArmJuno.dsc
+++ b/Platform/ARM/JunoPkg/ArmJuno.dsc
@@ -264,6 +264,15 @@ [Components.common]
   ArmPkg/Drivers/TimerDxe/TimerDxe.inf
   ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf
 
+  #
+  # Firmware Performance Data Table (FPDT)
+  #
+  
MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
+  
MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.inf
 {
+
+  LockBoxLib|MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf
+  }
+
   #
   # Semi-hosting filesystem
   #
diff --git a/Platform/ARM/JunoPkg/ArmJuno.fdf b/Platform/ARM/JunoPkg/ArmJuno.fdf
index 
e67c703d0ecd112df0e13f703c3903cfb8dffbdc..527e131de5a452ded1b3cb0951d86903b4495cae
 100644
--- a/Platform/ARM/JunoPkg/ArmJuno.fdf
+++ b/Platform/ARM/JunoPkg/ArmJuno.fdf
@@ -89,6 +89,12 @@ [FV.FvMain]
   INF MdeModulePkg/Core/Dxe/DxeMain.inf
   INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
 
+  #
+  # Firmware Performance Data Table (FPDT)
+  #
+  INF 
MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf
+  INF 
MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.inf
+
   #
   # PI DXE Drivers producing Architectural Protocols (EFI Services)
   #
-- 
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] BaseTools/Conf: Support LLVM39 and LLVM40 in CLANG38 toolchain

2017-09-22 Thread Marvin H?user
Hey,

I just noticed this patch as it recently has been pushed. I found this has been 
a reaction to https://bugzilla.tianocore.org/show_bug.cgi?id=410
Though as Clang correctly detected, this is Undefined Behavior per the C 
specification, so why was the warning hidden?
In context of the issue in UefiLib, providing the first element of the VA list 
as a prototyped argument, would have solved the issue without UB.

Do you wish such a patch?

Thanks,
Marvin.

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Gao, Liming
> Sent: Monday, August 28, 2017 9:19 AM
> To: Shi, Steven ; edk2-devel@lists.01.org
> Subject: Re: [edk2] [PATCH] BaseTools/Conf: Support LLVM39 and LLVM40 in
> CLANG38 toolchain
> 
> Reviewed-by: Liming Gao 
> 
> >-Original Message-
> >From: Shi, Steven
> >Sent: Wednesday, August 23, 2017 3:01 PM
> >To: edk2-devel@lists.01.org; Gao, Liming 
> >Cc: Zhu, Yonghong ; Shi, Steven
> >
> >Subject: [PATCH] BaseTools/Conf: Support LLVM39 and LLVM40 in CLANG38
> >toolchain
> >
> >From: "Shi, Steven" 
> >
> >Add LLVM39 and LLVM40 support in CLANG38 toolchain
> >
> >Contributed-under: TianoCore Contribution Agreement 1.0
> >Signed-off-by: Steven Shi 
> >---
> > BaseTools/Conf/tools_def.template | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> >diff --git a/BaseTools/Conf/tools_def.template
> >b/BaseTools/Conf/tools_def.template
> >index 1fa3ca3..2f83341 100755
> >--- a/BaseTools/Conf/tools_def.template
> >+++ b/BaseTools/Conf/tools_def.template
> >@@ -380,7 +380,8 @@ DEFINE SOURCERY_CYGWIN_TOOLS =
> /cygdrive/c/Program
> >Files/CodeSourcery/Sourcery G
> > #   Intel(r) ACPI Compiler from
> > #   https://acpica.org/downloads
> > #   CLANG38  -Linux-  Requires:
> >-# Clang v3.8 or later, LLVMgold plugin and GNU 
> >binutils 2.26
> >targeting x86_64-linux-gnu
> >+# Clang v3.8, LLVMgold plugin and GNU binutils 
> >2.26
> targeting
> >x86_64-linux-gnu
> >+# Clang v3.9 or later, LLVMgold plugin and GNU 
> >binutils 2.28
> >targeting x86_64-linux-gnu
> > #Optional:
> > # Required to build platforms or ACPI tables:
> > #   Intel(r) ACPI Compiler from
> >@@ -5512,7 +5513,7 @@ DEFINE CLANG38_X64_PREFIX   =
> >ENV(CLANG38_BIN)
> > DEFINE CLANG38_IA32_TARGET  = -target i686-pc-linux-gnu
> > DEFINE CLANG38_X64_TARGET   = -target x86_64-pc-linux-gnu
> >
> >-DEFINE CLANG38_ALL_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -Wno-
> >empty-body -fno-stack-protector -mms-bitfields -Wno-address -Wno-shift-
> >negative-value -Wno-parentheses-equality -Wno-unknown-pragmas -
> Wno-
> >tautological-constant-out-of-range-compare -Wno-incompatible-library-
> >redeclaration -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -
> msoft-
> >float -mno-implicit-float  -ftrap-
> >function=undefined_behavior_has_been_optimized_away_by_clang -
> >funsigned-char -fno-ms-extensions -Wno-null-dereference -Wno-
> >tautological-compare -Wno-unknown-warning-option
> >+DEFINE CLANG38_ALL_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -
> Wno-
> >empty-body -fno-stack-protector -mms-bitfields -Wno-address -Wno-shift-
> >negative-value -Wno-parentheses-equality -Wno-unknown-pragmas -
> Wno-
> >tautological-constant-out-of-range-compare -Wno-incompatible-library-
> >redeclaration -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -
> msoft-
> >float -mno-implicit-float  -ftrap-
> >function=undefined_behavior_has_been_optimized_away_by_clang -
> >funsigned-char -fno-ms-extensions -Wno-null-dereference -Wno-
> >tautological-compare -Wno-unknown-warning-option -Wno-varargs
> >
> > ###
> > # CLANG38 IA32 definitions
> >--
> >2.7.4
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] ShellPkg/DmpStore: fix GCC/CLANG build failure

2017-09-22 Thread Ni, Ruiyu
Sorry about the failure and thank you all for the quick fix.

Sent from a small-screen device

在 2017年9月22日,下午10:53,Laszlo Ersek > 
写道:

On 09/22/17 16:00, Carsey, Jaben wrote:
Reviewed-by: Jaben Carsey 
>

Thank you both; pushed as commit ba30d5f05121.
Laszlo

-Original Message-
From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
Sent: Friday, September 22, 2017 6:44 AM
To: Laszlo Ersek >
Cc: edk2-devel@lists.01.org; Carsey, Jaben 
>; Ni,
Ruiyu >; Shi, Steven 
>
Subject: Re: [PATCH] ShellPkg/DmpStore: fix GCC/CLANG build failure
Importance: High



On 22 Sep 2017, at 06:34, Laszlo Ersek 
> wrote:

ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c:525:66:
error:
passing argument 2 of 'gEfiShellProtocol->GetGuidName' from
incompatible
pointer type [-Werror=incompatible-pointer-types]

Status = gEfiShellProtocol->GetGuidName(,
);
   ^
ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c:525:66:
note:
expected 'const CHAR16 ** {aka const short unsigned int **}' but
argument is of type 'CHAR16 ** {aka short unsigned int **}'

Pointer-to-(pointer-to-CHAR16) and pointer-to-(pointer-to-const-CHAR16)
are incompatible types; GCC and CLANG are right to complain.

Cc: Ard Biesheuvel >
Cc: Jaben Carsey >
Cc: Ruiyu Ni >
Cc: Steven Shi >
Reported-by: Jenkins Build Host >
Reported-by: Steven Shi >
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=716
Fixes: 09e8678380aaaf0a5ef59179ff59e0a045d1b0bf
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek >
---

Notes:
  I'm going to push this as soon as I get an R-b from anyone.


Reviewed-by: Ard Biesheuvel 
>

  Thanks
  Laszlo

ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
index 062ab5dc3a9a..5791da9acc8c 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/DmpStore.c
@@ -424,7 +424,7 @@ CascadeProcessVariables (
 CHAR16*AttrString;
 CHAR16*HexString;
 EFI_STATUSSetStatus;
-  CHAR16*GuidName;
+  CONST CHAR16  *GuidName;

 if (ShellGetExecutionBreakFlag()) {
   return (SHELL_ABORTED);
--
2.14.1.3.gb7cf6e02401b

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v4 0/2] UDF partition driver fix

2017-09-22 Thread Paulo Alcantara
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=707

Hi,

This patchset fixes a bug in Partition driver that created UDF logical
partitions by using entire block device space and thus polluting
protocol database with broken handles.

v1->v2:
 - Followed Laszlo's suggestions to submit a proper patchset. Thanks!
 - As I'm still waiting for Ruiyu and Star to test this fix, I took
   advantage of it and did some code cleanups :-)

v2->v3:
 - Followed Ruiyu's suggestions to improve code and add additional
   checks for ensuring a valid UDF file system and supported by current
   EDK2 UDF file system implementation. Also run Ecc.py to make sure the
   files I touched did not break EDK2 C Coding Style, as well as
   PatchCheck.py for mal-formed patches.

v3->v4:
 - Change 2/2's title as suggested by Star.
 - Remove UDF_TAG_ID() and refactor out UDF_ENTITY_ID structure as
   suggested by Ruiyu.
 - Tested build with VS2015 toolchain.

I've had a chance to test these changes with my 32GiB USB stick
and formatted it on Windows 10 with `format` command. The UDF revisions
I tested (by specifying it with "/R:revision") were 1.02, 1.50, 2.00,
2.01 (default) and 2.50. They all worked except the 2.50 revision which
adds a Type 2 (Metadata) Partition and it's not supported by current
EDK2 UDF implementation -- which handles only Type 1 (Physical)
Partitions. The UDF 2.60 revision I tested with the usual
`sudo mkudffs -b 512 --media-type=hd /dev/sdX` command in Linux.

Remember, the *officially* supported revision is 2.60, however all
revisions use the same volume structures as defined by ECMA 167
specification, and they usually differ from each other by means of
new optional features, so that's why all those revisions worked with
this implementation.

Well, at least this what I understood when looking at the
specifications. Please correct me if I'm wrong.

Please, test building these changes in toolchains other than GCC and
make sure they don't break the world :-)

Thanks!
Paulo

Repo:   https://github.com/pcacjr/edk2.git
Branch: udf-partition-fix-v4

Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Laszlo Ersek 
Cc: Ruiyu Ni 
Cc: Star Zeng 
Cc: Jiewen Yao 
Contributed-under: TianoCore Contribution Agreement 1.1
Reported-by: Ruiyu Ni 
Signed-off-by: Paulo Alcantara 
---

Paulo Alcantara (2):
  MdePkg: Add UDF volume structure definitions
  MdeModulePkg/UDF: Fix creation of UDF logical partition

 MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c| 366 ++--
 MdeModulePkg/Universal/Disk/UdfDxe/File.c |  16 +-
 MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c | 627 

 MdeModulePkg/Universal/Disk/UdfDxe/Udf.c  |   7 -
 MdeModulePkg/Universal/Disk/UdfDxe/Udf.h  | 158 ++---
 MdePkg/Include/IndustryStandard/Udf.h |  97 ++-
 6 files changed, 698 insertions(+), 573 deletions(-)

-- 
2.13.3.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v4 2/2] MdeModulePkg/UDF: Fix creation of UDF logical partition

2017-09-22 Thread Paulo Alcantara
Do not reserve entire block device size for an UDF file system -
instead, reserve the appropriate space (UDF logical volume space) for
it.

Additionally, only create a logical partition for UDF logical volumes
that are currently supported by EDK2 UDF file system implementation. For
instance, an UDF volume with a single LVD and a single Physical (Type 1)
Partition will be supported.

Cc: Eric Dong 
Cc: Ruiyu Ni 
Cc: Star Zeng 
Cc: Laszlo Ersek 
Reported-by: Ruiyu Ni 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Paulo Alcantara 
Tested-by: Hao Wu 
Build-tested-by: Laszlo Ersek 
Reviewed-by: Star Zeng 
Build-tested-by: Star Zeng 
Build-tested-by: Paulo Alcantara 
---
 MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c| 366 ++--
 MdeModulePkg/Universal/Disk/UdfDxe/File.c |  16 +-
 MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c | 627 

 MdeModulePkg/Universal/Disk/UdfDxe/Udf.c  |   7 -
 MdeModulePkg/Universal/Disk/UdfDxe/Udf.h  | 158 ++---
 5 files changed, 606 insertions(+), 568 deletions(-)

diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c 
b/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c
index 609f56cef6..8aee30c759 100644
--- a/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c
+++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c
@@ -64,11 +64,12 @@ FindAnchorVolumeDescriptorPointer (
   OUT  UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER  *AnchorPoint
   )
 {
-  EFI_STATUS  Status;
-  UINT32  BlockSize;
-  EFI_LBA EndLBA;
-  EFI_LBA DescriptorLBAs[4];
-  UINTN   Index;
+  EFI_STATUS  Status;
+  UINT32  BlockSize;
+  EFI_LBA EndLBA;
+  EFI_LBA DescriptorLBAs[4];
+  UINTN   Index;
+  UDF_DESCRIPTOR_TAG  *DescriptorTag;
 
   BlockSize = BlockIo->Media->BlockSize;
   EndLBA = BlockIo->Media->LastBlock;
@@ -88,10 +89,13 @@ FindAnchorVolumeDescriptorPointer (
 if (EFI_ERROR (Status)) {
   return Status;
 }
+
+DescriptorTag = >DescriptorTag;
+
 //
 // Check if read LBA has a valid AVDP descriptor.
 //
-if (IS_AVDP (AnchorPoint)) {
+if (DescriptorTag->TagIdentifier == UdfAnchorVolumeDescriptorPointer) {
   return EFI_SUCCESS;
 }
   }
@@ -102,23 +106,18 @@ FindAnchorVolumeDescriptorPointer (
 }
 
 /**
-  Check if block device supports a valid UDF file system as specified by OSTA
-  Universal Disk Format Specification 2.60.
+  Find UDF volume identifiers in a Volume Recognition Sequence.
 
-  @param[in]   BlockIo  BlockIo interface.
-  @param[in]   DiskIo   DiskIo interface.
+  @param[in]  BlockIo BlockIo interface.
+  @param[in]  DiskIo  DiskIo interface.
 
-  @retval EFI_SUCCESS  UDF file system found.
-  @retval EFI_UNSUPPORTED  UDF file system not found.
-  @retval EFI_NO_MEDIA The device has no media.
-  @retval EFI_DEVICE_ERROR The device reported an error.
-  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
-  @retval EFI_OUT_OF_RESOURCES The scan was not successful due to lack of
-   resources.
+  @retval EFI_SUCCESS UDF volume identifiers were found.
+  @retval EFI_NOT_FOUND   UDF volume identifiers were not found.
+  @retval other   Failed to perform disk I/O.
 
 **/
 EFI_STATUS
-SupportUdfFileSystem (
+FindUdfVolumeIdentifiers (
   IN EFI_BLOCK_IO_PROTOCOL  *BlockIo,
   IN EFI_DISK_IO_PROTOCOL   *DiskIo
   )
@@ -128,7 +127,6 @@ SupportUdfFileSystem (
   UINT64EndDiskOffset;
   CDROM_VOLUME_DESCRIPTOR   VolDescriptor;
   CDROM_VOLUME_DESCRIPTOR   TerminatingVolDescriptor;
-  UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER  AnchorPoint;
 
   ZeroMem ((VOID *), sizeof 
(CDROM_VOLUME_DESCRIPTOR));
 
@@ -167,7 +165,7 @@ SupportUdfFileSystem (
 (CompareMem ((VOID *),
  (VOID *),
  sizeof (CDROM_VOLUME_DESCRIPTOR)) == 0)) {
-  return EFI_UNSUPPORTED;
+  return EFI_NOT_FOUND;
 }
   }
 
@@ -176,7 +174,7 @@ SupportUdfFileSystem (
   //
   Offset += UDF_LOGICAL_SECTOR_SIZE;
   if (Offset >= EndDiskOffset) {
-return EFI_UNSUPPORTED;
+return EFI_NOT_FOUND;
   }
 
   Status = DiskIo->ReadDisk (
@@ -196,7 +194,7 @@ SupportUdfFileSystem (
   (CompareMem ((VOID *)VolDescriptor.Unknown.Id,
(VOID *)UDF_NSR3_IDENTIFIER,
sizeof (VolDescriptor.Unknown.Id)) != 0)) {
-return EFI_UNSUPPORTED;
+return EFI_NOT_FOUND;
   }
 
   //
@@ -204,7 +202,7 @@ SupportUdfFileSystem (
   //
   Offset += UDF_LOGICAL_SECTOR_SIZE;
   if (Offset >= EndDiskOffset) {
-return EFI_UNSUPPORTED;
+return 

[edk2] [PATCH v4 1/2] MdePkg: Add UDF volume structure definitions

2017-09-22 Thread Paulo Alcantara
This patch adds a few more UDF volume structures in order to detect an
UDF file system which is supported by current EDK2 UDF file system
implementation in Partition driver.

Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Laszlo Ersek 
Cc: Ruiyu Ni 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Paulo Alcantara 
Build-tested-by: Laszlo Ersek 
Reviewed-by: Star Zeng 
Tested-by: Hao Wu 
Build-tested-by: Star Zeng 
Build-tested-by: Paulo Alcantara 
---
 MdePkg/Include/IndustryStandard/Udf.h | 97 +++-
 1 file changed, 92 insertions(+), 5 deletions(-)

diff --git a/MdePkg/Include/IndustryStandard/Udf.h 
b/MdePkg/Include/IndustryStandard/Udf.h
index 0febb4bcda..5806560aee 100644
--- a/MdePkg/Include/IndustryStandard/Udf.h
+++ b/MdePkg/Include/IndustryStandard/Udf.h
@@ -24,11 +24,22 @@
 #define UDF_LOGICAL_SECTOR_SIZE   ((UINT64)(1ULL << UDF_LOGICAL_SECTOR_SHIFT))
 #define UDF_VRS_START_OFFSET  ((UINT64)(16ULL << UDF_LOGICAL_SECTOR_SHIFT))
 
-#define _GET_TAG_ID(_Pointer) \
-  (((UDF_DESCRIPTOR_TAG *)(_Pointer))->TagIdentifier)
-
-#define IS_AVDP(_Pointer) \
-  ((BOOLEAN)(_GET_TAG_ID (_Pointer) == 2))
+typedef enum {
+  UdfPrimaryVolumeDescriptor = 1,
+  UdfAnchorVolumeDescriptorPointer = 2,
+  UdfVolumeDescriptorPointer = 3,
+  UdfImplemenationUseVolumeDescriptor = 4,
+  UdfPartitionDescriptor = 5,
+  UdfLogicalVolumeDescriptor = 6,
+  UdfUnallocatedSpaceDescriptor = 7,
+  UdfTerminatingDescriptor = 8,
+  UdfLogicalVolumeIntegrityDescriptor = 9,
+  UdfFileSetDescriptor = 256,
+  UdfFileIdentifierDescriptor = 257,
+  UdfAllocationExtentDescriptor = 258,
+  UdfFileEntry = 261,
+  UdfExtendedFileEntry = 266,
+} UDF_VOLUME_DESCRIPTOR_ID;
 
 #pragma pack(1)
 
@@ -49,12 +60,88 @@ typedef struct {
 } UDF_EXTENT_AD;
 
 typedef struct {
+  UINT8   CharacterSetType;
+  UINT8   CharacterSetInfo[63];
+} UDF_CHAR_SPEC;
+
+typedef struct {
+  UINT8   Flags;
+  UINT8   Identifier[23];
+  union {
+//
+// Domain Entity Identifier
+//
+struct {
+  UINT16  UdfRevision;
+  UINT8   DomainFlags;
+  UINT8   Reserved[5];
+} Domain;
+//
+// UDF Entity Identifier
+//
+struct {
+  UINT16  UdfRevision;
+  UINT8   OSClass;
+  UINT8   OSIdentifier;
+  UINT8   Reserved[4];
+} Entity;
+//
+// Implementation Entity Identifier
+//
+struct {
+  UINT8   OSClass;
+  UINT8   OSIdentifier;
+  UINT8   ImplementationUseArea[6];
+} ImplementationEntity;
+//
+// Application Entity Identifier
+//
+struct {
+  UINT8   ApplicationUseArea[8];
+} ApplicationEntity;
+//
+// Raw Identifier Suffix
+//
+struct {
+  UINT8   Data[8];
+} Raw;
+  } Suffix;
+} UDF_ENTITY_ID;
+
+typedef struct {
+  UINT32LogicalBlockNumber;
+  UINT16PartitionReferenceNumber;
+} UDF_LB_ADDR;
+
+typedef struct {
+  UINT32   ExtentLength;
+  UDF_LB_ADDR  ExtentLocation;
+  UINT8ImplementationUse[6];
+} UDF_LONG_ALLOCATION_DESCRIPTOR;
+
+typedef struct {
   UDF_DESCRIPTOR_TAG  DescriptorTag;
   UDF_EXTENT_AD   MainVolumeDescriptorSequenceExtent;
   UDF_EXTENT_AD   ReserveVolumeDescriptorSequenceExtent;
   UINT8   Reserved[480];
 } UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER;
 
+typedef struct {
+  UDF_DESCRIPTOR_TAG  DescriptorTag;
+  UINT32  VolumeDescriptorSequenceNumber;
+  UDF_CHAR_SPEC   DescriptorCharacterSet;
+  UINT8   LogicalVolumeIdentifier[128];
+  UINT32  LogicalBlockSize;
+  UDF_ENTITY_ID   DomainIdentifier;
+  UDF_LONG_ALLOCATION_DESCRIPTOR  LogicalVolumeContentsUse;
+  UINT32  MapTableLength;
+  UINT32  NumberOfPartitionMaps;
+  UDF_ENTITY_ID   ImplementationIdentifier;
+  UINT8   ImplementationUse[128];
+  UDF_EXTENT_AD   IntegritySequenceExtent;
+  UINT8   PartitionMaps[6];
+} UDF_LOGICAL_VOLUME_DESCRIPTOR;
+
 #pragma pack()
 
 #endif
-- 
2.13.3.windows.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 0/3] Maintainers.txt updates for OvmfPkg/ArmVirtPkg

2017-09-22 Thread Jordan Justen
On 2017-09-22 04:13:48, Laszlo Ersek wrote:
> On 09/22/17 12:15, Leif Lindholm wrote:
> > - Add Ard Biesheuvel as a maintainer for ArmVirtPkg.
> 
> s/ArmVirtPkg/OvmfPkg/
> 
> (The actual patch matches your intent; it's only the above typo that
> doesn't.)
> 
> > - Add Anthony Perard and Julien Grall as Xen reviewers for OvmfPkg,
> >   and Julien as reviewer for ArmVirtPkg.
> 
> Highly appreciated!
> 
> > Leif Lindholm (3):
> >   Maintainers.txt: add Ard Biesheuvel as OvmfPkg maintainer
> >   Maintainers.txt: add Xen reviewers to OvmfPkg
> >   Maintainers.txt: add Xen reviewer for ArmVirtPkg
> > 
> >  Maintainers.txt | 4 
> >  1 file changed, 4 insertions(+)
> > 
> 
> series
> Reviewed-by: Laszlo Ersek 

Series Reviewed-by: Jordan Justen 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel