Re: [edk2] [PATCH] CryptoPkg: Fix various typos

2019-02-06 Thread Wang, Jian J
Coeur,


> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Antoine Coeur
> Sent: Thursday, February 07, 2019 1:25 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [PATCH] CryptoPkg: Fix various typos
> 
> Fix various typos in CryptoPkg.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Coeur 
> ---
>  CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c | 2 +-
>  CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c
> b/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c
> index d63c23df09..540c5715cb 100644
> --- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c
> +++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c
> @@ -142,7 +142,7 @@ IMPLEMENT_ASN1_FUNCTIONS (TS_TST_INFO)
>@param[in]  Asn1Time Pointer to the ASN.1 GeneralizedTime to be
> converted.
>@param[out] SigningTime  Return the corresponding EFI Time.
> 
> -  @retval  TRUE   The time convertion succeeds.
> +  @retval  TRUE   The time conversion succeeds.
>@retval  FALSE  Invalid parameters.
> 
>  **/
> diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c
> b/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c
> index 9510a4a383..929e3fcd1e 100644
> --- a/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c
> +++ b/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c
> @@ -84,14 +84,14 @@ QuickSortWorker (
>  }
>}
>//
> -  // Swap pivot to it's final position (NextSwapLocaiton)
> +  // Swap pivot to it's final position (NextSwapLocation)

Thanks for the fixes. Please also change it's to its.

Regards,
Jian

>//
>CopyMem (Buffer, Pivot, ElementSize);
>CopyMem (Pivot, (UINT8 *)BufferToSort + (NextSwapLocation * ElementSize),
> ElementSize);
>CopyMem ((UINT8 *)BufferToSort + (NextSwapLocation * ElementSize), Buffer,
> ElementSize);
> 
>//
> -  // Now recurse on 2 paritial lists.  Neither of these will have the 'pivot'
> element.
> +  // Now recurse on 2 partial lists.  Neither of these will have the 'pivot' 
> element.
>// IE list is sorted left half, pivot element, sorted right half...
>//
>QuickSortWorker (
> --
> 2.17.2 (Apple Git-113)
> 
> ___
> 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 v5 edk2-platforms 18/22] Platform/RaspberryPi/RPi3 *NON-OSI*: Add ATF binaries

2019-02-06 Thread Kinney, Michael D
Hi Pete,

When I saw it as a single patch series, I did assume all the
patches were for the edk2-platforms repo.  And it looked like
non-OSI binaries were going into the edk2-platforms repo.

Patch #0 did not make this clear either that multiple repos
were targeted.

I have not seen a patch series with content for multiple repos.
 
It would be clearer if there were 2 different series.  One for
edk2-platforms repo and one for the edk2-non-osi repo.

Thanks,

Mike

> -Original Message-
> From: Pete Batard [mailto:p...@akeo.ie]
> Sent: Wednesday, February 6, 2019 4:53 PM
> To: Kinney, Michael D ;
> edk2-devel@lists.01.org; leif.lindh...@linaro.org
> Subject: Re: [edk2] [PATCH v5 edk2-platforms 18/22]
> Platform/RaspberryPi/RPi3 *NON-OSI*: Add ATF binaries
> 
> Hi Michael,
> 
> On 2019.02.06 22:39, Kinney, Michael D wrote:
> > Hi Pete,
> >
> > We have the edk2-non-osi repository for binaries.
> 
> Not exactly sure what your point is since this patch is
> tagged *NON-OSI*
> in its subject line which means it is intended to go
> into edk2-non-osi,
> and we already went over what, in this patch series, we
> thought belonged
> or did not belong to non-osi. These ATF binaries were
> determined to
> belong to non-osi (with the intent to remove them
> altogether,
> eventually, once we have the next dot release of ATF).
> 
> Or is the issue that I am submitting non-osi patches as
> part of series
> that is prefixed [edk2-platform]?
> 
> > Do some of
> > the patches in this series really belong there?
> 
> The current consensus from previous patchsets
> submission is that the 3
> patches that are tagged as *NON-OSI* in this series are
> meant to be
> applied to edk2-non-osi whereas the other 19 are meant
> to be applied to
> edk2-platforms.
> 
> I have to say, if the issue is that you'd like to see
> an [edk2-non-osi]
> prefix for these patches, rather than a *NON-OSI*
> suffix appended, then
> doing so is a bit of a pain when you are re-submitting
> a large patchset
> series. So I do hope that simply submitting everything
> as edk2-platforms
> and tagging the non-osi ones in the subject line is
> okay.
> 
> Regards,
> 
> /Pete
> 
> > https://github.com/tianocore/edk2-non-osi
> >
> > Thanks,
> >
> > Mike
> >
> >> -Original Message-
> >> From: edk2-devel [mailto:edk2-devel-
> >> boun...@lists.01.org] On Behalf Of Pete Batard
> >> Sent: Tuesday, February 5, 2019 8:26 AM
> >> To: edk2-devel@lists.01.org
> >> Subject: [edk2] [PATCH v5 edk2-platforms 18/22]
> >> Platform/RaspberryPi/RPi3 *NON-OSI*: Add ATF
> binaries
> >>
> >> These ATF binaries were built from the ATF source
> >> (commit c3859557)
> >> with the custom RPi3 platform options detailed in
> the
> >> readme, and with
> >> no modification to the official source whatsoever.
> >>
> >> Contributed-under: TianoCore Contribution Agreement
> 1.1
> >> Signed-off-by: Pete Batard 
> >> ---
> >>
> Platform/RaspberryPi/RPi3/TrustedFirmware/License.txt
> >> |  26 
> >>
> Platform/RaspberryPi/RPi3/TrustedFirmware/Readme.md
> >> |  42 
> >>   Platform/RaspberryPi/RPi3/TrustedFirmware/bl1.bin
> >> | Bin 0 -> 18801 bytes
> >>   Platform/RaspberryPi/RPi3/TrustedFirmware/fip.bin
> >> | Bin 0 -> 41714 bytes
> >>   4 files changed, 68 insertions(+)
> >>
> >> diff --git
> >>
> a/Platform/RaspberryPi/RPi3/TrustedFirmware/License.txt
> >>
> b/Platform/RaspberryPi/RPi3/TrustedFirmware/License.txt
> >> new file mode 100644
> >> index ..b98dc643227e
> >> --- /dev/null
> >> +++
> >>
> b/Platform/RaspberryPi/RPi3/TrustedFirmware/License.txt
> >> @@ -0,0 +1,26 @@
> >> +Copyright (c) 2013-2018, ARM Limited and
> Contributors.
> >> All rights reserved.
> >> +
> >> +Redistribution and use in source and binary forms,
> >> with or without modification,
> >> +are permitted provided that the following
> conditions
> >> are met:
> >> +
> >> +* Redistributions of source code must retain the
> above
> >> copyright notice, this
> >> +  list of conditions and the following disclaimer.
> >> +
> >> +* Redistributions in binary form must reproduce the
> >> above copyright notice, this
> >> +  list of conditions and the following disclaimer
> in
> >> the documentation and/or
> >> +  other materials provided with the distribution.
> >> +
> >> +* Neither the name of ARM nor the names of its
> >> contributors may be used to
> >> +  endorse or promote products derived from this
> >> software without specific prior
> >> +  written permission.
> >> +
> >> +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
> AND
> >> CONTRIBUTORS "AS IS" AND
> >> +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
> NOT
> >> LIMITED TO, THE IMPLIED
> >> +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
> >> PARTICULAR PURPOSE ARE
> >> +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
> OR
> >> CONTRIBUTORS BE LIABLE FOR
> >> +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
> EXEMPLARY,
> >> OR CONSEQUENTIAL DAMAGES
> >> +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> >> SU

Re: [edk2] [PATCH] MdeModulePkg/PciBus: Fix a bug PPB MEM32 BAR isn't restored sometimes

