[edk2-devel] [PATCH] BaseTools: VfrCompile/Pccts: Fix invalid bytes

2019-05-10 Thread Joe Richey via Groups.Io
Three text files have invalid ASCII bytes, this can mess up tooling
that trys to operate on the repository, which will accidentally
classify them as binary data.

https://github.com/josephlr/edk2/tree/format

Cc: Bob Feng 
Cc: Liming Gao 
Cc: Yonghong Zhu 
Signed-off-by: Joe Richey 
---
 BaseTools/Source/C/VfrCompile/Pccts/KNOWN_PROBLEMS.txt |  2 +-
 BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr1.txt   | 78 
++--
 BaseTools/Source/C/VfrCompile/Pccts/dlg/dlg1.txt   |  6 +-
 3 files changed, 43 insertions(+), 43 deletions(-)

diff --git a/BaseTools/Source/C/VfrCompile/Pccts/KNOWN_PROBLEMS.txt 
b/BaseTools/Source/C/VfrCompile/Pccts/KNOWN_PROBLEMS.txt
index 539cf775257b..f073e620ab68 100644
--- a/BaseTools/Source/C/VfrCompile/Pccts/KNOWN_PROBLEMS.txt
+++ b/BaseTools/Source/C/VfrCompile/Pccts/KNOWN_PROBLEMS.txt
@@ -40,7 +40,7 @@
 An bug (or at least an oddity) is that a reference to LT(1), LA(1),
 or LATEXT(1) in an action which immediately follows a token match
 in a rule refers to the token matched, not the token which is in
-the lookahead buffer.  Consider:
+the lookahead buffer.  Consider:
 
 r : abc <> D <> E;
 
diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr1.txt 
b/BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr1.txt
index 4a7d22e7f239..140b064217b7 100644
--- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr1.txt
+++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr1.txt
@@ -9,48 +9,48 @@ NAME
  antlr - ANother Tool for Language Recognition
 
 SYNTAX
- antlr [_o_p_t_i_o_n_s] _g_r_a_m_m_a_r__f_i_l_e_s
+ antlr [options] grammar_files
 
 DESCRIPTION
- _A_n_t_l_r converts an extended form of context-free grammar into
+ Antlr converts an extended form of context-free grammar into
  a set of C functions which directly implement an efficient
  form of deterministic recursive-descent LL(k) parser.
  Context-free grammars may be augmented with predicates to
  allow semantics to influence parsing; this allows a form of
  context-sensitive parsing.  Selective backtracking is also
  available to handle non-LL(k) and even non-LALR(k) con-
- structs.  _A_n_t_l_r also produces a definition of a lexer which
+ structs.  Antlr also produces a definition of a lexer which
  can be automatically converted into C code for a DFA-based
- lexer by _d_l_g.  Hence, _a_n_t_l_r serves a function much like 
that
- of _y_a_c_c, however, it is notably more flexible and is more
- integrated with a lexer generator (_a_n_t_l_r directly generates
- _d_l_g code, whereas _y_a_c_c and _l_e_x are given independent
- descriptions).  Unlike _y_a_c_c which accepts LALR(1) grammars,
- _a_n_t_l_r accepts LL(k) grammars in an extended BNF notation -
+ lexer by dlg.  Hence, antlr serves a function much like that
+ of yacc, however, it is notably more flexible and is more
+ integrated with a lexer generator (antlr directly generates
+ dlg code, whereas yacc and lex are given independent
+ descriptions).  Unlike yacc which accepts LALR(1) grammars,
+ antlr accepts LL(k) grammars in an extended BNF notation -
  which eliminates the need for precedence rules.
 
- Like _y_a_c_c grammars, _a_n_t_l_r grammars can use 
automatically-
+ Like yacc grammars, antlr grammars can use automatically-
  maintained symbol attribute values referenced as dollar
- variables.  Further, because _a_n_t_l_r generates top-down
+ variables.  Further, because antlr generates top-down
  parsers, arbitrary values may be inherited from parent rules
- (passed like function parameters).  _A_n_t_l_r also has a mechan-
+ (passed like function parameters).  Antlr also has a mechan-
  ism for creating and manipulating abstract-syntax-trees.
 
- There are various other niceties in _a_n_t_l_r, including the
+ There are various other niceties in antlr, including the
  ability to spread one grammar over multiple files or even
  multiple grammars in a single file, the ability to generate
  a version of the grammar with actions stripped out (for
  documentation purposes), and lots more.
 
 OPTIONS
- -ck _n
-  Use up to _n symbols of lookahead when using compressed
+ -ck n
+  Use up to n symbols of lookahead when using compressed
   (linear approximation) lookahead.  This type of looka-
   head is very cheap to compute and is attempted before
   full LL(k) lookahead, which is of exponential complex-
   ity in the worst case.  In general, the compressed loo-
-  kahead can be much deeper (e.g, -ck 10) _t_h_a_n _t_h_e 
_f_u_l_l
-  _l_o_o_k_a_h_e_a_d (_w_h_i_c_h _u_s_u_a_l_l_y 
_m_u_s_t _b_e _l_e_s_s _t_h_a_n _4).
+  kahead can be much deeper (e.g, -ck 10

[edk2-devel] Understanding TCP4 Connect() not working after calling Close() and Configure(NULL)

2019-05-10 Thread rebecca
Hi,


I've come across what to me looks like a bug, but is probably a
misunderstanding of how to use the EFI_TCP4_PROTOCOL.

Under OVMF (I've not tried anything else), I've found that when I call
tcp4->Close(), tcp4->Configure() with NULL to reset it, then
tcp4->Connect() the TCP stack reports in the debug output that it's sent
a SYN packet, but I don't see it in Wireshark, and the connection
attempt eventually times out.  I'm only able to reconnect if I call
tcp4sb->CreateChild() to get a new instance.


-- Rebecca Cran


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40465): https://edk2.groups.io/g/devel/message/40465
Mute This Topic: https://groups.io/mt/31583756/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [Patch 2/2] edk2: Update Maintainers.txt for packages moved to edk2-platforms

2019-05-10 Thread Ni, Ray
Reviewed-by: Ray Ni 

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Michael D Kinney
> Sent: Friday, May 10, 2019 11:46 AM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang ; Qian, Yi ;
> Steele, Kelly ; Ni, Ray ; Kubacki,
> Michael A ; Leif Lindholm
> ; Ard Biesheuvel 
> Subject: [edk2-devel] [Patch 2/2] edk2: Update Maintainers.txt for packages
> moved to edk2-platforms
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=1467
> https://bugzilla.tianocore.org/show_bug.cgi?id=1374
> https://bugzilla.tianocore.org/show_bug.cgi?id=1793
> 
> Remove maintainers for ththe following packages that have been imported
> to edk2-platforms/master
>   * Omap35xxPkg
>   * BeagleBoardPkg
>   * QuarkSocPkg
>   * QuarkPlatformPkg
>   * Vlv2DeviceRefCodePkg
>   * Vlv2TbltDevicePkg
>   * OptionRomPkg
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Kelly Steele 
> Cc: Ray Ni 
> Cc: Michael Kubacki 
> Cc: Leif Lindholm 
> Cc: Ard Biesheuvel 
> Signed-off-by: Michael D Kinney 
> ---
>  Maintainers.txt | 26 --
>  1 file changed, 26 deletions(-)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt index ff5ae4af93..7315241b6e
> 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -86,11 +86,6 @@ M: Bob Feng 
>  M: Liming Gao 
>  R: Yonghong Zhu 
> 
> -BeagleBoardPkg
> -W: https://github.com/tianocore/tianocore.github.io/wiki/BeagleBoardPkg
> -M: Leif Lindholm 
> -M: Ard Biesheuvel 
> -
>  CorebootModulePkg, CorebootPayloadPkg
>  W:
> https://github.com/tianocore/tianocore.github.io/wiki/Coreboot_UEFI_payl
> oad
>  M: Maurice Ma 
> @@ -195,15 +190,6 @@ W:
> https://github.com/tianocore/tianocore.github.io/wiki/Nt32Pkg
>  M: Ray Ni 
>  M: Hao A Wu 
> 
> -Omap35xxPkg
> -W: https://github.com/tianocore/tianocore.github.io/wiki/Omap35xxPkg
> -M: Leif Lindholm 
> -M: Ard Biesheuvel 
> -
> -OptionRomPkg
> -W: https://github.com/tianocore/tianocore.github.io/wiki/OptionRomPkg
> -M: Ray Ni 
> -
>  OvmfPkg
>  W: http://www.tianocore.org/ovmf/
>  M: Jordan Justen  @@ -223,10 +209,6 @@
> PcAtChipsetPkg
>  W: https://github.com/tianocore/tianocore.github.io/wiki/PcAtChipsetPkg
>  M: Ray Ni 
> 
> -QuarkPlatformPkg, QuarkSocPkg
> -M: Michael D Kinney 
> -M: Kelly Steele 
> -
>  SecurityPkg
>  W: https://github.com/tianocore/tianocore.github.io/wiki/SecurityPkg
>  M: Chao Zhang 
> @@ -260,14 +242,6 @@ M: Eric Dong 
>  M: Ray Ni 
>  R: Laszlo Ersek 
> 
> -Vlv2DeviceRefCodePkg
> -M: Zailiang Sun 
> -M: Yi Qian 
> -
> -Vlv2TbltDevicePkg
> -M: Zailiang Sun 
> -M: Yi Qian 
> -
>  StandaloneMmPkg
>  M: Achin Gupta 
>  M: Jiewen Yao 
> --
> 2.21.0.windows.1
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40462): https://edk2.groups.io/g/devel/message/40462
Mute This Topic: https://groups.io/mt/31573482/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [Patch 1/2] edk2: Remove packages moved to edk2-platforms

2019-05-10 Thread Kubacki, Michael A
Similarly, once the packages are moved to edk2-platforms.

Reviewed-by: Michael Kubacki 

> -Original Message-
> From: Leif Lindholm [mailto:leif.lindh...@linaro.org]
> Sent: Friday, May 10, 2019 11:09 AM
> To: Kinney, Michael D 
> Cc: devel@edk2.groups.io; Sun, Zailiang ; Qian, Yi
> ; Steele, Kelly ; Ni, Ray
> ; Kubacki, Michael A ; Ard
> Biesheuvel 
> Subject: Re: [Patch 1/2] edk2: Remove packages moved to edk2-platforms
> 
> On Thu, May 09, 2019 at 08:46:11PM -0700, Michael D Kinney wrote:
> > https://bugzilla.tianocore.org/show_bug.cgi?id=1467
> > https://bugzilla.tianocore.org/show_bug.cgi?id=1374
> > https://bugzilla.tianocore.org/show_bug.cgi?id=1793
> >
> > Remove the following packages that have been imported to
> > edk2-platforms/master
> >   * Omap35xxPkg
> >   * BeagleBoardPkg
> >   * QuarkSocPkg
> >   * QuarkPlatformPkg
> >   * Vlv2DeviceRefCodePkg
> >   * Vlv2TbltDevicePkg
> >   * OptionRomPkg
> >
> > Cc: Zailiang Sun 
> > Cc: Yi Qian 
> > Cc: Kelly Steele 
> > Cc: Ray Ni 
> > Cc: Michael Kubacki 
> > Cc: Leif Lindholm 
> > Cc: Ard Biesheuvel 
> > Signed-off-by: Michael D Kinney 
> 
> (Once affected packages have been merged into edk2-platforms.)
> Reviewed-by: Leif Lindholm 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40460): https://edk2.groups.io/g/devel/message/40460
Mute This Topic: https://groups.io/mt/31573481/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms: Patch 1/8] Silicon/TexasInsturments: Import Omap35xxPkg from edk2

2019-05-10 Thread Leif Lindholm
Hi Mike,

If you explicitly didn't change any of the files, then I'm totally
happy with the typo fixed. For Omap35xxPkg and BeagleBoardPkg:
Reviewed-by: Leif Lindholm 

Regards,

Leif

On Fri, May 10, 2019 at 07:16:47PM +, Kinney, Michael D wrote:
> Leif,
> 
> Thanks.  I will fix the typo.
> 
> I did not change any of the .dec or .dsc files with this series.
> 
> I tested builds by using PACKAGES_PATH.
> 
> Do you approve the change with the typo fixed or do you want 
> me to send a V2?
> 
> Thanks,
> 
> Mike
> 
> > -Original Message-
> > From: Leif Lindholm [mailto:leif.lindh...@linaro.org]
> > Sent: Friday, May 10, 2019 10:57 AM
> > To: Kinney, Michael D 
> > Cc: devel@edk2.groups.io; Ard Biesheuvel
> > 
> > Subject: Re: [edk2-platforms: Patch 1/8]
> > Silicon/TexasInsturments: Import Omap35xxPkg from edk2
> > 
> > Hi Mike,
> > 
> > I'm afraid a typo has snuck in below:
> > 
> > On Thu, May 09, 2019 at 08:34:28PM -0700, Michael D
> > Kinney wrote:
> > > https://bugzilla.tianocore.org/show_bug.cgi?id=1467
> > >
> > > Import Omap35xxPkg from edk2/master.
> > >
> > > Cc: Leif Lindholm 
> > > Cc: Ard Biesheuvel 
> > > Signed-off-by: Michael D Kinney
> > 
> > > ---
> > >  .../Omap35xxPkg/Flash/Flash.c |  768
> > +
> > >  .../Omap35xxPkg/Flash/Flash.h |  100
> > ++
> > >  .../Omap35xxPkg/Flash/Flash.inf   |   42
> > +
> > >  .../TexasInsturments/Omap35xxPkg/Gpio/Gpio.c  |  129
> > ++
> > >  .../Omap35xxPkg/Gpio/Gpio.inf |   39
> > +
> > >  .../Omap35xxPkg/Include/Library/OmapDmaLib.h  |   84
> > +
> > >  .../Omap35xxPkg/Include/Library/OmapLib.h |   38
> > +
> > >  .../Omap35xxPkg/Include/Omap3530/Omap3530.h   |   34
> > +
> > >  .../Include/Omap3530/Omap3530Dma.h|  124
> > ++
> > >  .../Include/Omap3530/Omap3530Gpio.h   |  125
> > ++
> > >  .../Include/Omap3530/Omap3530Gpmc.h   |  101
> > ++
> > >  .../Include/Omap3530/Omap3530I2c.h|   56
> > +
> > >  .../Include/Omap3530/Omap3530Interrupt.h  |   45
> > +
> > >  .../Include/Omap3530/Omap3530MMCHS.h  |  208
> > +++
> > >  .../Omap3530/Omap3530PadConfiguration.h   |  297
> > 
> > >  .../Include/Omap3530/Omap3530Prcm.h   |  159
> > ++
> > >  .../Include/Omap3530/Omap3530Timer.h  |   76
> > +
> > >  .../Include/Omap3530/Omap3530Uart.h   |   48
> > +
> > >  .../Include/Omap3530/Omap3530Usb.h|   42
> > +
> > >  .../Omap35xxPkg/Include/TPS65950.h|   74
> > +
> > >  .../InterruptDxe/HardwareInterrupt.c  |  396
> > +
> > >  .../Omap35xxPkg/InterruptDxe/InterruptDxe.inf |   48
> > +
> > >  .../LcdGraphicsOutputBlt.c|  439
> > +
> > >  .../LcdGraphicsOutputDxe.c|  394
> > +
> > >  .../LcdGraphicsOutputDxe.h|  151
> > ++
> > >  .../LcdGraphicsOutputDxe.inf  |   46
> > +
> > >  .../DebugAgentTimerLib/DebugAgentTimerLib.c   |  159
> > ++
> > >  .../DebugAgentTimerLib/DebugAgentTimerLib.inf |   42
> > +
> > >  .../Library/GdbSerialLib/GdbSerialLib.c   |   96
> > ++
> > >  .../Library/GdbSerialLib/GdbSerialLib.inf |   35
> > +
> > >  .../Omap35xxTimerLib/Omap35xxTimerLib.inf |   40
> > +
> > >  .../Library/Omap35xxTimerLib/TimerLib.c   |  151
> > ++
> > >  .../Library/OmapDmaLib/OmapDmaLib.c   |  170
> > ++
> > >  .../Library/OmapDmaLib/OmapDmaLib.inf |   43
> > +
> > >  .../Omap35xxPkg/Library/OmapLib/OmapLib.c |   77
> > +
> > >  .../Omap35xxPkg/Library/OmapLib/OmapLib.inf   |   31
> > +
> > >  .../RealTimeClockLib/RealTimeClockLib.c   |  291
> > 
> > >  .../RealTimeClockLib/RealTimeClockLib.inf |   32
> > +
> > >  .../Library/SerialPortLib/SerialPortLib.c |  208
> > +++
> > >  .../Library/SerialPortLib/SerialPortLib.inf   |   40
> > +
> > >  .../Omap35xxPkg/MMCHSDxe/MMCHS.c  | 1492
> > +
> > >  .../Omap35xxPkg/MMCHSDxe/MMCHS.h  |  169
> > ++
> > >  .../Omap35xxPkg/MMCHSDxe/MMCHS.inf|   48
> > +
> > >  .../Omap35xxPkg/MmcHostDxe/MmcHostDxe.c   |  671
> > 
> > >  .../Omap35xxPkg/MmcHostDxe/MmcHostDxe.h   |   38
> > +
> > >  .../Omap35xxPkg/MmcHostDxe/MmcHostDxe.inf |   47
> > +
> > >  .../Omap35xxPkg/Omap35xxPkg.dec   |   52
> > +
> > >  .../Omap35xxPkg/Omap35xxPkg.dsc   |  183
> > ++
> > >  .../Omap35xxPkg/PciEmulation/PciEmulation.c   |  107
> > ++
> > >  .../Omap35xxPkg/PciEmulation/PciEmulation.inf |   41
> > +
> > >  .../Omap35xxPkg/SmbusDxe/Smbus.c  |  319
> > 
> > >  .../Omap35xxPkg/SmbusDxe/Smbus.inf|   39
> > +
> > >  .../Omap35xxPkg/TPS65950Dxe/TPS65950.c|  110
> > ++
> > >  .../Omap35xxPkg/TPS65950Dxe/TPS65950.inf  |   42
> > +
> > >  .../Omap35xxPkg/TimerDxe/Timer.c  |  370
> > 
> > >  .../Omap35xxPkg/TimerDxe/TimerDxe.inf |   51
> > +
> > >  56 files changed, 9257 insert

Re: [edk2-devel] [PATCH] BaseTools: Include headers not mentioned in inf are not hashed

2019-05-10 Thread Christian Rodriguez
Hashing is not changing file format requirements as Basetools has no 
requirement on this even though the spec does have file requirements. That's 
why the initial patch was a workaround of sorts because it is allowed by 
Basetools to have local headers not in the sources section of the meta file.

Always breaking the build is outside of the scope of this BZ and my project 
priorities. I agree it should be done, but it's out of my scope.

I am specifically targeting the hashing feature, which relies on UEFI Spec 
requirements.