2019-02-06 Thread Wu, Hao A
> -Original Message-
> From: Ni, Ray
> Sent: Friday, February 01, 2019 4:59 PM
> To: edk2-devel@lists.01.org
> Cc: Ni, Ray; Wu, Hao A; Bi, Dandan
> Subject: [PATCH] MdeModulePkg/PciBus: Fix a bug PPB MEM32 BAR isn't
> restored sometimes
> 
> From: Ruiyu Ni 
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1505
> 
> When a device under PPB contains option ROM but doesn't require 32bit
> MMIO, ProgrameUpstreamBridgeForRom() cannot correctly restore the
> PPB MEM32 RANGE BAR. It causes the 32bit MMIO conflict which may
> cause system hangs in boot.
> 
> The root cause is when ProgrameUpstreamBridgeForRom() calls
> ProgramPpbApperture() to restore the PPB MEM32 RANGE BAR, the
> ProgramPpbApperture() skips to program the BAR when the resource
> length is 0.
> 
> This patch fixes this issue by not calling ProgramPpbApperture().
> Instead, it directly programs the PPB MEM32 RANGE BAR.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ray Ni 
> Cc: Hao Wu 
> Cc: Dandan Bi 
> ---
>  .../Bus/Pci/PciBusDxe/PciResourceSupport.c| 53 +--
>  1 file changed, 24 insertions(+), 29 deletions(-)
> 
> diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c
> b/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c
> index d3cbefbadf..77cdc3e844 100644
> --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c
> +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c
> @@ -1,7 +1,7 @@
>  /** @file
>PCI resouces support functions implemntation for PCI Bus module.
> 
> -Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
> +Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
>  This program and the accompanying materials
>  are licensed and made available under the terms and conditions of the BSD
> License
>  which accompanies this distribution.  The full text of the license may be 
> found
> at
> @@ -1661,57 +1661,52 @@ ProgrameUpstreamBridgeForRom (

Not directly related to the purpose of the patch, seems to me there is a
typo for the function name:
Programe -> Program

>IN BOOLEAN Enable
>)
>  {
> -  PCI_IO_DEVICE *Parent;
> -  PCI_RESOURCE_NODE Node;
> -  UINT64Base;
> -  UINT64Length;
> +  PCI_IO_DEVICE   *Parent;
> +  EFI_PCI_IO_PROTOCOL *PciIo;
> +  UINT16  Base;
> +  UINT16  Limit;
>//
>// For root bridge, just return.
>//
>Parent = PciDevice->Parent;
> -  ZeroMem (&Node, sizeof (Node));
>while (Parent != NULL) {
>  if (!IS_PCI_BRIDGE (&Parent->Pci)) {
>break;
>  }
> 
> -Node.PciDev = Parent;
> -Node.Alignment  = 0;
> -Node.Bar= PPB_MEM32_RANGE;
> -Node.ResType= PciBarTypeMem32;
> -Node.Offset = 0;
> +PciIo = &Parent->PciIo;
> 
>  //
>  // Program PPB to only open a single <= 16MB apperture

Also not directly related:
apperture -> aperture

There seems lots of 'apperture' within this driver.
I would suggest to propose another patch to address those typos.

>  //
>  if (Enable) {
> -  //
> -  // Save the original PPB_MEM32_RANGE BAR.
> -  // The values will be changed by ProgramPpbApperture().
> -  //
> -  Base   = Parent->PciBar[Node.Bar].BaseAddress;
> -  Length = Parent->PciBar[Node.Bar].Length;
> -
>//
>// Only cover MMIO for Option ROM.
>//
> -  Node.Length = PciDevice->RomSize;
> -  ProgramPpbApperture (OptionRomBase, &Node);
> -
> -  //
> -  // Restore the original PPB_MEM32_RANGE BAR.
> -  // So the MEM32 RANGE BAR register can be restored when disable the
> decoding.
> -  //
> -  Parent->PciBar[Node.Bar].BaseAddress = Base;
> -  Parent->PciBar[Node.Bar].Length  = Length;
> +  Base  = (UINT16) (OptionRomBase >> 16);
> +  Limit = (UINT16) ((OptionRomBase + PciDevice->RomSize - 1) >> 16);
> +  PciIo->Pci.Write (PciIo, EfiPciIoWidthUint16, OFFSET_OF (PCI_TYPE01,
> Bridge.MemoryBase),  1, &Base);
> +  PciIo->Pci.Write (PciIo, EfiPciIoWidthUint16, OFFSET_OF (PCI_TYPE01,
> Bridge.MemoryLimit), 1, &Limit);
> 
>PCI_ENABLE_COMMAND_REGISTER (Parent,
> EFI_PCI_COMMAND_MEMORY_SPACE);
>  } else {
>//
>// Cover 32bit MMIO for devices below the bridge.
>//
> -  Node.Length = Parent->PciBar[Node.Bar].Length;
> -  ProgramPpbApperture (Parent->PciBar[Node.Bar].BaseAddress, &Node);
> +  if (Parent->PciBar[PPB_MEM32_RANGE].Length == 0) {
> +//
> +// When devices under the bridge contains Option ROM and doesn't
> require 32bit MMIO.
> +//
> +Base  = (UINT16) gAllOne;
> +Limit = (UINT16) gAllZero;
> +  } else {
> +Base  = (UINT16) (Parent->PciBar[PPB_MEM32_RANGE].BaseAddress >>
> 16);
> +Limit = (UINT16)
> +((Parent->PciBar[PPB_MEM32_RANGE].BaseAddress + Parent-
> >PciBar[PPB_MEM32_RANGE].Length - 1) >> 16);
> +  }
> +  PciIo->

Re: [edk2] [PATCH v5 edk2-platforms 18/22] Platform/RaspberryPi/RPi3 *NON-OSI*: Add ATF binaries

2019-02-06 Thread Pete Batard

Hi Michael,

On 2019.02.06 22:39, Kinney, Michael D wrote:

Hi Pete,

We have the edk2-non-osi repository for binaries.


Not exactly sure what your point is since this patch is tagged *NON-OSI* 
in its subject line which means it is intended to go into edk2-non-osi, 
and we already went over what, in this patch series, we thought belonged 
or did not belong to non-osi. These ATF binaries were determined to 
belong to non-osi (with the intent to remove them altogether, 
eventually, once we have the next dot release of ATF).


Or is the issue that I am submitting non-osi patches as part of series 
that is prefixed [edk2-platform]?



Do some of
the patches in this series really belong there?


The current consensus from previous patchsets submission is that the 3 
patches that are tagged as *NON-OSI* in this series are meant to be 
applied to edk2-non-osi whereas the other 19 are meant to be applied to 
edk2-platforms.


I have to say, if the issue is that you'd like to see an [edk2-non-osi] 
prefix for these patches, rather than a *NON-OSI* suffix appended, then 
doing so is a bit of a pain when you are re-submitting a large patchset 
series. So I do hope that simply submitting everything as edk2-platforms 
and tagging the non-osi ones in the subject line is okay.


Regards,

/Pete


https://github.com/tianocore/edk2-non-osi

Thanks,

Mike


-Original Message-
From: edk2-devel [mailto:edk2-devel-
boun...@lists.01.org] On Behalf Of Pete Batard
Sent: Tuesday, February 5, 2019 8:26 AM
To: edk2-devel@lists.01.org
Subject: [edk2] [PATCH v5 edk2-platforms 18/22]
Platform/RaspberryPi/RPi3 *NON-OSI*: Add ATF binaries

These ATF binaries were built from the ATF source
(commit c3859557)
with the custom RPi3 platform options detailed in the
readme, and with
no modification to the official source whatsoever.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Pete Batard 
---
  Platform/RaspberryPi/RPi3/TrustedFirmware/License.txt
|  26 
  Platform/RaspberryPi/RPi3/TrustedFirmware/Readme.md
|  42 
  Platform/RaspberryPi/RPi3/TrustedFirmware/bl1.bin
| Bin 0 -> 18801 bytes
  Platform/RaspberryPi/RPi3/TrustedFirmware/fip.bin
| Bin 0 -> 41714 bytes
  4 files changed, 68 insertions(+)

diff --git
a/Platform/RaspberryPi/RPi3/TrustedFirmware/License.txt
b/Platform/RaspberryPi/RPi3/TrustedFirmware/License.txt
new file mode 100644
index ..b98dc643227e
--- /dev/null
+++
b/Platform/RaspberryPi/RPi3/TrustedFirmware/License.txt
@@ -0,0 +1,26 @@
+Copyright (c) 2013-2018, ARM Limited and Contributors.
All rights reserved.
+
+Redistribution and use in source and binary forms,
with or without modification,
+are permitted provided that the following conditions
are met:
+
+* Redistributions of source code must retain the above
copyright notice, this
+  list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the
above copyright notice, this
+  list of conditions and the following disclaimer in
the documentation and/or
+  other materials provided with the distribution.
+
+* Neither the name of ARM nor the names of its
contributors may be used to
+  endorse or promote products derived from this
software without specific prior
+  written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
diff --git
a/Platform/RaspberryPi/RPi3/TrustedFirmware/Readme.md
b/Platform/RaspberryPi/RPi3/TrustedFirmware/Readme.md
new file mode 100644
index ..74bcec7d1f12
--- /dev/null
+++
b/Platform/RaspberryPi/RPi3/TrustedFirmware/Readme.md
@@ -0,0 +1,42 @@
+ARM Trusted Firmware for Raspberry Pi 3
+===
+
+The `bl1` and `fip` ATF binaries, found in this
directory, were built from
+the [official ATF source](https://github.com/ARM-
software/arm-trusted-firmware)
+(commit c3859557) using Linaro's GCC 5.5 compiler
with:
+
+```
+export CROSS_COMPILE=/usr/src/gcc-linaro-5.5.0-
2017.10-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
+make PLAT=rpi3 PRELOADED_BL33_BASE=0x3
RPI3_PRELOADED_DTB_BASE=0x1 SUPPORT_VFP=1
RPI3_USE_UEFI_MAP=1 fip all
+```
+
+This results in the following memory mapping:
+
+```
+0x +-+
+   |   ROM   | BL1
+0x000100

Re: [edk2] [PATCH v2] BaseTools: Fix build failure when specifying multiple BUILDTARGET

2019-02-06 Thread Philippe Mathieu-Daudé
On 2/6/19 10:11 PM, Carsey, Jaben wrote:
> Reviewed-by: Jaben Carsey 
> 
> And pushed.

Thanks!

And I learned the hard way git config 'user.name' is obviously different
than 'sendemail.from'...
Liming asked me to not use non-ASCII character in commit message so I
fixed my user.name, but forgot the sendemail.from, and now I see my
lastname got mojibaked :S
No worry, my bad.

Regards,

Phil.

>> -Original Message-
>> From: Laszlo Ersek [mailto:ler...@redhat.com]
>> Sent: Wednesday, February 06, 2019 8:26 AM
>> To: Philippe Mathieu-Daudé ; Kinney, Michael D
>> ; edk2-devel@lists.01.org; Carsey, Jaben
>> 
>> Cc: Leif Lindholm 
>> Subject: Re: [PATCH v2] BaseTools: Fix build failure when specifying multiple
>> BUILDTARGET
>>
>> On 02/06/19 13:03, Philippe Mathieu-Daudé wrote:
>>> With Python3, the dict.value() method returns an iterator.
>>> If a dictionary is updated while an iterator on its keys is used,
>>> a RuntimeError is generated.
>>> Converting the iterator to a list() forces a copy of the mutable
>>> keys in an immutable list which can be safely iterated.
>>>
>>> Commit f8d11e5a4aaa converted various uses but missed one:
>>> When specifying multiple BUILDTARGET, the first target builds
>>> successfully, but then the PGen.BuildDatabase._CACHE_ dictionary is
>>> updated, and accessing the next target triggers a RuntimeError.
>>>
>>> Convert this iterator to an immutable list, to solve this build error:
>>>
>>> $ build -a IA32 -t GCC5 -b RELEASE -b NOOPT -p
>> OvmfPkg/OvmfPkgIa32.dsc
>>> [...]
>>> Processing meta-data ...
>>> build.py...
>>>  : error C0DE: Unknown fatal error when processing
>> [OvmfPkg/OvmfPkgIa32.dsc]
>>>
>>> (Please send email to edk2-devel@lists.01.org for help, attaching
>> following call stack trace!)
>>>
>>> (Python 3.5.3 on linux) Traceback (most recent call last):
>>>   File
>> "BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line
>> 2387, in Main
>>> MyBuild.Launch()
>>>   File
>> "BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line
>> 2141, in Launch
>>> self._MultiThreadBuildPlatform()
>>>   File
>> "BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line
>> 1921, in _MultiThreadBuildPlatform
>>> self.Progress
>>>   File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 304, in
>> __init__
>>> self._InitWorker(Workspace, MetaFile, Target, Toolchain, Arch, 
>>> *args,
>> **kwargs)
>>>   File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 477, in
>> _InitWorker
>>> for BuildData in PGen.BuildDatabase._CACHE_.values():
>>> RuntimeError: dictionary changed size during iteration
>>>
>>> Note: The culprit commit (f8d11e5a4aaa) can not be found with bisection.
>>> In 9c2d68c0a299 the build tools default to the python version provided
>>> by the ${PYTHON} environment variable, however the Python3 transition is
>>> not functional before d943b0c339fe. f8d11e5a4aaa falls between the
>>> previous two.
>>>
>>> Reported-by: Leif Lindholm 
>>> Fixes: f8d11e5a4aaa90bf63b4789f3993dd6d16c60787
>>> Contributed-under: TianoCore Contribution Agreement 1.1
>>> Signed-off-by: Philippe Mathieu-Daude 
>>> Tested-by: Leif Lindholm 
>>> Acked-by: Laszlo Ersek 
>>> ---
>>> v2:
>>>  - fixed English errors (Laszlo)
>>>  - the paragraph about bisection not working is not relevant to
>>>the fix, keep it as background info but move it after (Laszlo)
>>> Signed-off-by: Philippe Mathieu-Daudé 
>>> ---
>>>  BaseTools/Source/Python/AutoGen/AutoGen.py | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py
>> b/BaseTools/Source/Python/AutoGen/AutoGen.py
>>> index a95d2c710e..12592a2a46 100644
>>> --- a/BaseTools/Source/Python/AutoGen/AutoGen.py
>>> +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
>>> @@ -474,7 +474,7 @@ class WorkspaceAutoGen(AutoGen):
>>>
>>>  # generate the SourcePcdDict and BinaryPcdDict
>>>  PGen = PlatformAutoGen(self, self.MetaFile, Target, Toolchain,
>> Arch)
>>> -for BuildData in PGen.BuildDatabase._CACHE_.values():
>>> +for BuildData in list(PGen.BuildDatabase._CACHE_.values()):
>>>  if BuildData.Arch != Arch:
>>>  continue
>>>  if BuildData.MetaFile.Ext == '.inf':
>>>
>>
>> Looks nice, thanks! My A-b stands.
>>
>> Laszlo
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] FW: [PATCH] BaseTools/BuildReport: fix report for platforms/arches without struct PCDs

2019-02-06 Thread Carsey, Jaben
I sent this earlier, but failed the mailing list part.

Reviewed-by: Jaben Carsey 
And pushed.

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Vladimir Olovyannikov via edk2-devel
> Sent: Tuesday, February 05, 2019 8:58 AM
> To: Laszlo Ersek ; edk2-devel@lists.01.org
> Cc: Gao, Liming 
> Subject: Re: [edk2] [PATCH] BaseTools/BuildReport: fix report for
> platforms/arches without struct PCDs
> 
> Laszlo,
> Thanks a lot for the prompt fix. Works now.
> 
> Tested-by: Vladimir Olovyannikov 
> 
> -Original Message-
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: Tuesday, February 5, 2019 3:22 AM
> To: edk2-devel@lists.01.org
> Cc: Bob Feng; Liming Gao; Vladimir Olovyannikov; Yonghong Zhu
> Subject: [PATCH] BaseTools/BuildReport: fix report for platforms/arches
> without struct PCDs
> 
> The goal of commit 97c8f5b9e7d3 ("BaseTools:StructurePCD value display
> incorrect in "Not used" section.", 2019-02-02) was to display the full
> contents of such structure PCDs in the build report that were set in the
> platform DSC or the FDF, but not used in any module INFs. The listings
> would appear in the
> 
>   PCDs not used by modules or in conditional directives
> 
> section of the build report.
> 
> Commit 97c8f5b9e7d3 assumed that any (platform, architecture)
> combination
> would have a (possibly empty) set of structure PCD (and so the set of the
> structure PCDs could be filtered for set-but-unused ones).
> 
> This is not the case: in "DscBuildData.py", in method
> UpdateStructuredPcds(), if "S_pcd_set" remains an empty OrderedDict(),
> then it is not added to "GlobalData.gStructurePcd" *at all*, for the
> current (platform, architecture) combination.
> 
> As a result, when the PCD report tries to fetch the set of structure PCDs
> for the current (platform, architecture), "GlobalData.gStructurePcd" does
> not return an empty OrderedDict(); instead, it raises a KeyError. Fix it
> by defaulting to an empty OrderedDict(), with the get() method.
> 
> Reported-by: Vladimir Olovyannikov
> 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1513
> Fixes: 97c8f5b9e7d3136b6051a05cf056ce5ca9e79893
> Cc: Bob Feng 
> Cc: Liming Gao 
> Cc: Vladimir Olovyannikov 
> Cc: Yonghong Zhu 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
> Repo:   https://github.com/lersek/edk2.git
> Branch: report_without_struct_pcds
> 
>  BaseTools/Source/Python/build/BuildReport.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Source/Python/build/BuildReport.py
> b/BaseTools/Source/Python/build/BuildReport.py
> index e457660fcef3..0b98d62cb6aa 100644
> --- a/BaseTools/Source/Python/build/BuildReport.py
> +++ b/BaseTools/Source/Python/build/BuildReport.py
> @@ -780,7 +780,7 @@ class PcdReport(object):
>  # Collect the PCD defined in DSC/FDF file, but not used in
> module
>  #
>  UnusedPcdFullList = []
> -StructPcdDict = GlobalData.gStructurePcd[self.Arch]
> +StructPcdDict = GlobalData.gStructurePcd.get(self.Arch,
> collections.OrderedDict())
>  for Name, Guid in StructPcdDict:
>  if (Name, Guid) not in Pa.Platform.Pcds:
>  Pcd = StructPcdDict[(Name, Guid)]
> --
> 2.19.1.3.g30247aa5d201
> ___
> 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] OVMF and TCP4, HTTP protocols

2019-02-06 Thread Rebecca Cran via edk2-devel
On Wednesday, 6 February 2019 12:05:08 MST Laszlo Ersek wrote:

> Is "loader.efi" opaque, or do we know what it does?

It's the FreeBSD loader, so I have the complete source code for it and can 
rebuild it.

> For example, if it opens SNP with BY_DRIVER|EXCLUSIVE attributes, then
> everything on top will be disconnected.

Oh, that makes sense! Thanks, after disabling the existing code that was 
opening SNP exclusively, things started working much better.


-- 
Rebecca Cran


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


Re: [edk2] [PATCH v5 edk2-platforms 18/22] Platform/RaspberryPi/RPi3 *NON-OSI*: Add ATF binaries

2019-02-06 Thread Kinney, Michael D
Hi Pete,

We have the edk2-non-osi repository for binaries.  Do some of 
the patches in this series really belong there?

https://github.com/tianocore/edk2-non-osi

Thanks,

Mike

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-
> boun...@lists.01.org] On Behalf Of Pete Batard
> Sent: Tuesday, February 5, 2019 8:26 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [PATCH v5 edk2-platforms 18/22]
> Platform/RaspberryPi/RPi3 *NON-OSI*: Add ATF binaries
> 
> These ATF binaries were built from the ATF source
> (commit c3859557)
> with the custom RPi3 platform options detailed in the
> readme, and with
> no modification to the official source whatsoever.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Pete Batard 
> ---
>  Platform/RaspberryPi/RPi3/TrustedFirmware/License.txt
> |  26 
>  Platform/RaspberryPi/RPi3/TrustedFirmware/Readme.md
> |  42 
>  Platform/RaspberryPi/RPi3/TrustedFirmware/bl1.bin
> | Bin 0 -> 18801 bytes
>  Platform/RaspberryPi/RPi3/TrustedFirmware/fip.bin
> | Bin 0 -> 41714 bytes
>  4 files changed, 68 insertions(+)
> 
> diff --git
> a/Platform/RaspberryPi/RPi3/TrustedFirmware/License.txt
> b/Platform/RaspberryPi/RPi3/TrustedFirmware/License.txt
> new file mode 100644
> index ..b98dc643227e
> --- /dev/null
> +++
> b/Platform/RaspberryPi/RPi3/TrustedFirmware/License.txt
> @@ -0,0 +1,26 @@
> +Copyright (c) 2013-2018, ARM Limited and Contributors.
> All rights reserved.
> +
> +Redistribution and use in source and binary forms,
> with or without modification,
> +are permitted provided that the following conditions
> are met:
> +
> +* Redistributions of source code must retain the above
> copyright notice, this
> +  list of conditions and the following disclaimer.
> +
> +* Redistributions in binary form must reproduce the
> above copyright notice, this
> +  list of conditions and the following disclaimer in
> the documentation and/or
> +  other materials provided with the distribution.
> +
> +* Neither the name of ARM nor the names of its
> contributors may be used to
> +  endorse or promote products derived from this
> software without specific prior
> +  written permission.
> +
> +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
> CONTRIBUTORS "AS IS" AND
> +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> LIMITED TO, THE IMPLIED
> +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
> PARTICULAR PURPOSE ARE
> +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
> CONTRIBUTORS BE LIABLE FOR
> +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
> OR CONSEQUENTIAL DAMAGES
> +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
> SUBSTITUTE GOODS OR SERVICES;
> +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
> INTERRUPTION) HOWEVER CAUSED AND ON
> +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> LIABILITY, OR TORT
> +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
> OUT OF THE USE OF THIS
> +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
> DAMAGE.
> diff --git
> a/Platform/RaspberryPi/RPi3/TrustedFirmware/Readme.md
> b/Platform/RaspberryPi/RPi3/TrustedFirmware/Readme.md
> new file mode 100644
> index ..74bcec7d1f12
> --- /dev/null
> +++
> b/Platform/RaspberryPi/RPi3/TrustedFirmware/Readme.md
> @@ -0,0 +1,42 @@
> +ARM Trusted Firmware for Raspberry Pi 3
> +===
> +
> +The `bl1` and `fip` ATF binaries, found in this
> directory, were built from
> +the [official ATF source](https://github.com/ARM-
> software/arm-trusted-firmware)
> +(commit c3859557) using Linaro's GCC 5.5 compiler
> with:
> +
> +```
> +export CROSS_COMPILE=/usr/src/gcc-linaro-5.5.0-
> 2017.10-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
> +make PLAT=rpi3 PRELOADED_BL33_BASE=0x3
> RPI3_PRELOADED_DTB_BASE=0x1 SUPPORT_VFP=1
> RPI3_USE_UEFI_MAP=1 fip all
> +```
> +
> +This results in the following memory mapping:
> +
> +```
> +0x +-+
> +   |   ROM   | BL1
> +0x0001 +-+
> +   |   DTB   | (Loaded by the
> VideoCore)
> +0x0002 +-+
> +   |   FIP   |
> +0x0003 +-+
> +   | |
> +   |  UEFI PAYLOAD   |
> +   | |
> +0x0020 +-+
> +   |   Secure SRAM   | BL2, BL31
> +0x0030 +-+
> +   |   Secure DRAM   | BL32 (Secure
> payload)
> +0x0040 +-+
> +   | |
> +   | |
> +   | Non-secure DRAM | BL33
> +   | |
> +   | |
> +0x0100 +-+
> +   | |
> +   |   ...   |
> +   | |
> +0x3F00 +-+
> +   |   I/O   |

Re: [edk2] [PATCH v2] ArmPlatformPkg: Fix various typos

2019-02-06 Thread Philippe Mathieu-Daudé
On 2/6/19 4:46 PM, Antoine Coeur wrote:
> Fix various typos in ArmPlatformPkg.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Coeur 
> ---
>  ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c   | 4 ++--
>  ArmPlatformPkg/Include/Library/ArmPlatformLib.h| 2 +-
>  ArmPlatformPkg/Include/Library/PL011UartLib.h  | 2 +-
>  ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c | 2 +-
>  ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c  | 2 +-
>  ArmPlatformPkg/PlatformPei/PlatformPeim.c  | 2 +-
>  ArmPlatformPkg/PrePeiCore/PrePeiCore.c | 2 +-
>  ArmPlatformPkg/PrePi/PrePi.c   | 2 +-
>  8 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c 
> b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c
> index af40a4c884..73d389c811 100644
> --- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c
> +++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c
> @@ -1115,7 +1115,7 @@ NorFlashWriteSingleBlock (
>@retval EFI_SUCCESS   The data was read correctly from the device.
>@retval EFI_DEVICE_ERROR  The device reported an error while 
> performing the read.
>@retval EFI_NO_MEDIA  There is no media in the device.
> -  @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current 
> device.
> +  @retval EFI_MEDIA_CHANGED The MediaId does not match the current 
> device.

We could argue if this one is strictly a *typo* ;)

>@retval EFI_INVALID_PARAMETER The read request contains device addresses 
> that are not
>  valid for the device.
>  
> @@ -1160,7 +1160,7 @@ NorFlashDiskIoReadDisk (
>@retval EFI_WRITE_PROTECTED   The device can not be written to.
>@retval EFI_DEVICE_ERROR  The device reported an error while 
> performing the write.
>@retval EFI_NO_MEDIA  There is no media in the device.
> -  @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current 
> device.
> +  @retval EFI_MEDIA_CHANGED The MediaId does not match the current 
> device.
>@retval EFI_INVALID_PARAMETER The write request contains device addresses 
> that are not
>   valid for the device.
>  
> diff --git a/ArmPlatformPkg/Include/Library/ArmPlatformLib.h 
> b/ArmPlatformPkg/Include/Library/ArmPlatformLib.h
> index 3ad4c16066..fd264b31f7 100644
> --- a/ArmPlatformPkg/Include/Library/ArmPlatformLib.h
> +++ b/ArmPlatformPkg/Include/Library/ArmPlatformLib.h
> @@ -20,7 +20,7 @@
>  //
>  #include 
>  //
> -// The protocols, PPI and GUID defintions for this module
> +// The protocols, PPI and GUID definitions for this module
>  //
>  #include 
>  #include 
> diff --git a/ArmPlatformPkg/Include/Library/PL011UartLib.h 
> b/ArmPlatformPkg/Include/Library/PL011UartLib.h
> index 8cfc3d118a..495def8d7d 100644
> --- a/ArmPlatformPkg/Include/Library/PL011UartLib.h
> +++ b/ArmPlatformPkg/Include/Library/PL011UartLib.h
> @@ -118,7 +118,7 @@ PL011UartSetControl (
>   . EFI_SERIAL_OUTPUT_BUFFER_EMPTY : equal to one if 
> the
> transmit buffer is empty, 0 otherwise.
>   . EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE : equal to 
> one if
> -   the hardware loopback is enabled (the ouput feeds 
> the
> +   the hardware loopback is enabled (the output 
> feeds the
> receive buffer), 0 otherwise.
>   . EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE : equal to 
> one if
> a loopback is accomplished by software, 0 
> otherwise.
> diff --git a/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c 
> b/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c
> index 61a34fda0b..60c06a63a4 100644
> --- a/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c
> +++ b/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c
> @@ -327,7 +327,7 @@ PL011UartSetControl (
>   . EFI_SERIAL_OUTPUT_BUFFER_EMPTY : equal to one if 
> the
> transmit buffer is empty, 0 otherwise.
>   . EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE : equal to 
> one if
> -   the hardware loopback is enabled (the ouput feeds 
> the
> +   the hardware loopback is enabled (the output 
> feeds the
> receive buffer), 0 otherwise.
>   . EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE : equal to 
> one if
> a loopback is accomplished by software, 0 
> otherwise.

Which makes me wonder what is the benefit of copying the same doc twice,
in the header and the source?

> diff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c 
> b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c
> index 010f93add7..6f2a357b96 100644
> --- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c
> +++ b/ArmPlatformPkg/MemoryIni

Re: [edk2] [PATCH v2] ArmVirtPkg: Fix various typos

2019-02-06 Thread Philippe Mathieu-Daudé
On 2/6/19 4:48 PM, Antoine Coeur wrote:
> Fix various typos in ArmVirtPkg.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Coeur 

Reviewed-by: Philippe Mathieu-Daude 

> ---
>  ArmVirtPkg/ArmVirt.dsc.inc  | 2 +-
>  ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c| 2 +-
>  ArmVirtPkg/Library/BaseCachingPciExpressLib/PciExpressLib.c | 4 ++--
>  .../FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c  | 6 +++---
>  .../Library/FdtPL011SerialPortLib/FdtPL011SerialPortLib.c   | 6 +++---
>  ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c  | 4 ++--
>  6 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
> index c47955be94..304a4b4d21 100644
> --- a/ArmVirtPkg/ArmVirt.dsc.inc
> +++ b/ArmVirtPkg/ArmVirt.dsc.inc
> @@ -333,7 +333,7 @@
># Values are in EFI Pages (4K). DXE Core will make sure that
># at least this much of each type of memory can be allocated
># from a single memory range. This way you only end up with
> -  # maximum of two fragements for each type in the memory map
> +  # maximum of two fragments for each type in the memory map
># (the memory used, and the free memory that was prereserved
># but not used).
>#
> diff --git a/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c 
> b/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c
> index 73a0fbd8a4..758bc91ab1 100644
> --- a/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c
> +++ b/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c
> @@ -1,5 +1,5 @@
>  /** @file
> -  HOB Library implemenation for Dxe Phase with DebugLib dependency removed
> +  HOB Library implementation for Dxe Phase with DebugLib dependency removed
>  
>  Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
>  Copyright (c) 2014, Linaro Ltd. All rights reserved.
> diff --git a/ArmVirtPkg/Library/BaseCachingPciExpressLib/PciExpressLib.c 
> b/ArmVirtPkg/Library/BaseCachingPciExpressLib/PciExpressLib.c
> index 6479f53b37..a083826bab 100644
> --- a/ArmVirtPkg/Library/BaseCachingPciExpressLib/PciExpressLib.c
> +++ b/ArmVirtPkg/Library/BaseCachingPciExpressLib/PciExpressLib.c
> @@ -1238,7 +1238,7 @@ PciExpressBitFieldAndThenOr32 (
>Size into the buffer specified by Buffer. This function only allows the PCI
>configuration registers from a single PCI function to be read. Size is
>returned. When possible 32-bit PCI configuration read cycles are used to 
> read
> -  from StartAdress to StartAddress + Size. Due to alignment restrictions, 
> 8-bit
> +  from StartAddress to StartAddress + Size. Due to alignment restrictions, 
> 8-bit
>and 16-bit PCI configuration read cycles may be used at the beginning and 
> the
>end of the range.
>  
> @@ -1338,7 +1338,7 @@ PciExpressReadBuffer (
>Size from the buffer specified by Buffer. This function only allows the PCI
>configuration registers from a single PCI function to be written. Size is
>returned. When possible 32-bit PCI configuration write cycles are used to
> -  write from StartAdress to StartAddress + Size. Due to alignment 
> restrictions,
> +  write from StartAddress to StartAddress + Size. Due to alignment 
> restrictions,
>8-bit and 16-bit PCI configuration write cycles may be used at the 
> beginning
>and the end of the range.
>  
> diff --git 
> a/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c 
> b/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c
> index f0924dacbc..16c0e61816 100644
> --- a/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c
> +++ b/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c
> @@ -234,13 +234,13 @@ SerialPortGetControl (
>  }
>  
>  /**
> -  Sets the baud rate, receive FIFO depth, transmit/receice time out, parity,
> +  Sets the baud rate, receive FIFO depth, transmit/receive time out, parity,
>data bits, and stop bits on a serial device.
>  
>@param BaudRate   The requested baud rate. A BaudRate value of 0 
> will use the
>  device's default interface speed.
>  On output, the value actually set.
> -  @param ReveiveFifoDepth   The requested depth of the FIFO on the receive 
> side of the
> +  @param ReceiveFifoDepth   The requested depth of the FIFO on the receive 
> side of the
>  serial interface. A ReceiveFifoDepth value of 0 
> will use
>  the device's default FIFO depth.
>  On output, the value actually set.
> @@ -253,7 +253,7 @@ SerialPortGetControl (
>  DefaultParity will use the device's default 
> parity value.
>  On output, the value actually set.
>@param DataBits   The number of data bits to use on the serial 
> device. A DataBits
> -vaule of 0 will use the device's de

Re: [edk2] [PATCH] CryptoPkg: Fix various typos

2019-02-06 Thread Philippe Mathieu-Daudé
Hi Antoine,

On 2/6/19 6:24 PM, Antoine Coeur wrote:
> Fix various typos in CryptoPkg.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Coeur 
> ---
>  CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c | 2 +-
>  CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c 
> b/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c
> index d63c23df09..540c5715cb 100644
> --- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c
> +++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c
> @@ -142,7 +142,7 @@ IMPLEMENT_ASN1_FUNCTIONS (TS_TST_INFO)
>@param[in]  Asn1Time Pointer to the ASN.1 GeneralizedTime to be 
> converted.
>@param[out] SigningTime  Return the corresponding EFI Time.
>  
> -  @retval  TRUE   The time convertion succeeds.
> +  @retval  TRUE   The time conversion succeeds.

The typos are indeed fixed, so:
Reviewed-by: Philippe Mathieu-Daude 

However reading this description makes me suspicious, I'd have written
"The time convertion succeeded.", but I'm not native English speaker so
I'll let someone with more insurance opinate.

Regards,

Phil.

>@retval  FALSE  Invalid parameters.
>  
>  **/
> diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c 
> b/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c
> index 9510a4a383..929e3fcd1e 100644
> --- a/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c
> +++ b/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c
> @@ -84,14 +84,14 @@ QuickSortWorker (
>  }
>}
>//
> -  // Swap pivot to it's final position (NextSwapLocaiton)
> +  // Swap pivot to it's final position (NextSwapLocation)
>//
>CopyMem (Buffer, Pivot, ElementSize);
>CopyMem (Pivot, (UINT8 *)BufferToSort + (NextSwapLocation * ElementSize), 
> ElementSize);
>CopyMem ((UINT8 *)BufferToSort + (NextSwapLocation * ElementSize), Buffer, 
> ElementSize);
>  
>//
> -  // Now recurse on 2 paritial lists.  Neither of these will have the 
> 'pivot' element.
> +  // Now recurse on 2 partial lists.  Neither of these will have the 'pivot' 
> element.
>// IE list is sorted left half, pivot element, sorted right half...
>//
>QuickSortWorker (
> 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2] BeagleBoardPkg: Fix various typos

2019-02-06 Thread Philippe Mathieu-Daudé
On 2/6/19 4:51 PM, Antoine Coeur wrote:
> Fix various typos in BeagleBoardPkg.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Coeur 

Reviewed-by: Philippe Mathieu-Daude 