>-Original Message-
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>Felix Polyudov
>Sent: Friday, May 10, 2019 12:32 PM
>To: Rodriguez, Christian ;
>devel@edk2.groups.io; 'ler...@redhat.com' 
>Cc: Feng, Bob C ; Gao, Liming
>; Zhu, Yonghong 
>Subject: Re: [edk2-devel] [PATCH] BaseTools: Include headers not mentioned
>in inf are not hashed
>
>My suggestion would be to always break a build (no matter what the hashing
>settings are).
>Hashing is just an optimization technique, usage of which should not be
>changing source file formatting requirements.
>
>> -Original Message-
>> From: Rodriguez, Christian [mailto:christian.rodrig...@intel.com]
>> Sent: Friday, May 10, 2019 3:14 PM
>> To: devel@edk2.groups.io; Felix Polyudov; 'ler...@redhat.com'
>> Cc: Feng, Bob C; Gao, Liming; Zhu, Yonghong
>> Subject: RE: [edk2-devel] [PATCH] BaseTools: Include headers not
>> mentioned in inf are not hashed
>>
>> After talking to my colleagues about this, the direction seems to be
>> to fundamentally change this BZ. Instead of building this sort of
>> workaround feature, we should use the information gathered from this
>feature to cause the build to break when the hash feature is enabled. This
>would force users of the hash feature to be UEFI spec complaint.
>>
>> What do you guys think; Laszlo and Felix?
>>
>> I'll update the BZ when I get your input.
>>
>> Thanks,
>> Christian Rodriguez
>>
>> >-Original Message-
>> >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>> >Felix Polyudov
>> >Sent: Friday, May 10, 2019 6:41 AM
>> >To: devel@edk2.groups.io; 'ler...@redhat.com' ;
>> >Rodriguez, Christian 
>> >Cc: Feng, Bob C ; Gao, Liming
>> >; Zhu, Yonghong 
>> >Subject: Re: [edk2-devel] [PATCH] BaseTools: Include headers not
>> >mentioned in inf are not hashed
>> >
>> >> -Original Message-
>> >> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf
>> >> Of Laszlo Ersek
>> >> Sent: Thursday, May 09, 2019 7:53 PM
>> >>
>> >> Hello Christian,
>> >>
>> >> On 05/09/19 23:27, Christian Rodriguez wrote:
>> >> > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1787
>> >> >
>> >> > Get a list of local header files that are not present in the
>> >> > MetaFile for this module. Add those local header files into the
>> >> > hashing algorithm for a module. If a local header file is not
>> >> > present in the MetaFile, the module will still build correctly
>> >> > though the hashing system didn't know about it before.
>> >> >
>> >> > Signed-off-by: Christian Rodriguez
>> >> > 
>> >> > Cc: Bob Feng 
>> >> > Cc: Liming Gao 
>> >> > Cc: Yonghong Zhu 
>> >> > ---
>> >> >  BaseTools/Source/Python/AutoGen/AutoGen.py | 24
>> >> > 
>> >> >  1 file changed, 24 insertions(+)
>> >>
>> >> I saw the BZ soon after it was reported. I almost commented, but
>> >> ultimately I couldn't decide what the real use case was.
>> >>
>> >> With this particular use case (i.e. INF file is missing some
>> >> module-specific header files that it could easily list), I think I
>> >> disagree, mildly (not too strongly). E.g., we fixed such omissions
>> >> in a bunch of INF files, last March, in the series
>> >
>> >I agree with Lazlo.
>> >According to section 3.9 of the INF specification (https://edk2-
>> >docs.gitbooks.io/edk-ii-inf-
>> >specification/3_edk_ii_inf_file_format/39_[sources]_sections.html),
>> >all source files (including module header files) must be listed in
>> >the [Sources] section.
>> >Here is the quote:
>> >"All HII Unicode format files must be listed in this section as well
>> >as any other "source" type file, such as local module header files, Vfr 
>> >files,
>etc. "
>> >
>> >So, if file X is used by module Y, but is not listed in Y.inf, it's a
>> >violation of the INF spec., which makes it a bug that has to be fixed.
>> >
>> >
>> >Please consider the environment before printing this email.
>> >
>> >The information contained in this message may be confidential and
>> >proprietary to American Megatrends, Inc.  This communication is
>> >intended to be read only by the individual or entity to whom it is
>> >addressed or by their designee. If the reader of this message is not
>> >the intended recipient, you are on notice that any distribution of
>> >this message, in any form, is strictly prohibited.  Please promptly
>> >notify the sender by reply e-mail or by telephone at 770-246-8600, and
>then delete or destroy all copi

Re: [edk2-devel] [PATCH] BaseTools: Include headers not mentioned in inf are not hashed

2019-05-10 Thread Felix Polyudov
My suggestion would be to always break a build (no matter what the hashing 
settings are).
Hashing is just an optimization technique, usage of which should not be 
changing source file formatting requirements.

> -Original Message-
> From: Rodriguez, Christian [mailto:christian.rodrig...@intel.com]
> Sent: Friday, May 10, 2019 3:14 PM
> To: devel@edk2.groups.io; Felix Polyudov; 'ler...@redhat.com'
> Cc: Feng, Bob C; Gao, Liming; Zhu, Yonghong
> Subject: RE: [edk2-devel] [PATCH] BaseTools: Include headers not mentioned in 
> inf are not hashed
> 
> After talking to my colleagues about this, the direction seems to be to 
> fundamentally change this BZ. Instead of building this sort of
> workaround feature, we should use the information gathered from this feature 
> to cause the build to break when the hash feature is
> enabled. This would force users of the hash feature to be UEFI spec complaint.
> 
> What do you guys think; Laszlo and Felix?
> 
> I'll update the BZ when I get your input.
> 
> Thanks,
> Christian Rodriguez
> 
> >-Original Message-
> >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> >Felix Polyudov
> >Sent: Friday, May 10, 2019 6:41 AM
> >To: devel@edk2.groups.io; 'ler...@redhat.com' ;
> >Rodriguez, Christian 
> >Cc: Feng, Bob C ; Gao, Liming
> >; Zhu, Yonghong 
> >Subject: Re: [edk2-devel] [PATCH] BaseTools: Include headers not mentioned
> >in inf are not hashed
> >
> >> -Original Message-
> >> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> >> Laszlo Ersek
> >> Sent: Thursday, May 09, 2019 7:53 PM
> >>
> >> Hello Christian,
> >>
> >> On 05/09/19 23:27, Christian Rodriguez wrote:
> >> > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1787
> >> >
> >> > Get a list of local header files that are not present in the
> >> > MetaFile for this module. Add those local header files into the
> >> > hashing algorithm for a module. If a local header file is not
> >> > present in the MetaFile, the module will still build correctly
> >> > though the hashing system didn't know about it before.
> >> >
> >> > Signed-off-by: Christian Rodriguez 
> >> > Cc: Bob Feng 
> >> > Cc: Liming Gao 
> >> > Cc: Yonghong Zhu 
> >> > ---
> >> >  BaseTools/Source/Python/AutoGen/AutoGen.py | 24
> >> > 
> >> >  1 file changed, 24 insertions(+)
> >>
> >> I saw the BZ soon after it was reported. I almost commented, but
> >> ultimately I couldn't decide what the real use case was.
> >>
> >> With this particular use case (i.e. INF file is missing some
> >> module-specific header files that it could easily list), I think I
> >> disagree, mildly (not too strongly). E.g., we fixed such omissions in
> >> a bunch of INF files, last March, in the series
> >
> >I agree with Lazlo.
> >According to section 3.9 of the INF specification (https://edk2-
> >docs.gitbooks.io/edk-ii-inf-
> >specification/3_edk_ii_inf_file_format/39_[sources]_sections.html),
> >all source files (including module header files) must be listed in the 
> >[Sources]
> >section.
> >Here is the quote:
> >"All HII Unicode format files must be listed in this section as well as any 
> >other
> >"source" type file, such as local module header files, Vfr files, etc. "
> >
> >So, if file X is used by module Y, but is not listed in Y.inf, it's a 
> >violation of the
> >INF spec., which makes it a bug that has to be fixed.
> >
> >
> >Please consider the environment before printing this email.
> >
> >The information contained in this message may be confidential and
> >proprietary to American Megatrends, Inc.  This communication is intended to
> >be read only by the individual or entity to whom it is addressed or by their
> >designee. If the reader of this message is not the intended recipient, you 
> >are
> >on notice that any distribution of this message, in any form, is strictly
> >prohibited.  Please promptly notify the sender by reply e-mail or by 
> >telephone
> >at 770-246-8600, and then delete or destroy all copies of the transmission.
> >   l   K   q y e  ,j  a  +  U  ?E e   w Ӎ   i   vM *?  ^    ,j   
> >N6 ˭y8b :)  m  ?
> >躛"}y M5  { ޷ j躓z'z   h+  l  '   r  zm   y 6  . Ȩ  z칷! +-   
> >  糊{^  &

Please consider the environment before printing this email.

The information contained in this message may be confidential and proprietary 
to American Megatrends, Inc.  This communication is intended to be read only by 
the individual or entity to whom it is addressed or by their designee. If the 
reader of this message is not the intended recipient, you are on notice that 
any distribution of this message, in any form, is strictly prohibited.  Please 
promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and 
then delete or destroy all copies of the transmission.


Re: [edk2-devel] [edk2-platforms: Patch 1/8] Silicon/TexasInsturments: Import Omap35xxPkg from edk2

2019-05-10 Thread Michael D Kinney
Leif,

Thanks.  I will fix the typo.

I did not change any of the .dec or .dsc files with this series.

I tested builds by using PACKAGES_PATH.

Do you approve the change with the typo fixed or do you want 
me to send a V2?

Thanks,

Mike

> -Original Message-
> From: Leif Lindholm [mailto:leif.lindh...@linaro.org]
> Sent: Friday, May 10, 2019 10:57 AM
> To: Kinney, Michael D 
> Cc: devel@edk2.groups.io; Ard Biesheuvel
> 
> Subject: Re: [edk2-platforms: Patch 1/8]
> Silicon/TexasInsturments: Import Omap35xxPkg from edk2
> 
> Hi Mike,
> 
> I'm afraid a typo has snuck in below:
> 
> On Thu, May 09, 2019 at 08:34:28PM -0700, Michael D
> Kinney wrote:
> > https://bugzilla.tianocore.org/show_bug.cgi?id=1467
> >
> > Import Omap35xxPkg from edk2/master.
> >
> > Cc: Leif Lindholm 
> > Cc: Ard Biesheuvel 
> > Signed-off-by: Michael D Kinney
> 
> > ---
> >  .../Omap35xxPkg/Flash/Flash.c |  768
> +
> >  .../Omap35xxPkg/Flash/Flash.h |  100
> ++
> >  .../Omap35xxPkg/Flash/Flash.inf   |   42
> +
> >  .../TexasInsturments/Omap35xxPkg/Gpio/Gpio.c  |  129
> ++
> >  .../Omap35xxPkg/Gpio/Gpio.inf |   39
> +
> >  .../Omap35xxPkg/Include/Library/OmapDmaLib.h  |   84
> +
> >  .../Omap35xxPkg/Include/Library/OmapLib.h |   38
> +
> >  .../Omap35xxPkg/Include/Omap3530/Omap3530.h   |   34
> +
> >  .../Include/Omap3530/Omap3530Dma.h|  124
> ++
> >  .../Include/Omap3530/Omap3530Gpio.h   |  125
> ++
> >  .../Include/Omap3530/Omap3530Gpmc.h   |  101
> ++
> >  .../Include/Omap3530/Omap3530I2c.h|   56
> +
> >  .../Include/Omap3530/Omap3530Interrupt.h  |   45
> +
> >  .../Include/Omap3530/Omap3530MMCHS.h  |  208
> +++
> >  .../Omap3530/Omap3530PadConfiguration.h   |  297
> 
> >  .../Include/Omap3530/Omap3530Prcm.h   |  159
> ++
> >  .../Include/Omap3530/Omap3530Timer.h  |   76
> +
> >  .../Include/Omap3530/Omap3530Uart.h   |   48
> +
> >  .../Include/Omap3530/Omap3530Usb.h|   42
> +
> >  .../Omap35xxPkg/Include/TPS65950.h|   74
> +
> >  .../InterruptDxe/HardwareInterrupt.c  |  396
> +
> >  .../Omap35xxPkg/InterruptDxe/InterruptDxe.inf |   48
> +
> >  .../LcdGraphicsOutputBlt.c|  439
> +
> >  .../LcdGraphicsOutputDxe.c|  394
> +
> >  .../LcdGraphicsOutputDxe.h|  151
> ++
> >  .../LcdGraphicsOutputDxe.inf  |   46
> +
> >  .../DebugAgentTimerLib/DebugAgentTimerLib.c   |  159
> ++
> >  .../DebugAgentTimerLib/DebugAgentTimerLib.inf |   42
> +
> >  .../Library/GdbSerialLib/GdbSerialLib.c   |   96
> ++
> >  .../Library/GdbSerialLib/GdbSerialLib.inf |   35
> +
> >  .../Omap35xxTimerLib/Omap35xxTimerLib.inf |   40
> +
> >  .../Library/Omap35xxTimerLib/TimerLib.c   |  151
> ++
> >  .../Library/OmapDmaLib/OmapDmaLib.c   |  170
> ++
> >  .../Library/OmapDmaLib/OmapDmaLib.inf |   43
> +
> >  .../Omap35xxPkg/Library/OmapLib/OmapLib.c |   77
> +
> >  .../Omap35xxPkg/Library/OmapLib/OmapLib.inf   |   31
> +
> >  .../RealTimeClockLib/RealTimeClockLib.c   |  291
> 
> >  .../RealTimeClockLib/RealTimeClockLib.inf |   32
> +
> >  .../Library/SerialPortLib/SerialPortLib.c |  208
> +++
> >  .../Library/SerialPortLib/SerialPortLib.inf   |   40
> +
> >  .../Omap35xxPkg/MMCHSDxe/MMCHS.c  | 1492
> +
> >  .../Omap35xxPkg/MMCHSDxe/MMCHS.h  |  169
> ++
> >  .../Omap35xxPkg/MMCHSDxe/MMCHS.inf|   48
> +
> >  .../Omap35xxPkg/MmcHostDxe/MmcHostDxe.c   |  671
> 
> >  .../Omap35xxPkg/MmcHostDxe/MmcHostDxe.h   |   38
> +
> >  .../Omap35xxPkg/MmcHostDxe/MmcHostDxe.inf |   47
> +
> >  .../Omap35xxPkg/Omap35xxPkg.dec   |   52
> +
> >  .../Omap35xxPkg/Omap35xxPkg.dsc   |  183
> ++
> >  .../Omap35xxPkg/PciEmulation/PciEmulation.c   |  107
> ++
> >  .../Omap35xxPkg/PciEmulation/PciEmulation.inf |   41
> +
> >  .../Omap35xxPkg/SmbusDxe/Smbus.c  |  319
> 
> >  .../Omap35xxPkg/SmbusDxe/Smbus.inf|   39
> +
> >  .../Omap35xxPkg/TPS65950Dxe/TPS65950.c|  110
> ++
> >  .../Omap35xxPkg/TPS65950Dxe/TPS65950.inf  |   42
> +
> >  .../Omap35xxPkg/TimerDxe/Timer.c  |  370
> 
> >  .../Omap35xxPkg/TimerDxe/TimerDxe.inf |   51
> +
> >  56 files changed, 9257 insertions(+)
> >  create mode 100644
> Silicon/TexasInsturments/Omap35xxPkg/Flash/Flash.c
> 
> TexasInsturments ->
> TexasInstruments
> 
> Also, using the sortorder and --stat/--stat-graph-width
> from Laszlo's
> guide when generating patches would be helpful here even
> though the
> code is just moving. It makes the above more clear, and
> puts the .dec
> and .dsc (which have actually changed) first.
> 
> Beyond that, I intend to change both this and
> BeagleBoardPkg to use
> full pathnames relative to edk2-platforms root after the
> migration,
> but we 

Re: [edk2-devel] [PATCH] BaseTools: Include headers not mentioned in inf are not hashed

2019-05-10 Thread Christian Rodriguez
After talking to my colleagues about this, the direction seems to be to 
fundamentally change this BZ. Instead of building this sort of workaround 
feature, we should use the information gathered from this feature to cause the 
build to break when the hash feature is enabled. This would force users of the 
hash feature to be UEFI spec complaint.

What do you guys think; Laszlo and Felix?

I'll update the BZ when I get your input.

Thanks,
Christian Rodriguez 

>-Original Message-
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>Felix Polyudov
>Sent: Friday, May 10, 2019 6:41 AM
>To: devel@edk2.groups.io; 'ler...@redhat.com' ;
>Rodriguez, Christian 
>Cc: Feng, Bob C ; Gao, Liming
>; Zhu, Yonghong 
>Subject: Re: [edk2-devel] [PATCH] BaseTools: Include headers not mentioned
>in inf are not hashed
>
>> -Original Message-
>> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>> Laszlo Ersek
>> Sent: Thursday, May 09, 2019 7:53 PM
>>
>> Hello Christian,
>>
>> On 05/09/19 23:27, Christian Rodriguez wrote:
>> > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1787
>> >
>> > Get a list of local header files that are not present in the
>> > MetaFile for this module. Add those local header files into the
>> > hashing algorithm for a module. If a local header file is not
>> > present in the MetaFile, the module will still build correctly
>> > though the hashing system didn't know about it before.
>> >
>> > Signed-off-by: Christian Rodriguez 
>> > Cc: Bob Feng 
>> > Cc: Liming Gao 
>> > Cc: Yonghong Zhu 
>> > ---
>> >  BaseTools/Source/Python/AutoGen/AutoGen.py | 24
>> > 
>> >  1 file changed, 24 insertions(+)
>>
>> I saw the BZ soon after it was reported. I almost commented, but
>> ultimately I couldn't decide what the real use case was.
>>
>> With this particular use case (i.e. INF file is missing some
>> module-specific header files that it could easily list), I think I
>> disagree, mildly (not too strongly). E.g., we fixed such omissions in
>> a bunch of INF files, last March, in the series
>
>I agree with Lazlo.
>According to section 3.9 of the INF specification (https://edk2-
>docs.gitbooks.io/edk-ii-inf-
>specification/3_edk_ii_inf_file_format/39_[sources]_sections.html),
>all source files (including module header files) must be listed in the 
>[Sources]
>section.
>Here is the quote:
>"All HII Unicode format files must be listed in this section as well as any 
>other
>"source" type file, such as local module header files, Vfr files, etc. "
>
>So, if file X is used by module Y, but is not listed in Y.inf, it's a 
>violation of the
>INF spec., which makes it a bug that has to be fixed.
>
>
>Please consider the environment before printing this email.
>
>The information contained in this message may be confidential and
>proprietary to American Megatrends, Inc.  This communication is intended to
>be read only by the individual or entity to whom it is addressed or by their
>designee. If the reader of this message is not the intended recipient, you are
>on notice that any distribution of this message, in any form, is strictly
>prohibited.  Please promptly notify the sender by reply e-mail or by telephone
>at 770-246-8600, and then delete or destroy all copies of the transmission.
>   l   K   q y e  ,j  a  +  U  ?E e   w Ӎ   i   vM *?  ^    ,j   N6 
>˭y8b :)  m  ?
>躛"}y M5  { ޷ j躓z'z   h+  l  '   r  zm   y 6  . Ȩ  z칷! +- 
>糊{^  &

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40455): https://edk2.groups.io/g/devel/message/40455
Mute This Topic: https://groups.io/mt/31570019/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms: Patch 8/8] edk2-platforms: Update Maintainers.txt/Readme.md for imported packages

2019-05-10 Thread Leif Lindholm
Hi Mike,

Over all, looks good. One consistency comment below:

On Thu, May 09, 2019 at 08:34:35PM -0700, Michael D Kinney wrote:
> https://bugzilla.tianocore.org/show_bug.cgi?id=1467
> https://bugzilla.tianocore.org/show_bug.cgi?id=1374
> https://bugzilla.tianocore.org/show_bug.cgi?id=1793
> 
> Update Maintainers.txt for the following packages:
> * Drivers/OptionRomPkg
> * Platform/BeagleBoard/BeagleBoardPkg
> * Platform/Intel/QuarkPlatformPkg
> * Platform/Intel/Vlv2TbltDevicePkg
> * Silicon/Intel/QuarkSocPkg
> * Silicon/Intel/Vlv2DeviceRefCodePkg
> * Silicon/TexasInsturments/Omap35xxPkg
> 
> Add the following platforms to Readme.md
> * BeagleBoard
> * MinnowBoard Max/Turbot
> * Galileo
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Kelly Steele 
> Cc: Ray Ni 
> Cc: Michael Kubacki 
> Cc: Leif Lindholm 
> Cc: Ard Biesheuvel 
> Signed-off-by: Michael D Kinney 
> ---
>  Maintainers.txt | 20 
>  Readme.md   |  9 +
>  2 files changed, 29 insertions(+)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt
> index 6477591e68..7dd403a170 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -38,12 +38,32 @@ W: 
> https://github.com/tianocore/tianocore.github.io/wiki/Security
>  EDK II Packages:
>  
>  
> +Drivers/OptionRomPkg
> +W: https://github.com/tianocore/tianocore.github.io/wiki/OptionRomPkg
> +M: Ray Ni 
> +
>  Platform
>  M: Ard Biesheuvel 
>  M: Leif Lindholm 
>  M: Michael D Kinney 
>  
> +Platform/Intel/QuarkPlatformPkg
> +M: Michael D Kinney 
> +M: Kelly Steele 
> +
> +Platform/Intel/Vlv2TbltDevicePkg
> +M: Zailiang Sun 
> +M: Yi Qian 
> +
>  Silicon
>  M: Ard Biesheuvel 
>  M: Leif Lindholm 
>  M: Michael D Kinney 
> +
> +Silicon/Intel/QuarkSocPkg
> +M: Michael D Kinney 
> +M: Kelly Steele 
> +
> +Silicon/Intel/Vlv2DeviceRefCodePkg
> +M: Zailiang Sun 
> +M: Yi Qian 
> diff --git a/Readme.md b/Readme.md
> index 95c0c14522..aac9f69d46 100644
> --- a/Readme.md
> +++ b/Readme.md
> @@ -208,6 +208,9 @@ they will be documented with the platform.
>  
>  ## [ARM](Platform/ARM/Readme.md)
>  
> +## BeagleBoard
> +* [BeagleBoard](Platform\BeagleBoard\BeagleBoardPkg)

The link here uses \.

> +
>  ## Hisilicon
>  * [D02](Platform/Hisilicon/D02)
>  * [D03](Platform/Hisilicon/D03)
> @@ -223,6 +226,12 @@ they will be documented with the platform.
>  ## Socionext
>  * [SynQuacer](Platform/Socionext/DeveloperBox)
>  
> +## Intel(R) Quark SoC X1000 based platforms
> +* [Galileo](Platform/Intel/QuarkPlatformPkg)

And the other links (as well as existing links) all use /.
So change BeagleBoard link to use / too?

With that:
Reviewed-by: Leif Lindholm 

> +
> +## Minnowboard Max/Turbot based on Intel Valleyview2 SoC
> +* [Minnowboard Max](Platform/Intel/Vlv2TbltDevicePkg)
> +
>  # Maintainers
>  
>  See [Maintainers.txt](Maintainers.txt).
> -- 
> 2.21.0.windows.1
> 
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40451): https://edk2.groups.io/g/devel/message/40451
Mute This Topic: https://groups.io/mt/31573411/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [Patch 2/2] edk2: Update Maintainers.txt for packages moved to edk2-platforms

2019-05-10 Thread Leif Lindholm
On Thu, May 09, 2019 at 08:46:12PM -0700, Michael D Kinney wrote:
> https://bugzilla.tianocore.org/show_bug.cgi?id=1467
> https://bugzilla.tianocore.org/show_bug.cgi?id=1374
> https://bugzilla.tianocore.org/show_bug.cgi?id=1793
> 
> Remove maintainers for ththe following packages that have been
> imported to edk2-platforms/master
>   * Omap35xxPkg
>   * BeagleBoardPkg
>   * QuarkSocPkg
>   * QuarkPlatformPkg
>   * Vlv2DeviceRefCodePkg
>   * Vlv2TbltDevicePkg
>   * OptionRomPkg
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Kelly Steele 
> Cc: Ray Ni 
> Cc: Michael Kubacki 
> Cc: Leif Lindholm 
> Cc: Ard Biesheuvel 
> Signed-off-by: Michael D Kinney 

Reviewed-by: Leif Lindholm 

> ---
>  Maintainers.txt | 26 --
>  1 file changed, 26 deletions(-)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt
> index ff5ae4af93..7315241b6e 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -86,11 +86,6 @@ M: Bob Feng 
>  M: Liming Gao 
>  R: Yonghong Zhu 
>  
> -BeagleBoardPkg
> -W: https://github.com/tianocore/tianocore.github.io/wiki/BeagleBoardPkg
> -M: Leif Lindholm 
> -M: Ard Biesheuvel 
> -
>  CorebootModulePkg, CorebootPayloadPkg
>  W: 
> https://github.com/tianocore/tianocore.github.io/wiki/Coreboot_UEFI_payload
>  M: Maurice Ma 
> @@ -195,15 +190,6 @@ W: 
> https://github.com/tianocore/tianocore.github.io/wiki/Nt32Pkg
>  M: Ray Ni 
>  M: Hao A Wu 
>  
> -Omap35xxPkg
> -W: https://github.com/tianocore/tianocore.github.io/wiki/Omap35xxPkg
> -M: Leif Lindholm 
> -M: Ard Biesheuvel 
> -
> -OptionRomPkg
> -W: https://github.com/tianocore/tianocore.github.io/wiki/OptionRomPkg
> -M: Ray Ni 
> -
>  OvmfPkg
>  W: http://www.tianocore.org/ovmf/
>  M: Jordan Justen 
> @@ -223,10 +209,6 @@ PcAtChipsetPkg
>  W: https://github.com/tianocore/tianocore.github.io/wiki/PcAtChipsetPkg
>  M: Ray Ni 
>  
> -QuarkPlatformPkg, QuarkSocPkg
> -M: Michael D Kinney 
> -M: Kelly Steele 
> -
>  SecurityPkg
>  W: https://github.com/tianocore/tianocore.github.io/wiki/SecurityPkg
>  M: Chao Zhang 
> @@ -260,14 +242,6 @@ M: Eric Dong 
>  M: Ray Ni 
>  R: Laszlo Ersek 
>  
> -Vlv2DeviceRefCodePkg
> -M: Zailiang Sun 
> -M: Yi Qian 
> -
> -Vlv2TbltDevicePkg
> -M: Zailiang Sun 
> -M: Yi Qian 
> -
>  StandaloneMmPkg
>  M: Achin Gupta 
>  M: Jiewen Yao 
> -- 
> 2.21.0.windows.1
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40453): https://edk2.groups.io/g/devel/message/40453
Mute This Topic: https://groups.io/mt/31573482/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [Patch 1/2] edk2: Remove packages moved to edk2-platforms

2019-05-10 Thread Leif Lindholm
On Thu, May 09, 2019 at 08:46:11PM -0700, Michael D Kinney wrote:
> https://bugzilla.tianocore.org/show_bug.cgi?id=1467
> https://bugzilla.tianocore.org/show_bug.cgi?id=1374
> https://bugzilla.tianocore.org/show_bug.cgi?id=1793
> 
> Remove the following packages that have been imported to
> edk2-platforms/master
>   * Omap35xxPkg
>   * BeagleBoardPkg
>   * QuarkSocPkg
>   * QuarkPlatformPkg
>   * Vlv2DeviceRefCodePkg
>   * Vlv2TbltDevicePkg
>   * OptionRomPkg
> 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> Cc: Kelly Steele 
> Cc: Ray Ni 
> Cc: Michael Kubacki 
> Cc: Leif Lindholm 
> Cc: Ard Biesheuvel 
> Signed-off-by: Michael D Kinney 

(Once affected packages have been merged into edk2-platforms.)
Reviewed-by: Leif Lindholm 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40452): https://edk2.groups.io/g/devel/message/40452
Mute This Topic: https://groups.io/mt/31573481/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms: Patch 1/8] Silicon/TexasInsturments: Import Omap35xxPkg from edk2

2019-05-10 Thread Leif Lindholm
Hi Mike,

I'm afraid a typo has snuck in below:

On Thu, May 09, 2019 at 08:34:28PM -0700, Michael D Kinney wrote:
> https://bugzilla.tianocore.org/show_bug.cgi?id=1467
> 
> Import Omap35xxPkg from edk2/master.
> 
> Cc: Leif Lindholm 
> Cc: Ard Biesheuvel 
> Signed-off-by: Michael D Kinney 
> ---
>  .../Omap35xxPkg/Flash/Flash.c |  768 +
>  .../Omap35xxPkg/Flash/Flash.h |  100 ++
>  .../Omap35xxPkg/Flash/Flash.inf   |   42 +
>  .../TexasInsturments/Omap35xxPkg/Gpio/Gpio.c  |  129 ++
>  .../Omap35xxPkg/Gpio/Gpio.inf |   39 +
>  .../Omap35xxPkg/Include/Library/OmapDmaLib.h  |   84 +
>  .../Omap35xxPkg/Include/Library/OmapLib.h |   38 +
>  .../Omap35xxPkg/Include/Omap3530/Omap3530.h   |   34 +
>  .../Include/Omap3530/Omap3530Dma.h|  124 ++
>  .../Include/Omap3530/Omap3530Gpio.h   |  125 ++
>  .../Include/Omap3530/Omap3530Gpmc.h   |  101 ++
>  .../Include/Omap3530/Omap3530I2c.h|   56 +
>  .../Include/Omap3530/Omap3530Interrupt.h  |   45 +
>  .../Include/Omap3530/Omap3530MMCHS.h  |  208 +++
>  .../Omap3530/Omap3530PadConfiguration.h   |  297 
>  .../Include/Omap3530/Omap3530Prcm.h   |  159 ++
>  .../Include/Omap3530/Omap3530Timer.h  |   76 +
>  .../Include/Omap3530/Omap3530Uart.h   |   48 +
>  .../Include/Omap3530/Omap3530Usb.h|   42 +
>  .../Omap35xxPkg/Include/TPS65950.h|   74 +
>  .../InterruptDxe/HardwareInterrupt.c  |  396 +
>  .../Omap35xxPkg/InterruptDxe/InterruptDxe.inf |   48 +
>  .../LcdGraphicsOutputBlt.c|  439 +
>  .../LcdGraphicsOutputDxe.c|  394 +
>  .../LcdGraphicsOutputDxe.h|  151 ++
>  .../LcdGraphicsOutputDxe.inf  |   46 +
>  .../DebugAgentTimerLib/DebugAgentTimerLib.c   |  159 ++
>  .../DebugAgentTimerLib/DebugAgentTimerLib.inf |   42 +
>  .../Library/GdbSerialLib/GdbSerialLib.c   |   96 ++
>  .../Library/GdbSerialLib/GdbSerialLib.inf |   35 +
>  .../Omap35xxTimerLib/Omap35xxTimerLib.inf |   40 +
>  .../Library/Omap35xxTimerLib/TimerLib.c   |  151 ++
>  .../Library/OmapDmaLib/OmapDmaLib.c   |  170 ++
>  .../Library/OmapDmaLib/OmapDmaLib.inf |   43 +
>  .../Omap35xxPkg/Library/OmapLib/OmapLib.c |   77 +
>  .../Omap35xxPkg/Library/OmapLib/OmapLib.inf   |   31 +
>  .../RealTimeClockLib/RealTimeClockLib.c   |  291 
>  .../RealTimeClockLib/RealTimeClockLib.inf |   32 +
>  .../Library/SerialPortLib/SerialPortLib.c |  208 +++
>  .../Library/SerialPortLib/SerialPortLib.inf   |   40 +
>  .../Omap35xxPkg/MMCHSDxe/MMCHS.c  | 1492 +
>  .../Omap35xxPkg/MMCHSDxe/MMCHS.h  |  169 ++
>  .../Omap35xxPkg/MMCHSDxe/MMCHS.inf|   48 +
>  .../Omap35xxPkg/MmcHostDxe/MmcHostDxe.c   |  671 
>  .../Omap35xxPkg/MmcHostDxe/MmcHostDxe.h   |   38 +
>  .../Omap35xxPkg/MmcHostDxe/MmcHostDxe.inf |   47 +
>  .../Omap35xxPkg/Omap35xxPkg.dec   |   52 +
>  .../Omap35xxPkg/Omap35xxPkg.dsc   |  183 ++
>  .../Omap35xxPkg/PciEmulation/PciEmulation.c   |  107 ++
>  .../Omap35xxPkg/PciEmulation/PciEmulation.inf |   41 +
>  .../Omap35xxPkg/SmbusDxe/Smbus.c  |  319 
>  .../Omap35xxPkg/SmbusDxe/Smbus.inf|   39 +
>  .../Omap35xxPkg/TPS65950Dxe/TPS65950.c|  110 ++
>  .../Omap35xxPkg/TPS65950Dxe/TPS65950.inf  |   42 +
>  .../Omap35xxPkg/TimerDxe/Timer.c  |  370 
>  .../Omap35xxPkg/TimerDxe/TimerDxe.inf |   51 +
>  56 files changed, 9257 insertions(+)
>  create mode 100644 Silicon/TexasInsturments/Omap35xxPkg/Flash/Flash.c

TexasInsturments ->
TexasInstruments

Also, using the sortorder and --stat/--stat-graph-width from Laszlo's
guide when generating patches would be helpful here even though the
code is just moving. It makes the above more clear, and puts the .dec
and .dsc (which have actually changed) first.

Beyond that, I intend to change both this and BeagleBoardPkg to use
full pathnames relative to edk2-platforms root after the migration,
but we don't need to do that for the migration.

Best Regards,

Leif

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40450): https://edk2.groups.io/g/devel/message/40450
Mute This Topic: https://groups.io/mt/31573400/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 0/2] Add batch option to support build Binary Cache

2019-05-10 Thread Kubacki, Michael A
Hi Steven,

We have Python build scripts now and those need to be
updated with this change. The batch scripts will be deleted
soon and only exist at the moment for a brief grace period.
Please update the Python scripts.

Also, update the Python build section in Readme.md to
describe this change including how the user can change
the binary cache path.

Thanks,
Michael

> -Original Message-
> From: Shi, Steven
> Sent: Wednesday, May 8, 2019 8:21 PM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Lu, Shifei A
> ; Gao, Liming ; Bi, Dandan
> ; Kubacki, Michael A 
> Subject: [PATCH 0/2] Add batch option to support build Binary Cache
> 
> This patch serial is to extend the options in the Kabylake and Purley build
> batch file to support build Binary Cache produce and consume switch.
> 
> 
> Steven Shi (2):
>   KabylakeOpenBoardPkg/KabylakeRvp3: Extend build to support Binary
> Cache
>   PurleyOpenBoardPkg/BoardMtOlympus: Extend build to support Binary
> Cache
> 
>  .../KabylakeOpenBoardPkg/KabylakeRvp3/bld.bat | 24 +-
> -  .../PurleyOpenBoardPkg/BoardMtOlympus/bld.bat | 18 --
>  .../BoardMtOlympus/prebuild.bat   |  4 ++--
>  3 files changed, 40 insertions(+), 6 deletions(-)
> 
> --
> 2.17.1.windows.2


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40449): https://edk2.groups.io/g/devel/message/40449
Mute This Topic: https://groups.io/mt/31551299/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] BaseTools: Include headers not mentioned in inf are not hashed

2019-05-10 Thread Carsey, Jaben
Inline.

tldr: good answers. 

If change list to set in name of set object:
Reviewed-by: jaben carsey 

> -Original Message-
> From: Rodriguez, Christian
> Sent: Friday, May 10, 2019 8:28 AM
> To: Carsey, Jaben ; devel@edk2.groups.io
> Cc: Feng, Bob C ; Gao, Liming
> ; Zhu, Yonghong 
> Subject: RE: [edk2-devel] [PATCH] BaseTools: Include headers not
> mentioned in inf are not hashed
> Importance: High
> 
> Replies inline.
> 
> >-Original Message-
> >From: Carsey, Jaben
> >Sent: Thursday, May 9, 2019 4:39 PM
> >To: devel@edk2.groups.io; Rodriguez, Christian
> >
> >Cc: Feng, Bob C ; Gao, Liming
> >; Zhu, Yonghong 
> >Subject: RE: [edk2-devel] [PATCH] BaseTools: Include headers not
> mentioned
> >in inf are not hashed
> >
> >Some questions inline.
> >
> >> -Original Message-
> >> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> >> Christian Rodriguez
> >> Sent: Thursday, May 09, 2019 2:27 PM
> >> To: devel@edk2.groups.io
> >> Cc: Feng, Bob C ; Gao, Liming
> >> ; Zhu, Yonghong 
> >> Subject: [edk2-devel] [PATCH] BaseTools: Include headers not mentioned
> >> in inf are not hashed
> >>
> >> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1787
> >>
> >> Get a list of local header files that are not present in the MetaFile
> >> for this module. Add those local header files into the hashing
> >> algorithm for a module. If a local header file is not present in the
> >> MetaFile, the module will still build correctly though the hashing
> >> system didn't know about it before.
> >>
> >> Signed-off-by: Christian Rodriguez 
> >> Cc: Bob Feng 
> >> Cc: Liming Gao 
> >> Cc: Yonghong Zhu 
> >> ---
> >>  BaseTools/Source/Python/AutoGen/AutoGen.py | 24
> >> 
> >>  1 file changed, 24 insertions(+)
> >>
> >> diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py
> >> b/BaseTools/Source/Python/AutoGen/AutoGen.py
> >> index 31721a6f9f..bd282d3ec1 100644
> >> --- a/BaseTools/Source/Python/AutoGen/AutoGen.py
> >> +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
> >> @@ -4098,8 +4098,10 @@ class ModuleAutoGen(AutoGen):
> >>  if self.Name in GlobalData.gModuleHash[self.Arch] and
> >> GlobalData.gBinCacheSource and self.AttemptModuleCacheCopy():
> >>  return False
> >>  m = hashlib.md5()
> >> +
> >>  # Add Platform level hash
> >>  m.update(GlobalData.gPlatformHash.encode('utf-8'))
> >> +
> >>  # Add Package level hash
> >>  if self.DependentPackageList:
> >>  for Pkg in sorted(self.DependentPackageList, key=lambda x:
> >> x.PackageName):
> >> @@ -4118,14 +4120,36 @@ class ModuleAutoGen(AutoGen):
> >>  Content = f.read()
> >>  f.close()
> >>  m.update(Content)
> >> +
> >>  # Add Module's source files
> >> +localSourceFileList = set()
> >>  if self.SourceFileList:
> >>  for File in sorted(self.SourceFileList, key=lambda x: str(x)):
> >> +localSourceFileList.add(str(File))
> >>  f = open(str(File), 'rb')
> >>  Content = f.read()
> >>  f.close()
> >>  m.update(Content)
> >>
> >> +# Get a list of Module's local header files not included in 
> >> metaFile
> >> +localHeaderList = set()
> >> +if self.SourceDir:
> >> +for root, dirs, files in os.walk(self.SourceDir):
> >> +for aFile in files:
> >> +filePath = os.path.join(self.WorkspaceDir,
> >> + os.path.join(root,
> >> aFile))
> >> +if not filePath.endswith(('.h', '.H')):
> >> +continue
> >> +if filePath not in localSourceFileList:
> >
> >Confused about localSourceFileList.
> >Why is it a set and named list?
> >Why not just use self.SourceFileList?
> >
> The naming convention could be better and I can address that in a different
> patch, if we decide to go forward with this idea overall.
> It should probably be named a set.
> The reason to using this new set is for a few reasons:
> 1. self.SourceFileList contains source file paths of class PathClass and not 
> type
> str
> 2. If we want to use self.SourceFileList you must convert PathClass to a str 
> for
> string comparison
> The set just allows for a unique list of objects and theoretically faster to
> check existence.

I agree and really prefer the set datatype for this operation, the name is 
confusing.  I wonder what the ROI is for the custom PathClass sometimes.  Seems 
confusing often.