> ---
>  BeagleBoardPkg/BeagleBoardPkg.dsc | 4 ++--
>  BeagleBoardPkg/Library/BeagleBoardLib/Clock.c | 2 +-
>  BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoff.c | 4 ++--
>  BeagleBoardPkg/PrePi/LzmaDecompress.h | 2 +-
>  BeagleBoardPkg/Tools/replace.c| 6 +++---
>  5 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/BeagleBoardPkg/BeagleBoardPkg.dsc 
> b/BeagleBoardPkg/BeagleBoardPkg.dsc
> index e0fee3692f..d677ab3eed 100644
> --- a/BeagleBoardPkg/BeagleBoardPkg.dsc
> +++ b/BeagleBoardPkg/BeagleBoardPkg.dsc
> @@ -71,7 +71,7 @@
># Uncomment (and comment out the next line) For RealView Debugger. The 
> Standard IO window
># in the debugger will show load and unload commands for symbols. You can 
> cut and paste this
># into the command window to load symbols. We should be able to use a 
> script to do this, but
> -  # the version of RVD I have does not support scipts accessing system 
> memory.
> +  # the version of RVD I have does not support scripts accessing system 
> memory.
>#
>  #  
> PeCoffExtraActionLib|ArmPkg/Library/RvdPeCoffExtraActionLib/RvdPeCoffExtraActionLib.inf
>
> PeCoffExtraActionLib|ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.inf
> @@ -303,7 +303,7 @@
>  # Values are in EFI Pages (4K). DXE Core will make sure that
>  # at least this much of each type of memory can be allocated
>  # from a single memory range. This way you only end up with
> -# maximum of two fragements for each type in the memory map
> +# maximum of two fragments for each type in the memory map
>  # (the memory used, and the free memory that was prereserved
>  # but not used).
>  #
> diff --git a/BeagleBoardPkg/Library/BeagleBoardLib/Clock.c 
> b/BeagleBoardPkg/Library/BeagleBoardLib/Clock.c
> index 6ca48e0c9f..4ca07ce7bc 100644
> --- a/BeagleBoardPkg/Library/BeagleBoardLib/Clock.c
> +++ b/BeagleBoardPkg/Library/BeagleBoardLib/Clock.c
> @@ -61,7 +61,7 @@ ClockInit (
>| CM_ICLKEN_PER_EN_GPIO5_ENABLE
>| CM_ICLKEN_PER_EN_GPIO6_ENABLE);
>  
> -  // Turn on functional & inteface clocks to various wakeup modules.
> +  // Turn on functional & interface clocks to various wakeup modules.
>MmioOr32(CM_FCLKEN_WKUP, CM_FCLKEN_WKUP_EN_GPIO1_ENABLE
> | CM_FCLKEN_WKUP_EN_WDT2_ENABLE);
>MmioOr32(CM_ICLKEN_WKUP, CM_ICLKEN_WKUP_EN_GPIO1_ENABLE
> diff --git a/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoff.c 
> b/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoff.c
> index bcc694816a..0e81536ca6 100644
> --- a/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoff.c
> +++ b/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoff.c
> @@ -182,13 +182,13 @@ PeCoffLoaderImageReadFromMemory (
>  
>  
>  /**
> -  Reapply fixups on a fixed up PE32/PE32+ image to allow virutal calling at 
> EFI
> +  Reapply fixups on a fixed up PE32/PE32+ image to allow virtual calling at 
> EFI
>runtime.
>  
>This function reapplies relocation fixups to the PE/COFF image specified 
> by ImageBase
>and ImageSize so the image will execute correctly when the PE/COFF image 
> is mapped
>to the address specified by VirtualImageBase. RelocationData must be 
> identical
> -  to the FiuxupData buffer from the PE_COFF_LOADER_IMAGE_CONTEXT structure
> +  to the FixupData buffer from the PE_COFF_LOADER_IMAGE_CONTEXT structure
>after this PE/COFF image was relocated with PeCoffLoaderRelocateImage().
>  
>Note that if the platform does not maintain coherency between the 
> instruction cache(s) and the data
> diff --git a/BeagleBoardPkg/PrePi/LzmaDecompress.h 
> b/BeagleBoardPkg/PrePi/LzmaDecompress.h
> index a79ff343d2..3b67ee05cc 100644
> --- a/BeagleBoardPkg/PrePi/LzmaDecompress.h
> +++ b/BeagleBoardPkg/PrePi/LzmaDecompress.h
> @@ -25,7 +25,7 @@
>If the required information can not be retrieved from InputSection,
>then RETURN_INVALID_PARAMETER is returned.
>If the GUID of InputSection does match the GUID that this handler supports,
> -  then the size required to hold the decoded buffer is returned in 
> OututBufferSize,
> +  then the size required to hold the decoded buffer is returned in 
> OutputBufferSize,
>the size of an optional scratch buffer is returned in ScratchSize, and the 
> Attributes field
>from EFI_GUID_DEFINED_SECTION header of InputSection is returned in 
> SectionAttribute.
>  
> diff --git a/BeagleBoardPkg/Tools/replace.c b/BeagleBoardPkg/Tools/replace.c
> index 00f4249592..d974ac1bcd 100644
> --- a/BeagleBoardPkg/Tools/replace.c
> +++ b/BeagleBoardPkg/Tools/replace.c
> @@ -102,7 +102,7 @@ main (int argc, char **argv)
>  return -5;
>}
>  
> -  // Search for a match by reading every possition 

Re: [edk2] [PATCH v2] AppPkg: Fix various typos

2019-02-06 Thread Philippe Mathieu-Daudé
Hi Antoine,

On 2/6/19 4:37 PM, Antoine Coeur wrote:
> Fix various typos in AppPkg.

Thanks for updating the title and description.
The content looks the same than v1, so you could have kept my R-b tag.

> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Coeur 

Reviewed-by: Philippe Mathieu-Daude 

> ---
>  AppPkg/Applications/Enquire/Enquire.c |  2 +-
>  AppPkg/Applications/Sockets/DataSource/DataSource.c   |  4 ++--
>  AppPkg/Applications/Sockets/SetHostName/SetHostName.c |  2 +-
>  AppPkg/Applications/Sockets/TftpServer/TftpServer.c   | 10 +-
>  AppPkg/Applications/Sockets/TftpServer/TftpServer.h   |  6 +++---
>  AppPkg/Applications/Sockets/WebServer/HTTP.c  |  2 +-
>  AppPkg/Applications/Sockets/WebServer/PageList.c  |  2 +-
>  AppPkg/Applications/Sockets/WebServer/Reboot.c|  2 +-
>  AppPkg/ReadMe.txt |  2 +-
>  9 files changed, 16 insertions(+), 16 deletions(-)
> 
> diff --git a/AppPkg/Applications/Enquire/Enquire.c 
> b/AppPkg/Applications/Enquire/Enquire.c
> index 1e1db69a57..fdf4fe05e5 100644
> --- a/AppPkg/Applications/Enquire/Enquire.c
> +++ b/AppPkg/Applications/Enquire/Enquire.c
> @@ -619,7 +619,7 @@ tell.c, uncomment the following and change enquire.c to 
> tell.c.
>  //#include  /* if this fails, define NO_SIG */
>  //#endif
>  
> -/* Kludge around the possiblity that  includes  */
> +/* Kludge around the possibility that  includes  */
>  #ifdef CHAR_BIT
>  #undef CHAR_BIT
>  #undef CHAR_MAX
> diff --git a/AppPkg/Applications/Sockets/DataSource/DataSource.c 
> b/AppPkg/Applications/Sockets/DataSource/DataSource.c
> index 0dcd882edf..678a052a12 100644
> --- a/AppPkg/Applications/Sockets/DataSource/DataSource.c
> +++ b/AppPkg/Applications/Sockets/DataSource/DataSource.c
> @@ -873,7 +873,7 @@ Tcp4Close (
>Locate TCP protocol
>  
>@retval EFI_SUCCESS   Protocol found
> -  @retval other Protocl not found
> +  @retval other Protocol not found
>  **/
>  EFI_STATUS
>  Tcp4Locate (
> @@ -970,7 +970,7 @@ Tcp4Locate (
>Tcp4Handle ));
>  
>  //
> -//  Locate the TCP protcol
> +//  Locate the TCP protocol
>  //
>  Status = gBS->OpenProtocol ( Tcp4Handle,
>   &gEfiTcp4ProtocolGuid,
> diff --git a/AppPkg/Applications/Sockets/SetHostName/SetHostName.c 
> b/AppPkg/Applications/Sockets/SetHostName/SetHostName.c
> index 2c8001e205..15785e3fee 100644
> --- a/AppPkg/Applications/Sockets/SetHostName/SetHostName.c
> +++ b/AppPkg/Applications/Sockets/SetHostName/SetHostName.c
> @@ -62,7 +62,7 @@ main (
>  break;
>  
>case ENODEV:
> -Print ( L"WARNING - Plarform does not support permanent 
> storage!\r\n" );
> +Print ( L"WARNING - Platform does not support permanent 
> storage!\r\n" );
>  break;
>  
>case ENOMEM:
> diff --git a/AppPkg/Applications/Sockets/TftpServer/TftpServer.c 
> b/AppPkg/Applications/Sockets/TftpServer/TftpServer.c
> index 30d9dae41d..40f986ff92 100644
> --- a/AppPkg/Applications/Sockets/TftpServer/TftpServer.c
> +++ b/AppPkg/Applications/Sockets/TftpServer/TftpServer.c
> @@ -76,7 +76,7 @@ BufferFill (
>  pContext->BytesRemaining -= BytesRead;
>  pContext->ValidBytes += BytesRead;
>  DEBUG (( DEBUG_FILE_BUFFER,
> -  "0x%08x: Buffer filled with %Ld bytes, %Ld bytes 
> ramaining\r\n",
> +  "0x%08x: Buffer filled with %Ld bytes, %Ld bytes 
> remaining\r\n",
>pContext->pFill,
>BytesRead,
>pContext->BytesRemaining ));
> @@ -659,7 +659,7 @@ PacketTx (
>  //  Display the operation
>  //
>  DEBUG (( DEBUG_TX_PACKET,
> -  "0x%08x: Packet transmiting\r\n",
> +  "0x%08x: Packet transmitting\r\n",
>pPacket ));
>  DEBUG (( DEBUG_TX,
>"0x%08x: pContext sending 0x%08x bytes\r\n",
> @@ -1224,7 +1224,7 @@ TftpOptionSet (
>NextValue = Value / 10;
>  
>//
> -  //  Supress leading zeros
> +  //  Suppress leading zeros
>//
>if ( 0 != NextValue ) {
>  pOack = TftpOptionSet ( pOack, NextValue );
> @@ -1884,7 +1884,7 @@ TftpRead (
>the network stack.
>  
>@param [in] pTftpServer   Address of the ::TSDT_TFTP_SERVER structure
> -  @param [in] AddressFamily The address family to use for the conection.
> +  @param [in] AddressFamily The address family to use for the connection.
>@param [in] pIndexAddress of the index into the port array
>  
>  **/
> @@ -2297,7 +2297,7 @@ main (
>  TFTP_PACKET * pPacket;
>  
>  //
> -//  High speed TFTP uses an agressive retransmit to
> +//  High speed TFTP uses an aggressive retransmit to
>  //  get the TFTP client moving again when the ACK or
>  //  previous data packet was lost.
>  //
> diff --git a/AppPkg/Applications/Sockets/TftpServer/TftpServer.h 
> b/AppPkg/Applicati

Re: [edk2] [PATCH v2] BaseTools: Fix build failure when specifying multiple BUILDTARGET

2019-02-06 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey 

And pushed.

> -Original Message-
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: Wednesday, February 06, 2019 8:26 AM
> To: Philippe Mathieu-Daudé ; Kinney, Michael D
> ; edk2-devel@lists.01.org; Carsey, Jaben
> 
> Cc: Leif Lindholm 
> Subject: Re: [PATCH v2] BaseTools: Fix build failure when specifying multiple
> BUILDTARGET
> 
> On 02/06/19 13:03, Philippe Mathieu-Daudé wrote:
> > With Python3, the dict.value() method returns an iterator.
> > If a dictionary is updated while an iterator on its keys is used,
> > a RuntimeError is generated.
> > Converting the iterator to a list() forces a copy of the mutable
> > keys in an immutable list which can be safely iterated.
> >
> > Commit f8d11e5a4aaa converted various uses but missed one:
> > When specifying multiple BUILDTARGET, the first target builds
> > successfully, but then the PGen.BuildDatabase._CACHE_ dictionary is
> > updated, and accessing the next target triggers a RuntimeError.
> >
> > Convert this iterator to an immutable list, to solve this build error:
> >
> > $ build -a IA32 -t GCC5 -b RELEASE -b NOOPT -p
> OvmfPkg/OvmfPkgIa32.dsc
> > [...]
> > Processing meta-data ...
> > build.py...
> >  : error C0DE: Unknown fatal error when processing
> [OvmfPkg/OvmfPkgIa32.dsc]
> >
> > (Please send email to edk2-devel@lists.01.org for help, attaching
> following call stack trace!)
> >
> > (Python 3.5.3 on linux) Traceback (most recent call last):
> >   File
> "BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line
> 2387, in Main
> > MyBuild.Launch()
> >   File
> "BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line
> 2141, in Launch
> > self._MultiThreadBuildPlatform()
> >   File
> "BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line
> 1921, in _MultiThreadBuildPlatform
> > self.Progress
> >   File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 304, in
> __init__
> > self._InitWorker(Workspace, MetaFile, Target, Toolchain, Arch, 
> > *args,
> **kwargs)
> >   File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 477, in
> _InitWorker
> > for BuildData in PGen.BuildDatabase._CACHE_.values():
> > RuntimeError: dictionary changed size during iteration
> >
> > Note: The culprit commit (f8d11e5a4aaa) can not be found with bisection.
> > In 9c2d68c0a299 the build tools default to the python version provided
> > by the ${PYTHON} environment variable, however the Python3 transition is
> > not functional before d943b0c339fe. f8d11e5a4aaa falls between the
> > previous two.
> >
> > Reported-by: Leif Lindholm 
> > Fixes: f8d11e5a4aaa90bf63b4789f3993dd6d16c60787
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Philippe Mathieu-Daude 
> > Tested-by: Leif Lindholm 
> > Acked-by: Laszlo Ersek 
> > ---
> > v2:
> >  - fixed English errors (Laszlo)
> >  - the paragraph about bisection not working is not relevant to
> >the fix, keep it as background info but move it after (Laszlo)
> > Signed-off-by: Philippe Mathieu-Daudé 
> > ---
> >  BaseTools/Source/Python/AutoGen/AutoGen.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py
> b/BaseTools/Source/Python/AutoGen/AutoGen.py
> > index a95d2c710e..12592a2a46 100644
> > --- a/BaseTools/Source/Python/AutoGen/AutoGen.py
> > +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
> > @@ -474,7 +474,7 @@ class WorkspaceAutoGen(AutoGen):
> >
> >  # generate the SourcePcdDict and BinaryPcdDict
> >  PGen = PlatformAutoGen(self, self.MetaFile, Target, Toolchain,
> Arch)
> > -for BuildData in PGen.BuildDatabase._CACHE_.values():
> > +for BuildData in list(PGen.BuildDatabase._CACHE_.values()):
> >  if BuildData.Arch != Arch:
> >  continue
> >  if BuildData.MetaFile.Ext == '.inf':
> >
> 
> Looks nice, thanks! My A-b stands.
> 
> Laszlo
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] OVMF and TCP4, HTTP protocols

2019-02-06 Thread Laszlo Ersek
On 02/06/19 18:44, Rebecca Cran wrote:
> On Wednesday, 6 February 2019 09:36:43 MST Laszlo Ersek wrote:
> 
>> please refer to the HTTP_BOOT_ENABLE define in the OVMF DSC files; the
>> default value is FALSE.
>>
>> If you'd like HTTP over IPv6, then please pass -D NETWORK_IP6_ENABLE on
>> the "build" cmdline as well.
> 
> Thanks. I'm already building with HTTP_BOOT_ENABLE though, and successfully 
> fetching loader.efi from the web server. However once loader.efi runs, my 
> code 
> can't find the HTTP or TCPv4 protocols.
> 
>>> Start HTTP Boot over IPv4.
>   Station IP address is 192.168.0.119
> 
>   URI: http://192.168.0.1/boot/loader.efi
>   File Size: 480256 Bytes
>   Downloading...100%
> 

Is "loader.efi" opaque, or do we know what it does?

For example, if it opens SNP with BY_DRIVER|EXCLUSIVE attributes, then
everything on top will be disconnected.

(I don't understand clearly if "loader.efi" is your own code in fact.)

Here's an idea:

(1) Build "loader.efi" and code "around" it with

  OvmfPkg/Library/PlatformDebugLibIoPort/PlatformDebugLibIoPort.inf

as the DebugLib instance. Then debug messages from the application and
the platform firmware will be nicely intermixed on the QEMU debug port.

(2) Add a DEBUG_INFO message to CoreUninstallProtocolInterface()
[MdeModulePkg/Core/Dxe/Hand/Handle.c], logging the fact and the protocol
GUID.

(3) Search the log for installation & uninstallation of the GUID

  BDC8E6AF-D9BC-4379-A72A-E0C4E75DAE1C

(EFI_HTTP_SERVICE_BINDING_PROTOCOL). Perhaps you can correlate those log
entries with other events.

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


Re: [edk2] OVMF and TCP4, HTTP protocols

2019-02-06 Thread Rebecca Cran via edk2-devel
On Wednesday, 6 February 2019 09:36:43 MST Laszlo Ersek wrote:

> please refer to the HTTP_BOOT_ENABLE define in the OVMF DSC files; the
> default value is FALSE.
> 
> If you'd like HTTP over IPv6, then please pass -D NETWORK_IP6_ENABLE on
> the "build" cmdline as well.

Thanks. I'm already building with HTTP_BOOT_ENABLE though, and successfully 
fetching loader.efi from the web server. However once loader.efi runs, my code 
can't find the HTTP or TCPv4 protocols.

>>Start HTTP Boot over IPv4.
  Station IP address is 192.168.0.119

  URI: http://192.168.0.1/boot/loader.efi
  File Size: 480256 Bytes
  Downloading...100%

-- 
Rebecca Cran


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


[edk2] [PATCH] CryptoPkg: Fix various typos

2019-02-06 Thread Antoine Coeur
Fix various typos in CryptoPkg.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Coeur 
---
 CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c | 2 +-
 CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c 
b/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c
index d63c23df09..540c5715cb 100644
--- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c
+++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c
@@ -142,7 +142,7 @@ IMPLEMENT_ASN1_FUNCTIONS (TS_TST_INFO)
   @param[in]  Asn1Time Pointer to the ASN.1 GeneralizedTime to be 
converted.
   @param[out] SigningTime  Return the corresponding EFI Time.
 
-  @retval  TRUE   The time convertion succeeds.
+  @retval  TRUE   The time conversion succeeds.
   @retval  FALSE  Invalid parameters.
 
 **/
diff --git a/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c 
b/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c
index 9510a4a383..929e3fcd1e 100644
--- a/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c
+++ b/CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c
@@ -84,14 +84,14 @@ QuickSortWorker (
 }
   }
   //
-  // Swap pivot to it's final position (NextSwapLocaiton)
+  // Swap pivot to it's final position (NextSwapLocation)
   //
   CopyMem (Buffer, Pivot, ElementSize);
   CopyMem (Pivot, (UINT8 *)BufferToSort + (NextSwapLocation * ElementSize), 
ElementSize);
   CopyMem ((UINT8 *)BufferToSort + (NextSwapLocation * ElementSize), Buffer, 
ElementSize);
 
   //
-  // Now recurse on 2 paritial lists.  Neither of these will have the 'pivot' 
element.
+  // Now recurse on 2 partial lists.  Neither of these will have the 'pivot' 
element.
   // IE list is sorted left half, pivot element, sorted right half...
   //
   QuickSortWorker (
-- 
2.17.2 (Apple Git-113)

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


[edk2] [PATCH] CorebootPayloadPkg: Fix various typos

2019-02-06 Thread Antoine Coeur
Fix various typos in CorebootPayloadPkg.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Coeur 
---
 CorebootPayloadPkg/FbGop/FbGop.c  |   8 +-
 CorebootPayloadPkg/FbGop/FbGop.h  |   8 +-
 .../Library/PciHostBridgeLib/PciHostBridge.h  |   2 +-
 .../PciHostBridgeLib/PciHostBridgeLib.c   |   2 +-
 .../PciHostBridgeLib/PciHostBridgeSupport.c   |   6 +-
 .../PlatformBootManager.c |   2 +-
 .../Library/PlatformHookLib/PlatformHookLib.c | 106 +-
 7 files changed, 67 insertions(+), 67 deletions(-)

diff --git a/CorebootPayloadPkg/FbGop/FbGop.c b/CorebootPayloadPkg/FbGop/FbGop.c
index ecafc95ae3..9a66943cbf 100644
--- a/CorebootPayloadPkg/FbGop/FbGop.c
+++ b/CorebootPayloadPkg/FbGop/FbGop.c
@@ -262,7 +262,7 @@ FbGopDriverBindingStart (
 if (IsDevicePathEnd (RemainingDevicePath)) {
   //
   // If RemainingDevicePath is the End of Device Path Node,
-  // don't create any child device and return EFI_SUCESS
+  // don't create any child device and return EFI_SUCCESS
   Status = EFI_SUCCESS;
   goto Done;
 }
@@ -688,7 +688,7 @@ FbGopChildHandleUninstall (
 
 
 /**
-  Release resource for biso video instance.
+  Release resource for bios video instance.
 
   @param  FbGopPrivate   Video child device private data structure
 
@@ -703,7 +703,7 @@ FbGopDeviceReleaseResource (
   }
 
   //
-  // Release all the resourses occupied by the FB_VIDEO_DEV
+  // Release all the resources occupied by the FB_VIDEO_DEV
   //
   
   //
@@ -1222,7 +1222,7 @@ FbGopVbeBltWorker (
   }
   //
   // We need to fill the Virtual Screen buffer with the blt data.
-  // The virtual screen is upside down, as the first row is the bootom row of
+  // The virtual screen is upside down, as the first row is the bottom row of
   // the image.
   //
   if (BltOperation == EfiBltVideoToBltBuffer) {
diff --git a/CorebootPayloadPkg/FbGop/FbGop.h b/CorebootPayloadPkg/FbGop/FbGop.h
index 4445f5c730..112d5c5cb5 100644
--- a/CorebootPayloadPkg/FbGop/FbGop.h
+++ b/CorebootPayloadPkg/FbGop/FbGop.h
@@ -205,7 +205,7 @@ FbGopCheckForVbe (
 
 
 /**
-  Release resource for biso video instance.
+  Release resource for bios video instance.
 
   @param  FbGopPrivate   Video child device private data structure
 
@@ -311,9 +311,9 @@ FbGopGraphicsOutputVbeBlt (
 
 
 /**
-  Grahpics Output protocol instance to block transfer for VGA device.
+  Graphics Output protocol instance to block transfer for VGA device.
 
-  @param  This   Pointer to Grahpics Output protocol instance
+  @param  This   Pointer to Graphics Output protocol instance
   @param  BltBuffer  The data to transfer to screen
   @param  BltOperation   The operation to perform
   @param  SourceXThe X coordinate of the source for 
BltOperation
@@ -394,7 +394,7 @@ FbGopChildHandleUninstall (
   );
 
 /**
-  Release resource for biso video instance.
+  Release resource for bios video instance.
 
   @param  FbGopPrivate   Video child device private data structure
 
diff --git a/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridge.h 
b/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridge.h
index 4852ed0d8d..c777cdbac1 100644
--- a/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridge.h
+++ b/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridge.h
@@ -42,7 +42,7 @@ ScanForRootBridges (
assigned to any subordinate bus found behind any
PCI bridge hanging off this root bus.
 
-   The caller is repsonsible for ensuring that
+   The caller is responsible for ensuring that
RootBusNumber <= MaxSubBusNumber. If
RootBusNumber equals MaxSubBusNumber, then the
root bus has no room for subordinate buses.
diff --git a/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c 
b/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
index b0a6361557..f7e1369a08 100644
--- a/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
+++ b/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c
@@ -70,7 +70,7 @@ CB_PCI_ROOT_BRIDGE_DEVICE_PATH mRootBridgeDevicePathTemplate 
= {
assigned to any subordinate bus found behind any
PCI bridge hanging off this root bus.
 
-   The caller is repsonsible for ensuring that
+   The caller is responsible for ensuring that
RootBusNumber <= MaxSubBusNumber. If
RootBusNumber equals MaxSubBusNumber, then the
root bus has no room for subordinate buses.
diff --git a/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c 
b/CorebootPa

[edk2] [PATCH] CorebootModulePkg: Fix various typos

2019-02-06 Thread Antoine Coeur
Fix various typos in CorebootModulePkg.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Coeur 
---
 .../Include/Library/CbParseLib.h  | 36 +--
 .../BaseSerialPortLib16550.c  | 12 +++
 .../Library/CbParseLib/CbParseLib.c   |  6 ++--
 .../SataControllerDxe/SataController.h|  2 +-
 CorebootModulePkg/SecCore/FindPeiCore.c   |  2 +-
 CorebootModulePkg/SecCore/Ia32/Stack.S| 18 +-
 CorebootModulePkg/SecCore/Ia32/Stack.asm  | 18 +-
 CorebootModulePkg/SecCore/Ia32/Stack.nasm |  2 +-
 CorebootModulePkg/SecCore/SecMain.c   | 14 
 CorebootModulePkg/SecCore/SecMain.h   |  4 +--
 10 files changed, 57 insertions(+), 57 deletions(-)

diff --git a/CorebootModulePkg/Include/Library/CbParseLib.h 
b/CorebootModulePkg/Include/Library/CbParseLib.h
index 12dd4fa979..be39bd0923 100644
--- a/CorebootModulePkg/Include/Library/CbParseLib.h
+++ b/CorebootModulePkg/Include/Library/CbParseLib.h
@@ -25,7 +25,7 @@ typedef RETURN_STATUS \
   @param  TagThe tag id to be found
 
   @retval NULL  The Tag is not found.
-  @retval OthersThe poiter to the record found.
+  @retval OthersThe pointer to the record found.
 
 **/
 VOID *
@@ -51,7 +51,7 @@ CbParseMemoryInfo (
   IN  CB_MEM_INFO_CALLBACK  MemInfoCallback,
   IN  VOID  *pParam
   );
-
+
 /**
   Acquire the coreboot memory table with the given table id
 
@@ -67,11 +67,11 @@ CbParseMemoryInfo (
 RETURN_STATUS
 EFIAPI
 CbParseCbMemTable (
-  IN UINT32 TableId,
+  IN UINT32 TableId,
   IN VOID** pMemTable,
   IN UINT32*pMemTableSize
   );
-
+
 /**
   Acquire the acpi table from coreboot
 
@@ -89,7 +89,7 @@ CbParseAcpiTable (
   IN VOID** pMemTable,
   IN UINT32*pMemTableSize
   );
-
+
 /**
   Acquire the smbios table from coreboot
 
@@ -107,14 +107,14 @@ CbParseSmbiosTable (
   IN VOID** pMemTable,
   IN UINT32*pMemTableSize
   );
-
+
 /**
   Find the required fadt information
 
   @param  pPmCtrlReg Pointer to the address of power management 
control register
   @param  pPmTimerRegPointer to the address of power management timer 
register
   @param  pResetReg  Pointer to the address of system reset register
-  @param  pResetValuePointer to the value to be writen to the system 
reset register
+  @param  pResetValuePointer to the value to be written to the system 
reset register
   @param  pPmEvtReg  Pointer to the address of power management event 
register
   @param  pPmGpeEnRegPointer to the address of power management GPE 
enable register
 
@@ -132,16 +132,16 @@ CbParseFadtInfo (
   IN UINTN* pPmEvtReg,
   IN UINTN* pPmGpeEnReg
   );
-
+
 /**
   Find the serial port information
 
   @param  pRegBase   Pointer to the base address of serial port 
registers
   @param  pRegAccessType Pointer to the access type of serial port 
registers
-  @param  pRegWidth  Pointer to the register width in bytes
+  @param  pRegWidth  Pointer to the register width in bytes
   @param  pBaudrate  Pointer to the serial port baudrate
-  @param  pInputHertzPointer to the input clock frequency
-  @param  pUartPciAddr   Pointer to the UART PCI bus, dev and func address
+  @param  pInputHertzPointer to the input clock frequency
+  @param  pUartPciAddr   Pointer to the UART PCI bus, dev and func address
 
   @retval RETURN_SUCCESS Successfully find the serial port information.
   @retval RETURN_NOT_FOUND   Failed to find the serial port information .
@@ -150,12 +150,12 @@ CbParseFadtInfo (
 RETURN_STATUS
 EFIAPI
 CbParseSerialInfo (
-  OUT UINT32 *pRegBase,
-  OUT UINT32 *pRegAccessType,
-  OUT UINT32 *pRegWidth,
-  OUT UINT32 *pBaudrate,
-  OUT UINT32 *pInputHertz,
-  OUT UINT32 *pUartPciAddr
+  OUT UINT32 *pRegBase,
+  OUT UINT32 *pRegAccessType,
+  OUT UINT32 *pRegWidth,
+  OUT UINT32 *pBaudrate,
+  OUT UINT32 *pInputHertz,
+  OUT UINT32 *pUartPciAddr
   );
 
 /**
@@ -174,7 +174,7 @@ CbParseGetCbHeader (
   IN UINTN  Level,
   IN VOID** HeaderPtr
   );
-
+
 /**
   Find the video frame buffer information
 
diff --git 
a/CorebootModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c 
b/CorebootModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c
index ca6db2306a..92514bb3a7 100644
--- a/CorebootModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c
+++ b/CorebootModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c
@@ -23,7 +23,7 @@
 #include 
 
 //
-// PCI Defintions.
+// PCI Definitions.
 //
 #define PCI_BRIDGE_32_BIT_IO_SPACE  0x01
 
@@ -451,7 +451,7 @@ SerialPortWritable (
   //00   No cable connected.   Transmit
   //01   No cable connected.   Transmit
   //10   

Re: [edk2] OVMF and TCP4, HTTP protocols

2019-02-06 Thread Laszlo Ersek
Hello Rebecca,

On 02/06/19 07:06, Rebecca Cran via edk2-devel wrote:
> I'm trying to fetch a file over HTTP in a boot loader, but gBS-
>> LocateHandleBuffer doesn't find either of the 
>> EFI_TCP4_SERVICE_BINDING_PROTCOL 
> or EFI_HTTP_SERVICE_BINDING_PROTOCOL.
> 
> I'm running a build of OVMF from git master from a few weeks ago.
> Should they exist and be usable, or does OVMF only support the 
> EFI_SIMPLE_NETWORK_PROTOCOL?
> 

please refer to the HTTP_BOOT_ENABLE define in the OVMF DSC files; the
default value is FALSE.

If you'd like HTTP over IPv6, then please pass -D NETWORK_IP6_ENABLE on
the "build" cmdline as well.

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


Re: [edk2] [PATCH v2] ArmVirtPkg: Fix various typos

2019-02-06 Thread Laszlo Ersek
On 02/06/19 16:48, Antoine Coeur wrote:
> Fix various typos in ArmVirtPkg.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Coeur 
> ---
>  ArmVirtPkg/ArmVirt.dsc.inc  | 2 +-
>  ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c| 2 +-
>  ArmVirtPkg/Library/BaseCachingPciExpressLib/PciExpressLib.c | 4 ++--
>  .../FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c  | 6 +++---
>  .../Library/FdtPL011SerialPortLib/FdtPL011SerialPortLib.c   | 6 +++---
>  ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c  | 4 ++--
>  6 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
> index c47955be94..304a4b4d21 100644
> --- a/ArmVirtPkg/ArmVirt.dsc.inc
> +++ b/ArmVirtPkg/ArmVirt.dsc.inc
> @@ -333,7 +333,7 @@
># Values are in EFI Pages (4K). DXE Core will make sure that
># at least this much of each type of memory can be allocated
># from a single memory range. This way you only end up with
> -  # maximum of two fragements for each type in the memory map
> +  # maximum of two fragments for each type in the memory map
># (the memory used, and the free memory that was prereserved
># but not used).
>#
> diff --git a/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c 
> b/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c
> index 73a0fbd8a4..758bc91ab1 100644
> --- a/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c
> +++ b/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c
> @@ -1,5 +1,5 @@
>  /** @file
> -  HOB Library implemenation for Dxe Phase with DebugLib dependency removed
> +  HOB Library implementation for Dxe Phase with DebugLib dependency removed
>  
>  Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
>  Copyright (c) 2014, Linaro Ltd. All rights reserved.
> diff --git a/ArmVirtPkg/Library/BaseCachingPciExpressLib/PciExpressLib.c 
> b/ArmVirtPkg/Library/BaseCachingPciExpressLib/PciExpressLib.c
> index 6479f53b37..a083826bab 100644
> --- a/ArmVirtPkg/Library/BaseCachingPciExpressLib/PciExpressLib.c
> +++ b/ArmVirtPkg/Library/BaseCachingPciExpressLib/PciExpressLib.c
> @@ -1238,7 +1238,7 @@ PciExpressBitFieldAndThenOr32 (
>Size into the buffer specified by Buffer. This function only allows the PCI
>configuration registers from a single PCI function to be read. Size is
>returned. When possible 32-bit PCI configuration read cycles are used to 
> read
> -  from StartAdress to StartAddress + Size. Due to alignment restrictions, 
> 8-bit
> +  from StartAddress to StartAddress + Size. Due to alignment restrictions, 
> 8-bit
>and 16-bit PCI configuration read cycles may be used at the beginning and 
> the
>end of the range.
>  
> @@ -1338,7 +1338,7 @@ PciExpressReadBuffer (
>Size from the buffer specified by Buffer. This function only allows the PCI
>configuration registers from a single PCI function to be written. Size is
>returned. When possible 32-bit PCI configuration write cycles are used to
> -  write from StartAdress to StartAddress + Size. Due to alignment 
> restrictions,
> +  write from StartAddress to StartAddress + Size. Due to alignment 
> restrictions,
>8-bit and 16-bit PCI configuration write cycles may be used at the 
> beginning
>and the end of the range.
>  
> diff --git 
> a/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c 
> b/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c
> index f0924dacbc..16c0e61816 100644
> --- a/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c
> +++ b/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c
> @@ -234,13 +234,13 @@ SerialPortGetControl (
>  }
>  
>  /**
> -  Sets the baud rate, receive FIFO depth, transmit/receice time out, parity,
> +  Sets the baud rate, receive FIFO depth, transmit/receive time out, parity,
>data bits, and stop bits on a serial device.
>  
>@param BaudRate   The requested baud rate. A BaudRate value of 0 
> will use the
>  device's default interface speed.
>  On output, the value actually set.
> -  @param ReveiveFifoDepth   The requested depth of the FIFO on the receive 
> side of the
> +  @param ReceiveFifoDepth   The requested depth of the FIFO on the receive 
> side of the
>  serial interface. A ReceiveFifoDepth value of 0 
> will use
>  the device's default FIFO depth.
>  On output, the value actually set.
> @@ -253,7 +253,7 @@ SerialPortGetControl (
>  DefaultParity will use the device's default 
> parity value.
>  On output, the value actually set.
>@param DataBits   The number of data bits to use on the serial 
> device. A DataBits
> -vaule of 0 will use the device's default data 
> bit setting.
> + 

Re: [edk2] [PATCH v2] BaseTools: Fix build failure when specifying multiple BUILDTARGET

2019-02-06 Thread Laszlo Ersek
On 02/06/19 13:03, Philippe Mathieu-Daudé wrote:
> With Python3, the dict.value() method returns an iterator.
> If a dictionary is updated while an iterator on its keys is used,
> a RuntimeError is generated.
> Converting the iterator to a list() forces a copy of the mutable
> keys in an immutable list which can be safely iterated.
> 
> Commit f8d11e5a4aaa converted various uses but missed one:
> When specifying multiple BUILDTARGET, the first target builds
> successfully, but then the PGen.BuildDatabase._CACHE_ dictionary is
> updated, and accessing the next target triggers a RuntimeError.
> 
> Convert this iterator to an immutable list, to solve this build error:
> 
> $ build -a IA32 -t GCC5 -b RELEASE -b NOOPT -p OvmfPkg/OvmfPkgIa32.dsc
> [...]
> Processing meta-data ...
> build.py...
>  : error C0DE: Unknown fatal error when processing 
> [OvmfPkg/OvmfPkgIa32.dsc]
> 
> (Please send email to edk2-devel@lists.01.org for help, attaching 
> following call stack trace!)
> 
> (Python 3.5.3 on linux) Traceback (most recent call last):
>   File 
> "BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 
> 2387, in Main
> MyBuild.Launch()
>   File 
> "BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 
> 2141, in Launch
> self._MultiThreadBuildPlatform()
>   File 
> "BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 
> 1921, in _MultiThreadBuildPlatform
> self.Progress
>   File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 304, in __init__
> self._InitWorker(Workspace, MetaFile, Target, Toolchain, Arch, *args, 
> **kwargs)
>   File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 477, in 
> _InitWorker
> for BuildData in PGen.BuildDatabase._CACHE_.values():
> RuntimeError: dictionary changed size during iteration
> 
> Note: The culprit commit (f8d11e5a4aaa) can not be found with bisection.
> In 9c2d68c0a299 the build tools default to the python version provided
> by the ${PYTHON} environment variable, however the Python3 transition is
> not functional before d943b0c339fe. f8d11e5a4aaa falls between the
> previous two.
> 
> Reported-by: Leif Lindholm 
> Fixes: f8d11e5a4aaa90bf63b4789f3993dd6d16c60787
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Philippe Mathieu-Daude 
> Tested-by: Leif Lindholm 
> Acked-by: Laszlo Ersek 
> ---
> v2:
>  - fixed English errors (Laszlo)
>  - the paragraph about bisection not working is not relevant to
>the fix, keep it as background info but move it after (Laszlo)
> Signed-off-by: Philippe Mathieu-Daudé 
> ---
>  BaseTools/Source/Python/AutoGen/AutoGen.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py 
> b/BaseTools/Source/Python/AutoGen/AutoGen.py
> index a95d2c710e..12592a2a46 100644
> --- a/BaseTools/Source/Python/AutoGen/AutoGen.py
> +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
> @@ -474,7 +474,7 @@ class WorkspaceAutoGen(AutoGen):
>  
>  # generate the SourcePcdDict and BinaryPcdDict
>  PGen = PlatformAutoGen(self, self.MetaFile, Target, Toolchain, 
> Arch)
> -for BuildData in PGen.BuildDatabase._CACHE_.values():
> +for BuildData in list(PGen.BuildDatabase._CACHE_.values()):
>  if BuildData.Arch != Arch:
>  continue
>  if BuildData.MetaFile.Ext == '.inf':
> 

Looks nice, thanks! My A-b stands.

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


[edk2] [PATCH v2] BeagleBoardPkg: Fix various typos

2019-02-06 Thread Antoine Coeur
Fix various typos in BeagleBoardPkg.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Coeur 
---
 BeagleBoardPkg/BeagleBoardPkg.dsc | 4 ++--
 BeagleBoardPkg/Library/BeagleBoardLib/Clock.c | 2 +-
 BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoff.c | 4 ++--
 BeagleBoardPkg/PrePi/LzmaDecompress.h | 2 +-
 BeagleBoardPkg/Tools/replace.c| 6 +++---
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/BeagleBoardPkg/BeagleBoardPkg.dsc 
b/BeagleBoardPkg/BeagleBoardPkg.dsc
index e0fee3692f..d677ab3eed 100644
--- a/BeagleBoardPkg/BeagleBoardPkg.dsc
+++ b/BeagleBoardPkg/BeagleBoardPkg.dsc
@@ -71,7 +71,7 @@
   # Uncomment (and comment out the next line) For RealView Debugger. The 
Standard IO window
   # in the debugger will show load and unload commands for symbols. You can 
cut and paste this
   # into the command window to load symbols. We should be able to use a script 
to do this, but
-  # the version of RVD I have does not support scipts accessing system memory.
+  # the version of RVD I have does not support scripts accessing system memory.
   #
 #  
PeCoffExtraActionLib|ArmPkg/Library/RvdPeCoffExtraActionLib/RvdPeCoffExtraActionLib.inf
   
PeCoffExtraActionLib|ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.inf
@@ -303,7 +303,7 @@
 # Values are in EFI Pages (4K). DXE Core will make sure that
 # at least this much of each type of memory can be allocated
 # from a single memory range. This way you only end up with
-# maximum of two fragements for each type in the memory map
+# maximum of two fragments for each type in the memory map
 # (the memory used, and the free memory that was prereserved
 # but not used).
 #
diff --git a/BeagleBoardPkg/Library/BeagleBoardLib/Clock.c 
b/BeagleBoardPkg/Library/BeagleBoardLib/Clock.c
index 6ca48e0c9f..4ca07ce7bc 100644
--- a/BeagleBoardPkg/Library/BeagleBoardLib/Clock.c
+++ b/BeagleBoardPkg/Library/BeagleBoardLib/Clock.c
@@ -61,7 +61,7 @@ ClockInit (
   | CM_ICLKEN_PER_EN_GPIO5_ENABLE
   | CM_ICLKEN_PER_EN_GPIO6_ENABLE);
 
-  // Turn on functional & inteface clocks to various wakeup modules.
+  // Turn on functional & interface clocks to various wakeup modules.
   MmioOr32(CM_FCLKEN_WKUP, CM_FCLKEN_WKUP_EN_GPIO1_ENABLE
| CM_FCLKEN_WKUP_EN_WDT2_ENABLE);
   MmioOr32(CM_ICLKEN_WKUP, CM_ICLKEN_WKUP_EN_GPIO1_ENABLE
diff --git a/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoff.c 
b/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoff.c
index bcc694816a..0e81536ca6 100644
--- a/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoff.c
+++ b/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoff.c
@@ -182,13 +182,13 @@ PeCoffLoaderImageReadFromMemory (
 
 
 /**
-  Reapply fixups on a fixed up PE32/PE32+ image to allow virutal calling at EFI
+  Reapply fixups on a fixed up PE32/PE32+ image to allow virtual calling at EFI
   runtime.
 
   This function reapplies relocation fixups to the PE/COFF image specified by 
ImageBase
   and ImageSize so the image will execute correctly when the PE/COFF image is 
mapped
   to the address specified by VirtualImageBase. RelocationData must be 
identical
-  to the FiuxupData buffer from the PE_COFF_LOADER_IMAGE_CONTEXT structure
+  to the FixupData buffer from the PE_COFF_LOADER_IMAGE_CONTEXT structure
   after this PE/COFF image was relocated with PeCoffLoaderRelocateImage().
 
   Note that if the platform does not maintain coherency between the 
instruction cache(s) and the data
diff --git a/BeagleBoardPkg/PrePi/LzmaDecompress.h 
b/BeagleBoardPkg/PrePi/LzmaDecompress.h
index a79ff343d2..3b67ee05cc 100644
--- a/BeagleBoardPkg/PrePi/LzmaDecompress.h
+++ b/BeagleBoardPkg/PrePi/LzmaDecompress.h
@@ -25,7 +25,7 @@
   If the required information can not be retrieved from InputSection,
   then RETURN_INVALID_PARAMETER is returned.
   If the GUID of InputSection does match the GUID that this handler supports,
-  then the size required to hold the decoded buffer is returned in 
OututBufferSize,
+  then the size required to hold the decoded buffer is returned in 
OutputBufferSize,
   the size of an optional scratch buffer is returned in ScratchSize, and the 
Attributes field
   from EFI_GUID_DEFINED_SECTION header of InputSection is returned in 
SectionAttribute.
 
diff --git a/BeagleBoardPkg/Tools/replace.c b/BeagleBoardPkg/Tools/replace.c
index 00f4249592..d974ac1bcd 100644
--- a/BeagleBoardPkg/Tools/replace.c
+++ b/BeagleBoardPkg/Tools/replace.c
@@ -102,7 +102,7 @@ main (int argc, char **argv)
 return -5;
   }
 
-  // Search for a match by reading every possition of the file
+  // Search for a match by reading every position of the file
   // into a buffer that is as big as the maximum search key size.
   // Then we can search the keys for a match. If no match
   // copy the old file character to the new file. If it is a match
@@ -130,8 +130,8 @@ main (int argc

Re: [edk2] [PATCH] BaseTools: Fix build failure when specifying multiple BUILDTARGET

2019-02-06 Thread Laszlo Ersek
On 02/05/19 22:20, Carsey, Jaben wrote:
> Laszlo,
> 
> not sure which Andrew you wanted, but he didn’t get added so far as I can 
> tell.

He did, it's just the mailman2 list software pulling tricks on us again.

The default setting for list subscribers is to eliminate duplicates.
That is, if you are subscribed to the list, and someone send an email to
both the list and you personally, then mailman2 will see that you are
already CC'd on the original, so it will not deliver a 2nd copy to you.
The trick is that mailman2 will also strip your address from the copy
that it delivers to *other* list subscribers. Those other subscribers
won't be able to tell whether the original sender CC'd you or not.

If you manually invert this setting at
 (it's called "enable
duplicates" or something similar), then you will get two copies of the
original email, one directly, and another from the list. (This is
generally the more useful setting, because you can file the reflected
copy in your list folder, and keep the direct email in your inbox.) The
trick is that in this case mailman2 will *not* strip your address from
the copy that it reflects to the other subscribers.

So now you can tell that Mike has duplicates enabled, and Andrew has
them disabled. :)

>> I suggest we push the (upcoming v2) patch tomorrow.
> 
> Agreed.  I can push if desired, once final version is complete.

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


Re: [edk2] [PATCH 00/14] ArmVirtPkg: clean up set-but-unused PCDs

2019-02-06 Thread Laszlo Ersek
On 02/06/19 16:46, Ard Biesheuvel wrote:
> On Wed, 6 Feb 2019 at 12:11, Laszlo Ersek  wrote:
>>
>> Repo:   https://github.com/lersek/edk2.git
>> Branch: armvirt_pcd_clean
>>
>> (1) The procedure described below depends on:
>>
>> [edk2] [PATCH]
>> BaseTools/BuildReport: fix report for platforms/arches without struct 
>> PCDs
>>
>> 20190205112213.682-1-lersek@redhat.com">http://mid.mail-archive.com/20190205112213.682-1-lersek@redhat.com
>> https://lists.01.org/pipermail/edk2-devel/2019-February/036320.html
>>
>> (2) Background: while working on the fix in (1), I noticed that the PCD
>> sections in the build reports of various ArmVirt platforms contained
>> "PCDs not used by modules or in conditional directives". I thought
>> that we should attempt to clean those up. Subsequently I built the
>> following 36 ArmVirt platforms:
>>
>>> extra_opts=("" "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D 
>>> SECURE_BOOT_ENABLE -D TTY_TERMINAL")
>>> for arch in ARM AARCH64; do
>>>   for platform in Qemu QemuKernel Xen; do
>>> for target in NOOPT DEBUG RELEASE; do
>>>   for extra in 0 1; do
>>> GCC5_ARM_PREFIX=arm-linux-gnu- \
>>> GCC5_AARCH64_PREFIX=aarch64-linux-gnu- \
>>> build \
>>>   -a $arch \
>>>   -p ArmVirtPkg/ArmVirt${platform}.dsc \
>>>   -t GCC5 \
>>>   -b $target \
>>>   -n $(getconf _NPROCESSORS_ONLN) \
>>>   --report-file=$HOME/tmp/report.$arch.$platform.$target.$extra.txt 
>>> \
>>>   --report-type=PCD \
>>>   --cmd-len=65536 \
>>>   ${extra_opts[$extra]}
>>>   done
>>> done
>>>   done
>>> done
>>
>> Then I gradually eliminated the redundant PCD settings.
>>
>> (3) At the bottom of this email (i.e., the series cover letter), I'm
>> including a base64-encoded tarball of report files, saved (like
>> described in (2)) before and after the series. Diffing the reports
>> proves that the series cleans up the PCD settings without any
>> changes observable to modules.
>>
>> (4) The series advances in small steps. The reason is that some of the
>> facts exposed could be surprising (I know I was surprised), and we
>> could decide that we want to do something else (e.g. file a BZ, and
>> fill the gap later). For such cases I wanted to be able to drop
>> individual patches at will.
>>
>> Cc: Ard Biesheuvel 
>> Cc: Julien Grall 
>>
>> Thanks,
>> Laszlo
>>
>> Laszlo Ersek (14):
>>   ArmVirtPkg/ArmVirtQemuKernel: don't set PcdCPUCoresStackBase
>>   ArmVirtPkg: don't set PcdRelocateVectorTable
>>   ArmVirtPkg/{ArmVirtQemu,ArmVirtQemuKernel}: don't set
>> PcdTrustzoneSupport
>>   ArmVirtPkg: don't set PcdPostCodePropertyMask
>>   ArmVirtPkg: clean up PcdSetNxForStack setting (applies to ArmVirtQemu
>> only)
>>   ArmVirtPkg/PrePi: drop wrong PcdCoreCount dependency
>>   ArmVirtPkg: don't set PcdCoreCount
>>   ArmVirtPkg: don't set PcdDebugClearMemoryValue
>>   ArmVirtPkg: don't set PcdDebugPrintErrorLevel in RELEASE builds
>>   ArmVirtPkg/ArmVirtXen: don't set PcdPL031RtcBase
>>   ArmVirtPkg/ArmVirtXen: don't set PcdTerminalTypeGuidBuffer
>>   ArmVirtPkg/ArmVirtXen: don't set PcdShellFile
>>   ArmVirtPkg/ArmVirtXen: don't set PcdTurnOffUsbLegacySupport
>>   ArmVirtPkg/ArmVirtXen: don't set Pcd*ImageVerificationPolicy
>>
> 
> For the series
> 
> Reviewed-by: Ard Biesheuvel 
> 
> Thanks Laszlo
> 

Awesome, thank you! :)

Julien, can you please fetch the series and run some light
regression-tests on Xen? Again, no functionality change is intended or
expected.

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


[edk2] [PATCH v2] ArmVirtPkg: Fix various typos

2019-02-06 Thread Antoine Coeur
Fix various typos in ArmVirtPkg.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Coeur 
---
 ArmVirtPkg/ArmVirt.dsc.inc  | 2 +-
 ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c| 2 +-
 ArmVirtPkg/Library/BaseCachingPciExpressLib/PciExpressLib.c | 4 ++--
 .../FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c  | 6 +++---
 .../Library/FdtPL011SerialPortLib/FdtPL011SerialPortLib.c   | 6 +++---
 ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c  | 4 ++--
 6 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
index c47955be94..304a4b4d21 100644
--- a/ArmVirtPkg/ArmVirt.dsc.inc
+++ b/ArmVirtPkg/ArmVirt.dsc.inc
@@ -333,7 +333,7 @@
   # Values are in EFI Pages (4K). DXE Core will make sure that
   # at least this much of each type of memory can be allocated
   # from a single memory range. This way you only end up with
-  # maximum of two fragements for each type in the memory map
+  # maximum of two fragments for each type in the memory map
   # (the memory used, and the free memory that was prereserved
   # but not used).
   #
diff --git a/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c 
b/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c
index 73a0fbd8a4..758bc91ab1 100644
--- a/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c
+++ b/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c
@@ -1,5 +1,5 @@
 /** @file
-  HOB Library implemenation for Dxe Phase with DebugLib dependency removed
+  HOB Library implementation for Dxe Phase with DebugLib dependency removed
 
 Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
 Copyright (c) 2014, Linaro Ltd. All rights reserved.
diff --git a/ArmVirtPkg/Library/BaseCachingPciExpressLib/PciExpressLib.c 
b/ArmVirtPkg/Library/BaseCachingPciExpressLib/PciExpressLib.c
index 6479f53b37..a083826bab 100644
--- a/ArmVirtPkg/Library/BaseCachingPciExpressLib/PciExpressLib.c
+++ b/ArmVirtPkg/Library/BaseCachingPciExpressLib/PciExpressLib.c
@@ -1238,7 +1238,7 @@ PciExpressBitFieldAndThenOr32 (
   Size into the buffer specified by Buffer. This function only allows the PCI
   configuration registers from a single PCI function to be read. Size is
   returned. When possible 32-bit PCI configuration read cycles are used to read
-  from StartAdress to StartAddress + Size. Due to alignment restrictions, 8-bit
+  from StartAddress to StartAddress + Size. Due to alignment restrictions, 
8-bit
   and 16-bit PCI configuration read cycles may be used at the beginning and the
   end of the range.
 
@@ -1338,7 +1338,7 @@ PciExpressReadBuffer (
   Size from the buffer specified by Buffer. This function only allows the PCI
   configuration registers from a single PCI function to be written. Size is
   returned. When possible 32-bit PCI configuration write cycles are used to
-  write from StartAdress to StartAddress + Size. Due to alignment restrictions,
+  write from StartAddress to StartAddress + Size. Due to alignment 
restrictions,
   8-bit and 16-bit PCI configuration write cycles may be used at the beginning
   and the end of the range.
 
diff --git 
a/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c 
b/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c
index f0924dacbc..16c0e61816 100644
--- a/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c
+++ b/ArmVirtPkg/Library/FdtPL011SerialPortLib/EarlyFdtPL011SerialPortLib.c
@@ -234,13 +234,13 @@ SerialPortGetControl (
 }
 
 /**
-  Sets the baud rate, receive FIFO depth, transmit/receice time out, parity,
+  Sets the baud rate, receive FIFO depth, transmit/receive time out, parity,
   data bits, and stop bits on a serial device.
 
   @param BaudRate   The requested baud rate. A BaudRate value of 0 
will use the
 device's default interface speed.
 On output, the value actually set.
-  @param ReveiveFifoDepth   The requested depth of the FIFO on the receive 
side of the
+  @param ReceiveFifoDepth   The requested depth of the FIFO on the receive 
side of the
 serial interface. A ReceiveFifoDepth value of 0 
will use
 the device's default FIFO depth.
 On output, the value actually set.
@@ -253,7 +253,7 @@ SerialPortGetControl (
 DefaultParity will use the device's default parity 
value.
 On output, the value actually set.
   @param DataBits   The number of data bits to use on the serial 
device. A DataBits
-vaule of 0 will use the device's default data bit 
setting.
+value of 0 will use the device's default data bit 
setting.
 On output, the value actually set.
   @param StopBits   The number of stop bits to use on this serial 
device. A StopBits
 

[edk2] [PATCH v2] ArmPlatformPkg: Fix various typos

2019-02-06 Thread Antoine Coeur
Fix various typos in ArmPlatformPkg.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Coeur 
---
 ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c   | 4 ++--
 ArmPlatformPkg/Include/Library/ArmPlatformLib.h| 2 +-
 ArmPlatformPkg/Include/Library/PL011UartLib.h  | 2 +-
 ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c | 2 +-
 ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c  | 2 +-
 ArmPlatformPkg/PlatformPei/PlatformPeim.c  | 2 +-
 ArmPlatformPkg/PrePeiCore/PrePeiCore.c | 2 +-
 ArmPlatformPkg/PrePi/PrePi.c   | 2 +-
 8 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c 
b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c
index af40a4c884..73d389c811 100644
--- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c
+++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c
@@ -1115,7 +1115,7 @@ NorFlashWriteSingleBlock (
   @retval EFI_SUCCESS   The data was read correctly from the device.
   @retval EFI_DEVICE_ERROR  The device reported an error while performing 
the read.
   @retval EFI_NO_MEDIA  There is no media in the device.
-  @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current 
device.
+  @retval EFI_MEDIA_CHANGED The MediaId does not match the current device.
   @retval EFI_INVALID_PARAMETER The read request contains device addresses 
that are not
 valid for the device.
 
@@ -1160,7 +1160,7 @@ NorFlashDiskIoReadDisk (
   @retval EFI_WRITE_PROTECTED   The device can not be written to.
   @retval EFI_DEVICE_ERROR  The device reported an error while performing 
the write.
   @retval EFI_NO_MEDIA  There is no media in the device.
-  @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current 
device.
+  @retval EFI_MEDIA_CHANGED The MediaId does not match the current device.
   @retval EFI_INVALID_PARAMETER The write request contains device addresses 
that are not
  valid for the device.
 
diff --git a/ArmPlatformPkg/Include/Library/ArmPlatformLib.h 
b/ArmPlatformPkg/Include/Library/ArmPlatformLib.h
index 3ad4c16066..fd264b31f7 100644
--- a/ArmPlatformPkg/Include/Library/ArmPlatformLib.h
+++ b/ArmPlatformPkg/Include/Library/ArmPlatformLib.h
@@ -20,7 +20,7 @@
 //
 #include 
 //
-// The protocols, PPI and GUID defintions for this module
+// The protocols, PPI and GUID definitions for this module
 //
 #include 
 #include 
diff --git a/ArmPlatformPkg/Include/Library/PL011UartLib.h 
b/ArmPlatformPkg/Include/Library/PL011UartLib.h
index 8cfc3d118a..495def8d7d 100644
--- a/ArmPlatformPkg/Include/Library/PL011UartLib.h
+++ b/ArmPlatformPkg/Include/Library/PL011UartLib.h
@@ -118,7 +118,7 @@ PL011UartSetControl (
  . EFI_SERIAL_OUTPUT_BUFFER_EMPTY : equal to one if the
transmit buffer is empty, 0 otherwise.
  . EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE : equal to one 
if
-   the hardware loopback is enabled (the ouput feeds 
the
+   the hardware loopback is enabled (the output feeds 
the
receive buffer), 0 otherwise.
  . EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE : equal to one 
if
a loopback is accomplished by software, 0 otherwise.
diff --git a/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c 
b/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c
index 61a34fda0b..60c06a63a4 100644
--- a/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c
+++ b/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c
@@ -327,7 +327,7 @@ PL011UartSetControl (
  . EFI_SERIAL_OUTPUT_BUFFER_EMPTY : equal to one if the
transmit buffer is empty, 0 otherwise.
  . EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE : equal to one 
if
-   the hardware loopback is enabled (the ouput feeds 
the
+   the hardware loopback is enabled (the output feeds 
the
receive buffer), 0 otherwise.
  . EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE : equal to one 
if
a loopback is accomplished by software, 0 otherwise.
diff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c 
b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c
index 010f93add7..6f2a357b96 100644
--- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c
+++ b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c
@@ -15,7 +15,7 @@
 #include 
 
 //
-// The protocols, PPI and GUID defintions for this module
+// The protocols, PPI and GUID definitions for this module
 //
 #include 
 #include 
diff --git a/ArmPlatformPkg/PlatformPei/PlatformPeim.c 
b/ArmPlatformPkg/PlatformPei/PlatformPeim.c
index 14f301e947..4d9f3c2d54 100644
--- a/ArmPlatformPkg/PlatformPei/PlatformPeim.c
+++ b/ArmPlatformPkg/Platfor

Re: [edk2] [PATCH 00/14] ArmVirtPkg: clean up set-but-unused PCDs

2019-02-06 Thread Ard Biesheuvel
On Wed, 6 Feb 2019 at 12:11, Laszlo Ersek  wrote:
>
> Repo:   https://github.com/lersek/edk2.git
> Branch: armvirt_pcd_clean
>
> (1) The procedure described below depends on:
>
> [edk2] [PATCH]
> BaseTools/BuildReport: fix report for platforms/arches without struct PCDs
>
> 20190205112213.682-1-lersek@redhat.com">http://mid.mail-archive.com/20190205112213.682-1-lersek@redhat.com
> https://lists.01.org/pipermail/edk2-devel/2019-February/036320.html
>
> (2) Background: while working on the fix in (1), I noticed that the PCD
> sections in the build reports of various ArmVirt platforms contained
> "PCDs not used by modules or in conditional directives". I thought
> that we should attempt to clean those up. Subsequently I built the
> following 36 ArmVirt platforms:
>
> > extra_opts=("" "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D 
> > SECURE_BOOT_ENABLE -D TTY_TERMINAL")
> > for arch in ARM AARCH64; do
> >   for platform in Qemu QemuKernel Xen; do
> > for target in NOOPT DEBUG RELEASE; do
> >   for extra in 0 1; do
> > GCC5_ARM_PREFIX=arm-linux-gnu- \
> > GCC5_AARCH64_PREFIX=aarch64-linux-gnu- \
> > build \
> >   -a $arch \
> >   -p ArmVirtPkg/ArmVirt${platform}.dsc \
> >   -t GCC5 \
> >   -b $target \
> >   -n $(getconf _NPROCESSORS_ONLN) \
> >   --report-file=$HOME/tmp/report.$arch.$platform.$target.$extra.txt 
> > \
> >   --report-type=PCD \
> >   --cmd-len=65536 \
> >   ${extra_opts[$extra]}
> >   done
> > done
> >   done
> > done
>
> Then I gradually eliminated the redundant PCD settings.
>
> (3) At the bottom of this email (i.e., the series cover letter), I'm
> including a base64-encoded tarball of report files, saved (like
> described in (2)) before and after the series. Diffing the reports
> proves that the series cleans up the PCD settings without any
> changes observable to modules.
>
> (4) The series advances in small steps. The reason is that some of the
> facts exposed could be surprising (I know I was surprised), and we
> could decide that we want to do something else (e.g. file a BZ, and
> fill the gap later). For such cases I wanted to be able to drop
> individual patches at will.
>
> Cc: Ard Biesheuvel 
> Cc: Julien Grall 
>
> Thanks,
> Laszlo
>
> Laszlo Ersek (14):
>   ArmVirtPkg/ArmVirtQemuKernel: don't set PcdCPUCoresStackBase
>   ArmVirtPkg: don't set PcdRelocateVectorTable
>   ArmVirtPkg/{ArmVirtQemu,ArmVirtQemuKernel}: don't set
> PcdTrustzoneSupport
>   ArmVirtPkg: don't set PcdPostCodePropertyMask
>   ArmVirtPkg: clean up PcdSetNxForStack setting (applies to ArmVirtQemu
> only)
>   ArmVirtPkg/PrePi: drop wrong PcdCoreCount dependency
>   ArmVirtPkg: don't set PcdCoreCount
>   ArmVirtPkg: don't set PcdDebugClearMemoryValue
>   ArmVirtPkg: don't set PcdDebugPrintErrorLevel in RELEASE builds
>   ArmVirtPkg/ArmVirtXen: don't set PcdPL031RtcBase
>   ArmVirtPkg/ArmVirtXen: don't set PcdTerminalTypeGuidBuffer
>   ArmVirtPkg/ArmVirtXen: don't set PcdShellFile
>   ArmVirtPkg/ArmVirtXen: don't set PcdTurnOffUsbLegacySupport
>   ArmVirtPkg/ArmVirtXen: don't set Pcd*ImageVerificationPolicy
>

For the series

Reviewed-by: Ard Biesheuvel 

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


[edk2] [PATCH v2] ArmPkg: Fix various typos

2019-02-06 Thread Antoine Coeur
Fix various typos in ArmPkg.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Coeur 
---
 .../Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.c |  2 +-
 ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c   |  2 +-
 ArmPkg/Drivers/CpuDxe/Arm/Mmu.c   |  2 +-
 ArmPkg/Drivers/CpuDxe/CpuMmuCommon.c  |  2 +-
 ArmPkg/Drivers/CpuDxe/CpuMpCore.c |  4 +--
 ArmPkg/Drivers/CpuDxe/Exception.c |  2 +-
 ArmPkg/Drivers/CpuPei/CpuPei.c|  2 +-
 ArmPkg/Drivers/TimerDxe/TimerDxe.c|  2 +-
 ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c |  2 +-
 ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.h |  2 +-
 ArmPkg/Include/Library/ArmDisassemblerLib.h   |  4 +--
 .../Library/ArmArchTimerLib/ArmArchTimerLib.c |  2 +-
 .../ArmDisassemblerLib/Aarch64Disassembler.c  |  2 +-
 .../ArmDisassemblerLib/ArmDisassembler.c  |  4 +--
 .../ArmDisassemblerLib/ThumbDisassembler.c| 14 
 .../ArmExceptionLib/Arm/ExceptionSupport.S|  2 +-
 .../ArmExceptionLib/Arm/ExceptionSupport.asm  |  2 +-
 .../Library/ArmExceptionLib/ArmExceptionLib.c |  4 +--
 .../Library/ArmLib/AArch64/AArch64Support.S   |  6 ++--
 .../Library/ArmLib/AArch64/ArmLibSupportV8.S  |  2 +-
 .../Library/ArmMmuLib/AArch64/ArmMmuLibCore.c |  2 +-
 ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibCore.c  |  2 +-
 .../DebugPeCoffExtraActionLib.inf |  2 +-
 .../AArch64/DefaultExceptionHandler.c |  2 +-
 .../Arm/DefaultExceptionHandler.c |  2 +-
 .../PlatformBootManagerLib/PlatformBm.c   |  4 +--
 .../RvdPeCoffExtraActionLib.c |  2 +-
 .../RvdPeCoffExtraActionLib.inf   |  2 +-
 ArmPkg/Library/SemiHostingDebugLib/DebugLib.c | 32 +--
 .../SemiHostingSerialPortLib.inf  |  2 +-
 .../SemiHostingSerialPortLib/SerialPortLib.c  |  8 ++---
 31 files changed, 62 insertions(+), 62 deletions(-)

diff --git a/ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.c 
b/ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.c
index fecf6a87ad..9eb6691aac 100644
--- a/ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.c
+++ b/ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.c
@@ -152,7 +152,7 @@ CpuIoCheckParameter (
   //
   // Since MAX_ADDRESS can be the maximum integer value supported by the CPU 
and Count
   // can also be the maximum integer value supported by the CPU, this range
-  // check must be adjusted to avoid all oveflow conditions.
+  // check must be adjusted to avoid all overflow conditions.
   //
   // The following form of the range check is equivalent but assumes that
   // MAX_ADDRESS and MAX_IO_PORT_ADDRESS are of the form (2^n - 1).
diff --git a/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c 
b/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
index 3e216c7cb2..f4db4e13e5 100644
--- a/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
+++ b/ArmPkg/Drivers/CpuDxe/AArch64/Mmu.c
@@ -287,7 +287,7 @@ GetMemoryRegionRec (
 BlockEntry++;
   } else if (EntryType == BlockEntryType) {
 // We have found the BlockEntry attached to the address. We save its start 
address (the start
-// address might be before the 'BaseAdress') and attributes
+// address might be before the 'BaseAddress') and attributes
 *BaseAddress  = *BaseAddress & ~(TT_ADDRESS_AT_LEVEL(TableLevel) - 1);
 *RegionLength = 0;
 *RegionAttributes = *BlockEntry & TT_ATTRIBUTES_MASK;
diff --git a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
index 3b29d33d0a..ef49d5a595 100644
--- a/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
+++ b/ArmPkg/Drivers/CpuDxe/Arm/Mmu.c
@@ -240,7 +240,7 @@ SyncCacheConfig (
   EFI_GCD_MEMORY_SPACE_DESCRIPTOR *MemorySpaceMap;
 
 
-  DEBUG ((EFI_D_PAGE, "SyncCacheConfig()\n"));
+  DEBUG ((DEBUG_PAGE, "SyncCacheConfig()\n"));
 
   // This code assumes MMU is enabled and filed with section translations
   ASSERT (ArmMmuEnabled ());
diff --git a/ArmPkg/Drivers/CpuDxe/CpuMmuCommon.c 
b/ArmPkg/Drivers/CpuDxe/CpuMmuCommon.c
index 8150486217..ddce2d57a0 100644
--- a/ArmPkg/Drivers/CpuDxe/CpuMmuCommon.c
+++ b/ArmPkg/Drivers/CpuDxe/CpuMmuCommon.c
@@ -194,7 +194,7 @@ CpuSetMemoryAttributes (
 
   if ((BaseAddress & (SIZE_4KB - 1)) != 0) {
 // Minimum granularity is SIZE_4KB (4KB on ARM)
-DEBUG ((EFI_D_PAGE, "CpuSetMemoryAttributes(%lx, %lx, %lx): Minimum 
ganularity is SIZE_4KB\n", BaseAddress, Length, EfiAttributes));
+DEBUG ((DEBUG_PAGE, "CpuSetMemoryAttributes(%lx, %lx, %lx): Minimum 
granularity is SIZE_4KB\n", BaseAddress, Length, EfiAttributes));
 return EFI_UNSUPPORTED;
   }
 
diff --git a/ArmPkg/Drivers/CpuDxe/CpuMpCore.c 
b/ArmPkg/Drivers/CpuDxe/CpuMpCore.c
index 81d858ea25..240e2ee881 100644
--- a/ArmPkg/Drivers/CpuDxe/CpuMpCore.c
+++ b/ArmPkg/Drivers/CpuDxe/CpuMpCore.c
@@ -67,7 +67,7 @@ PublishArmProcessorTable (
 // Allocate Runtime memory for ARM processor table
 ArmProcessorTable = 
(ARM_PROCESSOR_TABLE*)AllocateRuntimePool(sizeof(ARM_PROCESSOR_TABLE));
 
-// Check if the memory allocation is succesful or no

[edk2] [PATCH v2] AppPkg: Fix various typos

2019-02-06 Thread Antoine Coeur
Fix various typos in AppPkg.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Coeur 
---
 AppPkg/Applications/Enquire/Enquire.c |  2 +-
 AppPkg/Applications/Sockets/DataSource/DataSource.c   |  4 ++--
 AppPkg/Applications/Sockets/SetHostName/SetHostName.c |  2 +-
 AppPkg/Applications/Sockets/TftpServer/TftpServer.c   | 10 +-
 AppPkg/Applications/Sockets/TftpServer/TftpServer.h   |  6 +++---
 AppPkg/Applications/Sockets/WebServer/HTTP.c  |  2 +-
 AppPkg/Applications/Sockets/WebServer/PageList.c  |  2 +-
 AppPkg/Applications/Sockets/WebServer/Reboot.c|  2 +-
 AppPkg/ReadMe.txt |  2 +-
 9 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/AppPkg/Applications/Enquire/Enquire.c 
b/AppPkg/Applications/Enquire/Enquire.c
index 1e1db69a57..fdf4fe05e5 100644
--- a/AppPkg/Applications/Enquire/Enquire.c
+++ b/AppPkg/Applications/Enquire/Enquire.c
@@ -619,7 +619,7 @@ tell.c, uncomment the following and change enquire.c to 
tell.c.
 //#include  /* if this fails, define NO_SIG */
 //#endif
 
-/* Kludge around the possiblity that  includes  */
+/* Kludge around the possibility that  includes  */
 #ifdef CHAR_BIT
 #undef CHAR_BIT
 #undef CHAR_MAX
diff --git a/AppPkg/Applications/Sockets/DataSource/DataSource.c 
b/AppPkg/Applications/Sockets/DataSource/DataSource.c
index 0dcd882edf..678a052a12 100644
--- a/AppPkg/Applications/Sockets/DataSource/DataSource.c
+++ b/AppPkg/Applications/Sockets/DataSource/DataSource.c
@@ -873,7 +873,7 @@ Tcp4Close (
   Locate TCP protocol
 
   @retval EFI_SUCCESS   Protocol found
-  @retval other Protocl not found
+  @retval other Protocol not found
 **/
 EFI_STATUS
 Tcp4Locate (
@@ -970,7 +970,7 @@ Tcp4Locate (
   Tcp4Handle ));
 
 //
-//  Locate the TCP protcol
+//  Locate the TCP protocol
 //
 Status = gBS->OpenProtocol ( Tcp4Handle,
  &gEfiTcp4ProtocolGuid,
diff --git a/AppPkg/Applications/Sockets/SetHostName/SetHostName.c 
b/AppPkg/Applications/Sockets/SetHostName/SetHostName.c
index 2c8001e205..15785e3fee 100644
--- a/AppPkg/Applications/Sockets/SetHostName/SetHostName.c
+++ b/AppPkg/Applications/Sockets/SetHostName/SetHostName.c
@@ -62,7 +62,7 @@ main (
 break;
 
   case ENODEV:
-Print ( L"WARNING - Plarform does not support permanent storage!\r\n" 
);
+Print ( L"WARNING - Platform does not support permanent storage!\r\n" 
);
 break;
 
   case ENOMEM:
diff --git a/AppPkg/Applications/Sockets/TftpServer/TftpServer.c 
b/AppPkg/Applications/Sockets/TftpServer/TftpServer.c
index 30d9dae41d..40f986ff92 100644
--- a/AppPkg/Applications/Sockets/TftpServer/TftpServer.c
+++ b/AppPkg/Applications/Sockets/TftpServer/TftpServer.c
@@ -76,7 +76,7 @@ BufferFill (
 pContext->BytesRemaining -= BytesRead;
 pContext->ValidBytes += BytesRead;
 DEBUG (( DEBUG_FILE_BUFFER,
-  "0x%08x: Buffer filled with %Ld bytes, %Ld bytes ramaining\r\n",
+  "0x%08x: Buffer filled with %Ld bytes, %Ld bytes remaining\r\n",
   pContext->pFill,
   BytesRead,
   pContext->BytesRemaining ));
@@ -659,7 +659,7 @@ PacketTx (
 //  Display the operation
 //
 DEBUG (( DEBUG_TX_PACKET,
-  "0x%08x: Packet transmiting\r\n",
+  "0x%08x: Packet transmitting\r\n",
   pPacket ));
 DEBUG (( DEBUG_TX,
   "0x%08x: pContext sending 0x%08x bytes\r\n",
@@ -1224,7 +1224,7 @@ TftpOptionSet (
   NextValue = Value / 10;
 
   //
-  //  Supress leading zeros
+  //  Suppress leading zeros
   //
   if ( 0 != NextValue ) {
 pOack = TftpOptionSet ( pOack, NextValue );
@@ -1884,7 +1884,7 @@ TftpRead (
   the network stack.
 
   @param [in] pTftpServer   Address of the ::TSDT_TFTP_SERVER structure
-  @param [in] AddressFamily The address family to use for the conection.
+  @param [in] AddressFamily The address family to use for the connection.
   @param [in] pIndexAddress of the index into the port array
 
 **/
@@ -2297,7 +2297,7 @@ main (
 TFTP_PACKET * pPacket;
 
 //
-//  High speed TFTP uses an agressive retransmit to
+//  High speed TFTP uses an aggressive retransmit to
 //  get the TFTP client moving again when the ACK or
 //  previous data packet was lost.
 //
diff --git a/AppPkg/Applications/Sockets/TftpServer/TftpServer.h 
b/AppPkg/Applications/Sockets/TftpServer/TftpServer.h
index 2166893570..9e944e2b81 100644
--- a/AppPkg/Applications/Sockets/TftpServer/TftpServer.h
+++ b/AppPkg/Applications/Sockets/TftpServer/TftpServer.h
@@ -131,7 +131,7 @@
 #define TFTP_OP_WRITE_REQUEST 2 ///<  Write request, zero terminated 
file name, zero terminated mode
 #define TFTP_OP_DATA  3 ///<  Data block, end-of-file 
indicated by short block
 #define TFTP_OP_ACK   4 ///< 

[edk2] [PATCH 10/14] ArmVirtPkg/ArmVirtXen: don't set PcdPL031RtcBase

2019-02-06 Thread Laszlo Ersek
According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x {Xen} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1}

(12 builds in total), the PCD is not used in any of those builds. Remove
the setting.

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---
 ArmVirtPkg/ArmVirtXen.dsc | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/ArmVirtPkg/ArmVirtXen.dsc b/ArmVirtPkg/ArmVirtXen.dsc
index a262b9ca37ee..04850eb7a9dd 100644
--- a/ArmVirtPkg/ArmVirtXen.dsc
+++ b/ArmVirtPkg/ArmVirtXen.dsc
@@ -129,9 +129,6 @@ [PcdsDynamicDefault.common]
   gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x0
   gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0x0
 
-  ## PL031 RealTimeClock
-  gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0
-
   gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|3
 
 

-- 
2.19.1.3.g30247aa5d201


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


[edk2] [PATCH 14/14] ArmVirtPkg/ArmVirtXen: don't set Pcd*ImageVerificationPolicy

2019-02-06 Thread Laszlo Ersek
According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x {Xen} x {DEBUG,NOOPT,RELEASE} x {feat-1}

(6 builds in total), PcdOptionRomImageVerificationPolicy,
PcdFixedMediaImageVerificationPolicy, and
PcdRemovableMediaImageVerificationPolicy are not used in any of those
builds.

Restrict the settings to the ArmVirtQemu and ArmVirtQemuKernel platforms
(preserving the -D SECURE_BOOT_ENABLE restriction in the process).

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---
 ArmVirtPkg/ArmVirt.dsc.inc   | 7 ---
 ArmVirtPkg/ArmVirtQemu.dsc   | 7 +++
 ArmVirtPkg/ArmVirtQemuKernel.dsc | 7 +++
 3 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
index f7c51e3c160f..5d541d35e0c0 100644
--- a/ArmVirtPkg/ArmVirt.dsc.inc
+++ b/ArmVirtPkg/ArmVirt.dsc.inc
@@ -347,13 +347,6 @@ [PcdsFixedAtBuild.common]
   gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderCode|20
   gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderData|0
 
-!if $(SECURE_BOOT_ENABLE) == TRUE
-  # override the default values from SecurityPkg to ensure images from all 
sources are verified in secure boot
-  gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x04
-  gEfiSecurityPkgTokenSpaceGuid.PcdFixedMediaImageVerificationPolicy|0x04
-  gEfiSecurityPkgTokenSpaceGuid.PcdRemovableMediaImageVerificationPolicy|0x04
-!endif
-
   #
   # Enable strict image permissions for all images. (This applies
   # only to images that were built with >= 4 KB section alignment.)
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index 83c8af0258b2..8cc31fda7a37 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -148,6 +148,13 @@ [PcdsFixedAtBuild.common]
   #
   gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TRUE
 
+!if $(SECURE_BOOT_ENABLE) == TRUE
+  # override the default values from SecurityPkg to ensure images from all 
sources are verified in secure boot
+  gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x04
+  gEfiSecurityPkgTokenSpaceGuid.PcdFixedMediaImageVerificationPolicy|0x04
+  gEfiSecurityPkgTokenSpaceGuid.PcdRemovableMediaImageVerificationPolicy|0x04
+!endif
+
 [PcdsFixedAtBuild.AARCH64]
   # Clearing BIT0 in this PCD prevents installing a 32-bit SMBIOS entry point,
   # if the entry point version is >= 3.0. AARCH64 OSes cannot assume the
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index 46d8bac3ef4d..c3e0c9bf2549 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -142,6 +142,13 @@ [PcdsFixedAtBuild.common]
   #
   gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16
 
+!if $(SECURE_BOOT_ENABLE) == TRUE
+  # override the default values from SecurityPkg to ensure images from all 
sources are verified in secure boot
+  gEfiSecurityPkgTokenSpaceGuid.PcdOptionRomImageVerificationPolicy|0x04
+  gEfiSecurityPkgTokenSpaceGuid.PcdFixedMediaImageVerificationPolicy|0x04
+  gEfiSecurityPkgTokenSpaceGuid.PcdRemovableMediaImageVerificationPolicy|0x04
+!endif
+
 [PcdsPatchableInModule.common]
   #
   # This will be overridden in the code
-- 
2.19.1.3.g30247aa5d201

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


[edk2] [PATCH 09/14] ArmVirtPkg: don't set PcdDebugPrintErrorLevel in RELEASE builds

2019-02-06 Thread Laszlo Ersek
According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x {Qemu,QemuKernel,Xen} x {RELEASE} x {feat-0,feat-1}

(12 builds in total), the PCD is not used in any of those builds. Restrict
the PCD setting to ($(TARGET) != RELEASE).

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---
 ArmVirtPkg/ArmVirt.dsc.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
index 0e4bcf728a4f..f4a1c0512678 100644
--- a/ArmVirtPkg/ArmVirt.dsc.inc
+++ b/ArmVirtPkg/ArmVirt.dsc.inc
@@ -320,7 +320,9 @@ [PcdsFixedAtBuild.common]
   #  DEBUG_VERBOSE   0x0040  // Detailed debug messages that may
   #  // significantly impact boot performance
   #  DEBUG_ERROR 0x8000  // Error
+!if $(TARGET) != RELEASE
   gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|$(DEBUG_PRINT_ERROR_LEVEL)
+!endif
 
   #
   # Optional feature to help prevent EFI memory map fragments
-- 
2.19.1.3.g30247aa5d201


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


[edk2] [PATCH 02/14] ArmVirtPkg: don't set PcdRelocateVectorTable

2019-02-06 Thread Laszlo Ersek
According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x
  {Qemu,QemuKernel,Xen} x
  {DEBUG,NOOPT,RELEASE} x
  {feat-0,feat-1}

(36 builds in total), the PCD is not used in any of those builds. Remove
the setting.

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---
 ArmVirtPkg/ArmVirt.dsc.inc | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
index c47955be940c..778a0aced23e 100644
--- a/ArmVirtPkg/ArmVirt.dsc.inc
+++ b/ArmVirtPkg/ArmVirt.dsc.inc
@@ -271,9 +271,6 @@ [BuildOptions]
 [PcdsFeatureFlag.common]
   gEfiMdeModulePkgTokenSpaceGuid.PcdHiiOsRuntimeSupport|FALSE
 
-  # Use the Vector Table location in CpuDxe. We will not copy the Vector Table 
at PcdCpuVectorBaseAddress
-  gArmTokenSpaceGuid.PcdRelocateVectorTable|FALSE
-
   gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob|TRUE
 
   gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE
-- 
2.19.1.3.g30247aa5d201


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


[edk2] [PATCH 12/14] ArmVirtPkg/ArmVirtXen: don't set PcdShellFile

2019-02-06 Thread Laszlo Ersek
According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x {Xen} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1}

(12 builds in total), the PCD is not used in any of those builds. Remove
the setting.

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---
 ArmVirtPkg/ArmVirtXen.dsc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/ArmVirtPkg/ArmVirtXen.dsc b/ArmVirtPkg/ArmVirtXen.dsc
index cfa7a5f870a4..a3688ae2cbb8 100644
--- a/ArmVirtPkg/ArmVirtXen.dsc
+++ b/ArmVirtPkg/ArmVirtXen.dsc
@@ -90,7 +90,6 @@ [PcdsFixedAtBuild.common]
 
   gEfiMdeModulePkgTokenSpaceGuid.PcdResetOnMemoryTypeInformationChange|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 
0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0x83, 0xA5, 0x04, 
0x7C, 0x3E, 0x9E, 0x1C, 0x4F, 0xAD, 0x65, 0xE0, 0x52, 0x68, 0xD0, 0xB4, 0xD1 }
 
   ## Default Terminal Type
   ## 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM
-- 
2.19.1.3.g30247aa5d201


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


[edk2] [PATCH 11/14] ArmVirtPkg/ArmVirtXen: don't set PcdTerminalTypeGuidBuffer

2019-02-06 Thread Laszlo Ersek
According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x {Xen} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1}

(12 builds in total), the PCD is not used in any of those builds.

Restrict the setting to the ArmVirtQemu and ArmVirtQemuKernel platforms.
Restrict the TTY_TERMINAL define similarly.

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---
 ArmVirtPkg/ArmVirt.dsc.inc   | 6 --
 ArmVirtPkg/ArmVirtQemu.dsc   | 3 +++
 ArmVirtPkg/ArmVirtQemuKernel.dsc | 3 +++
 ArmVirtPkg/ArmVirtXen.dsc| 3 ---
 4 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
index f4a1c0512678..59d66102bfb7 100644
--- a/ArmVirtPkg/ArmVirt.dsc.inc
+++ b/ArmVirtPkg/ArmVirt.dsc.inc
@@ -15,7 +15,6 @@
 
 [Defines]
   DEFINE DEBUG_PRINT_ERROR_LEVEL = 0x804F
-  DEFINE TTY_TERMINAL= FALSE
 
 
[BuildOptions.common.EDKII.DXE_CORE,BuildOptions.common.EDKII.DXE_DRIVER,BuildOptions.common.EDKII.UEFI_DRIVER,BuildOptions.common.EDKII.UEFI_APPLICATION]
   GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
@@ -357,11 +356,6 @@ [PcdsFixedAtBuild.common]
   gEfiSecurityPkgTokenSpaceGuid.PcdRemovableMediaImageVerificationPolicy|0x04
 !endif
 
-!if $(TTY_TERMINAL) == TRUE
-  # Set terminal type to TtyTerm, the value encoded is EFI_TTY_TERM_GUID
-  gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x80, 0x6d, 0x91, 0x7d, 
0xb1, 0x5b, 0x8c, 0x45, 0xa4, 0x8f, 0xe2, 0x5f, 0xdd, 0x51, 0xef, 0x94}
-!endif
-
   #
   # Enable strict image permissions for all images. (This applies
   # only to images that were built with >= 4 KB section alignment.)
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index 170821e5ace6..f4aac11ee4ef 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -33,6 +33,7 @@ [Defines]
   # Defines for default states.  These can be changed on the command line.
   # -D FLAG=VALUE
   #
+  DEFINE TTY_TERMINAL= FALSE
   DEFINE SECURE_BOOT_ENABLE  = FALSE
   DEFINE NETWORK_IP6_ENABLE  = FALSE
   DEFINE HTTP_BOOT_ENABLE= FALSE
@@ -110,6 +111,8 @@ [PcdsFixedAtBuild.common]
   ## 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM
 !if $(TTY_TERMINAL) == TRUE
   gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4
+  # Set terminal type to TtyTerm, the value encoded is EFI_TTY_TERM_GUID
+  gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x80, 0x6d, 0x91, 0x7d, 
0xb1, 0x5b, 0x8c, 0x45, 0xa4, 0x8f, 0xe2, 0x5f, 0xdd, 0x51, 0xef, 0x94}
 !else
   gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|1
 !endif
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index d5328ed6ff20..5fa75b8fd5e3 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -33,6 +33,7 @@ [Defines]
   # Defines for default states.  These can be changed on the command line.
   # -D FLAG=VALUE
   #
+  DEFINE TTY_TERMINAL= FALSE
   DEFINE SECURE_BOOT_ENABLE  = FALSE
   DEFINE NETWORK_IP6_ENABLE  = FALSE
   DEFINE HTTP_BOOT_ENABLE= FALSE
@@ -115,6 +116,8 @@ [PcdsFixedAtBuild.common]
   ## 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM
 !if $(TTY_TERMINAL) == TRUE
   gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4
+  # Set terminal type to TtyTerm, the value encoded is EFI_TTY_TERM_GUID
+  gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x80, 0x6d, 0x91, 0x7d, 
0xb1, 0x5b, 0x8c, 0x45, 0xa4, 0x8f, 0xe2, 0x5f, 0xdd, 0x51, 0xef, 0x94}
 !else
   gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|1
 !endif
diff --git a/ArmVirtPkg/ArmVirtXen.dsc b/ArmVirtPkg/ArmVirtXen.dsc
index 04850eb7a9dd..cfa7a5f870a4 100644
--- a/ArmVirtPkg/ArmVirtXen.dsc
+++ b/ArmVirtPkg/ArmVirtXen.dsc
@@ -96,9 +96,6 @@ [PcdsFixedAtBuild.common]
   ## 0-PCANSI, 1-VT100, 2-VT00+, 3-UTF8, 4-TTYTERM
   gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4
 
-  # Set terminal type to TtyTerm, the value encoded is EFI_TTY_TERM_GUID
-  gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x80, 0x6d, 0x91, 0x7d, 
0xb1, 0x5b, 0x8c, 0x45, 0xa4, 0x8f, 0xe2, 0x5f, 0xdd, 0x51, 0xef, 0x94}
-
   #
   # Make VariableRuntimeDxe work at emulated non-volatile variable mode.
   #
-- 
2.19.1.3.g30247aa5d201


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


[edk2] [PATCH 08/14] ArmVirtPkg: don't set PcdDebugClearMemoryValue

2019-02-06 Thread Laszlo Ersek
According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x {Qemu,QemuKernel,Xen} x {RELEASE} x {feat-0,feat-1}

(12 builds in total), the PCD is not used in any of those builds.

Rather than just restrict the PCD setting to ($(TARGET) != RELEASE),
remove the setting completely. The current value is identical to the 0xAF
default in "MdePkg/MdePkg.dec", which recognizes Andrew Fish, and so it's
unlikely to ever change.

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---
 ArmVirtPkg/ArmVirt.dsc.inc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
index 980cfa839027..0e4bcf728a4f 100644
--- a/ArmVirtPkg/ArmVirt.dsc.inc
+++ b/ArmVirtPkg/ArmVirt.dsc.inc
@@ -286,7 +286,6 @@ [PcdsFixedAtBuild.common]
   gEfiMdePkgTokenSpaceGuid.PcdMaximumAsciiStringLength|100
   gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength|100
   gEfiMdePkgTokenSpaceGuid.PcdSpinLockTimeout|1000
-  gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue|0xAF
   gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|320
 
   # DEBUG_ASSERT_ENABLED   0x01
-- 
2.19.1.3.g30247aa5d201


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


[edk2] [PATCH 13/14] ArmVirtPkg/ArmVirtXen: don't set PcdTurnOffUsbLegacySupport

2019-02-06 Thread Laszlo Ersek
According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x {Xen} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1}

(12 builds in total), the PCD is not used in any of those builds. Restrict
the setting to the ArmVirtQemu and ArmVirtQemuKernel platforms.

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---
 ArmVirtPkg/ArmVirt.dsc.inc   | 2 --
 ArmVirtPkg/ArmVirtQemu.dsc   | 2 ++
 ArmVirtPkg/ArmVirtQemuKernel.dsc | 2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
index 59d66102bfb7..f7c51e3c160f 100644
--- a/ArmVirtPkg/ArmVirt.dsc.inc
+++ b/ArmVirtPkg/ArmVirt.dsc.inc
@@ -272,8 +272,6 @@ [PcdsFeatureFlag.common]
 
   gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob|TRUE
 
-  gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE
-
 [PcdsFeatureFlag.AARCH64]
   #
   # Activate AcpiSdtProtocol
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index f4aac11ee4ef..83c8af0258b2 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -87,6 +87,8 @@ [PcdsFeatureFlag.common]
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
 
+  gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE
+
 [PcdsFixedAtBuild.common]
 !if $(ARCH) == AARCH64
   gArmTokenSpaceGuid.PcdVFPEnabled|1
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index 5fa75b8fd5e3..46d8bac3ef4d 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -93,6 +93,8 @@ [PcdsFeatureFlag.common]
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
 
+  gEfiMdeModulePkgTokenSpaceGuid.PcdTurnOffUsbLegacySupport|TRUE
+
 [PcdsFixedAtBuild.common]
 !if $(ARCH) == AARCH64
   gArmTokenSpaceGuid.PcdVFPEnabled|1
-- 
2.19.1.3.g30247aa5d201


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


[edk2] [PATCH 00/14] ArmVirtPkg: clean up set-but-unused PCDs

2019-02-06 Thread Laszlo Ersek
Repo:   https://github.com/lersek/edk2.git
Branch: armvirt_pcd_clean

(1) The procedure described below depends on:

[edk2] [PATCH]
BaseTools/BuildReport: fix report for platforms/arches without struct PCDs

20190205112213.682-1-lersek@redhat.com">http://mid.mail-archive.com/20190205112213.682-1-lersek@redhat.com
https://lists.01.org/pipermail/edk2-devel/2019-February/036320.html

(2) Background: while working on the fix in (1), I noticed that the PCD
sections in the build reports of various ArmVirt platforms contained
"PCDs not used by modules or in conditional directives". I thought
that we should attempt to clean those up. Subsequently I built the
following 36 ArmVirt platforms:

> extra_opts=("" "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D 
> SECURE_BOOT_ENABLE -D TTY_TERMINAL")
> for arch in ARM AARCH64; do
>   for platform in Qemu QemuKernel Xen; do
> for target in NOOPT DEBUG RELEASE; do
>   for extra in 0 1; do
> GCC5_ARM_PREFIX=arm-linux-gnu- \
> GCC5_AARCH64_PREFIX=aarch64-linux-gnu- \
> build \
>   -a $arch \
>   -p ArmVirtPkg/ArmVirt${platform}.dsc \
>   -t GCC5 \
>   -b $target \
>   -n $(getconf _NPROCESSORS_ONLN) \
>   --report-file=$HOME/tmp/report.$arch.$platform.$target.$extra.txt \
>   --report-type=PCD \
>   --cmd-len=65536 \
>   ${extra_opts[$extra]}
>   done
> done
>   done
> done

Then I gradually eliminated the redundant PCD settings.

(3) At the bottom of this email (i.e., the series cover letter), I'm
including a base64-encoded tarball of report files, saved (like
described in (2)) before and after the series. Diffing the reports
proves that the series cleans up the PCD settings without any
changes observable to modules.

(4) The series advances in small steps. The reason is that some of the
facts exposed could be surprising (I know I was surprised), and we
could decide that we want to do something else (e.g. file a BZ, and
fill the gap later). For such cases I wanted to be able to drop
individual patches at will.

Cc: Ard Biesheuvel 
Cc: Julien Grall 

Thanks,
Laszlo

Laszlo Ersek (14):
  ArmVirtPkg/ArmVirtQemuKernel: don't set PcdCPUCoresStackBase
  ArmVirtPkg: don't set PcdRelocateVectorTable
  ArmVirtPkg/{ArmVirtQemu,ArmVirtQemuKernel}: don't set
PcdTrustzoneSupport
  ArmVirtPkg: don't set PcdPostCodePropertyMask
  ArmVirtPkg: clean up PcdSetNxForStack setting (applies to ArmVirtQemu
only)
  ArmVirtPkg/PrePi: drop wrong PcdCoreCount dependency
  ArmVirtPkg: don't set PcdCoreCount
  ArmVirtPkg: don't set PcdDebugClearMemoryValue
  ArmVirtPkg: don't set PcdDebugPrintErrorLevel in RELEASE builds
  ArmVirtPkg/ArmVirtXen: don't set PcdPL031RtcBase
  ArmVirtPkg/ArmVirtXen: don't set PcdTerminalTypeGuidBuffer
  ArmVirtPkg/ArmVirtXen: don't set PcdShellFile
  ArmVirtPkg/ArmVirtXen: don't set PcdTurnOffUsbLegacySupport
  ArmVirtPkg/ArmVirtXen: don't set Pcd*ImageVerificationPolicy

 ArmVirtPkg/ArmVirt.dsc.inc  | 27 ++--
 ArmVirtPkg/ArmVirtQemu.dsc  | 21 ---
 ArmVirtPkg/ArmVirtQemuKernel.dsc| 17 
 ArmVirtPkg/ArmVirtXen.dsc   |  9 ---
 ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf |  2 --
 5 files changed, 31 insertions(+), 45 deletions(-)

begin-base64 600 reports.tar.xz
/Td6WFoAAATm1rRGAgAhARwQz1jM//8mVqtdADkZSme5QwuCRQPVbyCs
1A1Djwzv5gmJ350azHESRIjFtIVGuLA18xuEj7KIGo5U2Hn7SD7Cfpqv+Zll
/UrDwAWIn3WfB1O3Xg/w8olwOdQwfJM5JGnj4p/POHOnpdnKc+A9m8u/VoMb
yLxiEDJ0oVXDcVb94oH+KjKUhx8OXp5ecAAPCQbzDH6LhP4qUmISJsxYmlq4
NUgmgm0Ar1ke+/Fo85fnM1Pw8egX3Xp7X91XICxV2etftL4nf9red3ypSxpR
FUCSJmgKmx/Y+o8NGDNEDBPs6hKwlHwaTxZPvqfSTIr8J63iYjol1qvVmc5+
76anhhgijaCMwyDTtEq0uyCxOGJQhKXCXCTVlsWgWVTAIZAxE5y9FOISedCI
4CQmctPRiRpnhs+IAhcw2LHVgRdM0ThYYXZfIyUTRRlDnSuFybhQD9OmDRg3
OcfRdVQRKWN2mZxhNjM90QJOsfrgixWQaGgYWxFccWwOJ/zmTYjqlgDazXuv
t2Cjy1Q1tHzXGu5+MoOLYilYO55leyb4EG8aQ5pCb0/RZvVwtcxOeh+wPSKq
1vs9vLeeUyZ4wMSc/Dw3PXBfWrpw8y3ZtWG5IJPceJFo6TVzJKzTqRv5qlHs
vG3IcZ9li6EuSk6/rDoBYa9K0M+674zkvcb7jsMMCM9RFxFxcXz/9OGmEFRp
xbT/btJ1SQZ3er9sbkpLRQgv/JBh+oQVOlqGZnaewY01t6Ue3rOc18zj/bHO
q4KBo5NRKBDgw7KC0ii20+egTnfs05/rIFInSrr6gu2/nTepIA/NbXIU0+vB
rl93lfEQPSfUHg/aEb2ufwyYuNCP7zUlL1BPZSdZy/o9gFrtX3eJTr3i7x/O
xPRfEQPomMbQjtOlOjAbRuCdBNptpwc+MIo+ThtDVvOK4IoYebilrsLyUxiH
jUWUsFsL+P4rrqRxJmpE43z68tVtXkyekMpX3eG0FHEQXDeKnnWjGJd1PLPm
O2Pvo+awxvo5Nw+ZBxZHVjFXDTwymnAq/EldhM8FwoEPycdRA8DLX2a2DMXS
UCC+2ysD74U7lBwkAXsRpugRs0w3+V8epGytURGK8Wm914FFxH1zLJ/DJt0p
CcIaKPJdm9CJNM6dlWt1zcm6UYwFjV7R4rVj4l9a1DufclvpwudJ8ywIO428
Sv+vwMr/pxB5EIqIR3d3EQQh9cXvtKFVgukrQiq9eflEVCHS2iv+n4zfu8ke
SPPzPuaxYpLr6agTFvrDe3R68ddHIvmv0C8jOSimk/Qeq3wh4K7SsWc0M5Mc
m+Vl0vI00JRc4w9XHevUnlng5zwzqn0rWSIx/T9juFsu2MjEkpYjXAq9ZVny
CXoBC2UXWZIkXxUB4WuDRPZIkEoNq1TJOJeozWX2pDkuxJHZ4hfiGfgwLbYH
/GltP1+3MUyrvEt20m1uOM1RoF4s52HQu1vtZFGikWgEny+PL+aSmYAm

[edk2] [PATCH 04/14] ArmVirtPkg: don't set PcdPostCodePropertyMask

2019-02-06 Thread Laszlo Ersek
According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x
  {Qemu,QemuKernel,Xen} x
  {DEBUG,NOOPT,RELEASE} x
  {feat-0,feat-1}

(36 builds in total), the PCD is not used in any of those builds. Remove
the setting.

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---
 ArmVirtPkg/ArmVirt.dsc.inc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
index 778a0aced23e..0735c438d248 100644
--- a/ArmVirtPkg/ArmVirt.dsc.inc
+++ b/ArmVirtPkg/ArmVirt.dsc.inc
@@ -287,7 +287,6 @@ [PcdsFixedAtBuild.common]
   gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength|100
   gEfiMdePkgTokenSpaceGuid.PcdSpinLockTimeout|1000
   gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue|0xAF
-  gEfiMdePkgTokenSpaceGuid.PcdPostCodePropertyMask|0
   gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|320
 
   # DEBUG_ASSERT_ENABLED   0x01
-- 
2.19.1.3.g30247aa5d201


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


[edk2] [PATCH 03/14] ArmVirtPkg/{ArmVirtQemu, ArmVirtQemuKernel}: don't set PcdTrustzoneSupport

2019-02-06 Thread Laszlo Ersek
According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x
  {Qemu,QemuKernel} x
  {DEBUG,NOOPT,RELEASE} x
  {feat-0,feat-1}

(24 builds in total), the PCD is not used in any of those builds. Remove
the setting.

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---
 ArmVirtPkg/ArmVirtQemu.dsc   | 3 ---
 ArmVirtPkg/ArmVirtQemuKernel.dsc | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index aec92c191eca..6083d65a61e5 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -100,9 +100,6 @@ [PcdsFixedAtBuild.common]
   # Size of the region used by UEFI in permanent memory (Reserved 64MB)
   gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x0400
 
-  ## Trustzone enable (to make the transition from EL3 to EL2 in 
ArmPlatformPkg/Sec)
-  gArmTokenSpaceGuid.PcdTrustzoneSupport|FALSE
-
   #
   # ARM PrimeCell
   #
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index aa0f8eb47052..a77b4bd32127 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -105,9 +105,6 @@ [PcdsFixedAtBuild.common]
   # Size of the region used by UEFI in permanent memory (Reserved 64MB)
   gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x0400
 
-  ## Trustzone enable (to make the transition from EL3 to EL2 in 
ArmPlatformPkg/Sec)
-  gArmTokenSpaceGuid.PcdTrustzoneSupport|FALSE
-
   #
   # ARM PrimeCell
   #
-- 
2.19.1.3.g30247aa5d201


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


[edk2] [PATCH 06/14] ArmVirtPkg/PrePi: drop wrong PcdCoreCount dependency

2019-02-06 Thread Laszlo Ersek
The PcdCoreCount dependency in the "ArmVirtPrePiUniCoreRelocatable.inf"
file is false; the module doesn't consume the PCD. Clean up the INF.

Cc: Ard Biesheuvel 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---
 ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf | 2 --
 1 file changed, 2 deletions(-)

diff --git a/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf 
b/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
index 5fe6cd8eb481..26ee13c00ba1 100755
--- a/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
+++ b/ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf
@@ -83,8 +83,6 @@ [FixedPcd]
 
   gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize
 
-  gArmPlatformTokenSpaceGuid.PcdCoreCount
-
   gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize
 
   gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory
-- 
2.19.1.3.g30247aa5d201


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


[edk2] [PATCH 07/14] ArmVirtPkg: don't set PcdCoreCount

2019-02-06 Thread Laszlo Ersek
According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x
  {Qemu,QemuKernel,Xen} x
  {DEBUG,NOOPT,RELEASE} x
  {feat-0,feat-1}

(36 builds in total), the PCD is not used in any of those builds. Remove
the setting.

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---
 ArmVirtPkg/ArmVirtQemu.dsc   | 1 -
 ArmVirtPkg/ArmVirtQemuKernel.dsc | 1 -
 ArmVirtPkg/ArmVirtXen.dsc| 2 --
 3 files changed, 4 deletions(-)

diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index f4b945c79ab3..170821e5ace6 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -87,7 +87,6 @@ [PcdsFeatureFlag.common]
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
 
 [PcdsFixedAtBuild.common]
-  gArmPlatformTokenSpaceGuid.PcdCoreCount|1
 !if $(ARCH) == AARCH64
   gArmTokenSpaceGuid.PcdVFPEnabled|1
 !endif
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index a77b4bd32127..d5328ed6ff20 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -93,7 +93,6 @@ [PcdsFeatureFlag.common]
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
 
 [PcdsFixedAtBuild.common]
-  gArmPlatformTokenSpaceGuid.PcdCoreCount|1
 !if $(ARCH) == AARCH64
   gArmTokenSpaceGuid.PcdVFPEnabled|1
 !endif
diff --git a/ArmVirtPkg/ArmVirtXen.dsc b/ArmVirtPkg/ArmVirtXen.dsc
index e58444e6ae27..a262b9ca37ee 100644
--- a/ArmVirtPkg/ArmVirtXen.dsc
+++ b/ArmVirtPkg/ArmVirtXen.dsc
@@ -74,8 +74,6 @@ [BuildOptions.common.EDKII.SEC, 
BuildOptions.common.EDKII.BASE]
 
 [PcdsFixedAtBuild.common]
   gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"$(FIRMWARE_VER)"
-
-  gArmPlatformTokenSpaceGuid.PcdCoreCount|1
 !if $(ARCH) == AARCH64
   gArmTokenSpaceGuid.PcdVFPEnabled|1
 !endif
-- 
2.19.1.3.g30247aa5d201


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


[edk2] [PATCH 05/14] ArmVirtPkg: clean up PcdSetNxForStack setting (applies to ArmVirtQemu only)

2019-02-06 Thread Laszlo Ersek
According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x
  {QemuKernel,Xen} x
  {DEBUG,NOOPT,RELEASE} x
  {feat-0,feat-1}

(24 builds in total), the PCD is not used in any of those builds.

Move the setting from "ArmVirt.dsc.inc" to "ArmVirtQemu.dsc", to reflect
reality.

We originally moved the PCD setting in the opposite direction in commit
8aab575c26e9 ("ArmVirtPkg: enable non-executable DXE stack for all
platforms", 2017-03-07), generalizing it. However, as the comment itself
states, and according to all 36 ArmVirt build reports:

  {AARCH64,ARM} x
  {Qemu,QemuKernel,Xen} x
  {DEBUG,NOOPT,RELEASE} x
  {feat-0,feat-1}

the PCD is only consumed by "MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf", and
that module is only included in the ArmVirtQemu platform.

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---
 ArmVirtPkg/ArmVirt.dsc.inc | 5 -
 ArmVirtPkg/ArmVirtQemu.dsc | 5 +
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
index 0735c438d248..980cfa839027 100644
--- a/ArmVirtPkg/ArmVirt.dsc.inc
+++ b/ArmVirtPkg/ArmVirt.dsc.inc
@@ -374,11 +374,6 @@ [PcdsFixedAtBuild.common]
   #
   
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xC0007FD1
 
-  #
-  # Enable the non-executable DXE stack. (This gets set up by DxeIpl)
-  #
-  gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TRUE
-
 [Components.common]
   #
   # Ramdisk support
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index 6083d65a61e5..f4b945c79ab3 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -139,6 +139,11 @@ [PcdsFixedAtBuild.common]
   #
   gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16
 
+  #
+  # Enable the non-executable DXE stack. (This gets set up by DxeIpl)
+  #
+  gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack|TRUE
+
 [PcdsFixedAtBuild.AARCH64]
   # Clearing BIT0 in this PCD prevents installing a 32-bit SMBIOS entry point,
   # if the entry point version is >= 3.0. AARCH64 OSes cannot assume the
-- 
2.19.1.3.g30247aa5d201


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


[edk2] [PATCH 01/14] ArmVirtPkg/ArmVirtQemuKernel: don't set PcdCPUCoresStackBase

2019-02-06 Thread Laszlo Ersek
According to the

  PCDs not used by modules or in conditional directives

sections of all the build reports for

  {AARCH64,ARM} x {QemuKernel} x {DEBUG,NOOPT,RELEASE} x {feat-0,feat-1}

(12 builds in total), the PCD is not used in any of those builds. Remove
the setting.

("feat-1" stands for "-D HTTP_BOOT_ENABLE -D NETWORK_IP6_ENABLE -D
SECURE_BOOT_ENABLE -D TTY_TERMINAL", while "feat-0" stands for "".)

Cc: Ard Biesheuvel 
Cc: Julien Grall 
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek 
---
 ArmVirtPkg/ArmVirtQemuKernel.dsc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index 6c2d6488d499..aa0f8eb47052 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -98,7 +98,6 @@ [PcdsFixedAtBuild.common]
   gArmTokenSpaceGuid.PcdVFPEnabled|1
 !endif
 
-  gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase|0x4007c000
   gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800
-- 
2.19.1.3.g30247aa5d201


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


Re: [edk2] [PATCH v2] BaseTools: Fix build failure when specifying multiple BUILDTARGET

2019-02-06 Thread Philippe Mathieu-Daudé
On 2/6/19 1:03 PM, Philippe Mathieu-Daudé wrote:
[...]
> 
> Reported-by: Leif Lindholm 
> Fixes: f8d11e5a4aaa90bf63b4789f3993dd6d16c60787
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Philippe Mathieu-Daude 
> Tested-by: Leif Lindholm 
> Acked-by: Laszlo Ersek 
> ---
> v2:
>  - fixed English errors (Laszlo)
>  - the paragraph about bisection not working is not relevant to
>the fix, keep it as background info but move it after (Laszlo)
> Signed-off-by: Philippe Mathieu-Daudé 

^ Oops I notice the tool I'm using (git publish) added this S-o-b line,
due to an incomplete config.

Anyway this is in part of the patch stripped out when applied, so no
need to resend a v3 for this detail.

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


[edk2] [PATCH v2] BaseTools: Fix build failure when specifying multiple BUILDTARGET

2019-02-06 Thread Philippe Mathieu-Daudé
With Python3, the dict.value() method returns an iterator.
If a dictionary is updated while an iterator on its keys is used,
a RuntimeError is generated.
Converting the iterator to a list() forces a copy of the mutable
keys in an immutable list which can be safely iterated.

Commit f8d11e5a4aaa converted various uses but missed one:
When specifying multiple BUILDTARGET, the first target builds
successfully, but then the PGen.BuildDatabase._CACHE_ dictionary is
updated, and accessing the next target triggers a RuntimeError.

Convert this iterator to an immutable list, to solve this build error:

$ build -a IA32 -t GCC5 -b RELEASE -b NOOPT -p OvmfPkg/OvmfPkgIa32.dsc
[...]
Processing meta-data ...
build.py...
 : error C0DE: Unknown fatal error when processing [OvmfPkg/OvmfPkgIa32.dsc]

(Please send email to edk2-devel@lists.01.org for help, attaching following 
call stack trace!)

(Python 3.5.3 on linux) Traceback (most recent call last):
  File 
"BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 
2387, in Main
MyBuild.Launch()
  File 
"BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 
2141, in Launch
self._MultiThreadBuildPlatform()
  File 
"BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 
1921, in _MultiThreadBuildPlatform
self.Progress
  File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 304, in __init__
self._InitWorker(Workspace, MetaFile, Target, Toolchain, Arch, *args, 
**kwargs)
  File "BaseTools/Source/Python/AutoGen/AutoGen.py", line 477, in 
_InitWorker
for BuildData in PGen.BuildDatabase._CACHE_.values():
RuntimeError: dictionary changed size during iteration

Note: The culprit commit (f8d11e5a4aaa) can not be found with bisection.
In 9c2d68c0a299 the build tools default to the python version provided
by the ${PYTHON} environment variable, however the Python3 transition is
not functional before d943b0c339fe. f8d11e5a4aaa falls between the
previous two.

Reported-by: Leif Lindholm 
Fixes: f8d11e5a4aaa90bf63b4789f3993dd6d16c60787
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Philippe Mathieu-Daude 
Tested-by: Leif Lindholm 
Acked-by: Laszlo Ersek 
---
v2:
 - fixed English errors (Laszlo)
 - the paragraph about bisection not working is not relevant to
   the fix, keep it as background info but move it after (Laszlo)
Signed-off-by: Philippe Mathieu-Daudé 
---
 BaseTools/Source/Python/AutoGen/AutoGen.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py 
b/BaseTools/Source/Python/AutoGen/AutoGen.py
index a95d2c710e..12592a2a46 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -474,7 +474,7 @@ class WorkspaceAutoGen(AutoGen):
 
 # generate the SourcePcdDict and BinaryPcdDict
 PGen = PlatformAutoGen(self, self.MetaFile, Target, Toolchain, 
Arch)
-for BuildData in PGen.BuildDatabase._CACHE_.values():
+for BuildData in list(PGen.BuildDatabase._CACHE_.values()):
 if BuildData.Arch != Arch:
 continue
 if BuildData.MetaFile.Ext == '.inf':
-- 
2.20.1

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


Re: [edk2] [PATCH] AppPkg: Various typo

2019-02-06 Thread Philippe Mathieu-Daudé
Hi Antoine,

I'd rename the patch subject as "AppPkg: Fix various typos"

On 2/6/19 7:10 AM, Antoine Coeur wrote:
> Various typo in AppPkg, ignoring Python folder.

Ditto.

> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Coeur 

Reviewed-by: Philippe Mathieu-Daude 

> ---
>  AppPkg/Applications/Enquire/Enquire.c |  2 +-
>  AppPkg/Applications/Sockets/DataSource/DataSource.c   |  4 ++--
>  AppPkg/Applications/Sockets/SetHostName/SetHostName.c |  2 +-
>  AppPkg/Applications/Sockets/TftpServer/TftpServer.c   | 10 +-
>  AppPkg/Applications/Sockets/TftpServer/TftpServer.h   |  6 +++---
>  AppPkg/Applications/Sockets/WebServer/HTTP.c  |  2 +-
>  AppPkg/Applications/Sockets/WebServer/PageList.c  |  2 +-
>  AppPkg/Applications/Sockets/WebServer/Reboot.c|  2 +-
>  AppPkg/ReadMe.txt |  2 +-
>  9 files changed, 16 insertions(+), 16 deletions(-)
> 
> diff --git a/AppPkg/Applications/Enquire/Enquire.c 
> b/AppPkg/Applications/Enquire/Enquire.c
> index 1e1db69a57..fdf4fe05e5 100644
> --- a/AppPkg/Applications/Enquire/Enquire.c
> +++ b/AppPkg/Applications/Enquire/Enquire.c
> @@ -619,7 +619,7 @@ tell.c, uncomment the following and change enquire.c to 
> tell.c.
>  //#include  /* if this fails, define NO_SIG */
>  //#endif
>  
> -/* Kludge around the possiblity that  includes  */
> +/* Kludge around the possibility that  includes  */
>  #ifdef CHAR_BIT
>  #undef CHAR_BIT
>  #undef CHAR_MAX
> diff --git a/AppPkg/Applications/Sockets/DataSource/DataSource.c 
> b/AppPkg/Applications/Sockets/DataSource/DataSource.c
> index 0dcd882edf..678a052a12 100644
> --- a/AppPkg/Applications/Sockets/DataSource/DataSource.c
> +++ b/AppPkg/Applications/Sockets/DataSource/DataSource.c
> @@ -873,7 +873,7 @@ Tcp4Close (
>Locate TCP protocol
>  
>@retval EFI_SUCCESS   Protocol found
> -  @retval other Protocl not found
> +  @retval other Protocol not found
>  **/
>  EFI_STATUS
>  Tcp4Locate (
> @@ -970,7 +970,7 @@ Tcp4Locate (
>Tcp4Handle ));
>  
>  //
> -//  Locate the TCP protcol
> +//  Locate the TCP protocol
>  //
>  Status = gBS->OpenProtocol ( Tcp4Handle,
>   &gEfiTcp4ProtocolGuid,
> diff --git a/AppPkg/Applications/Sockets/SetHostName/SetHostName.c 
> b/AppPkg/Applications/Sockets/SetHostName/SetHostName.c
> index 2c8001e205..15785e3fee 100644
> --- a/AppPkg/Applications/Sockets/SetHostName/SetHostName.c
> +++ b/AppPkg/Applications/Sockets/SetHostName/SetHostName.c
> @@ -62,7 +62,7 @@ main (
>  break;
>  
>case ENODEV:
> -Print ( L"WARNING - Plarform does not support permanent 
> storage!\r\n" );
> +Print ( L"WARNING - Platform does not support permanent 
> storage!\r\n" );
>  break;
>  
>case ENOMEM:
> diff --git a/AppPkg/Applications/Sockets/TftpServer/TftpServer.c 
> b/AppPkg/Applications/Sockets/TftpServer/TftpServer.c
> index 30d9dae41d..40f986ff92 100644
> --- a/AppPkg/Applications/Sockets/TftpServer/TftpServer.c
> +++ b/AppPkg/Applications/Sockets/TftpServer/TftpServer.c
> @@ -76,7 +76,7 @@ BufferFill (
>  pContext->BytesRemaining -= BytesRead;
>  pContext->ValidBytes += BytesRead;
>  DEBUG (( DEBUG_FILE_BUFFER,
> -  "0x%08x: Buffer filled with %Ld bytes, %Ld bytes 
> ramaining\r\n",
> +  "0x%08x: Buffer filled with %Ld bytes, %Ld bytes 
> remaining\r\n",
>pContext->pFill,
>BytesRead,
>pContext->BytesRemaining ));
> @@ -659,7 +659,7 @@ PacketTx (
>  //  Display the operation
>  //
>  DEBUG (( DEBUG_TX_PACKET,
> -  "0x%08x: Packet transmiting\r\n",
> +  "0x%08x: Packet transmitting\r\n",
>pPacket ));
>  DEBUG (( DEBUG_TX,
>"0x%08x: pContext sending 0x%08x bytes\r\n",
> @@ -1224,7 +1224,7 @@ TftpOptionSet (
>NextValue = Value / 10;
>  
>//
> -  //  Supress leading zeros
> +  //  Suppress leading zeros
>//
>if ( 0 != NextValue ) {
>  pOack = TftpOptionSet ( pOack, NextValue );
> @@ -1884,7 +1884,7 @@ TftpRead (
>the network stack.
>  
>@param [in] pTftpServer   Address of the ::TSDT_TFTP_SERVER structure
> -  @param [in] AddressFamily The address family to use for the conection.
> +  @param [in] AddressFamily The address family to use for the connection.
>@param [in] pIndexAddress of the index into the port array
>  
>  **/
> @@ -2297,7 +2297,7 @@ main (
>  TFTP_PACKET * pPacket;
>  
>  //
> -//  High speed TFTP uses an agressive retransmit to
> +//  High speed TFTP uses an aggressive retransmit to
>  //  get the TFTP client moving again when the ACK or
>  //  previous data packet was lost.
>  //
> diff --git a/AppPkg/Applications/Sockets/TftpServer/TftpServer.h 
> b/AppPkg/Applications/Sockets/TftpServer/TftpServ

Re: [edk2] [PATCH edk2-staging 10/20] IntelUndiPkg/XGigUndiDxe: drop StdLibC library class reference

2019-02-06 Thread Ryszard Knop
Mike,

As mentioned in previous mails, we can't change some of our code to
meet the coding standard. I've filled BZ #1516 with everything we need,
plus what CryptoPkg provides for reference.

Thanks, Richard.

On Wed, 2019-01-30 at 20:58 +, Kinney, Michael D wrote:
> Hi Richard,
> 
> It is possible to update C code to prevent the use of compiler
> intrinsic functions.  This is what we have done for EDK II modules
> that are built for both IA32 and X64.
> 
> The one exception is the use of OpenSSL.  We prefer to use that
> project "as is" as a git submodule, so modifying the OpenSSL
> sources to prevent use of intrinsic functions was not practical.
> The CryptoPkg has the minimum set of intrinsic functions required
> For OpenSSL to build.
> 
> We do recognize that this issue is difficult for developers to
> resolve because the techniques require generation of mixed C/asm
> output files to track down the C statements that are generating
> the intrinsic functions.
> 
> Similar to the ARM support for an intrinsic lib, it may be 
> reasonable to add a small intrinsic lib for IA32 and X64 that
> supports the intrinsic functions that are seen the most often.
> May  require an intrinsic lib for each supported tool chain.
> 
> This would be a new feature that would take some effort to 
> implement and validate.  Can you enter an Bugzilla for this
> feature and list the specific intrinsic functions needed for
> this driver?
> 
> Thanks,
> 
> Mike
> 
> > -Original Message-
> > From: Ryszard Knop
> > [mailto:ryszard.k...@linux.intel.com]
> > Sent: Wednesday, January 30, 2019 9:27 AM
> > To: Ard Biesheuvel ; edk2-
> > de...@lists.01.org; Carsey, Jaben
> > 
> > Cc: Kacperski, Kamil ; Jin,
> > Eric ; Orlowski, Pawel
> > ; Kinney, Michael D
> > ; Hsiung, Harry L
> > 
> > Subject: Re: [edk2] [PATCH edk2-staging 10/20]
> > IntelUndiPkg/XGigUndiDxe: drop StdLibC library class
> > reference
> > 
> > That's actually not quite correct - we need this
> > package to build on
> > IA32. It's named rather unfortunately, since it's not
> > the EDK2 StdLibC,
> > but rather a package in this repository - see
> > IntelUndiPkg/LibC. It
> > contains the bare minimum of functionality required to
> > fix missing 64-
> > bit math/shifts on IA32 and missing memcpy/memset
> > intrinsics. We can't
> > prevent MSVC from yielding memcpy/memset either, so
> > this was the nasty
> > solution for build issues. You have included
> > CompilerIntrinsicsLib for
> > the same reason, too :)
> > 
> > I'm not aware of any X64/IA32 equivalent of your
> > CompilerIntrinsicsLib,
> > but I'd be happy to be proven wrong here. I'm off for
> > the rest of the
> > week - I'll continue with reviews and merging early
> > next week.
> > 
> > Thanks, Richard.
> > 
> > On Wed, 2018-11-14 at 18:33 -0800, ard.biesheuvela
> > wrote:
> > > StdLibc should not be used in drivers (it has
> > dependencies on Shell
> > > protocols), but in fact, we don't appear to rely on
> > it in the first
> > > place, so just drop the reference.
> > > 
> > > Contributed-under: TianoCore Contribution Agreement
> > 1.1
> > > Signed-off-by: Ard Biesheuvel  > linaro.org>
> > > ---
> > >  IntelUndiPkg/XGigUndiDxe/XGigUndiDxe.inf | 1 -
> > >  1 file changed, 1 deletion(-)
> > > 
> > > diff --git a/IntelUndiPkg/XGigUndiDxe/XGigUndiDxe.inf
> > > b/IntelUndiPkg/XGigUndiDxe/XGigUndiDxe.inf
> > > index beee8aa8134e..b5747565fbea 100644
> > > --- a/IntelUndiPkg/XGigUndiDxe/XGigUndiDxe.inf
> > > +++ b/IntelUndiPkg/XGigUndiDxe/XGigUndiDxe.inf
> > > @@ -132,7 +132,6 @@ GCC:*_*_*_CC_FLAGS = -DEFI32
> > >PrintLib
> > >UefiLib
> > >HiiLib
> > > -  StdLibC
> > > 
> > >  [LibraryClasses.X64]
> > > 

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


Re: [edk2] [PATCH edk2-staging 10/20] IntelUndiPkg/XGigUndiDxe: drop StdLibC library class reference

2019-02-06 Thread Ryszard Knop
Andrew,

Unfortunately, not assigning something too large or using math
functions is not an option for us, as we share a significant amount of
code with Linux/FreeBSD drivers and maintainers of that code don't want
changes similar to the ones below (especially that, for all the other
drivers, intrinsics just work). Intrinsic lib for IA32 and others would
be very much preferred (and one that just works on any architecture, so
that we wouldn't have to add extra arch-specific LibraryClasses).

Thanks, Richard

On Wed, 2019-01-30 at 10:34 -0800, Andrew Fish wrote:
> > On Jan 30, 2019, at 9:26 AM, Ryszard Knop <
> > ryszard.k...@linux.intel.com> wrote:
> > 
> > That's actually not quite correct - we need this package to build
> > on
> > IA32. It's named rather unfortunately, since it's not the EDK2
> > StdLibC,
> > but rather a package in this repository - see IntelUndiPkg/LibC. It
> > contains the bare minimum of functionality required to fix missing
> > 64-
> > bit math/shifts on IA32 and missing memcpy/memset intrinsics. We
> > can't
> > prevent MSVC from yielding memcpy/memset either, so this was the
> > nasty
> > solution for build issues. You have included CompilerIntrinsicsLib
> > for
> > the same reason, too :)
> > 
> 
> Ryszard,
> 
> For IA32/X64 we avoid the compiler intrinsic libs via the coding
> standard. 
> 1) If you don't assign something too large at execution time with an
> = the compiler will not inline memcpy()/memset()
> 2) BaseLib.h has all the math functions that generate intrinsics that
> your code can call explicitly: 
> https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Library/BaseLib.h#L3533
> 
> UINT64 X=0x1;
> UINT64 Y=2;
> 
> So:
> Y = X*Y;
> should be:
> Y = MultU64x64 (X, Y);
> 
> When ARM got added much later and some versions of ARM did not even
> have a divide instruction we gave up on trying to add more functions
> into all the existing IA32 code, and add the intrinsic lib. 
> 
> If we are going to add an intrinsic lib for x86 then we should
> probably add it to the MdePkg and it needs to support MSVC and GCC
> (as far as I can tell clang should work with the GCC intrinsics). 
> 
> Thanks,
> 
> Andrew Fish
> 
> 
> > I'm not aware of any X64/IA32 equivalent of your
> > CompilerIntrinsicsLib,
> > but I'd be happy to be proven wrong here. I'm off for the rest of
> > the
> > week - I'll continue with reviews and merging early next week.
> > 
> > Thanks, Richard.
> > 
> > On Wed, 2018-11-14 at 18:33 -0800, ard.biesheuvela wrote:
> > > StdLibc should not be used in drivers (it has dependencies on
> > > Shell
> > > protocols), but in fact, we don't appear to rely on it in the
> > > first
> > > place, so just drop the reference.
> > > 
> > > Contributed-under: TianoCore Contribution Agreement 1.1
> > > Signed-off-by: Ard Biesheuvel 
> > > ---
> > > IntelUndiPkg/XGigUndiDxe/XGigUndiDxe.inf | 1 -
> > > 1 file changed, 1 deletion(-)
> > > 
> > > diff --git a/IntelUndiPkg/XGigUndiDxe/XGigUndiDxe.inf
> > > b/IntelUndiPkg/XGigUndiDxe/XGigUndiDxe.inf
> > > index beee8aa8134e..b5747565fbea 100644
> > > --- a/IntelUndiPkg/XGigUndiDxe/XGigUndiDxe.inf
> > > +++ b/IntelUndiPkg/XGigUndiDxe/XGigUndiDxe.inf
> > > @@ -132,7 +132,6 @@ GCC:*_*_*_CC_FLAGS = -DEFI32
> > >   PrintLib
> > >   UefiLib
> > >   HiiLib
> > > -  StdLibC
> > > 
> > > [LibraryClasses.X64]
> > > 
> > 
> > ___
> > 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] BeagleBoardPkg: Various typo

2019-02-06 Thread Antoine Coeur
Various typo in BeagleBoardPkg.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Coeur 
---
 BeagleBoardPkg/BeagleBoardPkg.dsc | 4 ++--
 BeagleBoardPkg/Library/BeagleBoardLib/Clock.c | 2 +-
 BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoff.c | 4 ++--
 BeagleBoardPkg/PrePi/LzmaDecompress.h | 2 +-
 BeagleBoardPkg/Tools/replace.c| 6 +++---
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/BeagleBoardPkg/BeagleBoardPkg.dsc 
b/BeagleBoardPkg/BeagleBoardPkg.dsc
index e0fee3692f..d677ab3eed 100644
--- a/BeagleBoardPkg/BeagleBoardPkg.dsc
+++ b/BeagleBoardPkg/BeagleBoardPkg.dsc
@@ -71,7 +71,7 @@
   # Uncomment (and comment out the next line) For RealView Debugger. The 
Standard IO window
   # in the debugger will show load and unload commands for symbols. You can 
cut and paste this
   # into the command window to load symbols. We should be able to use a script 
to do this, but
-  # the version of RVD I have does not support scipts accessing system memory.
+  # the version of RVD I have does not support scripts accessing system memory.
   #
 #  
PeCoffExtraActionLib|ArmPkg/Library/RvdPeCoffExtraActionLib/RvdPeCoffExtraActionLib.inf
   
PeCoffExtraActionLib|ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.inf
@@ -303,7 +303,7 @@
 # Values are in EFI Pages (4K). DXE Core will make sure that
 # at least this much of each type of memory can be allocated
 # from a single memory range. This way you only end up with
-# maximum of two fragements for each type in the memory map
+# maximum of two fragments for each type in the memory map
 # (the memory used, and the free memory that was prereserved
 # but not used).
 #
diff --git a/BeagleBoardPkg/Library/BeagleBoardLib/Clock.c 
b/BeagleBoardPkg/Library/BeagleBoardLib/Clock.c
index 6ca48e0c9f..4ca07ce7bc 100644
--- a/BeagleBoardPkg/Library/BeagleBoardLib/Clock.c
+++ b/BeagleBoardPkg/Library/BeagleBoardLib/Clock.c
@@ -61,7 +61,7 @@ ClockInit (
   | CM_ICLKEN_PER_EN_GPIO5_ENABLE
   | CM_ICLKEN_PER_EN_GPIO6_ENABLE);
 
-  // Turn on functional & inteface clocks to various wakeup modules.
+  // Turn on functional & interface clocks to various wakeup modules.
   MmioOr32(CM_FCLKEN_WKUP, CM_FCLKEN_WKUP_EN_GPIO1_ENABLE
| CM_FCLKEN_WKUP_EN_WDT2_ENABLE);
   MmioOr32(CM_ICLKEN_WKUP, CM_ICLKEN_WKUP_EN_GPIO1_ENABLE
diff --git a/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoff.c 
b/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoff.c
index bcc694816a..0e81536ca6 100644
--- a/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoff.c
+++ b/BeagleBoardPkg/Library/DxeHobPeCoffLib/DxeHobPeCoff.c
@@ -182,13 +182,13 @@ PeCoffLoaderImageReadFromMemory (
 
 
 /**
-  Reapply fixups on a fixed up PE32/PE32+ image to allow virutal calling at EFI
+  Reapply fixups on a fixed up PE32/PE32+ image to allow virtual calling at EFI
   runtime.
 
   This function reapplies relocation fixups to the PE/COFF image specified by 
ImageBase
   and ImageSize so the image will execute correctly when the PE/COFF image is 
mapped
   to the address specified by VirtualImageBase. RelocationData must be 
identical
-  to the FiuxupData buffer from the PE_COFF_LOADER_IMAGE_CONTEXT structure
+  to the FixupData buffer from the PE_COFF_LOADER_IMAGE_CONTEXT structure
   after this PE/COFF image was relocated with PeCoffLoaderRelocateImage().
 
   Note that if the platform does not maintain coherency between the 
instruction cache(s) and the data
diff --git a/BeagleBoardPkg/PrePi/LzmaDecompress.h 
b/BeagleBoardPkg/PrePi/LzmaDecompress.h
index a79ff343d2..3b67ee05cc 100644
--- a/BeagleBoardPkg/PrePi/LzmaDecompress.h
+++ b/BeagleBoardPkg/PrePi/LzmaDecompress.h
@@ -25,7 +25,7 @@
   If the required information can not be retrieved from InputSection,
   then RETURN_INVALID_PARAMETER is returned.
   If the GUID of InputSection does match the GUID that this handler supports,
-  then the size required to hold the decoded buffer is returned in 
OututBufferSize,
+  then the size required to hold the decoded buffer is returned in 
OutputBufferSize,
   the size of an optional scratch buffer is returned in ScratchSize, and the 
Attributes field
   from EFI_GUID_DEFINED_SECTION header of InputSection is returned in 
SectionAttribute.
 
diff --git a/BeagleBoardPkg/Tools/replace.c b/BeagleBoardPkg/Tools/replace.c
index 00f4249592..d974ac1bcd 100644
--- a/BeagleBoardPkg/Tools/replace.c
+++ b/BeagleBoardPkg/Tools/replace.c
@@ -102,7 +102,7 @@ main (int argc, char **argv)
 return -5;
   }
 
-  // Search for a match by reading every possition of the file
+  // Search for a match by reading every position of the file
   // into a buffer that is as big as the maximum search key size.
   // Then we can search the keys for a match. If no match
   // copy the old file character to the new file. If it is a match
@@ -130,8 +130,8 @@ main (int argc, cha