> 
> >> +localHeaderList.add(filePath)
> >> +
> >> +# Add Module's local header files
> >> +localHeaderList = list(localHeaderList)
> >> +for File in sorted(localHeaderList):
> >> +f = open(str(File), 'rb')
> >> +Content = f.read()
> >
> >Can you use 'with open(...) as...:' syntax to make sure the file is always
> closed?
> I just used the same implementation as th

Re: [edk2-devel] [edk2-platforms: PATCH 00/14] Armada7k8k PCIE support

2019-05-10 Thread Leif Lindholm
On Thu, May 09, 2019 at 11:53:28AM +0200, Marcin Wojtas wrote:
> Hi,
> 
> Hereby I submit Armada7k8k PCIE support. The commits
> allow to use single controller on each of currently
> supported boards (MacchiatoBin, A7040/A8040-DB) both in
> firmware and in OS with ACPI boot. Multiple slots,
> using custom PciSegmentLib, will be added later.

Thanks, Marcin.

As you have seen, I had only really minor comments on this
set. (Patches I have not commented on look fine to me.)
But I think we need Ard to give this a skim as well before pushing it,
so I don't think we need a v2 until that has happened.

Best Regards,

Leif

> Current patchset can be grouped following way:
> 1. Preparation patches for Armada platforms (SoC and
>Board description libraries and protocol)
> 
> 2. Implement PciHostBridgeLib/PciExpressLib and
>enable compilation.
> 
> 3. ACPI support for each board + switch to pci-host-generic
>in MacchiatoBin DT.
> 
> 4. Additional 2 small patches.
> 
> Thank to these commits (and all previously merged support), we can
> now use mainline ARM-TF + EDK2 with DT and ACPI distributions and
> operating systems. Example logs:
> * McBin DT boot with pci-host-generic driver https://pastebin.com/5dRVCjRR
> * McBin + Centos AltArch7 https://pastebin.com/BGx3Q6w0
> * ACPI boot on Armada7040Db with USB over PCIE https://pastebin.com/kMMUnEr8
> 
> In case anyone wishes to try, for your convenience, I uploaded
> the McBin binary built from the PCIE branch on top of the
> latest edk2/edk2-platforms with today's ARM-TF:
> https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/wiki/files/flash-image-mcbin-mainline-r20190509.bin
> 
> The patches are available in the github:
> https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/commits/pcie-upstream-r20190509
> 
> I'm looking forward to your comments or remarks.
> 
> Best regards,
> Marcin
> 
> Ard Biesheuvel (1):
>   Marvell/Armada7k8k: Add PciExpressLib implementation
> 
> Marcin Wojtas (13):
>   Marvell/Library: MvGpioLib: Extend GPIO pin description
>   Marvell/Library: ArmadaSoCDescLib: Add PCIE information
>   Marvell/Library: ArmadaBoardDescLib: Add PCIE information
>   Marvell/Armada7k8k: Extend board description libraries with PCIE
>   Marvell/Armada7k8k: MvBoardDesc: Extend protocol with PCIE support
>   Marvell/Armada7k8k: Implement PciHostBridgeLib
>   Marvell/Armada7k8k: Enable PCIE support
>   Marvell/Armada80x0McBin: Enable ACPI PCIE support
>   Marvell/Armada80x0Db: Enable ACPI PCIE support
>   Marvell/Armada70x0Db: Enable ACPI PCIE support
>   Marvell/Armada80x0McBin: DeviceTree: Use pci-host-generic driver
>   Marvell/Armada7k8k: Remove duplication in .dsc files
>   Marvell/Armada7k8: Add 'acpiview' shell command to build
> 
>  Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
>|   18 +-
>  Platform/Marvell/Armada70x0Db/Armada70x0Db.dsc   
>|4 +-
>  Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc   
>|4 +-
>  Platform/SolidRun/Armada80x0McBin/Armada80x0McBin.dsc
>|4 +-
>  Silicon/Marvell/Armada7k8k/Armada7k8k.fdf
>|5 +
>  Silicon/Marvell/Armada7k8k/AcpiTables/Armada70x0Db.inf   
>|1 +
>  Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0Db.inf   
>|1 +
>  Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin.inf
>|1 +
>  Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciExpressLib/PciExpressLib.inf 
>|   42 +
>  
> Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLib.inf
>   |   52 +
>  Silicon/Marvell/Armada7k8k/AcpiTables/Armada70x0Db/Pcie.h
>|   25 +
>  Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0Db/Pcie.h
>|   25 +
>  Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin/Pcie.h 
>|   25 +
>  
> Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLibConstructor.h
>  |   95 ++
>  
> Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.h
>   |6 +
>  Silicon/Marvell/Include/Library/ArmadaBoardDescLib.h 
>|   46 +
>  Silicon/Marvell/Include/Library/ArmadaSoCDescLib.h   
>|   20 +
>  Silicon/Marvell/Include/Library/MvGpioLib.h  
>|1 +
>  Silicon/Marvell/Include/Protocol/BoardDesc.h 
>|   22 +
>  
> Platform/Marvell/Armada70x0Db/Armada70x0DbBoardDescLib/Armada70x0DbBoardDescLib.c
>|   48 +
>  
> Platform/Marvell/Armada70x0Db/NonDiscoverableInitLib/NonDiscoverableInitLib.

Re: [edk2-devel] [edk2-platforms: PATCH 09/14] Marvell/Armada80x0McBin: Enable ACPI PCIE support

2019-05-10 Thread Leif Lindholm
On Thu, May 09, 2019 at 11:53:37AM +0200, Marcin Wojtas wrote:
> This patch adds description of the PCIE controller in
> ACPI tables of MacchiatoBin community board.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Marcin Wojtas 
> ---
>  Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin.inf   |   1 +
>  Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin/Pcie.h|  25 +++
>  Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin/Dsdt.asl  | 217 
> 
>  Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin/Mcfg.aslc |  47 +
>  4 files changed, 290 insertions(+)
>  create mode 100644 
> Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin/Pcie.h
>  create mode 100644 
> Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin/Mcfg.aslc
> 
> diff --git a/Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin.inf 
> b/Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin.inf
> index 9e52281..e627932 100644
> --- a/Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin.inf
> +++ b/Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin.inf
> @@ -25,6 +25,7 @@
>  
>  [Sources]
>Armada80x0McBin/Dsdt.asl
> +  Armada80x0McBin/Mcfg.aslc
>Fadt.aslc
>Gtdt.aslc
>Madt.aslc
> diff --git a/Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin/Pcie.h 
> b/Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin/Pcie.h
> new file mode 100644
> index 000..93631c2
> --- /dev/null
> +++ b/Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin/Pcie.h

This file also has wrong line endings in your branch.

/
Leif

> @@ -0,0 +1,25 @@
> +/**
> +
> +  Copyright (C) 2019, Marvell International Ltd. and its affiliates.
> +
> +  This program and the accompanying materials are licensed and made available
> +  under the terms and conditions of the BSD License which accompanies this
> +  distribution. The full text of the license may be found at
> +  http://opensource.org/licenses/bsd-license.php
> +
> +  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> +  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
> IMPLIED.
> +
> +**/
> +
> +#define PCI_BUS_MIN0x0
> +#define PCI_BUS_MAX0x0
> +#define PCI_BUS_COUNT  0x1
> +#define PCI_MMIO32_BASE0xC000
> +#define PCI_MMIO32_SIZE0x2000
> +#define PCI_MMIO64_BASE0x8
> +#define PCI_MMIO64_SIZE0x1
> +#define PCI_IO_BASE0x0
> +#define PCI_IO_SIZE0x1
> +#define PCI_IO_TRANSLATION 0xEFF0
> +#define PCI_ECAM_BASE  0xE0008000
> diff --git a/Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin/Dsdt.asl 
> b/Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin/Dsdt.asl
> index 87cb93a..caf5cb9 100644
> --- a/Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin/Dsdt.asl
> +++ b/Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0McBin/Dsdt.asl
> @@ -14,6 +14,7 @@
>  
>  **/
>  
> +#include "Armada80x0McBin/Pcie.h"
>  #include "IcuInterrupts.h"
>  
>  DefinitionBlock ("DSDT.aml", "DSDT", 2, "MVEBU ", "ARMADA8K", 3)
> @@ -306,5 +307,221 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2, "MVEBU ", 
> "ARMADA8K", 3)
>  }
>  })
>  }
> +
> +//
> +// PCIe Root Bus
> +//
> +Device (PCI0)
> +{
> +Name (_HID, "PNP0A08" /* PCI Express Bus */)  // _HID: Hardware 
> ID
> +Name (_CID, "PNP0A03" /* PCI Bus */)  // _CID: Compatible ID
> +Name (_SEG, 0x00)  // _SEG: PCI Segment
> +Name (_BBN, 0x00)  // _BBN: BIOS Bus Number
> +Name (_CCA, 0x01)  // _CCA: Cache Coherency Attribute
> +Name (_PRT, Package ()  // _PRT: PCI Routing Table
> +{
> +Package () { 0x, 0x0, 0x0, 0x40 },
> +Package () { 0x, 0x1, 0x0, 0x40 },
> +Package () { 0x, 0x2, 0x0, 0x40 },
> +Package () { 0x, 0x3, 0x0, 0x40 }
> +})
> +
> +Method (_CRS, 0, Serialized)  // _CRS: Current Resource Settings
> +{
> +Name (RBUF, ResourceTemplate ()
> +{
> +WordBusNumber (ResourceProducer, MinFixed, MaxFixed, 
> PosDecode,
> +0x, // Granularity
> +PCI_BUS_MIN,// Range Minimum
> +PCI_BUS_MAX,// Range Maximum
> +0x, // Translation 
> Offset
> +PCI_BUS_COUNT   // Length
> +)
> +DWordMemory (ResourceProducer, PosDecode, MinFixed, 
> MaxFixed, NonCacheable, ReadWrite,
> +0x, // Granularity
> +PCI_MMIO32_BASE,// Range Minimum
> +0xDFFF, 

Re: [edk2-devel] [edk2-platforms: PATCH 07/14] Marvell/Armada7k8k: Implement PciHostBridgeLib

2019-05-10 Thread Leif Lindholm
On Thu, May 09, 2019 at 11:53:35AM +0200, Marcin Wojtas wrote:
> Add an implementation of the PciHostBridgeLib glue library that
> describes the PCIe RC on this SoC so that the generic PCI host bridge
> driver can attach to it.
> 
> This includes a constructor which performs the SoC specific init and
> training sequences.
> 
> This patch is based on work of Ard Biesheuvel 
> and Jing Hua /
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Marcin Wojtas 
> ---
>  
> Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLib.inf
>   |  52 +++
>  
> Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLibConstructor.h
>  |  95 ++

Since you so helpfully gave me a link to your branch, I can tell that
Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLibConstructor.h
has incorrect line endings. If you could address for v2, that would be
most appreciated.

>  
> Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLib.c
> | 244 +++
>  
> Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLibConstructor.c
>  | 330 
>  4 files changed, 721 insertions(+)
>  create mode 100644 
> Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLib.inf
>  create mode 100644 
> Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLibConstructor.h
>  create mode 100644 
> Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLib.c
>  create mode 100644 
> Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLibConstructor.c
> 
> diff --git 
> a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLib.inf
>  
> b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLib.inf
> new file mode 100644
> index 000..e46f71d
> --- /dev/null
> +++ 
> b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLib.inf
> @@ -0,0 +1,52 @@
> +## @file
> +#  PCI Host Bridge Library instance for Marvell Armada 7k/8k SOC
> +#
> +#  Copyright (c) 2017, Linaro Ltd. All rights reserved.
> +#  Copyright (c) 2019 Marvell International Ltd. All rights reserved.
> +#
> +#  This program and the accompanying materials are licensed and made 
> available
> +#  under the terms and conditions of the BSD License which accompanies this
> +#  distribution. The full text of the license may be found at
> +#  http://opensource.org/licenses/bsd-license.php
> +#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> +#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR
> +#  IMPLIED.
> +#
> +#
> +##
> +
> +[Defines]
> +  INF_VERSION= 0x0001001B
> +  BASE_NAME  = Armada7k8kPciHostBridgeLib
> +  FILE_GUID  = 7f989c9d-02a0-4348-8aeb-ab2e1566fb18
> +  MODULE_TYPE= DXE_DRIVER
> +  VERSION_STRING = 1.0
> +  LIBRARY_CLASS  = PciHostBridgeLib|DXE_DRIVER
> +  CONSTRUCTOR= Armada7k8kPciHostBridgeLibConstructor
> +
> +[Sources]
> +  PciHostBridgeLib.c
> +  PciHostBridgeLibConstructor.c
> +
> +[Packages]
> +  ArmPkg/ArmPkg.dec
> +  EmbeddedPkg/EmbeddedPkg.dec
> +  MdeModulePkg/MdeModulePkg.dec
> +  MdePkg/MdePkg.dec
> +  Silicon/Marvell/Marvell.dec
> +
> +[LibraryClasses]
> +  ArmLib
> +  ArmadaSoCDescLib
> +  DebugLib
> +  DevicePathLib
> +  MemoryAllocationLib
> +  MvGpioLib
> +  UefiBootServicesTableLib
> +
> +[Protocols]
> +  gEmbeddedGpioProtocolGuid
> +  gMarvellBoardDescProtocolGuid
> +
> +[Depex]
> +  gMarvellPlatformInitCompleteProtocolGuid
> diff --git 
> a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLibConstructor.h
>  
> b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLibConstructor.h
> new file mode 100644
> index 000..ff9d919
> --- /dev/null
> +++ 
> b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciHostBridgeLib/PciHostBridgeLibConstructor.h
> @@ -0,0 +1,95 @@
> +/** @file
> +  PCI Host Bridge Library instance for Marvell 70x0/80x0
> +
> +  Copyright (c) 2017, Linaro Ltd. All rights reserved.
> +  Copyright (c) 2019 Marvell International Ltd. All rights reserved.
> +
> +  This program and the accompanying materials are licensed and made available
> +  under the terms and conditions of the BSD License which accompanies this
> +  distribution.  The full text of the license may be found at
> +  http://opensource.org/licenses/bsd-license.php.
> +
> +  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 
> WITHOUT
> +  WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
> +
> +**/
> +#ifndef __PCI_HOST_BRIDGE_LIB_CONSTRUCTOR_H__
> +#define __PCI_HOST_BRIDGE_LIB_CONSTRUCTOR_H__
> +
> +#define IATU_VIEWPORT_OFF   0x900
> +#define IATU_

Re: [edk2-devel] [PATCH] BaseTools: Include headers not mentioned in inf are not hashed

2019-05-10 Thread Christian Rodriguez
Replies inline.

>-Original Message-
>From: Carsey, Jaben
>Sent: Thursday, May 9, 2019 4:39 PM
>To: devel@edk2.groups.io; Rodriguez, Christian
>
>Cc: Feng, Bob C ; Gao, Liming
>; Zhu, Yonghong 
>Subject: RE: [edk2-devel] [PATCH] BaseTools: Include headers not mentioned
>in inf are not hashed
>
>Some questions inline.
>
>> -Original Message-
>> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>> Christian Rodriguez
>> Sent: Thursday, May 09, 2019 2:27 PM
>> To: devel@edk2.groups.io
>> Cc: Feng, Bob C ; Gao, Liming
>> ; Zhu, Yonghong 
>> Subject: [edk2-devel] [PATCH] BaseTools: Include headers not mentioned
>> in inf are not hashed
>>
>> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1787
>>
>> Get a list of local header files that are not present in the MetaFile
>> for this module. Add those local header files into the hashing
>> algorithm for a module. If a local header file is not present in the
>> MetaFile, the module will still build correctly though the hashing
>> system didn't know about it before.
>>
>> Signed-off-by: Christian Rodriguez 
>> Cc: Bob Feng 
>> Cc: Liming Gao 
>> Cc: Yonghong Zhu 
>> ---
>>  BaseTools/Source/Python/AutoGen/AutoGen.py | 24
>> 
>>  1 file changed, 24 insertions(+)
>>
>> diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py
>> b/BaseTools/Source/Python/AutoGen/AutoGen.py
>> index 31721a6f9f..bd282d3ec1 100644
>> --- a/BaseTools/Source/Python/AutoGen/AutoGen.py
>> +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
>> @@ -4098,8 +4098,10 @@ class ModuleAutoGen(AutoGen):
>>  if self.Name in GlobalData.gModuleHash[self.Arch] and
>> GlobalData.gBinCacheSource and self.AttemptModuleCacheCopy():
>>  return False
>>  m = hashlib.md5()
>> +
>>  # Add Platform level hash
>>  m.update(GlobalData.gPlatformHash.encode('utf-8'))
>> +
>>  # Add Package level hash
>>  if self.DependentPackageList:
>>  for Pkg in sorted(self.DependentPackageList, key=lambda x:
>> x.PackageName):
>> @@ -4118,14 +4120,36 @@ class ModuleAutoGen(AutoGen):
>>  Content = f.read()
>>  f.close()
>>  m.update(Content)
>> +
>>  # Add Module's source files
>> +localSourceFileList = set()
>>  if self.SourceFileList:
>>  for File in sorted(self.SourceFileList, key=lambda x: str(x)):
>> +localSourceFileList.add(str(File))
>>  f = open(str(File), 'rb')
>>  Content = f.read()
>>  f.close()
>>  m.update(Content)
>>
>> +# Get a list of Module's local header files not included in metaFile
>> +localHeaderList = set()
>> +if self.SourceDir:
>> +for root, dirs, files in os.walk(self.SourceDir):
>> +for aFile in files:
>> +filePath = os.path.join(self.WorkspaceDir,
>> + os.path.join(root,
>> aFile))
>> +if not filePath.endswith(('.h', '.H')):
>> +continue
>> +if filePath not in localSourceFileList:
>
>Confused about localSourceFileList.
>Why is it a set and named list?
>Why not just use self.SourceFileList?
>
The naming convention could be better and I can address that in a different 
patch, if we decide to go forward with this idea overall.
It should probably be named a set.
The reason to using this new set is for a few reasons: 
1. self.SourceFileList contains source file paths of class PathClass and not 
type str
2. If we want to use self.SourceFileList you must convert PathClass to a str 
for string comparison
The set just allows for a unique list of objects and theoretically faster to 
check existence.

>> +localHeaderList.add(filePath)
>> +
>> +# Add Module's local header files
>> +localHeaderList = list(localHeaderList)
>> +for File in sorted(localHeaderList):
>> +f = open(str(File), 'rb')
>> +Content = f.read()
>
>Can you use 'with open(...) as...:' syntax to make sure the file is always 
>closed?
I just used the same implementation as the above existing code. I can 
definitely change it to use 'with open(...)'.
Though explicitly calling f.close() as below should be making sure the file is 
always closed.
>
>> +f.close()
>> +m.update(Content)
>> +
>>  ModuleHashFile = path.join(self.BuildDir, self.Name + ".hash")
>>  if self.Name not in GlobalData.gModuleHash[self.Arch]:
>>  GlobalData.gModuleHash[self.Arch][self.Name] =
>> m.hexdigest()
>> --
>> 2.19.1.windows.1
>>
>>
>> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40443): https://edk2.groups.io/g/devel/message/40443
Mute This Topic: https://groups.io/mt/31570019/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive

Re: [edk2-devel] [edk2-platforms: PATCH 06/14] Marvell/Armada7k8k: Add PciExpressLib implementation

2019-05-10 Thread Marcin Wojtas
Hi Leif,

pt., 10 maj 2019 o 17:25 Leif Lindholm  napisał(a):
>
> On Thu, May 09, 2019 at 11:53:34AM +0200, Marcin Wojtas wrote:
> > From: Ard Biesheuvel 
> >
> > Implement a special version of PciExpressLib that takes the quirky
> > nature of the Synopsys Designware PCIe IP into account. In particular,
> > we need to ignores config space accesses to all devices on the first
> > bus except device 0, because the broadcast nature of type 0 configuration
> > cycles will result in whatever device is in the slot to appear at each
> > of the 32 device positions.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Marcin Wojtas 
> > ---
> >  
> > Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciExpressLib/PciExpressLib.inf
> >  |   42 +
> >  Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciExpressLib/PciExpressLib.c 
> >   | 1529 
> >  2 files changed, 1571 insertions(+)
> >  create mode 100644 
> > Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciExpressLib/PciExpressLib.inf
> >  create mode 100644 
> > Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciExpressLib/PciExpressLib.c
> >
> > diff --git 
> > a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciExpressLib/PciExpressLib.inf
> >  
> > b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciExpressLib/PciExpressLib.inf
> > new file mode 100644
> > index 000..8f09820
> > --- /dev/null
> > +++ 
> > b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciExpressLib/PciExpressLib.inf
> > @@ -0,0 +1,42 @@
> > +## @file
> > +#
> > +#  Copyright (c) 2017, Linaro, Ltd. All rights reserved.
> > +#  Copyright (c) 2019 Marvell International Ltd. All rights reserved.
> > +#
> > +#  This program and the accompanying materials
> > +#  are licensed and made available under the terms and conditions of the 
> > BSD License
> > +#  which accompanies this distribution. The full text of the license may 
> > be found at
> > +#  http://opensource.org/licenses/bsd-license.php.
> > +#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> > +#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
> > IMPLIED.
> > +#
> > +#
> > +##
> > +
> > +[Defines]
> > +  INF_VERSION= 0x0001001B
> > +  BASE_NAME  = Armada7k8kPciExpressLib
> > +  FILE_GUID  = f0926204-3061-40ed-8261-2aeccc7914c9
> > +  MODULE_TYPE= BASE
> > +  VERSION_STRING = 1.0
> > +  LIBRARY_CLASS  = PciExpressLib
> > +
> > +[Sources]
> > +  PciExpressLib.c
> > +
> > +[Packages]
> > +  ArmPkg/ArmPkg.dec
> > +  MdePkg/MdePkg.dec
> > +
> > +[LibraryClasses]
> > +  BaseLib
> > +  DebugLib
> > +  IoLib
> > +  PcdLib
> > +
> > +[Pcd]
> > +  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress  ## CONSUMES
> > +
> > +[FixedPcd]
> > +  gArmTokenSpaceGuid.PcdPciBusMin
> > +  gArmTokenSpaceGuid.PcdPciBusMax
> > diff --git 
> > a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciExpressLib/PciExpressLib.c
> >  
> > b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciExpressLib/PciExpressLib.c
> > new file mode 100644
> > index 000..8fa2eb6
> > --- /dev/null
> > +++ 
> > b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciExpressLib/PciExpressLib.c
> > @@ -0,0 +1,1529 @@
> > +/** @file
> > +
> > +  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
> > +  Copyright (c) 2019 Marvell International Ltd. All rights reserved.
>
> If Ard is the author of this patch, should there not be Linaro
> copyright here as well?
>
> > +
> > +  This program and the accompanying materials
> > +  are licensed and made available under the terms and conditions of the 
> > BSD License
> > +  which accompanies this distribution.  The full text of the license may 
> > be found at
> > +  http://opensource.org/licenses/bsd-license.php.
> > +
> > +  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> > +  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
> > IMPLIED.
> > +
> > +**/
> > +
> > +
> > +#include 
> > +
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +
> > +/**
> > +  Assert the validity of a PCI address. A valid PCI address should contain 
> > 1's
> > +  only in the low 28 bits.
> > +
> > +  @param  A The address to validate.
> > +
> > +**/
> > +#define ASSERT_INVALID_PCI_ADDRESS(A) \
> > +  ASSERT (((A) & ~0xfff) == 0)
> > +
> > +/**
> > +  Registers a PCI device so PCI configuration registers may be accessed 
> > after
> > +  SetVirtualAddressMap().
> > +
> > +  Registers the PCI device specified by Address so all the PCI 
> > configuration
> > +  registers associated with that PCI device may be accessed after 
> > SetVirtualAddressMap()
> > +  is called.
> > +
> > +  If Address > 0x0FFF, then ASSERT().
> > +
> > +  @param  Address The address that encodes the PCI Bus, Device, Function 
> > and
> > +  Register.
> > +
> > +  @retval RETURN_SUCCESS   The PCI 

Re: [edk2-devel] [edk2-platforms: PATCH 06/14] Marvell/Armada7k8k: Add PciExpressLib implementation

2019-05-10 Thread Leif Lindholm
On Thu, May 09, 2019 at 11:53:34AM +0200, Marcin Wojtas wrote:
> From: Ard Biesheuvel 
> 
> Implement a special version of PciExpressLib that takes the quirky
> nature of the Synopsys Designware PCIe IP into account. In particular,
> we need to ignores config space accesses to all devices on the first
> bus except device 0, because the broadcast nature of type 0 configuration
> cycles will result in whatever device is in the slot to appear at each
> of the 32 device positions.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Marcin Wojtas 
> ---
>  Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciExpressLib/PciExpressLib.inf 
> |   42 +
>  Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciExpressLib/PciExpressLib.c   
> | 1529 
>  2 files changed, 1571 insertions(+)
>  create mode 100644 
> Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciExpressLib/PciExpressLib.inf
>  create mode 100644 
> Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciExpressLib/PciExpressLib.c
> 
> diff --git 
> a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciExpressLib/PciExpressLib.inf
>  
> b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciExpressLib/PciExpressLib.inf
> new file mode 100644
> index 000..8f09820
> --- /dev/null
> +++ 
> b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciExpressLib/PciExpressLib.inf
> @@ -0,0 +1,42 @@
> +## @file
> +#
> +#  Copyright (c) 2017, Linaro, Ltd. All rights reserved.
> +#  Copyright (c) 2019 Marvell International Ltd. All rights reserved.
> +#
> +#  This program and the accompanying materials
> +#  are licensed and made available under the terms and conditions of the BSD 
> License
> +#  which accompanies this distribution. The full text of the license may be 
> found at
> +#  http://opensource.org/licenses/bsd-license.php.
> +#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> +#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
> IMPLIED.
> +#
> +#
> +##
> +
> +[Defines]
> +  INF_VERSION= 0x0001001B
> +  BASE_NAME  = Armada7k8kPciExpressLib
> +  FILE_GUID  = f0926204-3061-40ed-8261-2aeccc7914c9
> +  MODULE_TYPE= BASE
> +  VERSION_STRING = 1.0
> +  LIBRARY_CLASS  = PciExpressLib
> +
> +[Sources]
> +  PciExpressLib.c
> +
> +[Packages]
> +  ArmPkg/ArmPkg.dec
> +  MdePkg/MdePkg.dec
> +
> +[LibraryClasses]
> +  BaseLib
> +  DebugLib
> +  IoLib
> +  PcdLib
> +
> +[Pcd]
> +  gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress  ## CONSUMES
> +
> +[FixedPcd]
> +  gArmTokenSpaceGuid.PcdPciBusMin
> +  gArmTokenSpaceGuid.PcdPciBusMax
> diff --git 
> a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciExpressLib/PciExpressLib.c 
> b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciExpressLib/PciExpressLib.c
> new file mode 100644
> index 000..8fa2eb6
> --- /dev/null
> +++ 
> b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kPciExpressLib/PciExpressLib.c
> @@ -0,0 +1,1529 @@
> +/** @file
> +
> +  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
> +  Copyright (c) 2019 Marvell International Ltd. All rights reserved.

If Ard is the author of this patch, should there not be Linaro
copyright here as well?

> +
> +  This program and the accompanying materials
> +  are licensed and made available under the terms and conditions of the BSD 
> License
> +  which accompanies this distribution.  The full text of the license may be 
> found at
> +  http://opensource.org/licenses/bsd-license.php.
> +
> +  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
> +  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR 
> IMPLIED.
> +
> +**/
> +
> +
> +#include 
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +/**
> +  Assert the validity of a PCI address. A valid PCI address should contain 
> 1's
> +  only in the low 28 bits.
> +
> +  @param  A The address to validate.
> +
> +**/
> +#define ASSERT_INVALID_PCI_ADDRESS(A) \
> +  ASSERT (((A) & ~0xfff) == 0)
> +
> +/**
> +  Registers a PCI device so PCI configuration registers may be accessed after
> +  SetVirtualAddressMap().
> +
> +  Registers the PCI device specified by Address so all the PCI configuration
> +  registers associated with that PCI device may be accessed after 
> SetVirtualAddressMap()
> +  is called.
> +
> +  If Address > 0x0FFF, then ASSERT().
> +
> +  @param  Address The address that encodes the PCI Bus, Device, Function and
> +  Register.
> +
> +  @retval RETURN_SUCCESS   The PCI device was registered for runtime 
> access.
> +  @retval RETURN_UNSUPPORTED   An attempt was made to call this function
> +   after ExitBootServices().
> +  @retval RETURN_UNSUPPORTED   The resources required to access the PCI 
> device
> +   at runtime could not be mapped.
> +  @retval RETURN_OUT_

Re: [edk2-devel] [edk2-platforms: PATCH 02/14] Marvell/Library: ArmadaSoCDescLib: Add PCIE information

2019-05-10 Thread Marcin Wojtas
pt., 10 maj 2019 o 16:59 Leif Lindholm  napisał(a):
>
> On Thu, May 09, 2019 at 11:53:30AM +0200, Marcin Wojtas wrote:
> > This patch introduces new library callback (ArmadaSoCPcieGet ()),
> > which dynamically allocates and fills array with all available PCIE
> > controllers' base addresses. It is needed for the configuration of PCIE,
> > whose support will be added in the upcoming patches.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Marcin Wojtas 
> > ---
> >  
> > Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.h
> >  |  6 +++
> >  Silicon/Marvell/Include/Library/ArmadaSoCDescLib.h 
> > | 20 +
> >  
> > Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.c
> >  | 44 
> >  3 files changed, 70 insertions(+)
> >
> > diff --git 
> > a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.h
> >  
> > b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.h
> > index 8bbc5b0..e904222 100644
> > --- 
> > a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.h
> > +++ 
> > b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.h
> > @@ -82,6 +82,12 @@
> >  #define MV_SOC_MDIO_ID(Cp)   (Cp)
> >
> >  //
> > +// Platform description of PCIE
> > +//
> > +#define MV_SOC_PCIE_PER_CP_COUNT 3
> > +#define MV_SOC_PCIE_BASE(Index)  (0x60 + ((Index) * 0x2))
> > +
> > +//
> >  // Platform description of PP2 NIC
> >  //
> >  #define MV_SOC_PP2_BASE(Cp)  MV_SOC_CP_BASE (Cp)
> > diff --git a/Silicon/Marvell/Include/Library/ArmadaSoCDescLib.h 
> > b/Silicon/Marvell/Include/Library/ArmadaSoCDescLib.h
> > index fc17c3a..ff617e6 100644
> > --- a/Silicon/Marvell/Include/Library/ArmadaSoCDescLib.h
> > +++ b/Silicon/Marvell/Include/Library/ArmadaSoCDescLib.h
> > @@ -191,6 +191,26 @@ ArmadaSoCDescXhciGet (
> >IN OUT UINTN  *DescCount
> >);
> >
> > +/**
> > +  This function returns the total number of PCIE controllers and an array
> > +  with their base addresses.
> > +
> > +  @param[in out] **PcieBaseAddresses  Array containing PCIE controllers' 
> > base
>
> Extra space before "Array" messes up alignment.
> Either drop that or add one to the lines below.
>

That's an effect of :%s typo fixing... Will correct in v2.

Thanks,
Marcin

>
> > + adresses.
> > +  @param[in out]  *Count Total amount of available PCIE 
> > controllers.
> > +
> > +  @retval EFI_SUCCESSThe data were obtained successfully.
> > +  @retval EFI_OUT_OF_RESOURCES   The request could not be completed 
> > due to a
> > + lack of resources.
> > +
> > +**/
> > +EFI_STATUS
> > +EFIAPI
> > +ArmadaSoCPcieGet (
> > +  IN OUT EFI_PHYSICAL_ADDRESS  **PcieBaseAddresses,
> > +  IN OUT UINTN  *Count
> > +  );
> > +
> >  //
> >  // PP2 NIC devices SoC description
> >  //
> > diff --git 
> > a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.c
> >  
> > b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.c
> > index 355be64..4f8a59a 100644
> > --- 
> > a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.c
> > +++ 
> > b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.c
> > @@ -278,6 +278,50 @@ ArmadaSoCDescAhciGet (
> >return EFI_SUCCESS;
> >  }
> >
> > +/**
> > +  This function returns the total number of PCIE controllers and an array
> > +  with their base addresses.
> > +
> > +  @param[in out] **PcieBaseAddresses Array containing PCIE controllers' 
> > base
> > + adresses.
> > +  @param[in out]  *Count Total amount of available PCIE 
> > controllers.
> > +
> > +  @retval EFI_SUCCESSThe data were obtained successfully.
> > +  @retval EFI_OUT_OF_RESOURCES   The request could not be completed 
> > due to a
> > + lack of resources.
> > +
> > +**/
> > +EFI_STATUS
> > +EFIAPI
> > +ArmadaSoCPcieGet (
> > +  IN OUT EFI_PHYSICAL_ADDRESS  **PcieBaseAddresses,
> > +  IN OUT UINTN  *Count
> > +  )
> > +{
> > +  UINTN CpCount, CpIndex, Index;
> > +  EFI_PHYSICAL_ADDRESS *BaseAddress;
> > +
> > +  CpCount = FixedPcdGet8 (PcdMaxCpCount);
> > +
> > +  *Count = CpCount * MV_SOC_PCIE_PER_CP_COUNT;
> > +  BaseAddress = AllocateZeroPool (*Count * sizeof (EFI_PHYSICAL_ADDRESS));
> > +  if (BaseAddress == NULL) {
> > +DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
> > +return EFI_OUT_OF_RESOURCES;
> > +  }
> > +
> > +  *PcieBaseAddresses = BaseAddress;
> > +
> > +  for (CpIndex = 0; CpIndex < CpCount; CpIndex++) {
> > +for (Index = 0; Index < MV_SOC_PCIE_PER_CP_COUNT; Index++) {
> > +  *BaseAddress = MV_SOC

Re: [edk2-devel] [edk2-platforms: PATCH 02/14] Marvell/Library: ArmadaSoCDescLib: Add PCIE information

2019-05-10 Thread Leif Lindholm
On Thu, May 09, 2019 at 11:53:30AM +0200, Marcin Wojtas wrote:
> This patch introduces new library callback (ArmadaSoCPcieGet ()),
> which dynamically allocates and fills array with all available PCIE
> controllers' base addresses. It is needed for the configuration of PCIE,
> whose support will be added in the upcoming patches.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Marcin Wojtas 
> ---
>  
> Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.h
>  |  6 +++
>  Silicon/Marvell/Include/Library/ArmadaSoCDescLib.h   
>   | 20 +
>  
> Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.c
>  | 44 
>  3 files changed, 70 insertions(+)
> 
> diff --git 
> a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.h
>  
> b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.h
> index 8bbc5b0..e904222 100644
> --- 
> a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.h
> +++ 
> b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.h
> @@ -82,6 +82,12 @@
>  #define MV_SOC_MDIO_ID(Cp)   (Cp)
>  
>  //
> +// Platform description of PCIE
> +//
> +#define MV_SOC_PCIE_PER_CP_COUNT 3
> +#define MV_SOC_PCIE_BASE(Index)  (0x60 + ((Index) * 0x2))
> +
> +//
>  // Platform description of PP2 NIC
>  //
>  #define MV_SOC_PP2_BASE(Cp)  MV_SOC_CP_BASE (Cp)
> diff --git a/Silicon/Marvell/Include/Library/ArmadaSoCDescLib.h 
> b/Silicon/Marvell/Include/Library/ArmadaSoCDescLib.h
> index fc17c3a..ff617e6 100644
> --- a/Silicon/Marvell/Include/Library/ArmadaSoCDescLib.h
> +++ b/Silicon/Marvell/Include/Library/ArmadaSoCDescLib.h
> @@ -191,6 +191,26 @@ ArmadaSoCDescXhciGet (
>IN OUT UINTN  *DescCount
>);
>  
> +/**
> +  This function returns the total number of PCIE controllers and an array
> +  with their base addresses.
> +
> +  @param[in out] **PcieBaseAddresses  Array containing PCIE controllers' base

Extra space before "Array" messes up alignment.
Either drop that or add one to the lines below.

/
Leif

> + adresses.
> +  @param[in out]  *Count Total amount of available PCIE 
> controllers.
> +
> +  @retval EFI_SUCCESSThe data were obtained successfully.
> +  @retval EFI_OUT_OF_RESOURCES   The request could not be completed due 
> to a
> + lack of resources.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +ArmadaSoCPcieGet (
> +  IN OUT EFI_PHYSICAL_ADDRESS  **PcieBaseAddresses,
> +  IN OUT UINTN  *Count
> +  );
> +
>  //
>  // PP2 NIC devices SoC description
>  //
> diff --git 
> a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.c
>  
> b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.c
> index 355be64..4f8a59a 100644
> --- 
> a/Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.c
> +++ 
> b/Silicon/Marvell/Armada7k8k/Library/Armada7k8kSoCDescLib/Armada7k8kSoCDescLib.c
> @@ -278,6 +278,50 @@ ArmadaSoCDescAhciGet (
>return EFI_SUCCESS;
>  }
>  
> +/**
> +  This function returns the total number of PCIE controllers and an array
> +  with their base addresses.
> +
> +  @param[in out] **PcieBaseAddresses Array containing PCIE controllers' base
> + adresses.
> +  @param[in out]  *Count Total amount of available PCIE 
> controllers.
> +
> +  @retval EFI_SUCCESSThe data were obtained successfully.
> +  @retval EFI_OUT_OF_RESOURCES   The request could not be completed due 
> to a
> + lack of resources.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +ArmadaSoCPcieGet (
> +  IN OUT EFI_PHYSICAL_ADDRESS  **PcieBaseAddresses,
> +  IN OUT UINTN  *Count
> +  )
> +{
> +  UINTN CpCount, CpIndex, Index;
> +  EFI_PHYSICAL_ADDRESS *BaseAddress;
> +
> +  CpCount = FixedPcdGet8 (PcdMaxCpCount);
> +
> +  *Count = CpCount * MV_SOC_PCIE_PER_CP_COUNT;
> +  BaseAddress = AllocateZeroPool (*Count * sizeof (EFI_PHYSICAL_ADDRESS));
> +  if (BaseAddress == NULL) {
> +DEBUG ((DEBUG_ERROR, "%a: Cannot allocate memory\n", __FUNCTION__));
> +return EFI_OUT_OF_RESOURCES;
> +  }
> +
> +  *PcieBaseAddresses = BaseAddress;
> +
> +  for (CpIndex = 0; CpIndex < CpCount; CpIndex++) {
> +for (Index = 0; Index < MV_SOC_PCIE_PER_CP_COUNT; Index++) {
> +  *BaseAddress = MV_SOC_CP_BASE (CpIndex) + MV_SOC_PCIE_BASE (Index);
> +  BaseAddress++;
> +}
> +  }
> +
> +  return EFI_SUCCESS;
> +}
> +
>  EFI_STATUS
>  EFIAPI
>  ArmadaSoCDescPp2Get (
> -- 
> 2.7.4
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40440): https://edk2.groups.io/g/devel/message/40440
Mute This Topic: https://groups

Re: [edk2-devel] [PATCH v3 1/1] ShellPkg/CommandLib: avoid NULL derefence and memory leak

2019-05-10 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey 

Code change looks good visually.


> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Heinrich Schuchardt
> Sent: Thursday, May 09, 2019 8:24 PM
> To: Gao, Zhichao 
> Cc: devel @ edk2 . groups . io ; Carsey, Jaben
> ; Ni, Ray ; Leif Lindholm
> ; Gao, Liming ; Heinrich
> Schuchardt 
> Subject: [edk2-devel] [PATCH v3 1/1] ShellPkg/CommandLib: avoid NULL
> derefence and memory leak
> Importance: High
> 
> Since TianoCore EDK2 commit d65f2cea36d1 ("ShellPkg/CommandLib: Locate
> proper UnicodeCollation instance") in edk2 the UEFI Shell crashes if EFI
> variable PlatformLang is not defined due to dereferencing gUnicodeCollation
> gUnicodeCollation (= NULL) in ShellCommandRegisterCommandName().
> 
> Furthermore CommandInit() is leaking PlatformLang if
> gUnicodeCollation != NULL.
> 
> Close the memory leak and use the first UnicodeCollation instance if
> PlatfomLang is not defined.
> 
> Fixes: d65f2cea36d1 ("ShellPkg/CommandLib: Locate proper
> UnicodeCollation
> instance")
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Heinrich Schuchardt 
> Reviewed-by: Zhichao Gao 
> ---
> v3
>   resend as quoted-printable
> ---
>  .../UefiShellCommandLib/UefiShellCommandLib.c | 20 +-
> -
>  1 file changed, 14 insertions(+), 6 deletions(-)
> 
> diff --git a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
> b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
> index ddc4bb1567..e60279e5ac 100644
> --- a/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
> +++ b/ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.c
> @@ -80,12 +80,10 @@ CommandInit(
>EFI_STATUS  Status;
> 
>CHAR8   *PlatformLang;
> 
> 
> 
> -  GetEfiGlobalVariable2 (EFI_PLATFORM_LANG_VARIABLE_NAME,
> (VOID**)&PlatformLang, NULL);
> 
> -  if (PlatformLang == NULL) {
> 
> -return EFI_UNSUPPORTED;
> 
> -  }
> 
> -
> 
>if (gUnicodeCollation == NULL) {
> 
> +
> 
> +GetEfiGlobalVariable2 (EFI_PLATFORM_LANG_VARIABLE_NAME,
> (VOID**)&PlatformLang, NULL);
> 
> +
> 
>  Status = gBS->LocateHandleBuffer (
> 
>  ByProtocol,
> 
>  &gEfiUnicodeCollation2ProtocolGuid,
> 
> @@ -113,6 +111,14 @@ CommandInit(
>  continue;
> 
>}
> 
> 
> 
> +  //
> 
> +  // Without clue provided use the first Unicode Collation2 protocol.
> 
> +  //
> 
> +  if (PlatformLang == NULL) {
> 
> +gUnicodeCollation = Uc;
> 
> +break;
> 
> +  }
> 
> +
> 
>//
> 
>// Find the best matching matching language from the supported
> languages
> 
>// of Unicode Collation2 protocol.
> 
> @@ -132,7 +138,9 @@ CommandInit(
>  if (Handles != NULL) {
> 
>FreePool (Handles);
> 
>  }
> 
> -FreePool (PlatformLang);
> 
> +if (PlatformLang != NULL) {
> 
> +  FreePool (PlatformLang);
> 
> +}
> 
>}
> 
> 
> 
>return (gUnicodeCollation == NULL) ? EFI_UNSUPPORTED : EFI_SUCCESS;
> 
> --
> 2.20.1
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> 
> View/Reply Online (#40395): https://edk2.groups.io/g/devel/message/40395
> Mute This Topic: https://groups.io/mt/31573312/1760878
> Group Owner: devel+ow...@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub
> [jaben.car...@intel.com]
> -=-=-=-=-=-=


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40439): https://edk2.groups.io/g/devel/message/40439
Mute This Topic: https://groups.io/mt/31573312/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v3 1/3] SecurityPkg: Remove double \r

2019-05-10 Thread Zhang, Chao B
Reviewed-by : Chao Zhang 

-Original Message-
From: Joe Richey [mailto:joeric...@google.com] 
Sent: Friday, May 10, 2019 5:37 PM
To: devel@edk2.groups.io
Cc: Zhang, Chao B ; Yao, Jiewen ; 
Wang, Jian J 
Subject: [PATCH v3 1/3] SecurityPkg: Remove double \r

Cc: Chao Zhang 
Cc: Jiewen Yao 
Cc: Jian Wang 
Signed-off-by: Joe Richey 
---
 SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c 
b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
index f101ca1c2001..18b65da756d6 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
@@ -1229,7 +1229,7 @@ EFI_STATUS
 OpalDiskUpdateOwnerShip (
   OPAL_DISK*OpalDisk
   )
-{

+{
   OPAL_SESSION  Session;
 
   if (OpalDisk->MsidLength == 0) {
@@ -1245,7 +1245,7 @@ OpalDiskUpdateOwnerShip (
   Session.MediaId = OpalDisk->MediaId;
   Session.OpalBaseComId = OpalDisk->OpalBaseComId;
 
-  OpalDisk->Owner = OpalUtilDetermineOwnership(&Session, OpalDisk->Msid, 
OpalDisk->MsidLength);

+  OpalDisk->Owner = OpalUtilDetermineOwnership(&Session, OpalDisk->Msid, 
OpalDisk->MsidLength);
   return EFI_SUCCESS;
 }
 
-- 
2.21.0.1020.gf2820cf01a-goog


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40438): https://edk2.groups.io/g/devel/message/40438
Mute This Topic: https://groups.io/mt/31577292/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] EDK2: Remove double \r

2019-05-10 Thread Joe Richey
From: Joe Richey 

All files in EDK2 have either \n or \r\n line endings. However, a few
files have formatting errors, leading to lines ending in \r\r\n. This
causes certain tools (like git) to complain or break.

https://github.com/josephlr/edk2/tree/line-ending

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Eric Dong 
Cc: Ray Ni 
Cc: Laszlo Ersek 
Cc: Chao Zhang 
Cc: Jiewen Yao 
Cc: Jian Wang 
Signed-off-by: Joe Richey 

Joe Richey (3):
  SecurityPkg: Remove double \r
  UefiCpuPkg: Remove double \r
  Vlv2TbltDevicePkg: Remove double \r

 Vlv2TbltDevicePkg/PlatformPkgConfig.dsc
 |   4 ++--
 Vlv2TbltDevicePkg/BootScriptSaveDxe/BootScriptSaveDxe.inf  
 |   4 ++--
 Vlv2TbltDevicePkg/FvInfoPei/FvInfoPei.inf  
 |   4 ++--
 Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbRuntimeDxe.inf  
 |   4 ++--
 Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbSmm.inf 
 |   4 ++--
 Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbSmmDxe.inf  
 |   4 ++--
 Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.inf  
 |   4 ++--
 Vlv2TbltDevicePkg/Library/CpuIA32Lib/CpuIA32Lib.inf
 |   4 ++--
 Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiRegTableLib.inf
 |   4 ++--
 Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpiTimerLib.inf
 |   4 ++--
 Vlv2TbltDevicePkg/Library/PchPlatformLib/PchPlatformLib.inf
 |   4 ++--
 Vlv2TbltDevicePkg/Library/PchSmmLib/PchSmmLib.inf  
 |   4 ++--
 Vlv2TbltDevicePkg/Library/PlatformCmosLib/PlatformCmosLib.inf  
 |   4 ++--
 Vlv2TbltDevicePkg/Library/PlatformFspLib/PlatformFspLib.inf
 |   4 ++--
 Vlv2TbltDevicePkg/Library/ResetSystemLib/ResetSystemLib.inf
 |   4 ++--
 Vlv2TbltDevicePkg/Library/SerialPortLib/SerialPortLib.inf  
 |   4 ++--
 Vlv2TbltDevicePkg/Library/SmbusLib/SmbusLib.inf
 |   4 ++--
 Vlv2TbltDevicePkg/Library/StallSmmLib/StallSmmLib.inf  
 |   4 ++--
 Vlv2TbltDevicePkg/Metronome/Metronome.inf  
 |   4 ++--
 Vlv2TbltDevicePkg/PciPlatform/PciPlatform.inf  
 |   4 ++--
 Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.inf  
 |   4 ++--
 Vlv2TbltDevicePkg/PlatformInfoDxe/PlatformInfoDxe.inf  
 |   4 ++--
 Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf
 |   4 ++--
 Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf  
 |   4 ++--
 
Vlv2TbltDevicePkg/SmmSwDispatch2OnSmmSwDispatchThunk/SmmSwDispatch2OnSmmSwDispatchThunk.inf
 |   4 ++--
 Vlv2TbltDevicePkg/SmramSaveInfoHandlerSmm/SmramSaveInfoHandlerSmm.inf  
 |   4 ++--
 Vlv2TbltDevicePkg/UiApp/UiApp.inf  
 |   4 ++--
 Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatformInitDxe.inf
 |   4 ++--
 Vlv2TbltDevicePkg/Wpce791/Wpce791.inf  
 |   4 ++--
 Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h  
 |   4 ++--
 Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatformHooks.h 
 |   4 ++--
 Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatformHooksLib.h  
 |   4 ++--
 Vlv2TbltDevicePkg/AcpiPlatform/Osfr.h  
 |   4 ++--
 Vlv2TbltDevicePkg/Application/FirmwareUpdate/FirmwareUpdate.h  
 |   4 ++--
 Vlv2TbltDevicePkg/BootScriptSaveDxe/InternalBootScriptSave.h   
 |   4 ++--
 Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.h   
 |   4 ++--
 Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbSmmCommon.h 
 |   4 ++--
 Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbSmmDxe.h
 |   4 ++--
 Vlv2TbltDevicePkg/Include/AlertStandardFormatTable.h   
 |   4 ++--
 Vlv2TbltDevicePkg/Include/ChipsetAccess.h  
 |   4 ++--
 Vlv2TbltDevicePkg/Include/CommonIncludes.h 
 |   4 ++--
 Vlv2TbltDevicePkg/Include/CpuType.h
 |   4 ++--
 Vlv2TbltDevicePkg/Include/FileHandleLib.h

Re: [edk2-devel] [PATCH 2/2] PurleyOpenBoardPkg/BoardMtOlympus: Extend build to support Binary Cache

2019-05-10 Thread Lu, Shifei A
Reviewed-by: Lu, shifei 

> -Original Message-
> From: Shi, Steven
> Sent: Thursday, May 9, 2019 11:21 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Lu, Shifei A
> ; Gao, Liming ; Bi, Dandan
> ; Kubacki, Michael A 
> Subject: [PATCH 2/2] PurleyOpenBoardPkg/BoardMtOlympus: Extend build
> to support Binary Cache
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1785
> 
> Extend the options in the Purley build batch file to support
> Binary Cache produce and consume switch.
> ---
>  .../PurleyOpenBoardPkg/BoardMtOlympus/bld.bat  | 18
> --
>  .../BoardMtOlympus/prebuild.bat|  4 ++--
>  2 files changed, 18 insertions(+), 4 deletions(-)
> 
> diff --git a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat
> b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat
> index a66d19e66e..eda749af36 100644
> --- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat
> +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/bld.bat
> @@ -16,6 +16,11 @@ REM Run setlocal to take a snapshot of the
> environment variables.  endlocal is c
>  setlocal
>  set SCRIPT_ERROR=0
> 
> +@if not defined BINARY_CACHE_PATH (
> +  echo Info: BINARY_CACHE_PATH is empty, use BinCache as default
> +  SET BINARY_CACHE_PATH=BinCache
> +)
> +
>  REM  Do NOT use :: for comments Inside of code blocks() 
> 
>  ::*
> *
> @@ -34,6 +39,15 @@ if /I "%1"=="clean" (
>goto :EOF
>  )
> 
> +if /I "%1"=="cache-produce" (
> +  set BINARY_CACHE_CMD_LINE= --hash --binary-
> destination=%BINARY_CACHE_PATH%
> +)
> +
> +if /I "%1"=="cache-consume" (
> +  set BINARY_CACHE_CMD_LINE= --hash --binary-
> source=%BINARY_CACHE_PATH%
> +)
> +
> +
>  shift
>  GOTO :parseCmdLine
> 
> @@ -92,8 +106,8 @@ echo  Build Start
>  echo.
>  echo 
>  echo.
> -echo build %BUILD_CMD_LINE% --
> log=%BUILD_LOG% %BUILD_REPORT_FLAGS%
> -call build %BUILD_CMD_LINE% --
> log=%BUILD_LOG% %BUILD_REPORT_FLAGS%
> +echo build %BUILD_CMD_LINE% --
> log=%BUILD_LOG% %BUILD_REPORT_FLAGS% %BINARY_CACHE_CMD_LINE%
> +call build %BUILD_CMD_LINE% --
> log=%BUILD_LOG% %BUILD_REPORT_FLAGS% %BINARY_CACHE_CMD_LINE%
>  echo 
>  echo.
>  echo  Build End
> diff --git
> a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/prebuild.bat
> b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/prebuild.bat
> index 81a9634d51..880e6417ac 100644
> --- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/prebuild.bat
> +++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/prebuild.bat
> @@ -188,8 +188,8 @@ set PRE_BUILD_CMD_LINE=%BUILD_CMD_LINE% -D
> MAX_SOCKET=%MAX_SOCKET%
>  set PRE_BUILD_LOG=%WORKSPACE%\Build\prebuild.log
>  set PRE_BUILD_REPORT=%WORKSPACE%\Build\preBuildReport.txt
> 
> -echo build %PRE_BUILD_CMD_LINE% -
> m %BOARD_PKG%\Acpi\BoardAcpiDxe\Dsdt.inf -y %PRE_BUILD_REPORT% --
> log=%PRE_BUILD_LOG%
> -call build %PRE_BUILD_CMD_LINE% -
> m %BOARD_PKG%\Acpi\BoardAcpiDxe\Dsdt.inf -y %PRE_BUILD_REPORT% --
> log=%PRE_BUILD_LOG%
> +echo build %PRE_BUILD_CMD_LINE% -
> m %BOARD_PKG%\Acpi\BoardAcpiDxe\Dsdt.inf -y %PRE_BUILD_REPORT% --
> log=%PRE_BUILD_LOG% %BINARY_CACHE_CMD_LINE%
> +call build %PRE_BUILD_CMD_LINE% -
> m %BOARD_PKG%\Acpi\BoardAcpiDxe\Dsdt.inf -y %PRE_BUILD_REPORT% --
> log=%PRE_BUILD_LOG% %BINARY_CACHE_CMD_LINE%
>  if %ERRORLEVEL% NEQ 0 EXIT /b %ERRORLEVEL%
> 
>  @REM PSYS == FIX0
> --
> 2.17.1.windows.2


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40431): https://edk2.groups.io/g/devel/message/40431
Mute This Topic: https://groups.io/mt/31551303/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] Reg: Need Help in enabling UEFI to existing KVM template

2019-05-10 Thread Pavan Kumar Aravapalli
Hi Team,


I am looking for pointers in enabling UEFI boot  loader to the existing (KVM)VM 
template. I am trying to enable it for CentOS 6.5(64-bit) no GUI 64-bit (KVM) 
template.



I found some images available over https://www.kraxel.org/repos/images/ with 
fedora os, but I am looking for uefi enabled Cent OS template. It would be 
helpfull if any documentation or steps provided for the same.

Index of /repos/images - kraxel's news
www.kraxel.org
various images. qcow2 images are for virtual machines (qemu). The fedora 29 
images for x86_64 and i686 will boot in both uefi and bios mode. The images 
don't have a root password set.





Thanks in Advance.


Regards,

Pavan.


DISCLAIMER
==
This e-mail may contain privileged and confidential information which is the 
property of Accelerite, a Persistent Systems business. It is intended only for 
the use of the individual or entity to which it is addressed. If you are not 
the intended recipient, you are not authorized to read, retain, copy, print, 
distribute or use this message. If you have received this communication in 
error, please notify the sender and delete all copies of this message. 
Accelerite, a Persistent Systems business does not accept any liability for 
virus infected mails.

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40432): https://edk2.groups.io/g/devel/message/40432
Mute This Topic: https://groups.io/mt/31577294/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v3 1/3] SecurityPkg: Remove double \r

2019-05-10 Thread Joe Richey via Groups.Io
Cc: Chao Zhang 
Cc: Jiewen Yao 
Cc: Jian Wang 
Signed-off-by: Joe Richey 
---
 SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c 
b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
index f101ca1c2001..18b65da756d6 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
@@ -1229,7 +1229,7 @@ EFI_STATUS
 OpalDiskUpdateOwnerShip (
   OPAL_DISK*OpalDisk
   )
-{

+{
   OPAL_SESSION  Session;
 
   if (OpalDisk->MsidLength == 0) {
@@ -1245,7 +1245,7 @@ OpalDiskUpdateOwnerShip (
   Session.MediaId = OpalDisk->MediaId;
   Session.OpalBaseComId = OpalDisk->OpalBaseComId;
 
-  OpalDisk->Owner = OpalUtilDetermineOwnership(&Session, OpalDisk->Msid, 
OpalDisk->MsidLength);

+  OpalDisk->Owner = OpalUtilDetermineOwnership(&Session, OpalDisk->Msid, 
OpalDisk->MsidLength);
   return EFI_SUCCESS;
 }
 
-- 
2.21.0.1020.gf2820cf01a-goog


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40429): https://edk2.groups.io/g/devel/message/40429
Mute This Topic: https://groups.io/mt/31577292/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH 2/3] UefiCpuPkg: Remove double \r

2019-05-10 Thread Joe Richey via Groups.Io
These files have \r\n line endings, but a few lines use \r\r\n which
is not a valid line ending. These lines were causing problems for git
and other tools.

Signed-off-by: Joe Richey 
---
 UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c 
b/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c
index 32cd63ede0..906ed65408 100644
--- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c
+++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c
@@ -68,7 +68,7 @@ LimitCpuidMaxvalInitialize (
   // The scope of LimitCpuidMaxval bit in the MSR_IA32_MISC_ENABLE is core for 
below
   // processor type, only program MSR_IA32_MISC_ENABLE for thread 0 in each 
core.
   //
-  if (IS_PENTIUM_4_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||

+  if (IS_PENTIUM_4_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||
   IS_SILVERMONT_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) 
||
   IS_GOLDMONT_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||
   IS_CORE_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||
-- 
2.21.0.1020.gf2820cf01a-goog


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40425): https://edk2.groups.io/g/devel/message/40425
Mute This Topic: https://groups.io/mt/31575355/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH 1/3] SecurityPkg: Remove double \r

2019-05-10 Thread Joe Richey via Groups.Io
These files have \r\n line endings, but a few lines use \r\r\n which
is not a valid line ending. These lines were causing problems for git
and other tools.

Signed-off-by: Joe Richey 
---
 SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c 
b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
index f101ca1c20..18b65da756 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
@@ -1229,7 +1229,7 @@ EFI_STATUS
 OpalDiskUpdateOwnerShip (
   OPAL_DISK*OpalDisk
   )
-{

+{
   OPAL_SESSION  Session;
 
   if (OpalDisk->MsidLength == 0) {
@@ -1245,7 +1245,7 @@ OpalDiskUpdateOwnerShip (
   Session.MediaId = OpalDisk->MediaId;
   Session.OpalBaseComId = OpalDisk->OpalBaseComId;
 
-  OpalDisk->Owner = OpalUtilDetermineOwnership(&Session, OpalDisk->Msid, 
OpalDisk->MsidLength);

+  OpalDisk->Owner = OpalUtilDetermineOwnership(&Session, OpalDisk->Msid, 
OpalDisk->MsidLength);
   return EFI_SUCCESS;
 }
 
-- 
2.21.0.1020.gf2820cf01a-goog


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40433): https://edk2.groups.io/g/devel/message/40433
Mute This Topic: https://groups.io/mt/31577295/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v3 2/3] UefiCpuPkg: Remove double \r

2019-05-10 Thread Joe Richey via Groups.Io
Cc: Eric Dong 
Cc: Ray Ni 
Cc: Laszlo Ersek 
Signed-off-by: Joe Richey 
---
 UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c 
b/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c
index 32cd63ede0c9..906ed6540839 100644
--- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c
+++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c
@@ -68,7 +68,7 @@ LimitCpuidMaxvalInitialize (
   // The scope of LimitCpuidMaxval bit in the MSR_IA32_MISC_ENABLE is core for 
below
   // processor type, only program MSR_IA32_MISC_ENABLE for thread 0 in each 
core.
   //
-  if (IS_PENTIUM_4_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||

+  if (IS_PENTIUM_4_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||
   IS_SILVERMONT_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) 
||
   IS_GOLDMONT_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||
   IS_CORE_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||
-- 
2.21.0.1020.gf2820cf01a-goog


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40437): https://edk2.groups.io/g/devel/message/40437
Mute This Topic: https://groups.io/mt/31577299/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v2 1/3] SecurityPkg: Remove double \r

2019-05-10 Thread Joe Richey
From: Joe Richey 

Cc: Chao Zhang 
Cc: Jiewen Yao 
Cc: Jian Wang 
Signed-off-by: Joe Richey 
---
 SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c 
b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
index f101ca1c2001..18b65da756d6 100644
--- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
+++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
@@ -1229,7 +1229,7 @@ EFI_STATUS
 OpalDiskUpdateOwnerShip (
   OPAL_DISK*OpalDisk
   )
-{

+{
   OPAL_SESSION  Session;
 
   if (OpalDisk->MsidLength == 0) {
@@ -1245,7 +1245,7 @@ OpalDiskUpdateOwnerShip (
   Session.MediaId = OpalDisk->MediaId;
   Session.OpalBaseComId = OpalDisk->OpalBaseComId;
 
-  OpalDisk->Owner = OpalUtilDetermineOwnership(&Session, OpalDisk->Msid, 
OpalDisk->MsidLength);

+  OpalDisk->Owner = OpalUtilDetermineOwnership(&Session, OpalDisk->Msid, 
OpalDisk->MsidLength);
   return EFI_SUCCESS;
 }
 
-- 
2.21.0.1020.gf2820cf01a-goog


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40436): https://edk2.groups.io/g/devel/message/40436
Mute This Topic: https://groups.io/mt/31577298/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v3 0/3] EDK2: Remove double \r\r

2019-05-10 Thread Joe Richey via Groups.Io
All files in EDK2 have either \n or \r\n line endings. However, a few
files have formatting errors, leading to lines ending in \r\r\n. This
causes certain tools (like git) to complain or break.

Sorry for all of the mailing list spew. EDK2's settings are just
different enough from the kernel to mess me up.

https://github.com/josephlr/edk2/tree/line-ending

Cc: Zailiang Sun 
Cc: Yi Qian 
Cc: Eric Dong 
Cc: Ray Ni 
Cc: Laszlo Ersek 
Cc: Chao Zhang 
Cc: Jiewen Yao 
Cc: Jian Wang 
Signed-off-by: Joe Richey 

Joe Richey (3):
  SecurityPkg: Remove double \r
  UefiCpuPkg: Remove double \r
  Vlv2TbltDevicePkg: Remove double \r

 Vlv2TbltDevicePkg/PlatformPkgConfig.dsc
 | 4 ++--
 Vlv2TbltDevicePkg/BootScriptSaveDxe/BootScriptSaveDxe.inf  
 | 4 ++--
 Vlv2TbltDevicePkg/FvInfoPei/FvInfoPei.inf  
 | 4 ++--
 Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbRuntimeDxe.inf  
 | 4 ++--
 Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbSmm.inf 
 | 4 ++--
 Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbSmmDxe.inf  
 | 4 ++--
 Vlv2TbltDevicePkg/Library/BiosIdLib/BiosIdLib.inf  
 | 4 ++--
 Vlv2TbltDevicePkg/Library/CpuIA32Lib/CpuIA32Lib.inf
 | 4 ++--
 Vlv2TbltDevicePkg/Library/EfiRegTableLib/EfiRegTableLib.inf
 | 4 ++--
 Vlv2TbltDevicePkg/Library/IntelPchAcpiTimerLib/IntelPchAcpiTimerLib.inf
 | 4 ++--
 Vlv2TbltDevicePkg/Library/PchPlatformLib/PchPlatformLib.inf
 | 4 ++--
 Vlv2TbltDevicePkg/Library/PchSmmLib/PchSmmLib.inf  
 | 4 ++--
 Vlv2TbltDevicePkg/Library/PlatformCmosLib/PlatformCmosLib.inf  
 | 4 ++--
 Vlv2TbltDevicePkg/Library/PlatformFspLib/PlatformFspLib.inf
 | 4 ++--
 Vlv2TbltDevicePkg/Library/ResetSystemLib/ResetSystemLib.inf
 | 4 ++--
 Vlv2TbltDevicePkg/Library/SerialPortLib/SerialPortLib.inf  
 | 4 ++--
 Vlv2TbltDevicePkg/Library/SmbusLib/SmbusLib.inf
 | 4 ++--
 Vlv2TbltDevicePkg/Library/StallSmmLib/StallSmmLib.inf  
 | 4 ++--
 Vlv2TbltDevicePkg/Metronome/Metronome.inf  
 | 4 ++--
 Vlv2TbltDevicePkg/PciPlatform/PciPlatform.inf  
 | 4 ++--
 Vlv2TbltDevicePkg/PlatformGopPolicy/PlatformGopPolicy.inf  
 | 4 ++--
 Vlv2TbltDevicePkg/PlatformInfoDxe/PlatformInfoDxe.inf  
 | 4 ++--
 Vlv2TbltDevicePkg/PlatformSetupDxe/PlatformSetupDxe.inf
 | 4 ++--
 Vlv2TbltDevicePkg/PlatformSmm/PlatformSmm.inf  
 | 4 ++--
 
Vlv2TbltDevicePkg/SmmSwDispatch2OnSmmSwDispatchThunk/SmmSwDispatch2OnSmmSwDispatchThunk.inf
 | 4 ++--
 Vlv2TbltDevicePkg/SmramSaveInfoHandlerSmm/SmramSaveInfoHandlerSmm.inf  
 | 4 ++--
 Vlv2TbltDevicePkg/UiApp/UiApp.inf  
 | 4 ++--
 Vlv2TbltDevicePkg/VlvPlatformInitDxe/VlvPlatformInitDxe.inf
 | 4 ++--
 Vlv2TbltDevicePkg/Wpce791/Wpce791.inf  
 | 4 ++--
 Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatform.h  
 | 4 ++--
 Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatformHooks.h 
 | 4 ++--
 Vlv2TbltDevicePkg/AcpiPlatform/AcpiPlatformHooksLib.h  
 | 4 ++--
 Vlv2TbltDevicePkg/AcpiPlatform/Osfr.h  
 | 4 ++--
 Vlv2TbltDevicePkg/Application/FirmwareUpdate/FirmwareUpdate.h  
 | 4 ++--
 Vlv2TbltDevicePkg/BootScriptSaveDxe/InternalBootScriptSave.h   
 | 4 ++--
 Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.h   
 | 4 ++--
 Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbSmmCommon.h 
 | 4 ++--
 Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbSmmDxe.h
 | 4 ++--
 Vlv2TbltDevicePkg/Include/AlertStandardFormatTable.h   
 | 4 ++--
 Vlv2TbltDevicePkg/Include/ChipsetAccess.h  
 | 4 ++--
 Vlv2TbltDevicePkg/Include/CommonIncludes.h 
 | 4 ++--
 Vlv2TbltDevicePkg/Include/CpuType.h
 | 4 ++--
 Vlv2TbltDevicePkg/Include/FileHandleLib.h 

[edk2-devel] [PATCH v2 2/3] UefiCpuPkg: Remove double \r

2019-05-10 Thread Joe Richey
From: Joe Richey 

Cc: Eric Dong 
Cc: Ray Ni 
Cc: Laszlo Ersek 
Signed-off-by: Joe Richey 
---
 UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c 
b/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c
index 32cd63ede0c9..906ed6540839 100644
--- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c
+++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c
@@ -68,7 +68,7 @@ LimitCpuidMaxvalInitialize (
   // The scope of LimitCpuidMaxval bit in the MSR_IA32_MISC_ENABLE is core for 
below
   // processor type, only program MSR_IA32_MISC_ENABLE for thread 0 in each 
core.
   //
-  if (IS_PENTIUM_4_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||

+  if (IS_PENTIUM_4_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||
   IS_SILVERMONT_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) 
||
   IS_GOLDMONT_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||
   IS_CORE_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||
-- 
2.21.0.1020.gf2820cf01a-goog


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40426): https://edk2.groups.io/g/devel/message/40426
Mute This Topic: https://groups.io/mt/31577289/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] BaseTools: Include headers not mentioned in inf are not hashed

2019-05-10 Thread Felix Polyudov
> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Laszlo 
> Ersek
> Sent: Thursday, May 09, 2019 7:53 PM
> 
> Hello Christian,
> 
> On 05/09/19 23:27, Christian Rodriguez wrote:
> > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1787
> >
> > Get a list of local header files that are not present in the
> > MetaFile for this module. Add those local header files into
> > the hashing algorithm for a module. If a local header file is
> > not present in the MetaFile, the module will still build correctly
> > though the hashing system didn't know about it before.
> >
> > Signed-off-by: Christian Rodriguez 
> > Cc: Bob Feng 
> > Cc: Liming Gao 
> > Cc: Yonghong Zhu 
> > ---
> >  BaseTools/Source/Python/AutoGen/AutoGen.py | 24 
> >  1 file changed, 24 insertions(+)
> 
> I saw the BZ soon after it was reported. I almost commented, but
> ultimately I couldn't decide what the real use case was.
> 
> With this particular use case (i.e. INF file is missing some
> module-specific header files that it could easily list), I think I
> disagree, mildly (not too strongly). E.g., we fixed such omissions in a
> bunch of INF files, last March, in the series

I agree with Lazlo.
According to section 3.9 of the INF specification 
(https://edk2-docs.gitbooks.io/edk-ii-inf-specification/3_edk_ii_inf_file_format/39_[sources]_sections.html),
all source files (including module header files) must be listed in the 
[Sources] section.
Here is the quote:
"All HII Unicode format files must be listed in this section as well as any 
other "source" type file, such as local module header files, Vfr files, etc. "

So, if file X is used by module Y, but is not listed in Y.inf, it's a violation 
of the INF spec., which makes it a bug that has to be fixed.


Please consider the environment before printing this email.

The information contained in this message may be confidential and proprietary 
to American Megatrends, Inc.  This communication is intended to be read only by 
the individual or entity to whom it is addressed or by their designee. If the 
reader of this message is not the intended recipient, you are on notice that 
any distribution of this message, in any form, is strictly prohibited.  Please 
promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and 
then delete or destroy all copies of the transmission.


Re: [edk2-devel] [PATCH v3 1/3] SecurityPkg: Remove double \r

2019-05-10 Thread Wang, Jian J
Reviewed-by: Jian J Wang 

> -Original Message-
> From: Joe Richey [mailto:joeric...@google.com]
> Sent: Friday, May 10, 2019 5:37 PM
> To: devel@edk2.groups.io
> Cc: Zhang, Chao B ; Yao, Jiewen
> ; Wang, Jian J 
> Subject: [PATCH v3 1/3] SecurityPkg: Remove double \r
> 
> Cc: Chao Zhang 
> Cc: Jiewen Yao 
> Cc: Jian Wang 
> Signed-off-by: Joe Richey 
> ---
>  SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
> b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
> index f101ca1c2001..18b65da756d6 100644
> --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
> +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c
> @@ -1229,7 +1229,7 @@ EFI_STATUS
>  OpalDiskUpdateOwnerShip (
>OPAL_DISK*OpalDisk
>)
> -{
> 
> +{
>OPAL_SESSION  Session;
> 
>if (OpalDisk->MsidLength == 0) {
> @@ -1245,7 +1245,7 @@ OpalDiskUpdateOwnerShip (
>Session.MediaId = OpalDisk->MediaId;
>Session.OpalBaseComId = OpalDisk->OpalBaseComId;
> 
> -  OpalDisk->Owner = OpalUtilDetermineOwnership(&Session, OpalDisk->Msid,
> OpalDisk->MsidLength);
> 
> +  OpalDisk->Owner = OpalUtilDetermineOwnership(&Session, OpalDisk->Msid,
> OpalDisk->MsidLength);
>return EFI_SUCCESS;
>  }
> 
> --
> 2.21.0.1020.gf2820cf01a-goog


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40423): https://edk2.groups.io/g/devel/message/40423
Mute This Topic: https://groups.io/mt/31575545/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v2 5/6] CryptoPkg: Upgrade OpenSSL to 1.1.1b

2019-05-10 Thread Wang, Jian J
Hi Laszlo,

rand_* is needed by openssl itself. BaseCryptLib also provide RandomSeed()
and RandomBytes() interface to wrap openssl rand functionality. We can't
just drop them. From platform independent perspective, using performance
counter is the best choice we have. If we want to achieve the uttermost
secure mechanism, only hardware seed/rand generator can meet it. Do you
agree to add cpu specific instruction to do that? For those processors
which don't support seed/rand generation, we have to fall back to performance
counter.

Another option is that we could make use of EFI_RNG_PROTOCOL. According
to UEFI spec (see below), it can be used to get entropy.

"This protocol is used to provide random numbers for use in applications,
or entropy for seeding other random number generators."

Again, we could use performance counter as a fall back if EFI_RNG_PROTOCOL
is not provided by a platform. So if a platform really care about the security,
it should provide a EFI_RNG_PROTOCOL. This can also help to hide the
hardware/platform dependency.

Regards,
Jian

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Laszlo Ersek
> Sent: Friday, May 10, 2019 1:30 AM
> To: devel@edk2.groups.io; Lu, XiaoyuX 
> Cc: Wang, Jian J ; Ye, Ting 
> Subject: Re: [edk2-devel] [PATCH v2 5/6] CryptoPkg: Upgrade OpenSSL to 1.1.1b
> 
> On 05/09/19 19:15, Laszlo Ersek wrote:
> 
> > How about the following:
> >
> > - It seems like we cannot convince OpenSSL to *never* call these
> >   functions, under UEFI.
> >
> > - We also cannot provide an implementation that is *guaranteed* to be
> >   secure enough, IMO.
> >
> > - It seems like these functions *should* never be called in the edk2
> >   build however, given that we're not trying to do anything "new" with
> >   OpenSSL in edk2 -- we just want to use the new OpenSSL release for the
> >   same old things.
> >
> > - So why not just ensure that these functions *never return*?
> >
> > (1) Basically implement all of the functions like this:
> >
> >   ASSERT (FALSE);
> >   CpuDeadLoop ();
> >   //
> >   // if a return value is needed
> >   //
> >   return 0;
> >
> > What do you think about this approach?
> 
> I notice that "rand" is another module in OpenSSL.
> 
> Can we try adding "no-rand" to our Configure invocation? Perhaps the
> need for all of the rand_* functions goes away then.
> 
> Thanks
> Laszlo
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40422): https://edk2.groups.io/g/devel/message/40422
Mute This Topic: https://groups.io/mt/31552212/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 2/3] UefiCpuPkg: Remove double \r

2019-05-10 Thread Ni, Ray
Reviewed-by: Ray Ni 

> -Original Message-
> From: Joe Richey 
> Sent: Friday, May 10, 2019 4:07 PM
> To: devel@edk2.groups.io
> Cc: Dong, Eric ; Ni, Ray ; Laszlo
> Ersek ; Joe Richey 
> Subject: [PATCH 2/3] UefiCpuPkg: Remove double \r
> 
> These files have \r\n line endings, but a few lines use \r\r\n which
> is not a valid line ending. These lines were causing problems for git
> and other tools.
> 
> Signed-off-by: Joe Richey 
> ---
>  UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c
> b/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c
> index 32cd63ede0..906ed65408 100644
> --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c
> +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c
> @@ -68,7 +68,7 @@ LimitCpuidMaxvalInitialize (
>// The scope of LimitCpuidMaxval bit in the MSR_IA32_MISC_ENABLE is
> core for below
>// processor type, only program MSR_IA32_MISC_ENABLE for thread 0 in
> each core.
>//
> -  if (IS_PENTIUM_4_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo-
> >DisplayModel) ||
> 
> +  if (IS_PENTIUM_4_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo-
> >DisplayModel) ||
>IS_SILVERMONT_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo-
> >DisplayModel) ||
>IS_GOLDMONT_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo-
> >DisplayModel) ||
>IS_CORE_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel)
> ||
> --
> 2.21.0.1020.gf2820cf01a-goog


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40421): https://edk2.groups.io/g/devel/message/40421
Mute This Topic: https://groups.io/mt/31575355/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v2 5/6] CryptoPkg: Upgrade OpenSSL to 1.1.1b

2019-05-10 Thread Xiaoyu lu
Thank you. Lersek. 
This is a big mistake. I haven't test it.

-Original Message-
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Laszlo 
Ersek
Sent: Friday, May 10, 2019 4:58 AM
To: devel@edk2.groups.io; Lu, XiaoyuX 
Cc: Wang, Jian J ; Ye, Ting 
Subject: Re: [edk2-devel] [PATCH v2 5/6] CryptoPkg: Upgrade OpenSSL to 1.1.1b

Hi Xiaoyu,

On 05/09/19 07:23, Xiaoyu lu wrote:
> From: Xiaoyu Lu 
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1089
>
> Update OpenSSL submodule to OpenSSL_1_1_1b
>   OpenSSL_1_1_1b(50eaac9f3337667259de725451f201e784599687)

I found another issue, while trying to cross-build this series for AARCH64.

I ran the commands below:

> export GCC5_AARCH64_PREFIX=aarch64-linux-gnu-
> build \
>   -a AARCH64 \
>   -b NOOPT \
>   -p CryptoPkg/CryptoPkg.dsc \
>   -t GCC5 \
>   --cmd-len=65536 \
>   -m CryptoPkg/Library/OpensslLib/OpensslLib.inf

The following cross-compilation command failed:

> "aarch64-linux-gnu-gcc" \
>   -g \
>   -fshort-wchar \
>   -fno-builtin \
>   -fno-strict-aliasing \
>   -Wall \
>   -Werror \
>   -Wno-array-bounds \
>   -ffunction-sections \
>   -fdata-sections \
>   -include AutoGen.h \
>   -fno-common \
>   -DSTRING_ARRAY_NAME=OpensslLibStrings \
>   -g \
>   -Os \
>   -fshort-wchar \
>   -fno-builtin \
>   -fno-strict-aliasing \
>   -Wall \
>   -Werror \
>   -Wno-array-bounds \
>   -include AutoGen.h \
>   -fno-common \
>   -mlittle-endian \
>   -fno-short-enums \
>   -fverbose-asm \
>   -funsigned-char \
>   -ffunction-sections \
>   -fdata-sections \
>   -Wno-address \
>   -fno-asynchronous-unwind-tables \
>   -fno-unwind-tables \
>   -fno-pic \
>   -fno-pie \
>   -ffixed-x18 \
>   -mcmodel=small \
>   -O0 \
>   -DL_ENDIAN \
>   -DOPENSSL_SMALL_FOOTPRINT \
>   -D_CRT_SECURE_NO_DEPRECATE \
>   -D_CRT_NONSTDC_NO_DEPRECATE \
>   -Wno-error=maybe-uninitialized \
>   -Wno-format \
>   -Wno-error=unused-but-set-variable \
>   -D DISABLE_NEW_DEPRECATED_INTERFACES \
>   -c \
>   -o 
> $WORKSPACE/Build/CryptoPkg/NOOPT_GCC5/AARCH64/CryptoPkg/Library/OpensslLib/OpensslLib/OUTPUT/openssl/crypto/rand/rand_unix.obj
>  \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/ssl/statem \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/ssl/record \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/ssl \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/x509v3 \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/x509 \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/ui \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/txt_db \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/stack \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/sm4 \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/sm3 \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/siphash \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/sha \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/rsa \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/rc4 \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/rand \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/pkcs7 \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/pkcs12 \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/pem \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/ocsp \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/objects \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/modes \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/md5 \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/md4 \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/lhash \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/kdf \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/hmac \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/evp \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/err \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/dso \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/dh \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/des \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/conf \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/comp \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/cmac \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/buffer \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/bn \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/bio \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/async \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/async/arch \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/asn1 \
>   -I$WORKSPACE/CryptoPkg/Library/OpensslLib/openssl/crypto/aria \
>   -I$WORKSPACE/CryptoPkg/L

Re: [edk2-devel] [PATCH v2 2/6] CryptoPkg/OpensslLib: Exclude unnecessary files in process_files.pl

2019-05-10 Thread Xiaoyu lu
Hi, Laszlo:

Thank you for your time.

I try the method you mentioned.

> (1) Therefore, the right thing to do here is to add "no-store" to the above 
> list, in my opinion. Can you try that, please?
> 
> And, this change should be a standalone patch, similarly to patch v2 1/6 in 
> this series.

(1)  OpenSSL configure script don't support no-store option.
It will lead to configure error.

Unsupported options: no-store

> (2a) Therefore, we should modify the "randfile.c" source file, with an 
> upstream OpenSSL contribution, to hide the function definitions, when 
> OPENSSL_SYS_UEFI is defined. In other words, continue with Qin Long's 
> approach from commit fb4844bbc62f.

I think this is the best way. But the openssl community takes time to accept 
the patch.
I just let OpenSSL work for UEFI. So UEFI can use the new algorithm in 
OpenSSL_1_1_1.
I am willing to continue to modify this later.

> (2b) Alternatively, I'm noticing that "rand" is just another module (similar 
> to "store", see above). Assuming we really don't need RAND_* functions for 
> anything in edk2: have we tried configuring OpenSSL, for the edk2 build, with 
> the "no-rand" parameter?

(2) I'm afraid not. Same as (1)

* Unsupported options: no-rand

Thanks,
Xiaoyu.
-Original Message-
From: Laszlo Ersek [mailto:ler...@redhat.com] 
Sent: Thursday, May 9, 2019 9:43 PM
To: devel@edk2.groups.io; Lu, XiaoyuX 
Cc: Wang, Jian J ; Ye, Ting 
Subject: Re: [edk2-devel] [PATCH v2 2/6] CryptoPkg/OpensslLib: Exclude 
unnecessary files in process_files.pl

On 05/09/19 07:23, Xiaoyu lu wrote:
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1089
>
> When running process_files.py to configure OpenSSL, we can exclude 
> some unnecessary files. This can reduce porting time, compiling time 
> and library size.

Indeed.

> OpenSSL_1_1_1(1708e3e85b4a8) add a STORE module (crypto/store/*).

This statement is incorrect (or, minimally, inexact). According to the 
following command:

$ git log --oneline --reverse OpenSSL_1_1_1b -- crypto/store/ \
  | head -n 1

the first OpenSSL commit that added files to crypto/store/ was:

> commit a5db6fa5760f21d16d59e025e930c02456e00fef
> Author: Richard Levitte 
> Date:   Thu May 1 03:53:12 2003 +
>
> Define a STORE type.  For documentation, read the entry in CHANGES,
> crypto/store/README, crypto/store/store.h and crypto/store/str_locl.h.

This commit goes back to 2003, and is part of releae OpenSSL_0_9_7d.

Instead, let's check what the following command reports:

$ git log --oneline --reverse \
OpenSSL_1_1_0j..OpenSSL_1_1_1b -- crypto/store/ \
  | head -1

It states that the first commit after OpenSSL_1_1_0j, but not after 
OpenSSL_1_1_1b, to modify the "crypto/store/" subdirectory, was commit 
71a5516dcc8a ("Add the STORE module", 2017-06-29).

If we investigate that commit:

$ git show --stat 71a5516dcc8a

we see that the commit modifies the Configure script:

>  Configure   |   2 +-

So let's check that part of the diff in detail:

$ git show 71a5516dcc8a -- Configure

And we get:

> diff --git a/Configure b/Configure
> index 2eacb2312e34..e302a58abb71 100755
> --- a/Configure
> +++ b/Configure
> @@ -310,7 +310,7 @@ $config{sdirs} = [
>  "bn", "ec", "rsa", "dsa", "dh", "dso", "engine",
>  "buffer", "bio", "stack", "lhash", "rand", "err",
>  "evp", "asn1", "pem", "x509", "x509v3", "conf", "txt_db", "pkcs7",
>  "pkcs12", "comp", "ocsp", "ui",
> -"cms", "ts", "srp", "cmac", "ct", "async", "kdf"
> +"cms", "ts", "srp", "cmac", "ct", "async", "kdf", "store"
>  ];
>  # test/ subdirectories to build
>  $config{tdirs} = [ "ossl_shim" ];

We can see that the "store" module is added after modules such as "cms", "ts", 
"srp", and so on.

Now, if you look at "CryptoPkg/Library/OpensslLib/process_files.pl", you find 
(with edk2 master being at commit 49693202ec9c):

49  "./Configure",
50  "UEFI",
51  "no-afalgeng",
52  "no-asm",
53  "no-async",  < disables "async"
54  "no-autoalginit",
55  "no-autoerrinit",
56  "no-bf",
57  "no-blake2",
58  "no-camellia",
59  "no-capieng",
60  "no-cast",
61  "no-chacha",
62  "no-cms",< disables "cms"
63  "no-ct", < disables "ct"
64  "no-deprecated",
65  "no-dgram",
66  "no-dsa",
67  "no-dynamic-engine",
68  "no-ec",
69  "no-ec2m",
70  "no-engine",
71  "no-err",
72  "no-filenames",
73  "no-gost",
74  "no-hw",
75  "no-idea",
76  "

Re: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: BaseSerialPortLib16550: Add missing Pcd to UNI

2019-05-10 Thread Wu, Hao A
> -Original Message-
> From: Loh, Tien Hock
> Sent: Thursday, May 09, 2019 5:20 PM
> To: devel@edk2.groups.io; thlo...@gmail.com
> Cc: Loh, Tien Hock; Wang, Jian J; Wu, Hao A; Zhu, Yonghong
> Subject: [PATCH v2 1/1] MdeModulePkg: BaseSerialPortLib16550: Add missing
> Pcd to UNI
> 
> From: "Tien Hock, Loh" 
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1771
> 
> Some busses doesn't allow 8 bit MMIO read/write, this adds support for
> 32 bits read/write. This patch adds the UNI information on the new Pcd
> introduced - PcdSerialRegisterAccessWidth
> 
> Signed-off-by: "Tien Hock, Loh" 
> Cc: Jian J Wang 
> Cc: Hao Wu 
> Cc: "Zhu, YongHong" 

Reviewed-by: Hao A Wu 
And the patch has been pushed via commit 70023bab7e.

Best Regards,
Hao Wu

> --
> v2
> - Added Bugzilla to commit
> - Fixed typo
> ---
>  MdeModulePkg/MdeModulePkg.uni | 6 ++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/MdeModulePkg/MdeModulePkg.uni
> b/MdeModulePkg/MdeModulePkg.uni
> index cf2aefa7ad..654dfeadb0 100644
> --- a/MdeModulePkg/MdeModulePkg.uni
> +++ b/MdeModulePkg/MdeModulePkg.uni
> @@ -160,6 +160,12 @@
>   
>  "TRUE  - 16550 serial port
> registers are in MMIO space.\n"
>   
>  "FALSE - 16550 serial port
> registers are in I/O space."
> 
> +#string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdSerialRegisterAccessWidth_PRO
> MPT  #language en-US "Serial port registers access width"
> +
> +#string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdSerialRegisterAccessWidth_HELP
> #language en-US "Sets the 16550 serial port registers access width in MMIO
> space. Default is 8 bits access.\n"
> + 
>  "8  - 16550 serial port
> MMIO register access are in 8 bits mode.\n"
> + 
>  "32 - 16550 serial port
> MMIO registers acess are in 32 bits mode.."
> +
>  #string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdSerialUseHardwareFlowControl_P
> ROMPT  #language en-US "Enable serial port hardware flow control"
> 
>  #string
> STR_gEfiMdeModulePkgTokenSpaceGuid_PcdSerialUseHardwareFlowControl_
> HELP  #language en-US "Indicates if the 16550 serial port hardware flow
> control will be enabled. Default is FALSE.\n"
> --
> 2.19.0


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40418): https://edk2.groups.io/g/devel/message/40418
Mute This Topic: https://groups.io/mt/31553371/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] BaseTools: Check the fread function and avoid dead loop

2019-05-10 Thread Bob Feng
Reviewed-by: Bob Feng 

-Original Message-
From: Liu, Zhiguang 
Sent: Friday, May 10, 2019 9:51 AM
To: devel@edk2.groups.io
Cc: Feng, Bob C ; Gao, Liming 
Subject: [PATCH] BaseTools: Check the fread function and avoid dead loop

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1789

If the input file is not a valid file, it may cause dead loop, because the 
return of fread function is not checked.

Signed-off-by: Zhiguang Liu 
Cc: Bob Feng 
Cc: Liming Gao 
---
 BaseTools/Source/C/VolInfo/VolInfo.c | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/C/VolInfo/VolInfo.c 
b/BaseTools/Source/C/VolInfo/VolInfo.c
index d8216c61e8..ffe0b47f03 100644
--- a/BaseTools/Source/C/VolInfo/VolInfo.c
+++ b/BaseTools/Source/C/VolInfo/VolInfo.c
@@ -751,6 +751,7 @@ Returns:
   UINTN   Signature[2];
   UINTN   BytesRead;
   UINT32  Size;
+  size_t  ReadSize;
 
   BytesRead = 0;
   Size  = 0;
@@ -764,7 +765,10 @@ Returns:
   //
   // Read the header
   //
-  fread (&VolumeHeader, sizeof (EFI_FIRMWARE_VOLUME_HEADER) - sizeof 
(EFI_FV_BLOCK_MAP_ENTRY), 1, InputFile);
+  ReadSize = fread (&VolumeHeader, sizeof (EFI_FIRMWARE_VOLUME_HEADER) 
+ - sizeof (EFI_FV_BLOCK_MAP_ENTRY), 1, InputFile);  if (ReadSize != 1) {
+return EFI_ABORTED;
+  }
   BytesRead = sizeof (EFI_FIRMWARE_VOLUME_HEADER) - sizeof 
(EFI_FV_BLOCK_MAP_ENTRY);
   Signature[0]  = VolumeHeader.Signature;
   Signature[1]  = 0;
@@ -1053,7 +1057,10 @@ Returns:
   printf ("Revision:  0x%04X\n", VolumeHeader.Revision);
 
   do {
-fread (&BlockMap, sizeof (EFI_FV_BLOCK_MAP_ENTRY), 1, InputFile);
+ReadSize = fread (&BlockMap, sizeof (EFI_FV_BLOCK_MAP_ENTRY), 1, 
InputFile);
+if (ReadSize != 1) {
+  return EFI_ABORTED;
+}
 BytesRead += sizeof (EFI_FV_BLOCK_MAP_ENTRY);
 
 if (BlockMap.NumBlocks != 0) {
--
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40417): https://edk2.groups.io/g/devel/message/40417
Mute This Topic: https://groups.io/mt/31572608/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [patch] BaseTools/VfrCompile: clean Framework Vfr support

2019-05-10 Thread Liming Gao
This change is good. Reviewed-by: Liming Gao 

>-Original Message-
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>Dandan Bi
>Sent: Friday, May 10, 2019 1:44 PM
>To: devel@edk2.groups.io
>Cc: Feng, Bob C ; Gao, Liming 
>Subject: [edk2-devel] [patch] BaseTools/VfrCompile: clean Framework Vfr
>support
>
>REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1464
>
>This commit is to do the cleanup which are missing in
>previous commit 1b72fd5121b5b31918be0a9a0868a39070d4c8d4
>BaseTools/VfrCompile: Remove framework VFR support
>
>Cc: Bob Feng 
>Cc: Liming Gao 
>Signed-off-by: Dandan Bi 
>---
> BaseTools/Source/C/VfrCompile/VfrSyntax.g | 272 +-
> 1 file changed, 55 insertions(+), 217 deletions(-)
>
>diff --git a/BaseTools/Source/C/VfrCompile/VfrSyntax.g
>b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
>index 24b30e3825..127cb8b2b2 100644
>--- a/BaseTools/Source/C/VfrCompile/VfrSyntax.g
>+++ b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
>@@ -652,16 +652,10 @@ vfrFormSetDefinition :
> break;
>   }
>
>   SET_LINE_INFO (*FSObj, 
> L);
>   FSObj->SetGuid (&Guid);
>-  //
>-  // for framework vfr to 
>store formset guid used by
>varstore and efivarstore
>-  //
>-  if (mCompatibleMode) {
>-memcpy 
>(&mFormsetGuid, &Guid, sizeof
>(EFI_GUID));
>-  }
>   FSObj->SetFormSetTitle 
> (_STOSID(S1->getText(),
>S1->getLine()));
>   FSObj->SetHelp 
> (_STOSID(S2->getText(), S2-
>>getLine()));
> >>
>   {
> FC:Class "=" classDefinition[C] "," << {CIfrClass 
> CObj;SET_LINE_INFO
>(CObj, FC); CObj.SetClass(C);} >>
>@@ -1004,16 +998,10 @@ vfrStatementVarStoreLinear :
> | U64:"UINT64" ","  << TypeName = 
> U64->getText(); LineNum
>= U64->getLine(); >>
> | D:"EFI_HII_DATE" ","  << TypeName = 
> D->getText(); LineNum
>= D->getLine(); >>
> | T:"EFI_HII_TIME" ","  << TypeName = 
> T->getText(); LineNum
>= T->getLine(); >>
> | R:"EFI_HII_REF" ","   << TypeName = 
> R->getText(); LineNum =
>R->getLine(); >>
>   )
>-  { Key "=" FID:Number ","  << // Key is used to 
>assign Varid in
>Framework VFR but no use in UEFI2.1 VFR
>-   if (mCompatibleMode) {
>- VarStoreId = 
>_STOU16(FID->getText(), FID-
>>getLine());
>-   }
>->>
>-  }
>   {
> VarId "=" ID:Number "," <<
>_PCATCH(
>  (INTN)(VarStoreId = 
> _STOU16(ID->getText(), ID-
>>getLine())) != 0,
>  (INTN)TRUE,
>@@ -1023,15 +1011,12 @@ vfrStatementVarStoreLinear :
> >>
>   }
>   Name "=" SN:StringIdentifier ","
>   Uuid "=" guidDefinition[Guid]
> <<
>-   if (mCompatibleMode) {
>- StoreName = TypeName;
>-   } else {
>- StoreName = 
>SN->getText();
>-   }
>+
>+   StoreName = 
>SN->getText();
>
>_PCATCH(gCVfrDataStorage.DeclareBufferVarStore (
>   
>   StoreName,
>   
>   &Guid,
>   
>   &gCVfrVarDataTypeDB,
>   
>   TypeName,
>@@ -1241,13 +1226,10 @@ vfrStatementDisableIfFormSet :
>   ;
>
> vfrStatementSuppressIfFormSet :
>   << CIfrSuppressIf SIObj;>>
>   L:SuppressIf <<
>-   if 
>(mCompatibleMode) {
>-   

Re: [edk2-devel] [Patch] BaseTools: Remove './SecMain' from 'run' target

2019-05-10 Thread Bob Feng
I think NT32Pkg need a POSTBUILD scripts to execute its run command.


-Original Message-
From: Gao, Liming 
Sent: Friday, May 10, 2019 3:26 PM
To: Feng, Bob C ; devel@edk2.groups.io
Cc: Kinney, Michael D 
Subject: RE: [Patch] BaseTools: Remove './SecMain' from 'run' target

Bob:
  Please make sure run command still works on NT32 platform. 

>-Original Message-
>From: Feng, Bob C
>Sent: Friday, May 10, 2019 2:34 PM
>To: devel@edk2.groups.io
>Cc: Feng, Bob C ; Gao, Liming 
>; Kinney, Michael D 
>Subject: [Patch] BaseTools: Remove './SecMain' from 'run' target
>
>BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1561
>
>When a target of 'run' is passed into build.py, BaseTools 
>unconditionally attempts to execute the application called './SecMain' 
>in the build output directory.
>
>This behavior applies to the Nt32Pkg which is being replaced with 
>features in the EmulatorPkg.
>
>Signed-off-by: Bob Feng 
>Cc: Liming Gao 
>Cc: Michael D Kinney 
>---
> BaseTools/Source/Python/build/build.py | 4 
> 1 file changed, 4 deletions(-)
>
>diff --git a/BaseTools/Source/Python/build/build.py
>b/BaseTools/Source/Python/build/build.py
>index 7271570d29..04f266abf5 100644
>--- a/BaseTools/Source/Python/build/build.py
>+++ b/BaseTools/Source/Python/build/build.py
>@@ -1225,14 +1225,10 @@ class Build():
>
> makefile =
>GenMake.BuildFile(AutoGenObject)._FILE_NAME_[GenMake.gMakeType]
>
> # run
> if Target == 'run':
>-RunDir = os.path.normpath(os.path.join(AutoGenObject.BuildDir,
>GlobalData.gGlobalDefines['ARCH']))
>-Command = '.\SecMain'
>-os.chdir(RunDir)
>-LaunchCommand(Command, RunDir)
> return True
>
> # build modules
> if BuildModule:
> BuildCommand = BuildCommand + [Target]
>--
>2.20.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40415): https://edk2.groups.io/g/devel/message/40415
Mute This Topic: https://groups.io/mt/31574316/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [Patch] BaseTools: Remove './SecMain' from 'run' target

2019-05-10 Thread Liming Gao
Bob:
  Please make sure run command still works on NT32 platform. 

>-Original Message-
>From: Feng, Bob C
>Sent: Friday, May 10, 2019 2:34 PM
>To: devel@edk2.groups.io
>Cc: Feng, Bob C ; Gao, Liming
>; Kinney, Michael D 
>Subject: [Patch] BaseTools: Remove './SecMain' from 'run' target
>
>BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1561
>
>When a target of 'run' is passed into build.py,
>BaseTools unconditionally attempts to execute the
>application called './SecMain' in the build output directory.
>
>This behavior applies to the Nt32Pkg which is being
>replaced with features in the EmulatorPkg.
>
>Signed-off-by: Bob Feng 
>Cc: Liming Gao 
>Cc: Michael D Kinney 
>---
> BaseTools/Source/Python/build/build.py | 4 
> 1 file changed, 4 deletions(-)
>
>diff --git a/BaseTools/Source/Python/build/build.py
>b/BaseTools/Source/Python/build/build.py
>index 7271570d29..04f266abf5 100644
>--- a/BaseTools/Source/Python/build/build.py
>+++ b/BaseTools/Source/Python/build/build.py
>@@ -1225,14 +1225,10 @@ class Build():
>
> makefile =
>GenMake.BuildFile(AutoGenObject)._FILE_NAME_[GenMake.gMakeType]
>
> # run
> if Target == 'run':
>-RunDir = os.path.normpath(os.path.join(AutoGenObject.BuildDir,
>GlobalData.gGlobalDefines['ARCH']))
>-Command = '.\SecMain'
>-os.chdir(RunDir)
>-LaunchCommand(Command, RunDir)
> return True
>
> # build modules
> if BuildModule:
> BuildCommand = BuildCommand + [Target]
>--
>2.20.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#40413): https://edk2.groups.io/g/devel/message/40413
Mute This Topic: https://groups.io/mt/31574316/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-