Re: [edk2] [PATCH] IntelFsp2Pkg: Add PACKAGES_PATH support

2016-11-29 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com>


> -Original Message-
> From: Thomaiyar, Richard Marian
> Sent: Friday, November 25, 2016 1:21 AM
> To: edk2-devel@lists.01.org
> Cc: Ma, Maurice <maurice...@intel.com>; Yao, Jiewen
> <jiewen@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>;
> Thomaiyar, Richard Marian <richard.marian.thomai...@intel.com>
> Subject: [PATCH] IntelFsp2Pkg: Add PACKAGES_PATH support
> 
> Add PACKAGES_PATH support in GenCfgOpt.py
> 
> Cc: Maurice Ma <maurice...@intel.com>
> Cc: Jiewen Yao <jiewen@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Richard Thomaiyar <richard.marian.thomai...@intel.com>
> ---
>  IntelFsp2Pkg/Tools/GenCfgOpt.py | 10 +++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py
> b/IntelFsp2Pkg/Tools/GenCfgOpt.py
> index 654cdfc..0675b55 100644
> --- a/IntelFsp2Pkg/Tools/GenCfgOpt.py
> +++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py
> @@ -523,9 +523,13 @@ EndList
>  if Match:
>  IncludeFilePath = Match.group(1)
>  IncludeFilePath = 
> self.ExpandMacros(IncludeFilePath)
> -try:
> -IncludeDsc  = 
> open(IncludeFilePath, "r")
> -except:
> +PackagesPath = 
> os.getenv("PACKAGES_PATH")
> +for PackagePath in 
> PackagesPath.split(os.pathsep):
> +IncludeFilePathAbs =
> os.path.join(os.path.normpath(PackagePath),
> os.path.normpath(IncludeFilePath))
> +if 
> os.path.exists(IncludeFilePathAbs):
> +IncludeDsc  = 
> open(IncludeFilePathAbs, "r")
> +break
> +if IncludeDsc == None:
>  print("ERROR: Cannot open file 
> '%s'" % IncludeFilePath)
>  raise SystemExit
>  NewDscLines = IncludeDsc.readlines()
> --
> 2.9.0.windows.1

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


Re: [edk2] [PATCH v3] MdePkg IndustryStandard: Add DDR3, DDR4 and LPDDR definition per SPD spec

2016-11-23 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Gao, Liming
> Sent: Tuesday, November 22, 2016 11:03 PM
> To: edk2-devel@lists.01.org
> Cc: Mudusuru, Giri P <giri.p.mudus...@intel.com>
> Subject: [PATCH v3] MdePkg IndustryStandard: Add DDR3, DDR4 and LPDDR
> definition per SPD spec
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=201
> 
> In V3, Use Odt to replace ODT, Cke to replace CKE, Id to replace ID,
> and Cl to replace CL in structure field name.
> 
> In V2, separate DDR3, DDR4 and LPDDR definition into the different files;
> use the different SPD prefix as structure definitions for each SPD type.
> 
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao <liming@intel.com>
> ---
>  MdePkg/Include/IndustryStandard/SdramSpd.h  |  31 +-
>  MdePkg/Include/IndustryStandard/SdramSpdDdr3.h  | 769
> +++
>  MdePkg/Include/IndustryStandard/SdramSpdDdr4.h  | 958
> 
>  MdePkg/Include/IndustryStandard/SdramSpdLpDdr.h | 474 
>  4 files changed, 2221 insertions(+), 11 deletions(-)
>  create mode 100644 MdePkg/Include/IndustryStandard/SdramSpdDdr3.h
>  create mode 100644 MdePkg/Include/IndustryStandard/SdramSpdDdr4.h
>  create mode 100644 MdePkg/Include/IndustryStandard/SdramSpdLpDdr.h
> 
> diff --git a/MdePkg/Include/IndustryStandard/SdramSpd.h
> b/MdePkg/Include/IndustryStandard/SdramSpd.h
> index 2b2012b..68f9045 100644
> --- a/MdePkg/Include/IndustryStandard/SdramSpd.h
> +++ b/MdePkg/Include/IndustryStandard/SdramSpd.h
> @@ -1,19 +1,23 @@
>  /** @file
>This file contains definitions for the SPD fields on an SDRAM.
> -
> -  Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.
> -  This program and the accompanying materials
> -  are licensed and made available under the terms and conditions of the BSD
> License
> -  which accompanies this distribution.  The full text of the license may be
> found at
> -  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.
> +  Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
> +  This program and the accompanying materials
> +  are licensed and made available under the terms and conditions of the BSD
> License
> +  which accompanies this distribution.  The full text of the license may be
> found at
> +  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 _SDRAM_SPD_H_
>  #define _SDRAM_SPD_H_
> 
> +#include 
> +#include 
> +#include 
> +
>  //
>  // SDRAM SPD field definitions
>  //
> @@ -47,9 +51,14 @@
>  //
>  // Memory Type Definitions
>  //
> -#define SPD_VAL_SDR_TYPE  4 ///< SDR SDRAM memory
> -#define SPD_VAL_DDR_TYPE  7 ///< DDR SDRAM memory
> -#define SPD_VAL_DDR2_TYPE 8 ///< DDR2 SDRAM memory
> +#define SPD_VAL_SDR_TYPE  4   ///< SDR SDRAM memory
> +#define SPD_VAL_DDR_TYPE  7   ///< DDR SDRAM memory
> +#define SPD_VAL_DDR2_TYPE 8   ///< DDR2 SDRAM memory
> +#define SPD_VAL_DDR3_TYPE 11  ///< DDR3 SDRAM memory
> +#define SPD_VAL_DDR4_TYPE 12  ///< DDR4 SDRAM memory
> +#define SPD_VAL_LPDDR3_TYPE 15///< LPDDR3 SDRAM memory
> +#define SPD_VAL_LPDDR4_TYPE 16///< LPDDR4 SDRAM memory
> +
>  //
>  // ECC Type Definitions
>  //
> diff --git a/MdePkg/Include/IndustryStandard/SdramSpdDdr3.h
> b/MdePkg/Include/IndustryStandard/SdramSpdDdr3.h
> new file mode 100644
> index 000..e280919
> --- /dev/null
> +++ b/MdePkg/Include/IndustryStandard/SdramSpdDdr3.h
> @@ -0,0 +1,769 @@
> +/** @file
> +  This file contains definitions for SPD DDR3.
> +
> +  Copyright (c) 2016, Intel Corporation. All rights reserved.
> +  This program and the accompanying materials
> +  are licensed and made available under the terms and conditions of the BSD
> License
> +  which accompanies this distribution.  The full text of the license may be
> found at
> +  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.
> +
> +  @par Revision Reference:
> +- Serial Presence Detect (SPD) for DDR3 SDRAM Modules Document
>

Re: [edk2] [PATCH 2/2] IntelFsp2Pkg: Use FspSiliconInitDone2 API for the Notify Phase Use FspSiliconInitDone2 API (with error status handling) for the Notify Phase

2016-11-17 Thread Mudusuru, Giri P
Correcting the edk2 mailing list.

> -Original Message-
> From: Mudusuru, Giri P
> Sent: Thursday, November 17, 2016 11:33 AM
> To: Thomaiyar, Richard Marian <richard.marian.thomai...@intel.com>; ed2-
> de...@lists.01.org
> Cc: Ma, Maurice <maurice...@intel.com>; Yao, Jiewen
> <jiewen@intel.com>
> Subject: RE: [PATCH 2/2] IntelFsp2Pkg: Use FspSiliconInitDone2 API for the
> Notify Phase Use FspSiliconInitDone2 API (with error status handling) for the
> Notify Phase
> 
> Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com>
> 
> > -Original Message-
> > From: Thomaiyar, Richard Marian
> > Sent: Wednesday, November 16, 2016 12:51 AM
> > To: ed2-de...@lists.01.org
> > Cc: Ma, Maurice <maurice...@intel.com>; Yao, Jiewen
> > <jiewen@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>;
> > Richard; Marian; Thomaiyar
> > Subject: [PATCH 2/2] IntelFsp2Pkg: Use FspSiliconInitDone2 API for the
> > Notify Phase Use FspSiliconInitDone2 API (with error status handling) for
> the
> > Notify Phase
> >
> > Cc: Maurice Ma <maurice...@intel.com>
> > Cc: Jiewen Yao <jiewen@intel.com>
> > Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Richard Marian Thomaiyar
> > <richard.marian.thomai...@intel.com>
> > ---
> >  IntelFsp2Pkg/FspNotifyPhase/FspNotifyPhasePeim.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/IntelFsp2Pkg/FspNotifyPhase/FspNotifyPhasePeim.c
> > b/IntelFsp2Pkg/FspNotifyPhase/FspNotifyPhasePeim.c
> > index 6acdeb3..41131d5 100644
> > --- a/IntelFsp2Pkg/FspNotifyPhase/FspNotifyPhasePeim.c
> > +++ b/IntelFsp2Pkg/FspNotifyPhase/FspNotifyPhasePeim.c
> > @@ -81,7 +81,7 @@ WaitForNotify (
> >// Give control back to BootLoader after FspSiliconInit
> >//
> >DEBUG ((DEBUG_INFO | DEBUG_INIT, "FSP is waiting for NOTIFY\n"));
> > -  FspSiliconInitDone ();
> > +  FspSiliconInitDone2 (EFI_SUCCESS);
> >
> >//
> >// BootLoader called FSP again through NotifyPhase
> > --
> > 2.9.0.windows.1

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


Re: [edk2] [PATCH] IntelFsp2Pkg: Use FspSiliconInitDone2 API

2016-11-17 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Thomaiyar, Richard Marian
> Sent: Wednesday, November 16, 2016 1:47 AM
> To: edk2-devel@lists.01.org
> Cc: Ma, Maurice <maurice...@intel.com>; Yao, Jiewen
> <jiewen@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>;
> Thomaiyar, Richard Marian <richard.marian.thomai...@intel.com>
> Subject: [PATCH] IntelFsp2Pkg: Use FspSiliconInitDone2 API
> 
> Use FspSiliconInitDone2 API in Notify Phase
> 
> Cc: Maurice Ma <maurice...@intel.com>
> Cc: Jiewen Yao <jiewen@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Richard Thomaiyar <richard.marian.thomai...@intel.com>
> ---
>  IntelFsp2Pkg/FspNotifyPhase/FspNotifyPhasePeim.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/IntelFsp2Pkg/FspNotifyPhase/FspNotifyPhasePeim.c
> b/IntelFsp2Pkg/FspNotifyPhase/FspNotifyPhasePeim.c
> index 6acdeb3..41131d5 100644
> --- a/IntelFsp2Pkg/FspNotifyPhase/FspNotifyPhasePeim.c
> +++ b/IntelFsp2Pkg/FspNotifyPhase/FspNotifyPhasePeim.c
> @@ -81,7 +81,7 @@ WaitForNotify (
>// Give control back to BootLoader after FspSiliconInit
>//
>DEBUG ((DEBUG_INFO | DEBUG_INIT, "FSP is waiting for NOTIFY\n"));
> -  FspSiliconInitDone ();
> +  FspSiliconInitDone2 (EFI_SUCCESS);
> 
>//
>// BootLoader called FSP again through NotifyPhase
> --
> 2.9.0.windows.1

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


Re: [edk2] [PATCH] IntelSiliconPkg/IntelSiliconPkg.dec: drop bogus semicolon from GUID def

2016-11-17 Thread Mudusuru, Giri P
Thank you for fixing it.
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com>


> -Original Message-
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: Thursday, November 17, 2016 2:37 AM
> To: edk2-devel-01 <edk2-de...@ml01.01.org>
> Cc: Mudusuru, Giri P <giri.p.mudus...@intel.com>; Yao, Jiewen
> <jiewen@intel.com>
> Subject: [PATCH] IntelSiliconPkg/IntelSiliconPkg.dec: drop bogus semicolon 
> from
> GUID def
> 
> The DEC spec doesn't allow the trailing semicolon:
> 
>   2.6 [Guids] Usage
> 
>   GuidCName = {C Format Guid Value} # Comment
> 
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Cc: Jiewen Yao <jiewen@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Laszlo Ersek <ler...@redhat.com>
> ---
>  IntelSiliconPkg/IntelSiliconPkg.dec | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/IntelSiliconPkg/IntelSiliconPkg.dec
> b/IntelSiliconPkg/IntelSiliconPkg.dec
> index 4a51d0a547da..8819cb8fed6b 100644
> --- a/IntelSiliconPkg/IntelSiliconPkg.dec
> +++ b/IntelSiliconPkg/IntelSiliconPkg.dec
> @@ -26,7 +26,7 @@ [Includes]
>  [Guids]
>## GUID for Package token space
># {A9F8D54E-1107-4F0A-ADD0-4587E7A4A735}
> -  gIntelSiliconPkgTokenSpaceGuid  = { 0xa9f8d54e, 0x1107, 0x4f0a, { 0xad,
> 0xd0, 0x45, 0x87, 0xe7, 0xa4, 0xa7, 0x35 } };
> +  gIntelSiliconPkgTokenSpaceGuid  = { 0xa9f8d54e, 0x1107, 0x4f0a, { 0xad,
> 0xd0, 0x45, 0x87, 0xe7, 0xa4, 0xa7, 0x35 } }
> 
>## HOB GUID to publish SMBIOS data records from PEI phase
># HOB data format is same as SMBIOS records defined in SMBIOS spec or OEM
> defined types
> --
> 2.9.2

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


Re: [edk2] [Patch] MdePkg IndustryStandard: Add DDR3, DDR4 and LPDDR definition per SPD spec

2016-11-14 Thread Mudusuru, Giri P
Thanks Liming for the patch. Few comments below

1) can we split the file into multiple files based on DDR technology like DDR3, 
DDR4?
SdramSpd.h will include others files similar to Acpi.h or Pci.h. May be 
SdramSpdDdr3.h, SdramSpdDdr4.h etc..

2) change from 116-102 to 102-116 for consistency in comments.
+  UINT8 PersonalityByte[116 - 102 + 
1];   ///< 116-102 Memory Buffer Personality

3) Change to MANUFACTURER instead of MANUFACTURE in names.

4) in SPD DDR4 Base section the bytes 6 and 10 are Package Type but the code 
uses Device Type 

  SPD_SDRAM_DEVICE_TYPE_STRUCTSdramDeviceType;  ///< 6   
Primary SDRAM Package Type
  SPD4_SECONDARY_SDRAM_PACKAGE_TYPE_STRUCT  SecondarySdramDeviceType;///< 10 
Secondary SDRAM Package Type

5) Update to CamelCase for example DRAMODTRTT_PARKfordatarateLe1866 to 
DramOdtRttParkForDataRateLe1866

Thanks,
-Giri

-Original Message-
From: Gao, Liming 
Sent: Friday, November 11, 2016 1:11 AM
To: edk2-devel@lists.01.org
Cc: Mudusuru, Giri P <giri.p.mudus...@intel.com>
Subject: [Patch] MdePkg IndustryStandard: Add DDR3, DDR4 and LPDDR definition 
per SPD spec

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

Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming@intel.com>
---
 MdePkg/Include/IndustryStandard/SdramSpd.h | 1682 +++-
 1 file changed, 1670 insertions(+), 12 deletions(-)

diff --git a/MdePkg/Include/IndustryStandard/SdramSpd.h 
b/MdePkg/Include/IndustryStandard/SdramSpd.h
index 2b2012b..e3f6eea 100644
--- a/MdePkg/Include/IndustryStandard/SdramSpd.h
+++ b/MdePkg/Include/IndustryStandard/SdramSpd.h
@@ -1,14 +1,24 @@
 /** @file
   This file contains definitions for the SPD fields on an SDRAM.
-
-  Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.
-  This program and the accompanying materials  
-  are licensed and made available under the terms and conditions of the BSD 
License 
-  which accompanies this distribution.  The full text of the license may be 
found at
-  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. 
+
+  Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
+  This program and the accompanying materials
+  are licensed and made available under the terms and conditions of the BSD 
License
+  which accompanies this distribution.  The full text of the license may be 
found at
+  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.
+
+  @par Revision Reference:
+- Serial Presence Detect (SPD) for DDR3 SDRAM Modules Document Release 6
+  http://www.jedec.org/sites/default/files/docs/4_01_02_11R21A.pdf
+
+- Serial Presence Detect (SPD) for DDR4 SDRAM Modules Document Release 4
+  http://www.jedec.org/standards-documents/docs/spd412l-4
+
+- Serial Presence Detect (SPD) for LPDDR3 and LPDDR4 SDRAM Modules 
Document Release 2
+  http://www.jedec.org/standards-documents/docs/spd412m-2
 **/
 
 #ifndef _SDRAM_SPD_H_
@@ -47,9 +57,14 @@
 //
 // Memory Type Definitions
 //
-#define SPD_VAL_SDR_TYPE  4 ///< SDR SDRAM memory
-#define SPD_VAL_DDR_TYPE  7 ///< DDR SDRAM memory
-#define SPD_VAL_DDR2_TYPE 8 ///< DDR2 SDRAM memory
+#define SPD_VAL_SDR_TYPE  4  ///< SDR SDRAM memory
+#define SPD_VAL_DDR_TYPE  7  ///< DDR SDRAM memory
+#define SPD_VAL_DDR2_TYPE 8  ///< DDR2 SDRAM memory
+#define SPD_VAL_DDR3_TYPE 11 ///< DDR3 SDRAM memory
+#define SPD_VAL_DDR4_TYPE 12 ///< DDR4 SDRAM memory
+#define SPD_VAL_LPDDR3_TYPE 15 ///< LPDDR3 SDRAM memory
+#define SPD_VAL_LPDDR4_TYPE 16 ///< LPDDR4 SDRAM memory
+
 //
 // ECC Type Definitions
 //
@@ -62,4 +77,1647 @@
 #define SPD_BUFFERED0x01
 #define SPD_REGISTERED  0x02
 
+#pragma pack (push, 1)
+
+typedef union {
+  struct {
+UINT8  BytesUsed   :  4; ///< Bits 3:0
+UINT8  BytesTotal  :  3; ///< Bits 6:4
+UINT8  CrcCoverage :  1; ///< Bits 7:7
+  } Bits;
+  UINT8  Data;
+} SPD_DEVICE_DESCRIPTION_STRUCT;
+
+typedef union {
+  struct {
+UINT8  Minor   :  4; ///< Bits 3:0
+UINT8  Major   :  4; ///< Bits 7:4
+  } Bits;
+  UINT8  Data;
+} SPD_REVISION_STRUCT;
+
+typedef union {
+  struct {
+UINT8  Type:  8; ///< Bits 7:0
+  } Bits;
+  UINT8  Data;
+} SPD_DRAM_DEVICE_TYPE_STRUCT;
+
+typedef uni

Re: [edk2] [PATCH] IntelFsp2Pkg: Support to return error status from FSP API done

2016-11-09 Thread Mudusuru, Giri P
Thanks Richard. Can you please add comments in the code to describe it? Other 
than that it looks good to me.

Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com>


> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Mudusuru, Giri P
> Sent: Tuesday, November 8, 2016 2:39 PM
> To: Thomaiyar, Richard Marian <richard.marian.thomai...@intel.com>; edk2-
> de...@lists.01.org
> Cc: Yao, Jiewen <jiewen@intel.com>
> Subject: Re: [edk2] [PATCH] IntelFsp2Pkg: Support to return error status from
> FSP API done
> 
> Hi Richard,
> 
> In the below snippet the debug message is based on the API status and will not
> be display if the switch stack already happened right? Also since it is in a 
> do while
> loop "cannot proceed further" is not necessarily accurate.
> 
> > -  SetFspApiReturnStatus (EFI_SUCCESS);
> > -
> > -  Pei2LoaderSwitchStack();
> > -
> > +  do {
> > +SetFspApiReturnStatus (Status);
> > +Pei2LoaderSwitchStack ();
> > +if (Status != EFI_SUCCESS) {
> > +  DEBUG ((DEBUG_ERROR, "!!!ERROR: FspSiliconInitApi() - [Status: 
> > 0x%08X]
> -
> > Error encountered during previous API and cannot proceed further\n", 
> > Status));
> > +}
> > +  } while (Status != EFI_SUCCESS);
> Thanks,
> -Giri
> 
> > -Original Message-
> > From: Thomaiyar, Richard Marian
> > Sent: Tuesday, November 8, 2016 1:45 AM
> > To: edk2-devel@lists.01.org
> > Cc: Ma, Maurice <maurice...@intel.com>; Yao, Jiewen
> > <jiewen@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>;
> > Thomaiyar, Richard Marian <richard.marian.thomai...@intel.com>
> > Subject: [PATCH] IntelFsp2Pkg: Support to return error status from FSP API
> done
> >
> > Added FspMemoryInitDone2, FspTempRamExitDone2, FspSiliconInitDone2
> > to return error status to Boot Loader for FSP API calls.
> > To maintain backward compatibility existing functions
> > (FspMemoryInitDone, FspTempRamExitDone, FspSiliconInitDone)
> > declaration left untouched.
> >
> > Cc: Maurice Ma <maurice...@intel.com>
> > Cc: Jiewen Yao <jiewen@intel.com>
> > Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Richard Thomaiyar <richard.marian.thomai...@intel.com>
> > ---
> >  IntelFsp2Pkg/Include/Library/FspPlatformLib.h  |  35 +
> >  .../Library/BaseFspPlatformLib/FspPlatformNotify.c | 151
> +-
> > ---
> >  2 files changed, 163 insertions(+), 23 deletions(-)
> >
> > diff --git a/IntelFsp2Pkg/Include/Library/FspPlatformLib.h
> > b/IntelFsp2Pkg/Include/Library/FspPlatformLib.h
> > index 61e77bd..1f39601 100644
> > --- a/IntelFsp2Pkg/Include/Library/FspPlatformLib.h
> > +++ b/IntelFsp2Pkg/Include/Library/FspPlatformLib.h
> > @@ -93,4 +93,39 @@ FspWaitForNotify (
> >VOID
> >);
> >
> > +/**
> > +  This function transfer control back to BootLoader after FspSiliconInit.
> > +
> > +  @param[in] Status return status for the FspSiliconInit.
> > +**/
> > +VOID
> > +EFIAPI
> > +FspSiliconInitDone2 (
> > +  IN EFI_STATUS Status
> > +  );
> > +
> > +/**
> > +  This function returns control to BootLoader after MemoryInitApi.
> > +
> > +  @param[in] Status return status for the MemoryInitApi.
> > +  @param[in,out] HobListPtr The address of HobList pointer.
> > +**/
> > +VOID
> > +EFIAPI
> > +FspMemoryInitDone2 (
> > +  IN EFI_STATUS Status,
> > +  IN OUT VOID   **HobListPtr
> > +  );
> > +
> > +/**
> > +  This function returns control to BootLoader after TempRamExitApi.
> > +
> > +  @param[in] Status return status for the TempRamExitApi.
> > +**/
> > +VOID
> > +EFIAPI
> > +FspTempRamExitDone2 (
> > +  IN EFI_STATUS Status
> > +  );
> > +
> >  #endif
> > diff --git a/IntelFsp2Pkg/Library/BaseFspPlatformLib/FspPlatformNotify.c
> > b/IntelFsp2Pkg/Library/BaseFspPlatformLib/FspPlatformNotify.c
> > index 755e84f..ac1fc1a 100644
> > --- a/IntelFsp2Pkg/Library/BaseFspPlatformLib/FspPlatformNotify.c
> > +++ b/IntelFsp2Pkg/Library/BaseFspPlatformLib/FspPlatformNotify.c
> > @@ -108,35 +108,56 @@ FspNotificationHandler (
> >  /**
> >This function transfer control back to BootLoader after FspSiliconInit.
> >
> > +  @param[in] Status return status for the FspSiliconInit.
> > +
> >  **/
> &g

Re: [edk2] [PATCH] IntelFsp2Pkg: Support to return error status from FSP API done

2016-11-08 Thread Mudusuru, Giri P
Hi Richard,

In the below snippet the debug message is based on the API status and will not 
be display if the switch stack already happened right? Also since it is in a do 
while loop "cannot proceed further" is not necessarily accurate.

> -  SetFspApiReturnStatus (EFI_SUCCESS);
> -
> -  Pei2LoaderSwitchStack();
> -
> +  do {
> +SetFspApiReturnStatus (Status);
> +Pei2LoaderSwitchStack ();
> +if (Status != EFI_SUCCESS) {
> +  DEBUG ((DEBUG_ERROR, "!!!ERROR: FspSiliconInitApi() - [Status: 0x%08X] 
> -
> Error encountered during previous API and cannot proceed further\n", Status));
> +}
> +  } while (Status != EFI_SUCCESS);
Thanks,
-Giri

> -Original Message-
> From: Thomaiyar, Richard Marian
> Sent: Tuesday, November 8, 2016 1:45 AM
> To: edk2-devel@lists.01.org
> Cc: Ma, Maurice <maurice...@intel.com>; Yao, Jiewen
> <jiewen@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>;
> Thomaiyar, Richard Marian <richard.marian.thomai...@intel.com>
> Subject: [PATCH] IntelFsp2Pkg: Support to return error status from FSP API 
> done
> 
> Added FspMemoryInitDone2, FspTempRamExitDone2, FspSiliconInitDone2
> to return error status to Boot Loader for FSP API calls.
> To maintain backward compatibility existing functions
> (FspMemoryInitDone, FspTempRamExitDone, FspSiliconInitDone)
> declaration left untouched.
> 
> Cc: Maurice Ma <maurice...@intel.com>
> Cc: Jiewen Yao <jiewen@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Richard Thomaiyar <richard.marian.thomai...@intel.com>
> ---
>  IntelFsp2Pkg/Include/Library/FspPlatformLib.h  |  35 +
>  .../Library/BaseFspPlatformLib/FspPlatformNotify.c | 151 +-
> ---
>  2 files changed, 163 insertions(+), 23 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Include/Library/FspPlatformLib.h
> b/IntelFsp2Pkg/Include/Library/FspPlatformLib.h
> index 61e77bd..1f39601 100644
> --- a/IntelFsp2Pkg/Include/Library/FspPlatformLib.h
> +++ b/IntelFsp2Pkg/Include/Library/FspPlatformLib.h
> @@ -93,4 +93,39 @@ FspWaitForNotify (
>VOID
>);
> 
> +/**
> +  This function transfer control back to BootLoader after FspSiliconInit.
> +
> +  @param[in] Status return status for the FspSiliconInit.
> +**/
> +VOID
> +EFIAPI
> +FspSiliconInitDone2 (
> +  IN EFI_STATUS Status
> +  );
> +
> +/**
> +  This function returns control to BootLoader after MemoryInitApi.
> +
> +  @param[in] Status return status for the MemoryInitApi.
> +  @param[in,out] HobListPtr The address of HobList pointer.
> +**/
> +VOID
> +EFIAPI
> +FspMemoryInitDone2 (
> +  IN EFI_STATUS Status,
> +  IN OUT VOID   **HobListPtr
> +  );
> +
> +/**
> +  This function returns control to BootLoader after TempRamExitApi.
> +
> +  @param[in] Status return status for the TempRamExitApi.
> +**/
> +VOID
> +EFIAPI
> +FspTempRamExitDone2 (
> +  IN EFI_STATUS Status
> +  );
> +
>  #endif
> diff --git a/IntelFsp2Pkg/Library/BaseFspPlatformLib/FspPlatformNotify.c
> b/IntelFsp2Pkg/Library/BaseFspPlatformLib/FspPlatformNotify.c
> index 755e84f..ac1fc1a 100644
> --- a/IntelFsp2Pkg/Library/BaseFspPlatformLib/FspPlatformNotify.c
> +++ b/IntelFsp2Pkg/Library/BaseFspPlatformLib/FspPlatformNotify.c
> @@ -108,35 +108,56 @@ FspNotificationHandler (
>  /**
>This function transfer control back to BootLoader after FspSiliconInit.
> 
> +  @param[in] Status return status for the FspSiliconInit.
> +
>  **/
>  VOID
>  EFIAPI
> -FspSiliconInitDone (
> -  VOID
> +FspSiliconInitDone2 (
> +  IN EFI_STATUS Status
>)
>  {
>//
> +  // Convert to FSP EAS defined API return codes
> +  //
> +  switch (Status) {
> +case EFI_SUCCESS:
> +case EFI_INVALID_PARAMETER:
> +case EFI_UNSUPPORTED:
> +case EFI_DEVICE_ERROR:
> +  break;
> +default:
> +  DEBUG ((DEBUG_INFO | DEBUG_INIT, "FspSiliconInitApi() Invalid Error -
> [Status: 0x%08X]\n", Status));
> +  Status = EFI_DEVICE_ERROR;  // Force to known error.
> +  break;
> +  }
> +  //
>// This is the end of the FspSiliconInit API
>// Give control back to the boot loader
>//
>SetFspMeasurePoint (FSP_PERF_ID_API_FSP_SILICON_INIT_EXIT);
> -  DEBUG ((DEBUG_INFO | DEBUG_INIT, "FspSiliconInitApi() - End\n"));
> +  DEBUG ((DEBUG_INFO | DEBUG_INIT, "FspSiliconInitApi() - [Status: 0x%08X] -
> End\n", Status));
>PERF_END_EX (, "EventRec", NULL, 0,
> FSP_STATUS_CODE_SILICON_INIT | FSP_STATUS_CODE_COMMON_CODE |
> FSP_STATUS_CODE_API_EX

Re: [edk2] [PATCH] IntelSiliconPkg: Add SMBIOS data HOB GUID

2016-10-31 Thread Mudusuru, Giri P
Hi Jiewen,
With the feature added last year (see below patch) the AutoGen.h will include 
the extern for the GUIDs. So no need for additional .h file.
https://github.com/tianocore/edk2/commit/8262037ff851b4beaa011ca96012876bf7c40f94

Thanks,
-Giri

From: Yao, Jiewen
Sent: Monday, October 31, 2016 5:48 PM
To: Mudusuru, Giri P <giri.p.mudus...@intel.com>; edk2-devel@lists.01.org
Cc: Zeng, Star <star.z...@intel.com>; Kinney, Michael D 
<michael.d.kin...@intel.com>
Subject: RE: [edk2] [PATCH] IntelSiliconPkg: Add SMBIOS data HOB GUID

HI Giri
I believe we also need .h file to let .c file include this GUID, right?

Will there be another patch to address that?

If so, this patch is reviewed-by: 
jiewen@intel.com<mailto:jiewen@intel.com>



> -Original Message-----
> From: Mudusuru, Giri P
> Sent: Tuesday, November 1, 2016 12:57 AM
> To: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> Cc: Yao, Jiewen <jiewen@intel.com<mailto:jiewen@intel.com>>; Zeng, 
> Star <star.z...@intel.com<mailto:star.z...@intel.com>>;
> Kinney, Michael D 
> <michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>
> Subject: [edk2] [PATCH] IntelSiliconPkg: Add SMBIOS data HOB GUID
>
> Add gIntelSmbiosDataHobGuid used to publish SMBIOS data from PEI phase.
> The HOB data format will be same as SMBIOS spec define formats for
> Types 0 to 127 and OEM defined types for 128 to 255.
>
> Generic library or DXE driver can add SMBIOS records using this HOB(s).
>
> Cc: Jiewen Yao <jiewen@intel.com<mailto:jiewen@intel.com>>
> Cc: Star Zeng <star.z...@intel.com<mailto:star.z...@intel.com>>
> Cc: Michael Kinney 
> <michael.d.kin...@intel.com<mailto:michael.d.kin...@intel.com>>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Giri P Mudusuru 
> <giri.p.mudus...@intel.com<mailto:giri.p.mudus...@intel.com>>
> ---
>  IntelSiliconPkg/IntelSiliconPkg.dec | 7 +++
>  1 file changed, 7 insertions(+)
>
> diff --git a/IntelSiliconPkg/IntelSiliconPkg.dec
> b/IntelSiliconPkg/IntelSiliconPkg.dec
> index e42dbad..84b0764 100644
> --- a/IntelSiliconPkg/IntelSiliconPkg.dec
> +++ b/IntelSiliconPkg/IntelSiliconPkg.dec
> @@ -22,3 +22,10 @@
>
>  [Includes]
>Include
> +
> +[Guids]
> +  ## HOB GUID to publish SMBIOS data records from PEI phase
> +  # HOB data format is same as SMBIOS records defined in SMBIOS spec or
> OEM defined types
> +  # Generic DXE Library / Driver can locate HOB(s) and add SMBIOS records
> into SMBIOS table
> +  gIntelSmbiosDataHobGuid = { 0x798e722e, 0x15b2, 0x4e13,
> { 0x8a, 0xe9, 0x6b, 0xa3, 0x0f, 0xf7, 0xf1, 0x67 }}
> +
> --
> 2.9.0.windows.1
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2] IntelFsp2WrapperPkg: Add a PCD to control if signaling PciEnumerationComplete.

2016-10-24 Thread Mudusuru, Giri P
We can add full description with note that only skip NotifyPhase Post PCI 
enumeration is implemented.

1) Change "BIT0~15 is for function:" to "BIT[15:0] is for function:" and 
"BIT16~32 is for sub-function:" to "BIT[32:16] is for sub-function:" for 
consistency
2)  Suggest to rename fix below define 
FSP_API_NOTIFY_PHASE_AFTER_PCI_ENUMERATION to be consistent with other usage
+#define   PCI_ENUMERATION_COMPLETE_API BIT16
3) Also for PCD naming suggest to change PcdSkipFspApi 

Thanks,
-Giri

> -Original Message-
> From: Yao, Jiewen
> Sent: Monday, October 24, 2016 4:18 PM
> To: Dong, Guo <guo.d...@intel.com>; edk2-devel@lists.01.org
> Cc: Mudusuru, Giri P <giri.p.mudus...@intel.com>; Ma, Maurice
> <maurice...@intel.com>
> Subject: RE: [edk2] [PATCH v2] IntelFsp2WrapperPkg: Add a PCD to control if
> signaling PciEnumerationComplete.
> 
> Thanks Guo. Can we add full description for the PCD?
> 
> # BIT0~15 is for function:
> #   BIT0 - Mask TempRamInit
> #   BIT1 - Mask MemoryInit
> #   BIT2 - Mask TempRamExit
> #   BIT3 - Mask SiliconInit
> #   BIT4 - Mask NotifyPhase
> # BIT16~32 is for sub-function:
> #   BIT16 - Mask NotifyPhase (AfterPciEnumeration)
> #   BIT17 - Mask NotifyPhase (ReadyToBoot)
> #   BIT18 - Mask NotifyPhase (EndOfFirmware)
> # Any undefined BITs are reserved for future use
> 
> 
> Thank you
> Yao Jiewen
> 
> > -Original Message-
> > From: Dong, Guo
> > Sent: Tuesday, October 25, 2016 1:03 AM
> > To: edk2-devel@lists.01.org
> > Cc: Yao, Jiewen <jiewen@intel.com>; Mudusuru, Giri P
> > <giri.p.mudus...@intel.com>; Ma, Maurice <maurice...@intel.com>; Dong,
> > Guo <guo.d...@intel.com>
> > Subject: [edk2] [PATCH v2] IntelFsp2WrapperPkg: Add a PCD to control if
> > signaling PciEnumerationComplete.
> >
> >  PciEnumerationComplete might be signaled to FSP in Coreboot. So FSP
> >  wrapper driver don't need send it again. Add a PCD to control if a
> >  FSP API could be skipped from FspWrapperNotifyDxe driver.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Guo Dong <guo.d...@intel.com>
> > Reviewed-by: Maurice Ma <maurice...@intel.com>
> > Reviewed-by: Jiewen Yao <jiewen@intel.com>
> > Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com>
> > ---
> >  .../FspWrapperNotifyDxe/FspWrapperNotifyDxe.c  | 22
> > ++
> >  .../FspWrapperNotifyDxe/FspWrapperNotifyDxe.inf|  1 +
> >  IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec|  8 
> >  3 files changed, 23 insertions(+), 8 deletions(-)
> >
> > diff --git
> > a/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c
> > b/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c
> > index 0797f44..969debc 100644
> > --- a/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c
> > +++ b/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c
> > @@ -26,6 +26,8 @@
> >  #include 
> >  #include 
> >
> > +#define   PCI_ENUMERATION_COMPLETE_API BIT16
> > +
> >  typedef
> >  EFI_STATUS
> >  (EFIAPI * ADD_PERFORMANCE_RECORDS)(
> > @@ -237,6 +239,7 @@ FspWrapperNotifyDxeEntryPoint (
> >EFI_EVENT  ReadyToBootEvent;
> >VOID   *Registration;
> >EFI_EVENT  ProtocolNotifyEvent;
> > +  UINT32   FspApiMask;
> >
> >//
> >// Load this driver's image to memory
> > @@ -246,14 +249,17 @@ FspWrapperNotifyDxeEntryPoint (
> >  return EFI_SUCCESS;
> >}
> >
> > -  ProtocolNotifyEvent = EfiCreateProtocolNotifyEvent (
> > -
> > ,
> > -  TPL_CALLBACK,
> > -  OnPciEnumerationComplete,
> > -  NULL,
> > -  
> > -  );
> > -  ASSERT (ProtocolNotifyEvent != NULL);
> > +  FspApiMask = PcdGet32 (PcdFspApiSkipMask);
> > +  if ((FspApiMask & PCI_ENUMERATION_COMPLETE_API) == 0) {
> > +ProtocolNotifyEvent = EfiCreateProtocolNotifyEvent (
> > +
> > ,
> > +TPL_CALLBACK,
> > +OnPciEnumerationComplete,
> > +NULL,
> > +
> > +);
> > +ASSERT (ProtocolNotifyEvent != NULL);
> > +  }
> >
> >Status = EfiCreateEventReadyToBootEx (
> >   TPL_CALLBACK,
> > diff --git
> > a/IntelFsp2Wrappe

Re: [edk2] [Bug 164] Add the build option "/D DISABLE_NEW_DEPRECATED_INTERFACES" in package DSC files

2016-10-23 Thread Mudusuru, Giri P
A combination of Jordon's and Andrews proposal would be better so we have one 
flag and also scalable. Level of deprecated interfaces can be controlled by 
each platform. EDK2 master platforms should not define this flag to eliminate 
the usage of deprecated interfaces while UDK2015 can define and set the value 
to 2015 for compatibility. 

ENABLE_UDK_DEPRECATED_INTERFACES=2014 or 2015 or 2017 (UDK versions)

Thanks,
-Giri

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yao,
> Jiewen
> Sent: Friday, October 21, 2016 4:13 PM
> To: Laszlo Ersek ; Justen, Jordan L
> ; Andrew Fish 
> Cc: Kinney, Michael D ; edk2-devel-01  de...@ml01.01.org>; Gao, Liming ; Leif Lindholm
> ; Ard Biesheuvel 
> Subject: Re: [edk2] [Bug 164] Add the build option "/D
> DISABLE_NEW_DEPRECATED_INTERFACES" in package DSC files
> 
> I remember our deprecation process is:
> 
> 1)  Core defines DISABLE_NEW_DEPRECATED_INTERFACES and puts a
> deprecated content in it. (Platform does not use
> DISABLE_NEW_DEPRECATED_INTERFACES and deprecated function can still be
> used at this moment. But we strongly recommend a platform doing clean up at
> same time.)
> 
> 2)  Platform defines DISABLE_NEW_DEPRECATED_INTERFACES and
> deprecated function cannot be used after the clean up work.
> 
> 3)  Core removes the deprecated content and
> DISABLE_NEW_DEPRECATED_INTERFACES, if we can make sure no platform
> using it.
> 
> 4)  Platform may remove DISABLE_NEW_DEPRECATED_INTERFACES.
> 
> We do not want to remove a function directly, to break lots of platforms. We
> just want to give a buffer to let platform do code cleanup.
> 
> Thank you
> Yao Jiewen
> 
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Laszlo
> Ersek
> Sent: Saturday, October 22, 2016 6:31 AM
> To: Justen, Jordan L ; Andrew Fish
> 
> Cc: Kinney, Michael D ; edk2-devel-01  de...@ml01.01.org>; Leif Lindholm ; Gao, Liming
> ; Ard Biesheuvel 
> Subject: Re: [edk2] [Bug 164] Add the build option "/D
> DISABLE_NEW_DEPRECATED_INTERFACES" in package DSC files
> 
> On 10/22/16 00:10, Jordan Justen wrote:
> > On 2016-10-21 14:02:44, Laszlo Ersek wrote:
> 
> >> Honestly, I imagined that DISABLE_NEW_DEPRECATED_INTERFACES would
> be
> >> temporary in the edk2 tree. That is, it's a means so we can gradually
> >> transition with all the in-tree stuff to a deprecationless code base.
> >> Once that's done -- i.e., *all* platform DSCs within the edk2 tree
> >> specify this feature test macro under their respective [BuildOptions]
> >> sections --, then whatever the macro excises from the core packages can
> >> be removed permanently, together with those platform [BuildOptions].
> >>
> >
> > That could be reasonable, although I'd argue that we could flip it
> > around. Opt-in to the deprecated interfaces on all platforms, and then
> > start marking deprecated interfaces. Finally we could clean up
> > platforms and removed the override.
> 
> That's a valid idea, IMO.
> 
> > But ... I think DISABLE_NEW_DEPRECATED_INTERFACES was first added in:
> >
> > commit bf4a3dbd4751b6411bdfc98bf3ac2c4f928bdfdf
> > Author: ydong10 
> > Date:   Wed May 30 07:36:00 2012 +
> >
> > So, I guess it is not going to be removed anytime soon. :(
> 
> I believe we just need to make progress with the individual platforms
> (and their dependencies from other Pkgs). It's not a lot of fun, but the
> BZs exist (well, they can be filed) now, and then we can address them...
> 
> I mean, I didn't care (or, really, know) about
> DISABLE_NEW_DEPRECATED_INTERFACES until the ArmVirtPkg / OvmfPkg BZs
> got
> filed. Bugzilla is great. I like the attention that it gets, from others
> and from myself.
> 
> Thanks
> Laszlo
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] IntelFsp2WrapperPkg: Add a PCD to control if signaling first event.

2016-10-23 Thread Mudusuru, Giri P
Agree with Jiewen's solution. Default should be 0 in IntelFsp2WrapperPkg and 
CorebootPayloadPkg can set BIT16 to skip the API.

Thanks,
-Giri

From: Yao, Jiewen
Sent: Friday, October 21, 2016 10:15 PM
To: Dong, Guo <guo.d...@intel.com>; Mudusuru, Giri P 
<giri.p.mudus...@intel.com>; edk2-devel@lists.01.org
Cc: Ma, Maurice <maurice...@intel.com>; Yarlagadda, Satya P 
<satya.p.yarlaga...@intel.com>
Subject: RE: [edk2] [PATCH] IntelFsp2WrapperPkg: Add a PCD to control if 
signaling first event.

My thinking is to define mask for ALL APIs, not 3.

We have 5 APIs, and 3 sub API for notify phase. How about this :
# BIT0~15 is for function:
#   BIT0 - Mask TempRamInit
#   BIT1 - Mask MemoryInit
#   BIT2 - Mask TempRamExit
#   BIT3 - Mask SiliconInit
#   BIT4 - Mask NotifyPhase
# BIT16~32 is for sub-function:
#   BIT16 - Mask NotifyPhase (AfterPciEnumeration)
#   BIT17 - Mask NotifyPhase (ReadyToBoot)
#   BIT18 - Mask NotifyPhase (EndOfFirmware)
# Any undefined BITs are reserved for future use
PcdFspApiSkipMask|UINT32

You can use BIT16 now. We may use BIT0+BIT2 later. And any other combination in 
the future.

From: Dong, Guo
Sent: Saturday, October 22, 2016 7:52 AM
To: Yao, Jiewen <jiewen@intel.com<mailto:jiewen....@intel.com>>; Mudusuru, 
Giri P <giri.p.mudus...@intel.com<mailto:giri.p.mudus...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Ma, Maurice <maurice...@intel.com<mailto:maurice...@intel.com>>; 
Yarlagadda, Satya P 
<satya.p.yarlaga...@intel.com<mailto:satya.p.yarlaga...@intel.com>>
Subject: RE: [edk2] [PATCH] IntelFsp2WrapperPkg: Add a PCD to control if 
signaling first event.


I am OK with bit mask PCD.
Now only 3 APIs in this driver. Do we really need UINT64?

Thanks,
Guo

From: Yao, Jiewen
Sent: Friday, October 21, 2016 4:23 PM
To: Dong, Guo <guo.d...@intel.com<mailto:guo.d...@intel.com>>; Mudusuru, Giri P 
<giri.p.mudus...@intel.com<mailto:giri.p.mudus...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Ma, Maurice <maurice...@intel.com<mailto:maurice...@intel.com>>; 
Yarlagadda, Satya P 
<satya.p.yarlaga...@intel.com<mailto:satya.p.yarlaga...@intel.com>>
Subject: RE: [edk2] [PATCH] IntelFsp2WrapperPkg: Add a PCD to control if 
signaling first event.

Understood. I agree that is a valid usage model.

So how about we define a bit mask for every function? Such as 
"PcdFspApiSkipMask|UINT64" - I am open on any naming proposal.

In the future we may need skip some other functions such as InitTempRam or 
TempRamExit.

Thank you
Yao Jiewen

From: Dong, Guo
Sent: Tuesday, October 18, 2016 1:11 PM
To: Yao, Jiewen <jiewen@intel.com<mailto:jiewen@intel.com>>; Mudusuru, 
Giri P <giri.p.mudus...@intel.com<mailto:giri.p.mudus...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Ma, Maurice <maurice...@intel.com<mailto:maurice...@intel.com>>; 
Yarlagadda, Satya P 
<satya.p.yarlaga...@intel.com<mailto:satya.p.yarlaga...@intel.com>>
Subject: RE: [edk2] [PATCH] IntelFsp2WrapperPkg: Add a PCD to control if 
signaling first event.


Hi Jiewen,

For Coreboot boot loader, PCI device enumeration is done in coreboot, so it is 
nature Coreboot sends PciEnumerationComplete to FSP. UEFI payload would send 
FSP ReadyToBoot and EndOfFirmware notification.

If there is other boot loader that sends ReadyToBoot and EndOfFirmware in 
different firmware component, we may add PCDs for them later.

Thanks,
Guo

From: Yao, Jiewen
Sent: Monday, October 17, 2016 9:10 PM
To: Dong, Guo <guo.d...@intel.com<mailto:guo.d...@intel.com>>; Mudusuru, Giri P 
<giri.p.mudus...@intel.com<mailto:giri.p.mudus...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Ma, Maurice <maurice...@intel.com<mailto:maurice...@intel.com>>; 
Yarlagadda, Satya P 
<satya.p.yarlaga...@intel.com<mailto:satya.p.yarlaga...@intel.com>>; Yao, 
Jiewen <jiewen@intel.com<mailto:jiewen@intel.com>>
Subject: RE: [edk2] [PATCH] IntelFsp2WrapperPkg: Add a PCD to control if 
signaling first event.

Hi
I am a little concern on this as well.

If today, there is a POC require skipping PciEnumerationComplete.
There might be the other POC tomorrow to skip ReadyToBoot
Then another POC to skip EventExitBootServices.

We will be exhausted to add POC to skip each separately.

Can this POC handle all 3 event together? Or not handle 3 event completely?


Thank you
Yao Jiewen

From: Dong, Guo
Sent: Tuesday, October 18, 2016 12:04 PM
To: Mudusuru, Giri P 
<giri.p.mudus...@intel.com<mailto:giri.p.mudus...@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Yao, Jiewen <jiewen@intel.com<mailto:jiewen@intel.com>>; Ma, 
Maurice <maurice...@intel.c

Re: [edk2] [PATCH] IntelSiliconPkg: Add GUIDs for SMBIOS data HOB and VBT data

2016-10-23 Thread Mudusuru, Giri P
Thanks for the feedback Jiewen, Star.

Sure will send separate patches.

The cosmetic change was to indent it at odd columns so it aligns with tabs (two 
spaces) will skip this for now.

Will add description to the VBT. This is FFS GUID to store the GOP VBT data in 
RAW format. 

Thanks,
-Giri

> -Original Message-
> From: Yao, Jiewen
> Sent: Friday, October 21, 2016 4:43 PM
> To: Mudusuru, Giri P <giri.p.mudus...@intel.com>; edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Zeng, Star
> <star.z...@intel.com>; Yao, Jiewen <jiewen@intel.com>
> Subject: RE: [edk2] [PATCH] IntelSiliconPkg: Add GUIDs for SMBIOS data HOB
> and VBT data
> 
> Thanks for the patch. I have 2 minor comments:
> 
> 1) below update seems unnecessary. It makes me confused. We did not change
> anything right? Can we skip it?
> -  DEC_SPECIFICATION  = 0x00010005
> -  PACKAGE_NAME   = IntelSiliconPkg
> -  PACKAGE_GUID   = F7A58914-FA0E-4F71-BD6A-220FDF824A49
> -  PACKAGE_VERSION= 0.1
> +  DEC_SPECIFICATION   = 0x00010005
> +  PACKAGE_NAME= IntelSiliconPkg
> +  PACKAGE_GUID= F7A58914-FA0E-4F71-BD6A-220FDF824A49
> +  PACKAGE_VERSION = 0.1
> 
> 2) Can we add one line to describe the VBT in more detail? If this is FFS 
> GUID, or
> HOB GUID, PROTOCOL GUID? How is produced and consumed?
> > +  ## GUID for Graphics Video BIOS Table (VBT) Data
> > +  gIntelGraphicsVbtDataGuid   = { 0x56752da9, 0xde6b, 0x4895,
> > { 0x88, 0x19, 0x19, 0x45, 0xb6, 0xb7, 0x6c, 0x22 }}
> 
> I think below example is much better:
> > +  ## HOB GUID to publish SMBIOS data records from PEI phase
> > +  # Generic DXE Library / Driver can locate HOB(s) and add SMBIOS records
> > into SMBIOS table
> > +  gIntelSmbiosDataHobGuid = { 0x798e722e, 0x15b2, 0x4e13,
> > { 0x8a, 0xe9, 0x6b, 0xa3, 0x0f, 0xf7, 0xf1, 0x67 }}
> 
> 
> 
> Thank you
> Yao Jiewen
> 
> 
> > -Original Message-
> > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> > Giri P Mudusuru
> > Sent: Saturday, October 22, 2016 12:18 AM
> > To: edk2-devel@lists.01.org
> > Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Yao, Jiewen
> > <jiewen@intel.com>; Zeng, Star <star.z...@intel.com>
> > Subject: [edk2] [PATCH] IntelSiliconPkg: Add GUIDs for SMBIOS data HOB
> > and VBT data
> >
> > Add gIntelSmbiosDataHobGuid and gIntelGraphicsVbtDataGuid GUIDs
> >
> > Cc: Jiewen Yao <jiewen@intel.com>
> > Cc: Star Zeng <star.z...@intel.com>
> > Cc: Michael Kinney <michael.d.kin...@intel.com>
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Giri P Mudusuru <giri.p.mudus...@intel.com>
> > ---
> >  IntelSiliconPkg/IntelSiliconPkg.dec | 19 ++-
> >  1 file changed, 14 insertions(+), 5 deletions(-)
> >
> > diff --git a/IntelSiliconPkg/IntelSiliconPkg.dec
> > b/IntelSiliconPkg/IntelSiliconPkg.dec
> > index e42dbad..556fe76 100644
> > --- a/IntelSiliconPkg/IntelSiliconPkg.dec
> > +++ b/IntelSiliconPkg/IntelSiliconPkg.dec
> > @@ -1,5 +1,5 @@
> >  ## @file
> > -# IntelSilicon Package
> > +# Intel Silicon Package
> >  #
> >  # This package provides common open source Intel silicon modules.
> >  #
> > @@ -15,10 +15,19 @@
> >  ##
> >
> >  [Defines]
> > -  DEC_SPECIFICATION  = 0x00010005
> > -  PACKAGE_NAME   = IntelSiliconPkg
> > -  PACKAGE_GUID   =
> > F7A58914-FA0E-4F71-BD6A-220FDF824A49
> > -  PACKAGE_VERSION= 0.1
> > +  DEC_SPECIFICATION   = 0x00010005
> > +  PACKAGE_NAME= IntelSiliconPkg
> > +  PACKAGE_GUID=
> > F7A58914-FA0E-4F71-BD6A-220FDF824A49
> > +  PACKAGE_VERSION = 0.1
> >
> >  [Includes]
> >Include
> > +
> > +[Guids]
> > +  ## GUID for Graphics Video BIOS Table (VBT) Data
> > +  gIntelGraphicsVbtDataGuid   = { 0x56752da9, 0xde6b, 0x4895,
> > { 0x88, 0x19, 0x19, 0x45, 0xb6, 0xb7, 0x6c, 0x22 }}
> > +
> > +  ## HOB GUID to publish SMBIOS data records from PEI phase
> > +  # Generic DXE Library / Driver can locate HOB(s) and add SMBIOS records
> > into SMBIOS table
> > +  gIntelSmbiosDataHobGuid = { 0x798e722e, 0x15b2, 0x4e13,
> > { 0x8a, 0xe9, 0x6b, 0xa3, 0x0f, 0xf7, 0xf1, 0x67 }}
> > +
> > --
> > 2.9.0.windows.1
> >
> > ___
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] IntelFsp2Pkg: Added changes to enable FPDT performance measurements

2016-10-21 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Yarlagadda, Satya P
> Sent: Thursday, October 20, 2016 10:49 PM
> To: edk2-devel@lists.01.org
> Cc: Ma, Maurice <maurice...@intel.com>; Yao, Jiewen
> <jiewen@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>
> Subject: [PATCH] IntelFsp2Pkg: Added changes to enable FPDT performance
> measurements
> 
> IntelFsp2Pkg:
> 1.Defined performance measure mask to mask the Perf id (Bits 63:56) of the
> Perf Data from FSP Global data.
> 2.Replaced the hard coded perf ids to use the standard defines
> from FspStatuscode.h
> 3.Add the PerfData form Fsp Global data ( for TempRaminit entry,
> TempramInit exit, memoryinit entry) to FPDT entries
> 
> IntelFsp2WrapperPkg:
>   Moved the code to add the FSP FPDT records and wrapper FPDT records
> from ReadytoBoot event to EndofFirmware event
> 
> Cc: Maurice Ma <maurice...@intel.com>
> Cc: Jiewen Yao <jiewen@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Satya Yarlagadda <satya.p.yarlaga...@intel.com>
> ---
>  IntelFsp2Pkg/Include/FspGlobalData.h   |  1 +
>  .../BaseFspPlatformLib/BaseFspPlatformLib.inf  |  4 ++
>  .../Library/BaseFspPlatformLib/FspPlatformNotify.c | 33 +
>  .../FspWrapperNotifyDxe/FspWrapperNotifyDxe.c  | 55 +++--
> -
>  .../FspmWrapperPeim/FspmWrapperPeim.c  |  5 +-
>  .../FspsWrapperPeim/FspsWrapperPeim.c  |  5 +-
>  6 files changed, 61 insertions(+), 42 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Include/FspGlobalData.h
> b/IntelFsp2Pkg/Include/FspGlobalData.h
> index 8ac3199..7de2660 100644
> --- a/IntelFsp2Pkg/Include/FspGlobalData.h
> +++ b/IntelFsp2Pkg/Include/FspGlobalData.h
> @@ -38,6 +38,7 @@ typedef struct  {
> 
>  #define FSP_GLOBAL_DATA_SIGNATURE  SIGNATURE_32 ('F', 'S', 'P', 'D')
>  #define FSP_PERFORMANCE_DATA_SIGNATURE  SIGNATURE_32 ('P', 'E', 'R', 'F')
> +#define FSP_PERFORMANCE_DATA_TIMER_MASK 0xFF
> 
>  typedef struct  {
> UINT32 Signature;
> diff --git a/IntelFsp2Pkg/Library/BaseFspPlatformLib/BaseFspPlatformLib.inf
> b/IntelFsp2Pkg/Library/BaseFspPlatformLib/BaseFspPlatformLib.inf
> index d04689e..907482d 100644
> --- a/IntelFsp2Pkg/Library/BaseFspPlatformLib/BaseFspPlatformLib.inf
> +++ b/IntelFsp2Pkg/Library/BaseFspPlatformLib/BaseFspPlatformLib.inf
> @@ -44,6 +44,10 @@
>  [Guids]
>gFspPerformanceDataGuid   ## CONSUMES ## 
> GUID
>gFspEventEndOfFirmwareGuid## PRODUCES ## 
> GUID
> +  gEfiEventReadyToBootGuid  ## CONSUMES ## 
> Event
> +
> +[Protocols]
> +  gEfiPciEnumerationCompleteProtocolGuid## CONSUMES
> 
>  [FixedPcd]
>gIntelFsp2PkgTokenSpaceGuid.PcdFspMaxPatchEntry## CONSUMES
> diff --git a/IntelFsp2Pkg/Library/BaseFspPlatformLib/FspPlatformNotify.c
> b/IntelFsp2Pkg/Library/BaseFspPlatformLib/FspPlatformNotify.c
> index 66b6cdb..755e84f 100644
> --- a/IntelFsp2Pkg/Library/BaseFspPlatformLib/FspPlatformNotify.c
> +++ b/IntelFsp2Pkg/Library/BaseFspPlatformLib/FspPlatformNotify.c
> @@ -121,15 +121,12 @@ FspSiliconInitDone (
>//
>SetFspMeasurePoint (FSP_PERF_ID_API_FSP_SILICON_INIT_EXIT);
>DEBUG ((DEBUG_INFO | DEBUG_INIT, "FspSiliconInitApi() - End\n"));
> -
> -  PERF_END_EX (, "EventRec", NULL, 0, 0x907F);
> -
> +  PERF_END_EX (, "EventRec", NULL, 0,
> FSP_STATUS_CODE_SILICON_INIT | FSP_STATUS_CODE_COMMON_CODE |
> FSP_STATUS_CODE_API_EXIT);
>REPORT_STATUS_CODE (EFI_PROGRESS_CODE,
> FSP_STATUS_CODE_COMMON_CODE | FSP_STATUS_CODE_API_EXIT);
>SetFspApiReturnStatus (EFI_SUCCESS);
> 
>Pei2LoaderSwitchStack();
> 
> -  PERF_START_EX (, "EventRec", NULL, 0, 0x6000);
>  }
> 
>  /**
> @@ -143,6 +140,7 @@ FspMemoryInitDone (
>IN OUT VOID   **HobListPtr
>)
>  {
> +  FSP_GLOBAL_DATA   *FspData;
>//
>// Calling use FspMemoryInit API
>// Update HOB and return the control directly
> @@ -155,8 +153,13 @@ FspMemoryInitDone (
>// This is the end of the FspMemoryInit API
>// Give control back to the boot loader
>//
> -  SetFspMeasurePoint (FSP_PERF_ID_API_FSP_MEMORY_INIT_EXIT);
>DEBUG ((DEBUG_INFO | DEBUG_INIT, "FspMemoryInitApi() - End\n"));
> +  SetFspMeasurePoint (FSP_PERF_ID_API_FSP_MEMORY_INIT_EXIT);
> +  FspData = GetFspGlobalDataPointer ();
> +  PERF_START_EX(, "EventRec", NULL, (FspData-
> >PerfData[0] &

Re: [edk2] [PATCH] IntelFsp2Pkg: Removing FSP Data Table

2016-10-20 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Yarlagadda, Satya P
> Sent: Thursday, October 20, 2016 5:46 PM
> To: edk2-devel@lists.01.org
> Cc: Ma, Maurice <maurice...@intel.com>; Yao, Jiewen
> <jiewen@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>
> Subject: [PATCH] IntelFsp2Pkg: Removing FSP Data Table
> 
> FSP Base address is part of FSP_INFO_HEADER and we don't need additional
> table to report the base address of FSP components. we expect Boot
> loaders to parse the FSP INFO Header to get the base address. Also, this
> the FSP_DATA_TABLE is not defined in the FSP EAS and we don't see a need
> for it.
> 
> Cc: Maurice Ma <maurice...@intel.com>
> Cc: Jiewen Yao <jiewen@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Satya Yarlagadda <satya.p.yarlaga...@intel.com>
> ---
>  IntelFsp2Pkg/Include/FspDataTable.h| 32 
> --
>  .../Library/BaseFspCommonLib/FspCommonLib.c|  1 -
>  2 files changed, 33 deletions(-)
>  delete mode 100644 IntelFsp2Pkg/Include/FspDataTable.h
> 
> diff --git a/IntelFsp2Pkg/Include/FspDataTable.h
> b/IntelFsp2Pkg/Include/FspDataTable.h
> deleted file mode 100644
> index 3c79f34..000
> --- a/IntelFsp2Pkg/Include/FspDataTable.h
> +++ /dev/null
> @@ -1,32 +0,0 @@
> -/** @file
> -  The header file of FSP data table
> -
> -  Copyright (c) 2016, Intel Corporation. All rights reserved.
> -  This program and the accompanying materials
> -  are licensed and made available under the terms and conditions of the BSD
> License
> -  which accompanies this distribution.  The full text of the license may be 
> found
> at
> -  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 _FSP_DATA_TABLE_H_
> -#define _FSP_DATA_TABLE_H_
> -
> -#pragma pack(1)
> -
> -#define FSP_DATA_SIGNATURE  SIGNATURE_32 ('F', 'S', 'P', 'D')
> -
> -typedef struct  {
> -  UINT32  Signature;
> -  UINT32  Length;
> -  UINT32  FsptBase;
> -  UINT32  FspmBase;
> -  UINT32  FspsBase;
> -} FSP_DATA_TABLE;
> -
> -#pragma pack()
> -
> -#endif
> diff --git a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> index a9c8da6..2f2981c 100644
> --- a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> +++ b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> @@ -17,7 +17,6 @@
>  #include 
>  #include 
>  #include 
> -#include 
>  #include 
> 
>  #pragma pack(1)
> --
> 2.10.0.windows.1

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


Re: [edk2] [PATCH 14/33] IntelFsp2Pkg: Fix typos in comments

2016-10-19 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Gary Lin [mailto:g...@suse.com]
> Sent: Wednesday, October 19, 2016 12:01 AM
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen....@intel.com>; Mudusuru, Giri P
> <giri.p.mudus...@intel.com>
> Subject: [PATCH 14/33] IntelFsp2Pkg: Fix typos in comments
> 
> - tempory -> temporary
> - immediatly -> immediately
> - permenent -> permanent
> - funciton -> function
> 
> Cc: Jiewen Yao <jiewen@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Gary Lin <g...@suse.com>
> ---
>  IntelFsp2Pkg/FspSecCore/SecMain.c| 6 +++---
>  IntelFsp2Pkg/FspSecCore/SecMain.h| 2 +-
>  IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h | 2 +-
>  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/FspSecCore/SecMain.c
> b/IntelFsp2Pkg/FspSecCore/SecMain.c
> index fa556bf..0432dee 100644
> --- a/IntelFsp2Pkg/FspSecCore/SecMain.c
> +++ b/IntelFsp2Pkg/FspSecCore/SecMain.c
> @@ -39,7 +39,7 @@ UINT64  mIdtEntryTemplate = 0x8e08ffe4ULL;
> 
> 
>@param[in] SizeOfRam  Size of the temporary memory available for 
> use.
> -  @param[in] TempRamBaseBase address of tempory ram
> +  @param[in] TempRamBaseBase address of temporary ram
>@param[in] BootFirmwareVolume Base address of the Boot Firmware
> Volume.
>@param[in] PeiCorePeiCore entry point.
>@param[in] BootLoaderStackBootLoader stack.
> @@ -215,8 +215,8 @@ SecTemporaryRamSupport (
> 
>//
>// SecSwitchStack function must be invoked after the memory migration
> -  // immediatly, also we need fixup the stack change caused by new call into
> -  // permenent memory.
> +  // immediately, also we need fixup the stack change caused by new call into
> +  // permanent memory.
>//
>SecSwitchStack (
>  (UINT32) (UINTN) OldStack,
> diff --git a/IntelFsp2Pkg/FspSecCore/SecMain.h
> b/IntelFsp2Pkg/FspSecCore/SecMain.h
> index 33f7362..291bc5c 100644
> --- a/IntelFsp2Pkg/FspSecCore/SecMain.h
> +++ b/IntelFsp2Pkg/FspSecCore/SecMain.h
> @@ -105,7 +105,7 @@ InitializeFloatingPointUnits (
> 
> 
>@param[in] SizeOfRam  Size of the temporary memory available for 
> use.
> -  @param[in] TempRamBaseBase address of tempory ram
> +  @param[in] TempRamBaseBase address of temporary ram
>@param[in] BootFirmwareVolume Base address of the Boot Firmware
> Volume.
>@param[in] PeiCorePeiCore entry point.
>@param[in] BootLoaderStackBootLoader stack.
> diff --git a/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h
> b/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h
> index e90b13e..fee44a3 100644
> --- a/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h
> +++ b/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h
> @@ -16,7 +16,7 @@
> 
>  /**
> 
> -  This funciton will switch the current stack to the previous saved stack.
> +  This function will switch the current stack to the previous saved stack.
>Before calling the previous stack has to be set in
> FSP_GLOBAL_DATA.CoreStack.
>  EIP
>  FLAGS  16 bit  FLAGS  16 bit
> --
> 2.10.1

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


Re: [edk2] [PATCH 15/33] IntelFsp2WrapperPkg: Fix a typo in the comment

2016-10-19 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Gary Lin [mailto:g...@suse.com]
> Sent: Wednesday, October 19, 2016 12:01 AM
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen....@intel.com>; Mudusuru, Giri P
> <giri.p.mudus...@intel.com>
> Subject: [PATCH 15/33] IntelFsp2WrapperPkg: Fix a typo in the comment
> 
> - boundry -> boundary
> 
> Cc: Jiewen Yao <jiewen@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Gary Lin <g...@suse.com>
> ---
>  IntelFsp2WrapperPkg/FspWrapperNotifyDxe/LoadBelow4G.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/LoadBelow4G.c
> b/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/LoadBelow4G.c
> index c073703..ff2f563 100644
> --- a/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/LoadBelow4G.c
> +++ b/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/LoadBelow4G.c
> @@ -112,7 +112,7 @@ RelocateImageUnder4GIfNeeded (
>ASSERT_EFI_ERROR (Status);
>ImageContext.ImageAddress = (PHYSICAL_ADDRESS)(UINTN)FfsBuffer;
>//
> -  // Align buffer on section boundry
> +  // Align buffer on section boundary
>//
>ImageContext.ImageAddress += ImageContext.SectionAlignment - 1;
>ImageContext.ImageAddress &=
> ~((EFI_PHYSICAL_ADDRESS)(ImageContext.SectionAlignment - 1));
> --
> 2.10.1

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


Re: [edk2] [PATCH] IntelFsp2WrapperPkg: Add a PCD to control if signaling first event.

2016-10-17 Thread Mudusuru, Giri P
Hello Guo,
FSP wrapper and Coreboot are bootloaders consuming FSP binary. 

FSP must get called Post PCI bus enumeration to do the required silicon 
initialization. Why do we need a PCD to skip it?

Thanks,
-Giri

> -Original Message-
> From: Dong, Guo
> Sent: Monday, October 17, 2016 3:53 PM
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen@intel.com>; Mudusuru, Giri P
> <giri.p.mudus...@intel.com>; Dong, Guo <guo.d...@intel.com>
> Subject: [edk2] [PATCH] IntelFsp2WrapperPkg: Add a PCD to control if signaling
> first event.
> 
> PciEnumerationComplete might be signaled to FSP in Coreboot. Add a
> PCD PcdNotifyPciEnumerationComplete so FspWrapperNotifyDxe driver
> could be used in this case.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: gdong1 <guo.d...@intel.com>
> ---
>  .../FspWrapperNotifyDxe/FspWrapperNotifyDxe.c  | 18 
> ++
>  .../FspWrapperNotifyDxe/FspWrapperNotifyDxe.inf|  3 ++-
>  IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec|  5 +
>  3 files changed, 17 insertions(+), 9 deletions(-)
> 
> diff --git a/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c
> b/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c
> index 0797f44..45eae4b 100644
> --- a/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c
> +++ b/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c
> @@ -246,14 +246,16 @@ FspWrapperNotifyDxeEntryPoint (
>  return EFI_SUCCESS;
>}
> 
> -  ProtocolNotifyEvent = EfiCreateProtocolNotifyEvent (
> -  ,
> -  TPL_CALLBACK,
> -  OnPciEnumerationComplete,
> -  NULL,
> -  
> -  );
> -  ASSERT (ProtocolNotifyEvent != NULL);
> +  if (PcdGetBool(PcdNotifyPciEnumerationComplete)) {
> +ProtocolNotifyEvent = EfiCreateProtocolNotifyEvent (
> +,
> +TPL_CALLBACK,
> +OnPciEnumerationComplete,
> +NULL,
> +
> +);
> +ASSERT (ProtocolNotifyEvent != NULL);
> +  }
> 
>Status = EfiCreateEventReadyToBootEx (
>   TPL_CALLBACK,
> diff --git
> a/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.inf
> b/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.inf
> index f851f68..f28356d 100644
> --- a/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.inf
> +++ b/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.inf
> @@ -61,7 +61,8 @@
>gFspHobGuid   ## CONSUMES ## HOB
> 
>  [Pcd]
> -  gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress  ## CONSUMES
> +  gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress   ##
> CONSUMES
> +  gIntelFsp2WrapperTokenSpaceGuid.PcdNotifyPciEnumerationComplete  ##
> CONSUMES
> 
>  [Depex]
>TRUE
> diff --git a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> index d9d2d80..52ed9d8 100644
> --- a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> +++ b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
> @@ -74,6 +74,11 @@
>## This is the base address of FSP-T/M/S
> 
> gIntelFsp2WrapperTokenSpaceGuid.PcdFsptBaseAddress|0x|UINT32|
> 0x0300
> 
> gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress|0x|UINT32
> |0x0301
> +  ## Indicates if the FSP wrapper will notify FSP
> PciEnumerationComplete.
> +  #   TRUE  - FSP wrapper will notify PciEnumerationComplete to FSP.
> +  #   FALSE - FSP wrapper will NOT notify PciEnumerationComplete to FSP.
> +  # @Prompt Notify FSP PciEnumerationComplete.
> +
> gIntelFsp2WrapperTokenSpaceGuid.PcdNotifyPciEnumerationComplete|TRUE|
> BOOLEAN|0x4009
> 
>  [PcdsFixedAtBuild, PcdsPatchableInModule,PcdsDynamic,PcdsDynamicEx]
> 
> gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress|0x|UINT32|
> 0x1001
> --
> 2.7.0.windows.1

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


Re: [edk2] [PATCH] IntelSiliconPkg: Add Intel Firmware Version Info (FVI) definitions

2016-10-13 Thread Mudusuru, Giri P
Yes Star thanks for catching the merge issue. Will fix it before check-in.

Thanks,
-Giri

> -Original Message-
> From: Zeng, Star
> Sent: Thursday, October 13, 2016 9:25 PM
> To: Mudusuru, Giri P <giri.p.mudus...@intel.com>; edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Yao, Jiewen
> <jiewen@intel.com>; Zeng, Star <star.z...@intel.com>
> Subject: RE: [edk2] [PATCH] IntelSiliconPkg: Add Intel Firmware Version Info
> (FVI) definitions
> 
> Shouldn't
> +#include SmBios.h
> be
> +#include 
> ?
> 
> Thanks,
> Star
> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Giri P
> Mudusuru
> Sent: Thursday, October 13, 2016 10:11 AM
> To: edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Yao, Jiewen
> <jiewen@intel.com>
> Subject: [edk2] [PATCH] IntelSiliconPkg: Add Intel Firmware Version Info (FVI)
> definitions
> 
> Adding Intel Firmware Version Info (FVI) related defines & structures.
> FVI enables reporting the Firmware Versions using SMBIOS OEM Type.
> 
> Cc: Jiewen Yao <jiewen@intel.com>
> Cc: Michael Kinney <michael.d.kin...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Giri P Mudusuru <giri.p.mudus...@intel.com>
> ---
>  .../Include/IndustryStandard/FirmwareVersionInfo.h | 60
> ++
>  1 file changed, 60 insertions(+)
>  create mode 100644
> IntelSiliconPkg/Include/IndustryStandard/FirmwareVersionInfo.h
> 
> diff --git a/IntelSiliconPkg/Include/IndustryStandard/FirmwareVersionInfo.h
> b/IntelSiliconPkg/Include/IndustryStandard/FirmwareVersionInfo.h
> new file mode 100644
> index 000..4ac5e27
> --- /dev/null
> +++ b/IntelSiliconPkg/Include/IndustryStandard/FirmwareVersionInfo.h
> @@ -0,0 +1,60 @@
> +/** @file
> +  Intel Firmware Version Info (FVI) related definitions.
> +
> +  @todo: update document/spec reference
> +
> +  Copyright (c) 2016, Intel Corporation. All rights reserved.  This
> + program and the accompanying materials  are licensed and made
> + available under the terms and conditions of the BSD License  which
> + accompanies this distribution.  The full text of the license may be
> + found at  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.
> +
> +@par Specification Reference:
> +  System Management BIOS (SMBIOS) Reference Specification v3.0.0 dated
> +2015-Feb-12
> +
> +http://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.0
> +.0.pdf
> +
> +**/
> +
> +#ifndef __FIRMWARE_VERSION_INFO_H__
> +#define __FIRMWARE_VERSION_INFO_H__
> +
> +#include SmBios.h
> +
> +#define INTEL_FIRMWARE_VERSION_INFO_GROUP_NAME"Firmware
> Version Info"
> +
> +#pragma pack(1)
> +
> +///
> +/// Firmware Version Structure
> +///
> +typedef struct {
> +  UINT8   MajorVersion;
> +  UINT8   MinorVersion;
> +  UINT8   Revision;
> +  UINT16  BuildNumber;
> +} INTEL_FIRMWARE_VERSION;
> +
> +///
> +/// Firmware Version Info (FVI) Structure /// typedef struct {
> +  SMBIOS_TABLE_STRING ComponentName;  ///< String Index of
> Component Name
> +  SMBIOS_TABLE_STRING VersionString;  ///< String Index of Version 
> String
> +  INTEL_FIRMWARE_VERSION  Version;///< Firmware version
> +} INTEL_FIRMWARE_VERSION_INFO;
> +
> +///
> +/// SMBIOS OEM Type Intel Firmware Version Info (FVI) Structure ///
> +typedef struct {
> +  SMBIOS_STRUCTUREHeader; ///< SMBIOS structure header
> +  UINT8   Count;  ///< Number of FVI entries in 
> this structure
> +  INTEL_FIRMWARE_VERSION_INFO Fvi[1]; ///< FVI structure(s)
> +} SMBIOS_TABLE_TYPE_OEM_INTEL_FVI;
> +
> +#pragma pack()
> +
> +#endif
> --
> 2.9.0.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] IntelFsp2Pkg/FspSecCore: Make FSP funcitons position independent

2016-10-12 Thread Mudusuru, Giri P
Thanks for fixing the bug Maurice. Please fix the typo funcitons in the title 
during checkin

Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Ma, Maurice
> Sent: Wednesday, October 12, 2016 6:03 PM
> To: edk2-devel@lists.01.org
> Cc: Ma, Maurice <maurice...@intel.com>; Yao, Jiewen
> <jiewen@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>
> Subject: [edk2] [PATCH] IntelFsp2Pkg/FspSecCore: Make FSP funcitons position
> independent
> 
> The current AsmGetFspInfoHeader function in FspHeader.nasm is
> position dependent code since it uses absolute address. Change
> to use relative address instead to make it position independent.
> 
> Cc: Jiewen Yao <jiewen@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Maurice Ma <maurice...@intel.com>
> ---
>  IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
> b/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
> index a848dcbc0298..ad631943e32d 100644
> --- a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
> +++ b/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
> @@ -31,7 +31,7 @@ ASM_PFX(NextInstruction):
> pop   eax
> sub   eax, ASM_PFX(NextInstruction)
> add   eax, ASM_PFX(AsmGetFspInfoHeader)
> -   sub   eax, dword [ASM_PFX(FspInfoHeaderRelativeOff)]
> +   sub   eax, dword [eax - ASM_PFX(AsmGetFspInfoHeader) +
> ASM_PFX(FspInfoHeaderRelativeOff)]
> ret
> 
>  global ASM_PFX(AsmGetFspInfoHeaderNoStack)
> --
> 1.9.5.msysgit.0

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


Re: [edk2] [patch 2/3] MdeModulePkg:TcpDriver need to use EFI_D_NET for DEBUG maessage.

2016-09-23 Thread Mudusuru, Giri P
Please use DEBUG_NET instead of EFI_D_NET. 

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Zhang
> Lubo
> Sent: Thursday, September 22, 2016 10:42 PM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting ; Fu, Siyuan 
> Subject: [edk2] [patch 2/3] MdeModulePkg:TcpDriver need to use EFI_D_NET
> for DEBUG maessage.
> 
> Tcp driver need to use EFI_D_NET to log DEBUG message,
> So it becomes easy to separate/filter out debug messages
> from network stack versus generic EFI_D_INFO debugs.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Zhang Lubo 
> Cc: Hegde Nagaraj P 
> Cc: Subramanian Sriram 
> Cc: Fu Siyuan 
> Cc: Ye Ting 
> ---
>  MdeModulePkg/Universal/Network/Tcp4Dxe/SockImpl.c  | 46 +++
> ---
>  .../Universal/Network/Tcp4Dxe/SockInterface.c  |  2 +-
>  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Input.c | 32 +++
>  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c  |  8 ++--
>  .../Universal/Network/Tcp4Dxe/Tcp4Output.c |  6 +--
>  5 files changed, 47 insertions(+), 47 deletions(-)
> 
> diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/SockImpl.c
> b/MdeModulePkg/Universal/Network/Tcp4Dxe/SockImpl.c
> index 2e31643..3025790 100644
> --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/SockImpl.c
> +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/SockImpl.c
> @@ -1,9 +1,9 @@
>  /** @file
>Implementation of the Socket.
> 
> -Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.
> +Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.
>  This program and the accompanying materials
>  are licensed and made available under the terms and conditions of the BSD
> License
>  which accompanies this distribution.  The full text of the license may be 
> found
> at
>  http://opensource.org/licenses/bsd-license.php
> 
> @@ -31,11 +31,11 @@ UINT32
>  SockTcpDataToRcv (
>IN SOCK_BUFFER*SockBuffer,
>   OUT BOOLEAN*IsUrg,
>IN UINT32 BufLen
>);
> -
> +
>  /**
>Process the send token.
> 
>@param  Sock  Pointer to the socket.
> 
> @@ -47,11 +47,11 @@ SockProcessSndToken (
> 
>  /**
>Supporting function for both SockImpl and SockInterface.
> 
>@param Event The Event this notify function registered to, 
> ignored.
> -
> +
>  **/
>  VOID
>  EFIAPI
>  SockFreeFoo (
>IN EFI_EVENT Event
> @@ -320,11 +320,11 @@ SockProcessTcpSndData (
>  /**
>Flush the tokens in the specific token list.
> 
>@param  Sock  Pointer to the socket.
>@param  PendingTokenList  Pointer to the token list to be flushed.
> -
> +
>  **/
>  VOID
>  SockFlushPendingToken (
>IN SOCKET *Sock,
>IN LIST_ENTRY *PendingTokenList
> @@ -350,11 +350,11 @@ SockFlushPendingToken (
>}
>  }
> 
> 
>  /**
> -  Wake up the connection token while the connection is successfully
> established,
> +  Wake up the connection token while the connection is successfully
> established,
>then try to process any pending send token.
> 
>@param  Sock  Pointer to the socket.
> 
>  **/
> @@ -411,11 +411,11 @@ SockWakeListenToken (
>  FreePool (SockToken);
> 
>  RemoveEntryList (>ConnectionList);
> 
>  Parent->ConnCnt--;
> -DEBUG ((EFI_D_INFO, "SockWakeListenToken: accept a socket, now conncnt
> is %d", Parent->ConnCnt));
> +DEBUG ((EFI_D_NET, "SockWakeListenToken: accept a socket, now conncnt
> is %d", Parent->ConnCnt));
> 
>  Sock->Parent = NULL;
>}
>  }
> 
> @@ -662,11 +662,11 @@ SockCreate (
>  // if the Parent->ConnCnt < Parent->BackLog
>  //
>  Parent->ConnCnt++;
> 
>  DEBUG (
> -  (EFI_D_INFO,
> +  (EFI_D_NET,
>"SockCreate: Create a new socket and add to parent, now conncnt is 
> %d\n",
>Parent->ConnCnt)
>);
> 
>  InsertTailList (>ConnectionList, >ConnectionList);
> @@ -751,11 +751,11 @@ SockDestroy (
> 
>  RemoveEntryList (&(Sock->ConnectionList));
>  (Sock->Parent->ConnCnt)--;
> 
>  DEBUG (
> -  (EFI_D_INFO,
> +  (EFI_D_NET,
>"SockDestroy: Delete a unaccepted socket from parent"
>"now conncnt is %d\n",
>Sock->Parent->ConnCnt)
>);
> 
> @@ -931,14 +931,14 @@ SockClone (
>return ClonedSock;
>  }
> 
> 
>  /**
> -  Called by the low layer protocol to indicate the socket a connection is
> -  established.
> -
> -  This function just changes the socket's state to SO_CONNECTED
> +  Called by the low layer protocol to indicate the socket a connection is
> +  established.
> +
> +  This function just changes the socket's state to SO_CONNECTED
>and signals the token used for connection establishment.
> 
>@param  Sock  Pointer to the socket associated with the
>  

Re: [edk2] [PATCH] Maintainers.txt: Add Giri as 2nd maintainer

2016-09-07 Thread Mudusuru, Giri P
Agee with Jiewen to keep the doc and tool consistent. 
Also the patch prefix "[edk2][PATCH]" should be excluded as it is not part of 
the commit message title.

Thanks,
-Giri

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Yao,
> Jiewen
> Sent: Wednesday, September 7, 2016 3:31 PM
> To: Justen, Jordan L ; edk2-devel@lists.01.org
> Cc: Chan, Amy 
> Subject: Re: [edk2] [PATCH] Maintainers.txt: Add Giri as 2nd maintainer
> 
> The problem I am seeing is “inconsistence”.
> 
> The https://github.com/tianocore/tianocore.github.io/wiki/Commit-Message-
> Format mention 70 char as max.
> But the tool check 76 char.
> 
> Can we make then consistent?
> 
> Either change wiki to 76 char, or change tool to 70 char.
> 
> Thank you
> Yao Jiewen
> 
> 
> From: Justen, Jordan L
> Sent: Thursday, September 8, 2016 1:39 AM
> To: Yao, Jiewen ; Yao, Jiewen
> ; edk2-devel@lists.01.org
> Cc: Chan, Amy ; Yao, Jiewen 
> Subject: RE: [edk2] [PATCH] Maintainers.txt: Add Giri as 2nd maintainer
> 
> On 2016-09-07 01:00:46, Yao, Jiewen wrote:
> >Jordan
> >
> >I have a quick check:
> >
> >Here is my observation:
> >
> >1)  From
> >https://github.com/tianocore/tianocore.github.io/wiki/Commit-Message-
> Format,
> >it mentions:
> >
> >  o The length of 'Pkg-Module: Brief-single-line-summary' should not
> >exceed 70 characters
> >
> >2)  In the PatchCheck.py, we have below code:
> >
> >   if count >= 1 and len(lines[0]) > 76:
> >
> >self.error('First line of commit message (subject line) ' +
> >
> >   'is too long.')
> >
> 
> I think the general idea of the subject line is described well here as
> the "summary phrase":
> 
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentatio
> n/SubmittingPatches?id=bca47613#n493
> 
> Regarding subject line length, I think that it should work well with
> git log --oneline to produce output less than 80 characters. Based on
> the standard prefix in git log --oneline, this would indicate that we
> should try to use less than 72 characters. I guess the kernel uses
> 70-75 characters for guidance.
> 
> >
> >3)  You recommendation
> >“Maintainers.txt: Add Giri as IntelFsp2*Pkg, IntelSiliconPkg maintainer”,
> >it is 71 char.
> >
> >However, if we add “[edk2] [PATCH]”, it becomes 85 char.
> >
> 
> Hmm, I don't think "[edk2] [PATCH]" should be factored into the
> length. The length after applying in git is what should matter. Is
> this is a bug in PatchCheck.py?
> 
> I think maybe the subject line length could be a warning from
> PatchCheck.py, but it is almost always possible to reword the subject
> line fairly easily. If it is difficult to make a good short subject
> line, then it might be a sign that the patch should be split. For
> example, you could split this patch in 2. One for IntelFsp2*Pkg, and
> another for IntelSiliconPkg. (After all, they are 2 separate package
> types, so it is reasonable to change them separately.)
> 
> -Jordan
> 
> >
> >I am confused on the rule. So I have 2 suggestion:
> >
> >1)  wiki mentions *70* char, but tool checks *76* char. It seems
> >mismatch. We had better fix that. Can we make them consistent?
> >
> >2)  In most cases, the patch subject is start with *[edk2] [PATCH]*.
> >These 14 additional char had better be excluded in the total 70 or 76 
> > char
> >(I am not sure what is right number), when the subject is calculated.
> >
> >I have no problem to fix this patch manually.
> >
> >I do hope we can have consistent rule and tool to help us do the check.
> >
> >Thank you
> >
> >Yao Jiewen
> >
> >From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> >Yao, Jiewen
> >Sent: Wednesday, September 7, 2016 3:21 PM
> >To: Justen, Jordan L
> >; edk2-
> de...@lists.01.org
> >Cc: Chan, Amy >
> >Subject: Re: [edk2] [PATCH] Maintainers.txt: Add Giri as 2nd maintainer
> >
> >
> >
> >Jordan
> >I got error from BaseTools\Scripts\PatchCheck.py, if I add it.
> >
> >Can you fix the tool to remove such limitation?
> >
> >===
> >Checking patch file: C:\home\EdkIITransition\AllComboGit\edk2\0001-
> Maintainers.t
> >xt-Add-Giri-as-2nd-maintainer-to-IntelF.patch
> >The commit message format is not valid:
> >* First line of commit message (subject line) is too long.
> >https://github.com/tianocore/tianocore.github.io/wiki/Commit-Message-
> Format
> >The code passed all checks.
> >===
> >
> >From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> 

Re: [edk2] [PATCH] Maintainers.txt: Add Giri as 2nd maintainer

2016-09-06 Thread Mudusuru, Giri P
Thanks Jiewen. 

Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Yao, Jiewen
> Sent: Tuesday, September 6, 2016 6:21 PM
> To: edk2-devel@lists.01.org
> Cc: Mudusuru, Giri P <giri.p.mudus...@intel.com>; Chan, Amy
> <amy.c...@intel.com>
> Subject: [PATCH] Maintainers.txt: Add Giri as 2nd maintainer
> 
> Add Giri as 2nd maintainer to IntelFsp2*Pkg and IntelSiliconPkg.
> 
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Cc: Amy Chan <amy.c...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jiewen Yao <jiewen@intel.com>
> ---
>  Maintainers.txt | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt
> index b2e679d..6ac7085 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -130,10 +130,12 @@ M: Jeff Fan <jeff@intel.com>
>  IntelFsp2Pkg
>  W: https://github.com/tianocore/tianocore.github.io/wiki/IntelFsp2Pkg
>  M: Jiewen Yao <jiewen@intel.com>
> +M: Giri P Mudusuru <giri.p.mudus...@intel.com>
> 
>  IntelFsp2WrapperPkg
>  W:
> https://github.com/tianocore/tianocore.github.io/wiki/IntelFsp2WrapperPkg
>  M: Jiewen Yao <jiewen@intel.com>
> +M: Giri P Mudusuru <giri.p.mudus...@intel.com>
> 
>  IntelFspPkg
>  W: https://github.com/tianocore/tianocore.github.io/wiki/IntelFspPkg
> @@ -146,6 +148,7 @@ M: Jiewen Yao <jiewen@intel.com>
>  IntelSiliconPkg
>  W: https://github.com/tianocore/tianocore.github.io/wiki/IntelSiliconPkg
>  M: Jiewen Yao <jiewen@intel.com>
> +M: Giri P Mudusuru <giri.p.mudus...@intel.com>
> 
>  MdeModulePkg
>  W: https://github.com/tianocore/tianocore.github.io/wiki/MdeModulePkg
> --
> 2.7.4.windows.1

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


Re: [edk2] [Patch 20/20] UefiCpuPkg/XeonPhiMsr.h: add MSR reference from SDM in comment

2016-09-06 Thread Mudusuru, Giri P
Thanks Jeff for adding comments to refer the SDM naming.

Reviewed series of patches.

Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Fan, Jeff
> Sent: Tuesday, September 6, 2016 4:39 AM
> To: edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Tian, Feng
> <feng.t...@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>
> Subject: [Patch 20/20] UefiCpuPkg/XeonPhiMsr.h: add MSR reference from SDM
> in comment
> 
> Cc: Michael Kinney <michael.d.kin...@intel.com>
> Cc: Feng Tian <feng.t...@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff@intel.com>
> ---
>  UefiCpuPkg/Include/Register/Msr/XeonPhiMsr.h | 51
> 
>  1 file changed, 51 insertions(+)
> 
> diff --git a/UefiCpuPkg/Include/Register/Msr/XeonPhiMsr.h
> b/UefiCpuPkg/Include/Register/Msr/XeonPhiMsr.h
> index 6695b69..75f2dce 100644
> --- a/UefiCpuPkg/Include/Register/Msr/XeonPhiMsr.h
> +++ b/UefiCpuPkg/Include/Register/Msr/XeonPhiMsr.h
> @@ -41,6 +41,7 @@
> 
>Msr.Uint64 = AsmReadMsr64 (MSR_XEON_PHI_SMI_COUNT);
>@endcode
> +  @note MSR_XEON_PHI_SMI_COUNT is defined as MSR_SMI_COUNT in SDM.
>  **/
>  #define MSR_XEON_PHI_SMI_COUNT   0x0034
> 
> @@ -85,6 +86,7 @@ typedef union {
>Msr.Uint64 = AsmReadMsr64 (MSR_XEON_PHI_PLATFORM_INFO);
>AsmWriteMsr64 (MSR_XEON_PHI_PLATFORM_INFO, Msr.Uint64);
>@endcode
> +  @note MSR_XEON_PHI_PLATFORM_INFO is defined as
> MSR_PLATFORM_INFO in SDM.
>  **/
>  #define MSR_XEON_PHI_PLATFORM_INFO   0x00CE
> 
> @@ -151,6 +153,7 @@ typedef union {
>Msr.Uint64 = AsmReadMsr64 (MSR_XEON_PHI_PKG_CST_CONFIG_CONTROL);
>AsmWriteMsr64 (MSR_XEON_PHI_PKG_CST_CONFIG_CONTROL, Msr.Uint64);
>@endcode
> +  @note MSR_XEON_PHI_PKG_CST_CONFIG_CONTROL is defined as
> MSR_PKG_CST_CONFIG_CONTROL in SDM.
>  **/
>  #define MSR_XEON_PHI_PKG_CST_CONFIG_CONTROL  0x00E2
> 
> @@ -208,6 +211,7 @@ typedef union {
>Msr.Uint64 = AsmReadMsr64 (MSR_XEON_PHI_PMG_IO_CAPTURE_BASE);
>AsmWriteMsr64 (MSR_XEON_PHI_PMG_IO_CAPTURE_BASE, Msr.Uint64);
>@endcode
> +  @note MSR_XEON_PHI_PMG_IO_CAPTURE_BASE is defined as
> MSR_PMG_IO_CAPTURE_BASE in SDM.
>  **/
>  #define MSR_XEON_PHI_PMG_IO_CAPTURE_BASE 0x00E4
> 
> @@ -261,6 +265,7 @@ typedef union {
>Msr.Uint64 = AsmReadMsr64 (MSR_XEON_PHI_FEATURE_CONFIG);
>AsmWriteMsr64 (MSR_XEON_PHI_FEATURE_CONFIG, Msr.Uint64);
>@endcode
> +  @note MSR_XEON_PHI_FEATURE_CONFIG is defined as
> MSR_FEATURE_CONFIG in SDM.
>  **/
>  #define MSR_XEON_PHI_FEATURE_CONFIG  0x013C
> 
> @@ -313,6 +318,7 @@ typedef union {
>Msr.Uint64 = AsmReadMsr64 (MSR_XEON_PHI_IA32_MISC_ENABLE);
>AsmWriteMsr64 (MSR_XEON_PHI_IA32_MISC_ENABLE, Msr.Uint64);
>@endcode
> +  @note MSR_XEON_PHI_IA32_MISC_ENABLE is defined as
> IA32_MISC_ENABLE in SDM.
>  **/
>  #define MSR_XEON_PHI_IA32_MISC_ENABLE0x01A0
> 
> @@ -402,6 +408,7 @@ typedef union {
>Msr.Uint64 = AsmReadMsr64 (MSR_XEON_PHI_TEMPERATURE_TARGET);
>AsmWriteMsr64 (MSR_XEON_PHI_TEMPERATURE_TARGET, Msr.Uint64);
>@endcode
> +  @note MSR_XEON_PHI_TEMPERATURE_TARGET is defined as
> MSR_TEMPERATURE_TARGET in SDM.
>  **/
>  #define MSR_XEON_PHI_TEMPERATURE_TARGET  0x01A2
> 
> @@ -450,6 +457,7 @@ typedef union {
>Msr = AsmReadMsr64 (MSR_XEON_PHI_OFFCORE_RSP_0);
>AsmWriteMsr64 (MSR_XEON_PHI_OFFCORE_RSP_0, Msr);
>@endcode
> +  @note MSR_XEON_PHI_OFFCORE_RSP_0 is defined as MSR_OFFCORE_RSP_0
> in SDM.
>  **/
>  #define MSR_XEON_PHI_OFFCORE_RSP_0   0x01A6
> 
> @@ -468,6 +476,7 @@ typedef union {
>Msr = AsmReadMsr64 (MSR_XEON_PHI_OFFCORE_RSP_1);
>AsmWriteMsr64 (MSR_XEON_PHI_OFFCORE_RSP_1, Msr);
>@endcode
> +  @note MSR_XEON_PHI_OFFCORE_RSP_1 is defined as MSR_OFFCORE_RSP_1
> in SDM.
>  **/
>  #define MSR_XEON_PHI_OFFCORE_RSP_1   0x01A7
> 
> @@ -488,6 +497,7 @@ typedef union {
>Msr.Uint64 = AsmReadMsr64 (MSR_XEON_PHI_TURBO_RATIO_LIMIT);
>AsmWriteMsr64 (MSR_XEON_PHI_TURBO_RATIO_LIMIT, Msr.Uint64);
>@endcode
> +  @note MSR_XEON_PHI_TURBO_RATIO_LIMIT is defined as
> MSR_TURBO_RATIO_LIMIT in SDM.
>  **/
>  #define MSR_XEON_PHI_TURBO_RATIO_LIMIT   0x01AD
> 
> @@ -612,6 +622,7 @@ typedef union {
>Msr = AsmReadMsr64 (MSR_XEON_PHI_LBR_SELECT);
>AsmWriteMsr64 (MSR_XEON_PHI_LBR_SELECT, Msr);
>@endcode
> +  @note MSR_XEON_PHI_LBR_SELECT is defined as MSR_LBR_SELECT in SDM.

Re: [edk2] [Patch 4/4] BaseTools VfrCompile Pccts: Update GCC Flags to the specific one with BUILD_ prefix

2016-09-05 Thread Mudusuru, Giri P
Reviewed the series of 4 patches
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com>


> -Original Message-
> From: Gao, Liming
> Sent: Monday, September 5, 2016 9:00 PM
> To: edk2-devel@lists.01.org
> Cc: Mudusuru, Giri P <giri.p.mudus...@intel.com>; Zhu, Yonghong
> <yonghong@intel.com>
> Subject: [Patch 4/4] BaseTools VfrCompile Pccts: Update GCC Flags to the
> specific one with BUILD_ prefix
> 
> This change is also applied to VfrCompile Pccts antlr and dlg tool.
> 
> In V2, add the missing C rules.
> 
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Cc: Yonghong Zhu <yonghong@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao <liming@intel.com>
> ---
>  BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile | 13 -
>  BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile   | 18 +++---
>  2 files changed, 19 insertions(+), 12 deletions(-)
> 
> diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile
> b/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile
> index c49cfd8..8f2cc78 100644
> --- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile
> +++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/makefile
> @@ -157,20 +157,21 @@ PCCTS_H=../h
>  #$(DLG) -C2 parser.dlg scan.c
>  #
>  #set.$(OBJ_EXT): $(SET)/set.c
> -#$(CC) $(CFLAGS) -c $(OUT_OBJ)set.$(OBJ_EXT) $(SET)/set.c
> +#$(BUILD_CC) $(BUILD_CFLAGS) -c $(OUT_OBJ)set.$(OBJ_EXT)
> $(SET)/set.c
> 
> 
> 
>  #
>  #   UNIX  (default)
>  #
> -CC?=gcc
> +BUILD_CC?=gcc
>  COPT=-O
>  ANTLR=${BIN_DIR}/antlr
>  DLG=${BIN_DIR}/dlg
>  OBJ_EXT=o
>  OUT_OBJ = -o
> -CFLAGS= $(COPT) -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN $(COTHER) -
> DZZLEXBUFSIZE=65536
> +BUILD_CFLAGS= $(COPT) -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN $(COTHER) -
> DZZLEXBUFSIZE=65536
> +BUILD_CPPFLAGS=
>  #
>  # SGI Users, use this CFLAGS
>  #
> @@ -179,7 +180,7 @@ OBJ=antlr.o scan.o err.o bits.o build.o fset2.o fset.o
> gen.o  \
>  globals.o hash.o lex.o main.o misc.o set.o pred.o egman.o mrhoist.o
> fcache.o
> 
>  $(BIN_DIR)/antlr : $(OBJ) $(SRC)
> - $(CC) $(CFLAGS) -o $(BIN_DIR)/antlr $(OBJ)
> + $(BUILD_CC) $(BUILD_CFLAGS) -o $(BIN_DIR)/antlr $(OBJ)
> 
>  # what files does PCCTS generate (both ANTLR and DLG)
>  PCCTS_GEN=antlr.c scan.c err.c tokens.h mode.h parser.dlg stdpccts.h remap.h
> @@ -202,8 +203,10 @@ scan.o : scan.c mode.h tokens.h
>  #$(DLG) -C2 parser.dlg scan.c
> 
>  set.o : $(SET)/set.c
> - $(CC) $(CFLAGS) -c -o set.o $(SET)/set.c
> + $(BUILD_CC) $(BUILD_CFLAGS) -c -o set.o $(SET)/set.c
> 
> +%.o : %.c
> + $(BUILD_CC) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@
> 
>  #
>  # ** These next targets are common to UNIX and PC world 
> diff --git a/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile
> b/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile
> index dfcf3ee..b3a34d3 100644
> --- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile
> +++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/makefile
> @@ -114,18 +114,19 @@ PCCTS_H=../h
>  #
>  #   UNIX
>  #
> -CC?=cc
> +BUILD_CC?=cc
>  COPT=-O
>  ANTLR=${BIN_DIR}/antlr
>  DLG=${BIN_DIR}/dlg
> -CFLAGS= $(COPT) -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN -
> DZZLEXBUFSIZE=65536
> +BUILD_CFLAGS= $(COPT) -I. -I$(SET) -I$(PCCTS_H) -DUSER_ZZSYN -
> DZZLEXBUFSIZE=65536
> +BUILD_CPPFLAGS=
>  OBJ_EXT=o
>  OUT_OBJ = -o
>  OBJ = dlg_p.o dlg_a.o main.o err.o set.o support.o output.o \
>  relabel.o automata.o
> 
>  $(BIN_DIR)/dlg : $(OBJ) $(SRC)
> - $(CC) $(CFLAGS) -o $(BIN_DIR)/dlg $(OBJ)
> + $(BUILD_CC) $(BUILD_CFLAGS) -o $(BIN_DIR)/dlg $(OBJ)
> 
>  SRC = dlg_p.c dlg_a.c main.c err.c $(SET)/set.c support.c output.c \
>  relabel.c automata.c
> @@ -137,16 +138,19 @@ SRC = dlg_p.c dlg_a.c main.c err.c $(SET)/set.c
> support.c output.c \
>  #$(DLG) -C2 parser.dlg dlg_a.c
> 
>  dlg_p.$(OBJ_EXT) : dlg_p.c dlg.h tokens.h mode.h
> - $(CC) $(CFLAGS) -c dlg_p.c
> + $(BUILD_CC) $(BUILD_CFLAGS) -c dlg_p.c
> 
>  dlg_a.$(OBJ_EXT) : dlg_a.c dlg.h tokens.h mode.h
> - $(CC) $(CFLAGS) -c dlg_a.c
> + $(BUILD_CC) $(BUILD_CFLAGS) -c dlg_a.c
> 
>  main.$(OBJ_EXT) : main.c dlg.h
> - $(CC) $(CFLAGS) -c main.c
> + $(BUILD_CC) $(BUILD_CFLAGS) -c main.c
> 
>  set.$(OBJ_EXT) : $(SET)/set.c
> - $(CC) -c $(CFLAGS) $(SET)/set.c
> + $(BUILD_CC) -c $(BUILD_CFLAGS) $(SET)/set.c
> +
> +%.o : %.c
> + $(BUILD_CC) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@
> 
>  lint:
>   lint *.c
> --
> 2.8.0.windows.1

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


Re: [edk2] [PATCH 3/3] IntelFsp2WrapperPkg: Update pragma to use push and pop

2016-08-29 Thread Mudusuru, Giri P
Thanks Mike, sent updated patch v2 removing the push, pop change.

Thanks,
-Giri

> -Original Message-
> From: Kinney, Michael D
> Sent: Monday, August 29, 2016 11:45 AM
> To: Mudusuru, Giri P <giri.p.mudus...@intel.com>; edk2-devel@lists.01.org;
> Kinney, Michael D <michael.d.kin...@intel.com>
> Cc: Yao, Jiewen <jiewen@intel.com>; Ma, Maurice
> <maurice...@intel.com>; Yarlagadda, Satya P
> <satya.p.yarlaga...@intel.com>
> Subject: RE: [edk2] [PATCH 3/3] IntelFsp2WrapperPkg: Update pragma to use
> push and pop
> 
> Giri,
> 
> Just leave this as #pragma pack(1) and #pragma pack() to follow the
> style used everywhere else.
> 
> EDK II sources assume the default packing is natural packing. The compiler
> Configuration in tools_def.txt need to make sure natural packing is the 
> default.
> 
> Mike
> 
> > -Original Message-
> > From: Mudusuru, Giri P
> > Sent: Monday, August 29, 2016 11:14 AM
> > To: edk2-devel@lists.01.org
> > Cc: Yao, Jiewen <jiewen@intel.com>; Ma, Maurice
> <maurice...@intel.com>; Yarlagadda,
> > Satya P <satya.p.yarlaga...@intel.com>; Kinney, Michael D
> <michael.d.kin...@intel.com>
> > Subject: [edk2] [PATCH 3/3] IntelFsp2WrapperPkg: Update pragma to use push
> and pop
> >
> > Cc: Jiewen Yao <jiewen@intel.com>
> > Cc: Maurice Ma <maurice...@intel.com>
> > Cc: Satya Yarlagadda <satya.p.yarlaga...@intel.com>
> > Cc: Michael Kinney <michael.d.kin...@intel.com>
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Giri P Mudusuru <giri.p.mudus...@intel.com>
> > ---
> >  .../Library/BaseFspWrapperApiLib/X64/DispatchExecute.c| 4 
> > ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git
> a/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/X64/DispatchExecute.c
> >
> b/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/X64/DispatchExecute.c
> > index 061d381..5f4b75e 100644
> > ---
> a/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/X64/DispatchExecute.c
> > +++
> b/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/X64/DispatchExecute.c
> > @@ -18,7 +18,7 @@
> >  #include 
> >  #include 
> >
> > -#pragma pack(1)
> > +#pragma pack(push, 1)
> >  typedef union {
> >struct {
> >  UINT32  LimitLow: 16;
> > @@ -37,7 +37,7 @@ typedef union {
> >} Bits;
> >UINT64  Uint64;
> >  } IA32_GDT;
> > -#pragma pack()
> > +#pragma pack(pop)
> >
> >  GLOBAL_REMOVE_IF_UNREFERENCED IA32_GDT mGdtEntries[] = {
> >{{0,  0,  0,  0,0,  0,  0,  0,0,  0, 0,  0,  0}}, /* 0x0:  
> > reserve */
> > --
> > 2.9.0.windows.1

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


Re: [edk2] [Patch] BaseTools GNU Makefile: Add the missing rules for cpp source file

2016-08-22 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Gao, Liming
> Sent: Sunday, August 21, 2016 11:29 PM
> To: edk2-devel@lists.01.org
> Cc: Mudusuru, Giri P <giri.p.mudus...@intel.com>; Zhu, Yonghong
> <yonghong@intel.com>
> Subject: [Patch] BaseTools GNU Makefile: Add the missing rules for cpp source
> file
> 
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Cc: Yonghong Zhu <yonghong@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao <liming@intel.com>
> ---
>  BaseTools/Source/C/Makefiles/footer.makefile | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Source/C/Makefiles/footer.makefile
> b/BaseTools/Source/C/Makefiles/footer.makefile
> index 2dfc683..c3d8020 100644
> --- a/BaseTools/Source/C/Makefiles/footer.makefile
> +++ b/BaseTools/Source/C/Makefiles/footer.makefile
> @@ -1,7 +1,7 @@
>  ## @file
>  # Makefile
>  #
> -# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
> +# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
>  # This program and the accompanying materials
>  # are licensed and made available under the terms and conditions of the BSD
> License
>  # which accompanies this distribution.The full text of the license may be
> found at
> @@ -29,6 +29,9 @@ $(LIBRARY): $(OBJECTS)
>  %.o : %.S
>   $(AS) -c $(ASFLAGS) $< -o $@
> 
> +%.o : %.cpp
> + $(CXX)  -c $(CPPFLAGS) $< -o $@
> +
>  .PHONY: clean
>  clean:
>   @rm -f $(OBJECTS) $(LIBRARY) $(DEPFILES)
> --
> 2.8.0.windows.1

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


Re: [edk2] [Patch] BaseTools GnuMakefile: Update GCC Flags to the specific one with BUILD_ prefix

2016-08-22 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Gao, Liming
> Sent: Sunday, August 21, 2016 11:32 PM
> To: edk2-devel@lists.01.org
> Cc: Mudusuru, Giri P <giri.p.mudus...@intel.com>; Zhu, Yonghong
> <yonghong@intel.com>
> Subject: [Patch] BaseTools GnuMakefile: Update GCC Flags to the specific one
> with BUILD_ prefix
> 
> To avoid the conflict with the default GCC flag name, BUILD_ prefix is added.
> 
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Cc: Yonghong Zhu <yonghong@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao <liming@intel.com>
> ---
>  BaseTools/Source/C/Makefiles/footer.makefile |  8 
>  BaseTools/Source/C/Makefiles/header.makefile | 28 ++---
> ---
>  BaseTools/Source/C/VfrCompile/GNUmakefile|  4 ++--
>  3 files changed, 20 insertions(+), 20 deletions(-)
> 
> diff --git a/BaseTools/Source/C/Makefiles/footer.makefile
> b/BaseTools/Source/C/Makefiles/footer.makefile
> index c3d8020..216ae41 100644
> --- a/BaseTools/Source/C/Makefiles/footer.makefile
> +++ b/BaseTools/Source/C/Makefiles/footer.makefile
> @@ -21,16 +21,16 @@ install: $(MAKEROOT)/libs-$(ARCH) $(LIBRARY)
>   cp $(LIBRARY) $(MAKEROOT)/libs-$(ARCH)
> 
>  $(LIBRARY): $(OBJECTS)
> - $(AR) crs $@ $^
> + $(BUILD_AR) crs $@ $^
> 
>  %.o : %.c
> - $(CC)  -c $(CFLAGS) $(CPPFLAGS) $< -o $@
> + $(BUILD_CC)  -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $< -o $@
> 
>  %.o : %.S
> - $(AS) -c $(ASFLAGS) $< -o $@
> + $(BUILD_AS) -c $(BUILD_ASFLAGS) $< -o $@
> 
>  %.o : %.cpp
> - $(CXX)  -c $(CPPFLAGS) $< -o $@
> + $(BUILD_CXX) -c $(BUILD_CPPFLAGS) $< -o $@
> 
>  .PHONY: clean
>  clean:
> diff --git a/BaseTools/Source/C/Makefiles/header.makefile
> b/BaseTools/Source/C/Makefiles/header.makefile
> index 09d2bff..5e79f31 100644
> --- a/BaseTools/Source/C/Makefiles/header.makefile
> +++ b/BaseTools/Source/C/Makefiles/header.makefile
> @@ -6,7 +6,7 @@
>  # ARCH = ia64 or IA64 for IA64 build
>  # ARCH = Arm or ARM for ARM build
>  #
> -# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.
> +# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
>  # This program and the accompanying materials
>  # are licensed and made available under the terms and conditions of the BSD
> License
>  # which accompanies this distribution.The full text of the license may be
> found at
> @@ -21,12 +21,12 @@ CYGWIN:=$(findstring CYGWIN, $(shell uname -s))
>  LINUX:=$(findstring Linux, $(shell uname -s))
>  DARWIN:=$(findstring Darwin, $(shell uname -s))
> 
> -CC ?= gcc
> -CXX ?= g++
> -AS ?= gcc
> -AR ?= ar
> -LD ?= ld
> -LINKER ?= $(CC)
> +BUILD_CC ?= gcc
> +BUILD_CXX ?= g++
> +BUILD_AS ?= gcc
> +BUILD_AR ?= ar
> +BUILD_LD ?= ld
> +LINKER ?= $(BUILD_CC)
>  ifeq ($(ARCH), IA32)
>  ARCH_INCLUDE = -I $(MAKEROOT)/Include/Ia32/
>  endif
> @@ -44,14 +44,14 @@ ARCH_INCLUDE = -I $(MAKEROOT)/Include/AArch64/
>  endif
> 
>  INCLUDE = $(TOOL_INCLUDE) -I $(MAKEROOT) -I
> $(MAKEROOT)/Include/Common -I $(MAKEROOT)/Include/ -I
> $(MAKEROOT)/Include/IndustryStandard -I $(MAKEROOT)/Common/ -I .. -I .
> $(ARCH_INCLUDE)
> -CPPFLAGS = $(INCLUDE)
> +BUILD_CPPFLAGS = $(INCLUDE)
>  ifeq ($(DARWIN),Darwin)
>  # assume clang or clang compatible flags on OS X
> -CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-
> deprecated-declarations -Wno-self-assign -nostdlib -c -g
> +BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-
> deprecated-declarations -Wno-self-assign -nostdlib -c -g
>  else
> -CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-
> deprecated-declarations -nostdlib -c -g
> +BUILD_CFLAGS = -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-
> deprecated-declarations -nostdlib -c -g
>  endif
> -LFLAGS =
> +BUILD_LFLAGS =
> 
>  ifeq ($(ARCH), IA32)
>  #
> @@ -60,9 +60,9 @@ ifeq ($(ARCH), IA32)
>  #  so only do this is uname -m returns i386.
>  #
>  ifeq ($(DARWIN),Darwin)
> -  CFLAGS   += -arch i386
> -  CPPFLAGS += -arch i386
> -  LFLAGS   += -arch i386
> +  BUILD_CFLAGS   += -arch i386
> +  BUILD_CPPFLAGS += -arch i386
> +  BUILD_LFLAGS   += -arch i386
>  endif
>  endif
> 
> diff --git a/BaseTools/Source/C/VfrCompile/GNUmakefile
> b/BaseTools/Source/C/VfrCompile/GNUmakefile
> index e446d14..e2d4321 100644
> --- a/BaseTools/Source/C/VfrCompile/GNUmakefile
> +++ b/BaseTools/Source/C/VfrCompile/GNUmakefile
> @@ -1,7 +1,7 @@
>  ## @file
>  # GNU/Linux makefile for 'VfrCompile' module

Re: [edk2] [PATCH] Update ReadMe.MD file.

2016-08-09 Thread Mudusuru, Giri P
Hi Mang,
Please fix non ASCII characters "Run the Intel� FSP installer " to "Run the 
Intel(R) FSP installer"

Reviewed-by: Giri P Mudusuru  

Thanks,
-Giri

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Guo,
> Mang
> Sent: Monday, August 8, 2016 11:31 PM
> To: edk2-devel@lists.01.org
> Cc: Richardson, Brian ; Wei, David
> 
> Subject: [edk2] [PATCH] Update ReadMe.MD file.
> 
> 
> Update ReadMe.MD file because code structure of BraswellPlatformPkg was
> changed.
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Guo Mang 
> ---
>  ReadMe.MD | 30 --
>  1 file changed, 24 insertions(+), 6 deletions(-)
> 
> diff --git a/ReadMe.MD b/ReadMe.MD
> index c2d5772..1eb6480 100644
> --- a/ReadMe.MD
> +++ b/ReadMe.MD
> @@ -43,13 +43,25 @@ This code combines elements from github, intel.com/fsp
> and firmware.intel.com
> (BSW_MR1) from http://intel.com/fsp
> 
>  5) Run the Intel� FSP installer and copy the following files into the 
> Workspace:
> -   a. Copy FspUpdVpd.h into the "C:\MyWorkspace\edk2-
> platforms\ChvFspBinPkg\Include" directory.
> -   b. Create the "FspBinary" sub-directory under the "C:\MyWorkspace\edk2-
> platforms\ChvFspBinPkg"
> +   a. Default install directory: "C:\Program Files (x86)\Braswell FSP Kit 
> MR1\FSP"
> +   b. Copy FspUpdVpd.h into the "C:\MyWorkspace\edk2-
> platforms\ChvFspBinPkg\Include" directory.
> +   c. Create the "FspBinary" sub-directory under the "C:\MyWorkspace\edk2-
> platforms\ChvFspBinPkg"
>directory, if it does not exist ("C:\MyWorkspace\edk2-
> platforms\ChvFspBinPkg\FspBinary").
> -   c. Copy BSWFSP.fd into the "C:\MyWorkspace\edk2-
> platforms\ChvFspBinPkg\FspBinary" directory.
> +   d. Copy BSWFSP.fd into the "C:\MyWorkspace\edk2-
> platforms\ChvFspBinPkg\FspBinary" directory.
> 
>  6) Download the 'BraswellPlatformPkg' package from firmware.intel.com:
> https://firmware.intel.com/projects/braswell-uefi
> +   NOTE: The directory structure of BraswellPlatformPkg changed between the
> 2016-06-15
> +   and 2016-08-05 releases. Check your BraswellPlatformPkg git hash to
> determine which
> +   version to download.
> +   If BraswellPlatformPkg hash is
> f71cf3bf29aa216bc72f703815a7f96fb2ca0592(2016-08-05 release) or
> +   after this hash, please download this link:
> +   
> https://firmware.intel.com/sites/default/files/BraswellPlatformPkg_2016-08-
> 05.zip
> +   If BraswellPlatformPkg hash is
> 471674c0aa4350c48e5e9e8f2d8962883f582275(2016-06-15 release),
> +   please download this link:
> +   
> https://firmware.intel.com/sites/default/files/BraswellPlatformPkg_2016-06-
> 15.zip
> +
> +
> 
>  7) Unzip the 'BraswellPlatformPkg' package and move the contents into the
> Workspace:
> a. Copy the "BraswellPlatformPkg" sub-directory over the existing 
> directory
> @@ -95,7 +107,7 @@ OS Configuration:
>(/vs08 = Visual Studio 2008; /vs10 = Visual Studio 2010; /vs13 = 
> Visual Studio
> 2013)
> 
> 3) After the build successfully completes, the 8MB firmware binary image
> -  will be located in "C:\MyWorkspace\edk2-
> platforms\BraswellPlatformPkg\Stitch\"
> +  will be located in "C:\MyWorkspace\edk2-platforms\Build\"
> 
>  3b. Build Steps (64-bit)
> 1) To build a 64-bit release version
> @@ -111,13 +123,13 @@ OS Configuration:
>(/vs08 = Visual Studio 2008; /vs10 = Visual Studio 2010; /vs13 = 
> Visual Studio
> 2013)
> 
> 3) After the build successfully completes, the 8MB firmware binary image
> -  will be located in "C:\MyWorkspace\edk2-
> platforms\BraswellPlatformPkg\Stitch\"
> +  will be located in "C:\MyWorkspace\edk2-platforms\Build\"
> 
> 
> =
> ===
> VALIDATED OS
> 
> =
> ===
>  1. Yocto Revision 1.8 (x64)
> -2. Microsoft Windows 10 Enterprise, Build 10586 (x64 [64-bit] and x86 
> [32-bit])
> +2. Microsoft Windows 10 Enterprise, Build 10240 (x64 [64-bit] and x86 
> [32-bit])
>  3. Ubuntu 15.10 Desktop (x64)
> 
> 
> =
> ===
> @@ -133,6 +145,12 @@
> https://github.com/mangguo321/Braswell/blob/master/Documents/Open_Bras
> well_Platf
>  https://www.yoctoproject.org/downloads/bsps/fido18/cherry-hill-bsp-braswell
> 
> 
> =
> ===
> +  KNOWN ISSUES
> +
> 
> +
> +1. Linux build environments are not currently supported.
> +
> +
> 
>MAINTAINERS
> 
> 

Re: [edk2] [PATCH] IntelFsp2Pkg: Only include required header files in FspEas.h

2016-08-04 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Ma, Maurice
> Sent: Thursday, August 4, 2016 9:20 PM
> To: edk2-devel@lists.01.org
> Cc: Ma, Maurice <maurice...@intel.com>; Yao, Jiewen
> <jiewen@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>
> Subject: [edk2] [PATCH] IntelFsp2Pkg: Only include required header files in
> FspEas.h
> 
> Current FspEas.h file includes Uefi.h which also refers to lots of other
> UEFI header files not used by FSP consumer. It caused many unnecessary
> header file overhead for a bootloader that consumes FSP, such as coreboot.
> This change reduces the required header file number down to 3.
> 
> Cc: Jiewen Yao <jiewen@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Maurice Ma <maurice...@intel.com>
> ---
>  IntelFsp2Pkg/Include/FspEas.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/IntelFsp2Pkg/Include/FspEas.h b/IntelFsp2Pkg/Include/FspEas.h
> index 79bb0b8e8efc..00098a392699 100644
> --- a/IntelFsp2Pkg/Include/FspEas.h
> +++ b/IntelFsp2Pkg/Include/FspEas.h
> @@ -16,7 +16,7 @@
>  #ifndef _FSP_EAS_H_
>  #define _FSP_EAS_H_
> 
> -#include 
> +#include 
>  #include 
>  #include 
>  #include 
> --
> 1.9.5.msysgit.0

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


Re: [edk2] [Patch v5 02/48] UefiCpuPkg/MpInitLib: Add microcode definitions defined in IA32 SDM

2016-08-02 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Fan, Jeff
> Sent: Tuesday, August 2, 2016 1:59 AM
> To: edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Tian, Feng
> <feng.t...@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>; Laszlo
> Ersek <ler...@redhat.com>
> Subject: [Patch v5 02/48] UefiCpuPkg/MpInitLib: Add microcode definitions
> defined in IA32 SDM
> 
> Add microcode definitions defined in Intel(R) 64 and IA-32 Architectures
> Software Developer's Manual Volume 3A, Section 9.11.
> 
> v4:
>   1. ProcessorSignature type changed to
> CPU_MICROCODE_PROCESSOR_SIGNATURE
>   2. Add pack(1) for structure CPU_MICROCODE_HEADER and
>  CPU_MICROCODE_EXTENDED_TABLE.
> v3:
>   1. Update SDM date to June, 2016
>   2. Mention BCD format in CPU_MICROCODE_DATE
>   3. Rename ProcessorChecksum to Checksum to match SDM.
> 
> Cc: Michael Kinney <michael.d.kin...@intel.com>
> Cc: Feng Tian <feng.t...@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Cc: Laszlo Ersek <ler...@redhat.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff@intel.com>
> Reviewed-by: Laszlo Ersek <ler...@redhat.com>
> ---
>  UefiCpuPkg/Include/Register/Microcode.h | 200
> 
>  1 file changed, 200 insertions(+)
>  create mode 100644 UefiCpuPkg/Include/Register/Microcode.h
> 
> diff --git a/UefiCpuPkg/Include/Register/Microcode.h
> b/UefiCpuPkg/Include/Register/Microcode.h
> new file mode 100644
> index 000..94529a1
> --- /dev/null
> +++ b/UefiCpuPkg/Include/Register/Microcode.h
> @@ -0,0 +1,200 @@
> +/** @file
> +  Microcode Definitions.
> +
> +  Microcode Definitions based on contents of the
> +  Intel(R) 64 and IA-32 Architectures Software Developer's Manual
> +Volume 3A, Section 9.11  Microcode Definitions
> +
> +  Copyright (c) 2016, Intel Corporation. All rights reserved.
> +  This program and the accompanying materials
> +  are licensed and made available under the terms and conditions of the BSD
> License
> +  which accompanies this distribution.  The full text of the license may be 
> found
> at
> +  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.
> +
> +  @par Specification Reference:
> +  Intel(R) 64 and IA-32 Architectures Software Developer's Manual, Volume 3A,
> +  June 2016, Chapter 9 Processor Management and Initialization, Section 9-11.
> +
> +**/
> +
> +#ifndef __MICROCODE_H__
> +#define __MICROCODE_H__
> +
> +///
> +/// CPU Microcode Date in BCD format
> +///
> +typedef union {
> +  struct {
> +UINT32   Year:16;
> +UINT32   Day:8;
> +UINT32   Month:8;
> +  } Bits;
> +  UINT32 Uint32;
> +} CPU_MICROCODE_DATE;
> +
> +///
> +/// CPU Microcode Processor Signature format
> +///
> +typedef union {
> +  struct {
> +UINT32   Stepping:4;
> +UINT32   Model:4;
> +UINT32   Family:4;
> +UINT32   Type:2;
> +UINT32   Reserved1:2;
> +UINT32   ExtendedModel:4;
> +UINT32   ExtendedFamily:8;
> +UINT32   Reserved2:4;
> +  } Bits;
> +  UINT32 Uint32;
> +} CPU_MICROCODE_PROCESSOR_SIGNATURE;
> +
> +#pragma pack (1)
> +
> +///
> +/// Microcode Update Format definition
> +///
> +typedef struct {
> +  ///
> +  /// Version number of the update header
> +  ///
> +  UINT32HeaderVersion;
> +  ///
> +  /// Unique version number for the update, the basis for the update
> +  /// signature provided by the processor to indicate the current update
> +  /// functioning within the processor. Used by the BIOS to authenticate
> +  /// the update and verify that the processor loads successfully. The
> +  /// value in this field cannot be used for processor stepping 
> identification
> +  /// alone. This is a signed 32-bit number.
> +  ///
> +  UINT32UpdateRevision;
> +  ///
> +  /// Date of the update creation in binary format: mmdd (e.g.
> +  /// 07/18/98 is 07181998H).
> +  ///
> +  CPU_MICROCODE_DATEDate;
> +  ///
> +  /// Extended family, extended model, type, family, model, and stepping
> +  /// of processor that requires this particular update revision (e.g.,
> +  /// 0650H). Each microcode update is designed specifically for a
> +  /// given extended family, extended model, type, family, model, and
> +  /// stepping o

Re: [edk2] [PATCH] IntelFsp2Pkg: Locate FSP Info Header dynamically

2016-08-01 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

Please update the comments for the opcode to be in line similar to the 
https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm
 

Thanks,
-Giri

> -Original Message-
> From: Yarlagadda, Satya P
> Sent: Monday, August 1, 2016 4:42 AM
> To: edk2-devel@lists.01.org
> Cc: Ma, Maurice <maurice...@intel.com>; Yao, Jiewen
> <jiewen@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>
> Subject: [PATCH] IntelFsp2Pkg: Locate FSP Info Header dynamically
> 
> we need to locate the FSP Info Header by calculating offset dynamically to
> handle the scenario of FSP component is being rebased to different location.
> 
> Cc: Maurice Ma <maurice...@intel.com>
> Cc: Jiewen Yao <jiewen@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Satya Yarlagadda <satya.p.yarlaga...@intel.com>
> ---
>  IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm | 18 +-
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
> b/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
> index 00e953b..7d5fa5e 100644
> --- a/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
> +++ b/IntelFsp2Pkg/FspSecCore/Ia32/FspHelper.nasm
> @@ -14,22 +14,22 @@
>  SECTION .text
> 
>  global ASM_PFX(FspInfoHeaderRelativeOff)
> -ASM_PFX(FspInfoHeaderRelativeOff):
> -   ;
> -   ; This value will be pached by the build script
> -   ;
> -   DD0x12345678
> 
>  global ASM_PFX(AsmGetFspBaseAddress)
>  ASM_PFX(AsmGetFspBaseAddress):
> -   mov   eax, ASM_PFX(AsmGetFspInfoHeader)
> -   sub   eax, dword [ASM_PFX(FspInfoHeaderRelativeOff)]
> +   call  ASM_PFX(AsmGetFspInfoHeader)
> add   eax, 0x1C
> mov   eax, dword [eax]
> ret
> 
>  global ASM_PFX(AsmGetFspInfoHeader)
>  ASM_PFX(AsmGetFspInfoHeader):
> -   mov   eax, ASM_PFX(AsmGetFspInfoHeader)
> -   sub   eax, dword [ASM_PFX(FspInfoHeaderRelativeOff)]
> +   call  ASM_PFX(NextInstruction)
> +ASM_PFX(NextInstruction):
> +   pop   eax
> +   sub   eax, ASM_PFX(NextInstruction)
> +   add   eax, ASM_PFX(AsmGetFspInfoHeader)
> +   ;sub   eax, 012345678h
> +   DB02Dh
> +ASM_PFX(FspInfoHeaderRelativeOff):DD0x12345678
> ret
> --
> 2.9.2.windows.1

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


Re: [edk2] [PATCH] MdePkg: Add DmaRemappingReportingTable.h

2016-08-01 Thread Mudusuru, Giri P
Thanks for detailed conversation and I agree with direction.

As it is ACPI related which has multiple vendors owning specific tables 
referred by ACPI spec MdePkg for now seems to be right place. That said we can 
start separate discussion if we want to create vendor folders for better 
organization in future.

For now we can close this thread to include in MdePkg. Any objections?

Thanks,
-Giri

> -Original Message-
> From: Rothman, Michael A
> Sent: Thursday, July 28, 2016 11:53 AM
> To: Mudusuru, Giri P <giri.p.mudus...@intel.com>; Tim Lewis
> <tim.le...@insyde.com>; Kinney, Michael D <michael.d.kin...@intel.com>;
> Laszlo Ersek <ler...@redhat.com>; edk2-devel@lists.01.org  de...@ml01.01.org>
> Cc: Yao, Jiewen <jiewen@intel.com>; Gao, Liming <liming@intel.com>
> Subject: RE: [edk2] [PATCH] MdePkg: Add DmaRemappingReportingTable.h
> 
> Personally,
> 
> I see that we have two classes of data we have external references to in the
> codebase.
> 
> We have data that is in a standards-maintained spec like ACPI, UEFI, etc.  
> This
> might be something like FPDT, which is a reservation in ACPI, but also has a
> litany of definitions contained within the main ACPI specification and bug 
> fixes
> or extensions associated with it will show up in the main spec.
> 
> We also have data that one of the main industry specs may reference, but don't
> define explicitly. Things like the PE/COFF format, XENV, DMAR, etc. These are
> maintained by vendor owners such as MSFT, INTC, or others.
> 
> In my mind, both of these categories are in essence industry spec material.
> They're used by the industry and thus at least show up in some form within the
> main industry specs.
> 
> However, the key difference is who is maintaining it.
> 
> I can easily see argued that the industrystandard directory should contain 
> them
> all.
> I could further argue that if we end up having too much in the main
> industrystandard directory, we could start to bucket them by having
> subdirectories noting who maintains it.
> 
> Being that it is reference by an industry standard seems to be the simplest 
> litmus
> test for what main directory (and thus .h file) it gets placed in - otherwise 
> it
> might get pretty confusing.
> 
> Definitely feels like something the Codebase Grand Poobahs(Kinney/Fish/Leif)
> need to discuss. :-)
> 
> Thanks,
> Mike Rothman
> (迈克 罗斯曼 / माइकल रोथ्मेन् / Михаил Ротман / משה רוטמן)
> רועה עיקרי של חתולים
> 
> 
> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Mudusuru, Giri P
> Sent: Thursday, July 28, 2016 10:59 AM
> To: Tim Lewis <tim.le...@insyde.com>; Kinney, Michael D
> <michael.d.kin...@intel.com>; Laszlo Ersek <ler...@redhat.com>; edk2-
> de...@lists.01.org <edk2-de...@ml01.01.org>
> Cc: Yao, Jiewen <jiewen@intel.com>; Gao, Liming <liming@intel.com>
> Subject: Re: [edk2] [PATCH] MdePkg: Add DmaRemappingReportingTable.h
> 
> Hi Tim,
> Yes it is historical, and if we want to change that let's define the 
> guidelines.
> 
> In initial review added to IntelSiliconPkg but looking at other usage and to 
> keep
> it consistent I have moved to MdePkg.
> 
> For example HPET and SPMI is another example which falls under the same
> bucket from Intel side.
> 
> For now we have place for Intel silicon related at IntelSiliconPkg but not all
> vendors have same.
> 
> Will wait for the stewards (Mike, Leif and Andrew) to recommend the final
> location.
> 
> Thanks,
> -Giri
> 
> > -Original Message-
> > From: Tim Lewis [mailto:tim.le...@insyde.com]
> > Sent: Thursday, July 28, 2016 9:55 AM
> > To: Kinney, Michael D <michael.d.kin...@intel.com>; Laszlo Ersek
> > <ler...@redhat.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>;
> > edk2- de...@lists.01.org <edk2-de...@ml01.01.org>
> > Cc: Yao, Jiewen <jiewen@intel.com>; Gao, Liming
> > <liming@intel.com>
> > Subject: RE: [edk2] [PATCH] MdePkg: Add DmaRemappingReportingTable.h
> >
> > Mike --
> >
> > Not quite. That table has historically been a registry of claimed
> > table IDs similar to the registry for \EFI directory names. As noted,
> > there is a link to a page that gives the links to the actual spec,
> > which is hosted by Intel (or Microsoft or Xen) The listing in this
> > table is not an endorsement of an "industry standard" any more than XENV.
> (XEN Project Table). They are just vendor links.
> >
> > Tim
> >
> > -Original Message-
> > From: Kinney, Michae

Re: [edk2] [PATCH] MdePkg: Add DmaRemappingReportingTable.h

2016-07-28 Thread Mudusuru, Giri P
Hi Tim,
Yes it is historical, and if we want to change that let's define the 
guidelines. 

In initial review added to IntelSiliconPkg but looking at other usage and to 
keep it consistent I have moved to MdePkg.

For example HPET and SPMI is another example which falls under the same bucket 
from Intel side.

For now we have place for Intel silicon related at IntelSiliconPkg but not all 
vendors have same.

Will wait for the stewards (Mike, Leif and Andrew) to recommend the final 
location.

Thanks,
-Giri

> -Original Message-
> From: Tim Lewis [mailto:tim.le...@insyde.com]
> Sent: Thursday, July 28, 2016 9:55 AM
> To: Kinney, Michael D <michael.d.kin...@intel.com>; Laszlo Ersek
> <ler...@redhat.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>; edk2-
> de...@lists.01.org <edk2-de...@ml01.01.org>
> Cc: Yao, Jiewen <jiewen@intel.com>; Gao, Liming <liming@intel.com>
> Subject: RE: [edk2] [PATCH] MdePkg: Add DmaRemappingReportingTable.h
> 
> Mike --
> 
> Not quite. That table has historically been a registry of claimed table IDs 
> similar
> to the registry for \EFI directory names. As noted, there is a link to a page 
> that
> gives the links to the actual spec, which is hosted by Intel (or Microsoft or 
> Xen)
> The listing in this table is not an endorsement of an "industry standard" any 
> more
> than XENV. (XEN Project Table). They are just vendor links.
> 
> Tim
> 
> -Original Message-
> From: Kinney, Michael D [mailto:michael.d.kin...@intel.com]
> Sent: Thursday, July 28, 2016 9:51 AM
> To: Tim Lewis <tim.le...@insyde.com>; Laszlo Ersek <ler...@redhat.com>;
> Mudusuru, Giri P <giri.p.mudus...@intel.com>; edk2-devel@lists.01.org  de...@ml01.01.org>; Kinney, Michael D <michael.d.kin...@intel.com>
> Cc: Yao, Jiewen <jiewen@intel.com>; Gao, Liming <liming@intel.com>
> Subject: RE: [edk2] [PATCH] MdePkg: Add DmaRemappingReportingTable.h
> 
> Tim,
> 
> The 'DMAR' table is defined in the ACPI Specification.
> 
> This is similar to 'DBG2':
> 
>   MdePkg/Include/IndustryStandard/DebugPort2Table.h
> 
> And 'SPCD':
> 
>   MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h
> 
> Mike
> 
> > -Original Message-
> > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> > Tim Lewis
> > Sent: Thursday, July 28, 2016 9:42 AM
> > To: Laszlo Ersek <ler...@redhat.com>; Mudusuru, Giri P
> > <giri.p.mudus...@intel.com>; edk2-devel@lists.01.org
> > <edk2-de...@ml01.01.org>
> > Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Yao, Jiewen
> > <jiewen@intel.com>; Gao, Liming <liming@intel.com>
> > Subject: Re: [edk2] [PATCH] MdePkg: Add DmaRemappingReportingTable.h
> >
> > Laszlo --
> >
> > I hear what you are saying. However, I think this is a different case:
> >
> > 1) How many ARM-defined standards are in the
> MdePkg\Include\IndustryStandards.h file?
> > By my count, none. This is by design. They are all in other packages.
> > DMAR is there because it was grandfathered in from a generation of
> > tianocore when only architectures provided by Intel were prevalent for UEFI.
> >  2) Now that there is an Intel package for Intel-silicon related
> > header files and modules, now is the time to move it.
> > 3) OS cases are a little different, since we don't usually produce
> > Microsoft (or Redhat or Canonical or BSD) specific modules for UEFI.
> > There are header files and a smattering of files that deal with these.
> > If we created a MicrosoftOsPkg, I'd move the header files there as well.
> >
> > Tim
> >
> > -Original Message-
> > From: Laszlo Ersek [mailto:ler...@redhat.com]
> > Sent: Thursday, July 28, 2016 9:29 AM
> > To: Tim Lewis <tim.le...@insyde.com>; Giri P Mudusuru
> > <giri.p.mudus...@intel.com>; edk2-devel@lists.01.org
> > <edk2-de...@ml01.01.org>
> > Cc: Michael Kinney <michael.d.kin...@intel.com>; Jiewen Yao
> > <jiewen@intel.com>; Liming Gao <liming@intel.com>
> > Subject: Re: [edk2] [PATCH] MdePkg: Add DmaRemappingReportingTable.h
> >
> > On 07/28/16 18:00, Tim Lewis wrote:
> > > Giri --
> > >
> > > Is MdePkg the right place for this? This appears to be an
> > > Intel-specific definition, right? I understand that it was in
> > > IndustryStandard for EdkCompatibilityPkg, but it might do better now
> > > in the IntelSiliconPkg.
> >
> > DMAR is defined by a widely used industry standard / spec; I think it
> > belongs

Re: [edk2] [PATCH] MdePkg: Add DmaRemappingReportingTable.h

2016-07-28 Thread Mudusuru, Giri P
Sure Jiewen. Will add these two defines and send v2 patch.

Thanks,
-Giri

> -Original Message-
> From: Yao, Jiewen
> Sent: Thursday, July 28, 2016 12:28 AM
> To: Mudusuru, Giri P <giri.p.mudus...@intel.com>; edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Gao, Liming
> <liming@intel.com>
> Subject: RE: [edk2] [PATCH] MdePkg: Add DmaRemappingReportingTable.h
> 
> Thanks. It looks good.
> Reviewed-by: jiewen@intel.com
> 
> Do you think we can define below MACRO too?
> 
> #define EFI_ACPI_DMAR_DRHD_FLAG_INCLUDE_PCI_ALL  BIT0
> 
> #define EFI_ACPI_DMAR_ATSR_FALG_ALL_PORTS  BIT0
> 
> 
> > -Original Message-
> > From: Mudusuru, Giri P
> > Sent: Thursday, July 28, 2016 2:46 PM
> > To: edk2-devel@lists.01.org
> > Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Gao, Liming
> > <liming@intel.com>; Yao, Jiewen <jiewen@intel.com>
> > Subject: [edk2] [PATCH] MdePkg: Add DmaRemappingReportingTable.h
> >
> > DMA Remapping Reporting (DMAR) ACPI table definitions from Intel(R)
> > Virtualization Technology for Directed I/O (VT-D) Architecture
> > Specification v2.4 dated June 2016.
> >
> > This replaces the DMARemappingReportingTable.h from
> > EdkCompatibilityPkg\Foundation\Include\IndustryStandard
> >
> > Cc: Michael Kinney <michael.d.kin...@intel.com>
> > Cc: Liming Gao <liming@intel.com>
> > Cc: Jiewen Yao <jiewen@intel.com>
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Giri P Mudusuru <giri.p.mudus...@intel.com>
> > ---
> >  .../IndustryStandard/DmaRemappingReportingTable.h  | 254
> > +
> >  1 file changed, 254 insertions(+)
> >  create mode 100644
> > MdePkg/Include/IndustryStandard/DmaRemappingReportingTable.h
> >
> > diff --git
> > a/MdePkg/Include/IndustryStandard/DmaRemappingReportingTable.h
> > b/MdePkg/Include/IndustryStandard/DmaRemappingReportingTable.h
> > new file mode 100644
> > index 000..691aea0
> > --- /dev/null
> > +++ b/MdePkg/Include/IndustryStandard/DmaRemappingReportingTable.h
> > @@ -0,0 +1,254 @@
> > +/** @file
> > +  DMA Remapping Reporting (DMAR) ACPI table definition from Intel(R)
> > +  Virtualization Technology for Directed I/O (VT-D) Architecture
> > Specification.
> > +
> > +  Copyright (c) 2016, Intel Corporation. All rights reserved.
> > +  This program and the accompanying materials
> > +  are licensed and made available under the terms and conditions of the
> > BSD License
> > +  which accompanies this distribution.  The full text of the license may be
> > found at
> > +  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.
> > +
> > +  @par Revision Reference:
> > +- Intel(R) Virtualization Technology for Directed I/O (VT-D) 
> > Architecture
> > +  Specification v2.4, Dated June 2016.
> > +
> > http://www.intel.com/content/dam/www/public/us/en/documents/product
> > -specifications/vt-directed-io-spec.pdf
> > +
> > +  @par Glossary:
> > +- HPET - High Precision Event Timer
> > +- NUMA - Non-uniform Memory Access
> > +**/
> > +#ifndef _DMA_REMAPPING_REPORTING_TABLE_H_
> > +#define _DMA_REMAPPING_REPORTING_TABLE_H_
> > +
> > +#pragma pack(1)
> > +
> > +///
> > +/// DMA Remapping Reporting Table Revision
> > +///
> > +#define EFI_ACPI_DMAR_DESCRIPTION_TABLE_REVISION   0x01
> > +
> > +///
> > +/// DMA-Remapping Reporting ACPI Table definitions from section 8.1
> > +///@{
> > +#define EFI_ACPI_DMAR_TABLE_FLAGS_INTR_REMAP_SET
> > BIT0
> > +#define EFI_ACPI_DMAR_TABLE_FLAGS_X2APIC_OPT_OUT_SET
> > BIT1
> > +///@}
> > +
> > +///
> > +/// Remapping Structure Types definitions from section 8.2
> > +///@{
> > +#define EFI_ACPI_DMAR_TYPE_DRHD   0x00
> > +#define EFI_ACPI_DMAR_TYPE_RMRR   0x01
> > +#define EFI_ACPI_DMAR_TYPE_ATSR   0x02
> > +#define EFI_ACPI_DMAR_TYPE_RHSA   0x03
> > +#define EFI_ACPI_DMAR_TYPE_ANDD   0x04
> > +///@}
> > +
> > +///
> > +/// Definition for DMA Remapping Structure Header
> > +///
> > +typedef struct {
> > +  UINT16Type;
> > +  UINT16Length;
> > +} EFI_ACPI_DMAR_STRUCTURE_HEADER;
> > +
> > +///
> > +/// 

Re: [edk2] [PATCH 3/3] MdeModulePkg SmbiosDxe: Use definition in IndustryStandard/Smbios.h

2016-07-28 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru  

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Star
> Zeng
> Sent: Wednesday, July 27, 2016 8:04 PM
> To: edk2-devel@lists.01.org
> Cc: Tian, Feng ; Chan, Amy ;
> Zeng, Star 
> Subject: [edk2] [PATCH 3/3] MdeModulePkg SmbiosDxe: Use definition in
> IndustryStandard/Smbios.h
> 
> Cc: Feng Tian 
> Cc: Amy Chan 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Star Zeng 
> ---
>  MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c
> b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c
> index 809dff84ac9b..ea762d59b9bd 100644
> --- a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c
> +++ b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c
> @@ -2,7 +2,7 @@
>This code produces the Smbios protocol. It also responsible for 
> constructing
>SMBIOS table into system table.
> 
> -Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.
> +Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
>  This program and the accompanying materials
>  are licensed and made available under the terms and conditions of the BSD
> License
>  which accompanies this distribution.  The full text of the license may be 
> found
> at
> @@ -1127,7 +1127,7 @@ SmbiosCreateTable (
>// Create End-Of-Table structure
>//
>GetMaxSmbiosHandle(SmbiosProtocol, );
> -  EndStructure.Header.Type = EFI_SMBIOS_TYPE_END_OF_TABLE;
> +  EndStructure.Header.Type = SMBIOS_TYPE_END_OF_TABLE;
>EndStructure.Header.Length = (UINT8) sizeof (EFI_SMBIOS_TABLE_HEADER);
>EndStructure.Header.Handle = SmbiosHandle;
>EndStructure.Tailing[0] = 0;
> @@ -1300,7 +1300,7 @@ SmbiosCreate64BitTable (
>// Create End-Of-Table structure
>//
>GetMaxSmbiosHandle(SmbiosProtocol, );
> -  EndStructure.Header.Type = EFI_SMBIOS_TYPE_END_OF_TABLE;
> +  EndStructure.Header.Type = SMBIOS_TYPE_END_OF_TABLE;
>EndStructure.Header.Length = (UINT8) sizeof (EFI_SMBIOS_TABLE_HEADER);
>EndStructure.Header.Handle = SmbiosHandle;
>EndStructure.Tailing[0] = 0;
> --
> 2.7.0.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 1/3] IntelFrameworkModulePkg BdsDxe: Use definition in IndustryStandard/Smbios.h

2016-07-28 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru  

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Star
> Zeng
> Sent: Wednesday, July 27, 2016 8:04 PM
> To: edk2-devel@lists.01.org
> Cc: Ni, Ruiyu ; Chan, Amy ; Dong,
> Eric ; Zeng, Star ; Fan, Jeff
> 
> Subject: [edk2] [PATCH 1/3] IntelFrameworkModulePkg BdsDxe: Use definition
> in IndustryStandard/Smbios.h
> 
> Cc: Ruiyu Ni 
> Cc: Eric Dong 
> Cc: Jeff Fan 
> Cc: Amy Chan 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Star Zeng 
> ---
>  IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c | 10 +-
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
> b/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
> index fc8e50f1450e..c771974ca0d2 100644
> --- a/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
> +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/FrontPage.c
> @@ -747,7 +747,7 @@ UpdateFrontPageStrings (
>  SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;
>  Status = Smbios->GetNext (Smbios, , NULL, , NULL);
>  while (!EFI_ERROR(Status)) {
> -  if (Record->Type == EFI_SMBIOS_TYPE_BIOS_INFORMATION) {
> +  if (Record->Type == SMBIOS_TYPE_BIOS_INFORMATION) {
>  Type0Record = (SMBIOS_TABLE_TYPE0 *) Record;
>  StrIndex = Type0Record->BiosVersion;
>  GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type0Record +
> Type0Record->Hdr.Length), StrIndex, );
> @@ -756,7 +756,7 @@ UpdateFrontPageStrings (
>  FreePool (NewString);
>}
> 
> -  if (Record->Type == EFI_SMBIOS_TYPE_SYSTEM_INFORMATION) {
> +  if (Record->Type == SMBIOS_TYPE_SYSTEM_INFORMATION) {
>  Type1Record = (SMBIOS_TABLE_TYPE1 *) Record;
>  StrIndex = Type1Record->ProductName;
>  GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type1Record +
> Type1Record->Hdr.Length), StrIndex, );
> @@ -765,7 +765,7 @@ UpdateFrontPageStrings (
>  FreePool (NewString);
>}
> 
> -  if (Record->Type == EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION) {
> +  if (Record->Type == SMBIOS_TYPE_PROCESSOR_INFORMATION) {
>  Type4Record = (SMBIOS_TABLE_TYPE4 *) Record;
>  StrIndex = Type4Record->ProcessorVersion;
>  GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type4Record +
> Type4Record->Hdr.Length), StrIndex, );
> @@ -774,7 +774,7 @@ UpdateFrontPageStrings (
>  FreePool (NewString);
>}
> 
> -  if (Record->Type == EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION) {
> +  if (Record->Type == SMBIOS_TYPE_PROCESSOR_INFORMATION) {
>  Type4Record = (SMBIOS_TABLE_TYPE4 *) Record;
>  ConvertProcessorToString(Type4Record->CurrentSpeed, 6, );
>  TokenToUpdate = STRING_TOKEN (STR_FRONT_PAGE_CPU_SPEED);
> @@ -782,7 +782,7 @@ UpdateFrontPageStrings (
>  FreePool (NewString);
>}
> 
> -  if ( Record->Type ==
> EFI_SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS ) {
> +  if ( Record->Type == SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS )
> {
>  Type19Record = (SMBIOS_TABLE_TYPE19 *) Record;
>  if (Type19Record->StartingAddress != 0x ) {
>InstalledMemory += RShiftU64(Type19Record->EndingAddress -
> --
> 2.7.0.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 2/3] MdeModulePkg UiApp: Use definition in IndustryStandard/Smbios.h

2016-07-28 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru  

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Ni,
> Ruiyu
> Sent: Wednesday, July 27, 2016 10:11 PM
> To: Zeng, Star ; edk2-devel@lists.01.org
> Cc: Tian, Feng ; Chan, Amy ;
> Dong, Eric 
> Subject: Re: [edk2] [PATCH 2/3] MdeModulePkg UiApp: Use definition in
> IndustryStandard/Smbios.h
> 
> 
> 
> Reviewed-by: Ruiyu Ni 
> > -Original Message-
> > From: Zeng, Star
> > Sent: Thursday, July 28, 2016 11:04 AM
> > To: edk2-devel@lists.01.org
> > Cc: Zeng, Star ; Ni, Ruiyu ; Dong,
> > Eric ; Tian, Feng ; Chan, Amy
> > 
> > Subject: [PATCH 2/3] MdeModulePkg UiApp: Use definition in
> > IndustryStandard/Smbios.h
> >
> > Cc: Ruiyu Ni 
> > Cc: Eric Dong 
> > Cc: Feng Tian 
> > Cc: Amy Chan 
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Star Zeng 
> > ---
> >  MdeModulePkg/Application/UiApp/FrontPage.c | 8 
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/MdeModulePkg/Application/UiApp/FrontPage.c
> > b/MdeModulePkg/Application/UiApp/FrontPage.c
> > index aef0e79124de..bda5ff9231b9 100644
> > --- a/MdeModulePkg/Application/UiApp/FrontPage.c
> > +++ b/MdeModulePkg/Application/UiApp/FrontPage.c
> > @@ -579,7 +579,7 @@ UpdateFrontPageBannerStrings (
> >SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;
> >Status = Smbios->GetNext (Smbios, , NULL, , NULL);
> >while (!EFI_ERROR(Status)) {
> > -if (Record->Type == EFI_SMBIOS_TYPE_BIOS_INFORMATION) {
> > +if (Record->Type == SMBIOS_TYPE_BIOS_INFORMATION) {
> >Type0Record = (SMBIOS_TABLE_TYPE0 *) Record;
> >StrIndex = Type0Record->BiosVersion;
> >GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type0Record +
> > Type0Record->Hdr.Length), StrIndex, ); @@ -597,7 +597,7 @@
> > UpdateFrontPageBannerStrings (
> >}
> >  }
> >
> > -if (Record->Type == EFI_SMBIOS_TYPE_SYSTEM_INFORMATION) {
> > +if (Record->Type == SMBIOS_TYPE_SYSTEM_INFORMATION) {
> >Type1Record = (SMBIOS_TABLE_TYPE1 *) Record;
> >StrIndex = Type1Record->ProductName;
> >GetOptionalStringByIndex ((CHAR8*)((UINT8*)Type1Record +
> > Type1Record->Hdr.Length), StrIndex, ); @@ -606,7 +606,7 @@
> > UpdateFrontPageBannerStrings (
> >FreePool (NewString);
> >  }
> >
> > -if ((Record->Type == EFI_SMBIOS_TYPE_PROCESSOR_INFORMATION)
> > && !FoundCpu) {
> > +if ((Record->Type == SMBIOS_TYPE_PROCESSOR_INFORMATION) &&
> > + !FoundCpu) {
> >Type4Record = (SMBIOS_TABLE_TYPE4 *) Record;
> >//
> >// The information in the record should be only valid when the CPU
> > Socket is populated.
> > @@ -627,7 +627,7 @@ UpdateFrontPageBannerStrings (
> >}
> >  }
> >
> > -if ( Record->Type ==
> > EFI_SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS ) {
> > +if ( Record->Type ==
> > SMBIOS_TYPE_MEMORY_ARRAY_MAPPED_ADDRESS ) {
> >Type19Record = (SMBIOS_TABLE_TYPE19 *) Record;
> >if (Type19Record->StartingAddress != 0x ) {
> >  InstalledMemory += RShiftU64(Type19Record->EndingAddress -
> > --
> > 2.7.0.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] IntelSiliconPkg: Add DmaRemappingTable.h

2016-07-26 Thread Mudusuru, Giri P
Thanks Jiewen for the feedback. Will send patch v2 including the feedback.

Thanks,
-Giri

> -Original Message-
> From: Yao, Jiewen
> Sent: Tuesday, July 26, 2016 3:42 PM
> To: Mudusuru, Giri P <giri.p.mudus...@intel.com>; edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kin...@intel.com>
> Subject: RE: [edk2] [PATCH] IntelSiliconPkg: Add DmaRemappingTable.h
> 
> Thanks to start adding this.
> 
> I have some comment:
> 1) EFI_PHYSICAL_ADDRESS should not be used. Please use UINT64.
> 
> 2) Please full name instead of short name:
> Such as:
> SegmentNum->SegmentNumber
> RmrBaseAddress->ReservedMemoryRegionBaseAddress
> RmrLimitAddress->ReservedMemoryRegionLimitAddress
> 
> 3) I think we also need define:
> 
> //
> // Definition for DMA-Remapping PCI Path
> //
> typedef struct {
>   UINT8 Device;
>   UINT8 Function;
> } EFI_ACPI_DMAR_PCI_PATH;
> 
> //
> // Definition for DMA-Remapping Device Scope Entry Structure
> //
> #define EFI_ACPI_DEVICE_SCOPE_ENTRY_TYPE_ENDPOINT 0x01
> #define EFI_ACPI_DEVICE_SCOPE_ENTRY_TYPE_BRIDGE   0x02
> #define EFI_ACPI_DEVICE_SCOPE_ENTRY_TYPE_IOAPIC   0x03
> #define EFI_ACPI_DEVICE_SCOPE_ENTRY_TYPE_MSI_CAPABLE_HPET 0x04
> #define EFI_ACPI_DEVICE_SCOPE_ENTRY_TYPE_ACPI_NAMESPACE_DEVICE
> 0x05
> typedef struct {
>   UINT8   DeviceScopeEntryType;
>   UINT8   Length;
>   UINT16  Reserved_2;
>   UINT8   EnumerationID;
>   UINT8   StartingBusNumber;
> } EFI_ACPI_DMAR_DEVICE_SCOPE_ENTRY_STRUCTURE;
> 
> //
> // Definition for DMA-Remapping Reporting ACPI Table
> //
> #define EFI_ACPI_DMAR_TABLE_FLAGS_INTR_REMAP_SET0x01
> #define EFI_ACPI_DMAR_TABLE_FLAGS_X2APIC_OPT_OUT_SET0x02
> 
> //
> // Definition for DMA Remapping Structure Header
> //
> typedef struct {
>   UINT16      Type;
>   UINT16  Length;
> } EFI_ACPI_DMAR_STRUCTURE_HEADER;
> 
> 
> > -Original Message-
> > From: Mudusuru, Giri P
> > Sent: Wednesday, July 27, 2016 3:28 AM
> > To: edk2-devel@lists.01.org
> > Cc: Yao, Jiewen <jiewen@intel.com>; Kinney, Michael D
> > <michael.d.kin...@intel.com>
> > Subject: [edk2] [PATCH] IntelSiliconPkg: Add DmaRemappingTable.h
> >
> > DMA Remapping Reporting (DMAR) ACPI table definitions from Intel(R)
> > Virtualization Technology for Directed I/O (VT-D) Architecture
> > Specification v2.4 dated June 2016.
> >
> > Cc: Jiewen Yao <jiewen@intel.com>
> > Cc: Michael Kinney <michael.d.kin...@intel.com>
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Giri P Mudusuru <giri.p.mudus...@intel.com>
> > ---
> >  .../Include/IndustryStandard/DmaRemappingTable.h   | 220
> > +
> >  1 file changed, 220 insertions(+)
> >  create mode 100644
> > IntelSiliconPkg/Include/IndustryStandard/DmaRemappingTable.h
> >
> > diff --git a/IntelSiliconPkg/Include/IndustryStandard/DmaRemappingTable.h
> > b/IntelSiliconPkg/Include/IndustryStandard/DmaRemappingTable.h
> > new file mode 100644
> > index 000..1013876
> > --- /dev/null
> > +++ b/IntelSiliconPkg/Include/IndustryStandard/DmaRemappingTable.h
> > @@ -0,0 +1,220 @@
> > +/** @file
> > +  DMA Remapping Reporting (DMAR) ACPI table definition from Intel(R)
> > +  Virtualization Technology for Directed I/O (VT-D) Architecture
> > Specification.
> > +
> > +  Copyright (c) 2016, Intel Corporation. All rights reserved.
> > +  This program and the accompanying materials
> > +  are licensed and made available under the terms and conditions of the
> > BSD License
> > +  which accompanies this distribution.  The full text of the license may be
> > found at
> > +  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.
> > +
> > +  @par Revision Reference:
> > +- Intel(R) Virtualization Technology for Directed I/O (VT-D) 
> > Architecture
> > +  Specification v2.4, Dated June 2016.
> > +
> > http://www.intel.com/content/dam/www/public/us/en/documents/product
> > -specifications/vt-directed-io-spec.pdf
> > +
> > +  @par Glossary:
> > +- HPET - High Precision Event Timer
> > +- NUMA - Non-uniform 

Re: [edk2] [patch] MdeModulePkg: add generic SataController driver.

2016-07-25 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Chan, Amy
> Sent: Monday, July 25, 2016 8:14 PM
> To: Tian, Feng <feng.t...@intel.com>; Kinney, Michael D
> <michael.d.kin...@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>
> Cc: edk2-devel@lists.01.org
> Subject: RE: [patch] MdeModulePkg: add generic SataController driver.
> 
> Reviewed-by: Chan, Amy <amy.c...@intel.com>
> 
> Thanks
> Amy
> 
> > -Original Message-
> > From: Tian, Feng
> > Sent: Wednesday, July 20, 2016 1:07 PM
> > To: Kinney, Michael D <michael.d.kin...@intel.com>; Mudusuru, Giri P
> > <giri.p.mudus...@intel.com>; Chan, Amy <amy.c...@intel.com>
> > Cc: edk2-devel@lists.01.org
> > Subject: [patch] MdeModulePkg: add generic SataController driver.
> >
> > This SataController driver is used to provide a generic solution
> > for those IDE/SATA/AHCI spec compliance host controllers.
> >
> > If there is special reqirement on timing setting or something else,
> > user could override this driver to customize a specific one.
> >
> > Cc: Michael Kinney <michael.d.kin...@intel.com>
> > Cc: Amy Chan <amy.c...@intel.com>
> > Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Feng Tian <feng.t...@intel.com>
> > ---
> >  .../Bus/Pci/SataControllerDxe/ComponentName.c  |  177 
> >  .../Bus/Pci/SataControllerDxe/SataController.c | 1021
> > 
> >  .../Bus/Pci/SataControllerDxe/SataController.h |  536 ++
> >  .../Pci/SataControllerDxe/SataControllerDxe.inf|   58 ++
> >  .../Pci/SataControllerDxe/SataControllerDxe.uni|   22 +
> >  .../SataControllerDxe/SataControllerDxeExtra.uni   |   20 +
> >  MdeModulePkg/MdeModulePkg.dsc  |1 +
> >  7 files changed, 1835 insertions(+)
> >  create mode 100644
> > MdeModulePkg/Bus/Pci/SataControllerDxe/ComponentName.c
> >  create mode 100644
> > MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c
> >  create mode 100644
> > MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.h
> >  create mode 100644
> > MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf
> >  create mode 100644
> > MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.uni
> >  create mode 100644
> > MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxeExtra.uni
> >
> > diff --git a/MdeModulePkg/Bus/Pci/SataControllerDxe/ComponentName.c
> > b/MdeModulePkg/Bus/Pci/SataControllerDxe/ComponentName.c
> > new file mode 100644
> > index 000..467ad11
> > --- /dev/null
> > +++ b/MdeModulePkg/Bus/Pci/SataControllerDxe/ComponentName.c
> > @@ -0,0 +1,177 @@
> > +/** @file
> > +  UEFI Component Name(2) protocol implementation for Sata Controller
> > driver.
> > +
> > +  Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
> > +  This program and the accompanying materials
> > +  are licensed and made available under the terms and conditions of the BSD
> > License
> > +  which accompanies this distribution.  The full text of the license may be
> > found at
> > +  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 "SataController.h"
> > +
> > +//
> > +/// EFI Component Name Protocol
> > +///
> > +GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL
> > gSataControllerComponentName = {
> > +  SataControllerComponentNameGetDriverName,
> > +  SataControllerComponentNameGetControllerName,
> > +  "eng"
> > +};
> > +
> > +//
> > +/// EFI Component Name 2 Protocol
> > +///
> > +GLOBAL_REMOVE_IF_UNREFERENCED
> EFI_COMPONENT_NAME2_PROTOCOL
> > gSataControllerComponentName2 = {
> > +  (EFI_COMPONENT_NAME2_GET_DRIVER_NAME)
> > SataControllerComponentNameGetDriverName,
> > +  (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)
> > SataControllerComponentNameGetControllerName,
> > +  "en"
> > +};
> > +
> > +//
> > +/// Driver Name Strings
> > +///
> > +GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE
> > mSataControllerDriverNameTable[] = {
> > +  {
> > +"eng;en",
> > +(C

Re: [edk2] [PATCH] IntelFsp2Pkg: Skip loading Microcode if MicrocodeCodeSize is zero

2016-07-25 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Yarlagadda, Satya P
> Sent: Monday, July 25, 2016 6:14 PM
> To: edk2-devel@lists.01.org
> Cc: Mudusuru, Giri P <giri.p.mudus...@intel.com>; Yao, Jiewen
> <jiewen@intel.com>
> Subject: [PATCH] IntelFsp2Pkg: Skip loading Microcode if MicrocodeCodeSize is
> zero
> 
> During asm to Nasm conversion, we missed the code to skip loading the
> microcode and return success if the size is zero. Added additional check to
> report error if the microcode size is not zero but less than 2 kB.
> 
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Cc: Jiewen Yao <jiewen@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Satya Yarlagadda <satya.p.yarlaga...@intel.com>
> ---
>  IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm | 10 +-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
> b/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
> index 55ee85a..6e86023 100644
> --- a/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
> +++ b/IntelFsp2Pkg/FspSecCore/Ia32/FspApiEntryT.nasm
> @@ -172,7 +172,15 @@ ASM_PFX(LoadMicrocodeDefault):
> cmpeax, 0
> jz ParamError
> movesp, eax
> -
> +
> +   ; skip loading Microcode if the MicrocodeCodeSize is zero
> +   ; and report error if size is less than 2k
> +   moveax, dword [esp + LoadMicrocodeParams.MicrocodeCodeSize]
> +   cmpeax, 0
> +   jz Exit2
> +   cmpeax, 0800h
> +   jl ParamError
> +
> movesi, dword [esp + LoadMicrocodeParams.MicrocodeCodeAddr]
> cmpesi, 0
> jnzCheckMainHeader
> --
> 2.9.2.windows.1

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


Re: [edk2] [Patch v2 16/40] UefiCpuPkg/MpInitLib: Register one period event to check APs status

2016-07-23 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com>

Please use CamelCase for variables and functions not in the Spec 

+EFI_EVENTmCheckAllAPsEvent = NULL;
+volatile BOOLEAN mStopCheckAllAPsStatus = TRUE;

Thanks,
-Giri

> -Original Message-
> From: Fan, Jeff
> Sent: Thursday, July 21, 2016 8:14 PM
> To: edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Tian, Feng
> <feng.t...@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>; Laszlo
> Ersek <ler...@redhat.com>
> Subject: [Patch v2 16/40] UefiCpuPkg/MpInitLib: Register one period event to
> check APs status
> 
> In DxeMpInitLib, register one period event callback function CheckAPsStatus()
> used to check AP Status.
> 
> Cc: Michael Kinney <michael.d.kin...@intel.com>
> Cc: Feng Tian <feng.t...@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Cc: Laszlo Ersek <ler...@redhat.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff@intel.com>
> ---
>  UefiCpuPkg/Library/MpInitLib/DxeMpLib.c | 54
> +
>  1 file changed, 54 insertions(+)
> 
> diff --git a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
> b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
> index 3c6c78b..8dd8964 100644
> --- a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
> +++ b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
> @@ -13,7 +13,13 @@
>  **/
> 
>  #include "MpLib.h"
> +
> +#include 
> +#include 
> +
>  CPU_MP_DATA  *mCpuMpData = NULL;
> +EFI_EVENTmCheckAllAPsEvent = NULL;
> +volatile BOOLEAN mStopCheckAllAPsStatus = TRUE;
> 
>  /**
>Get the pointer to CPU MP Data structure.
> @@ -43,6 +49,43 @@ SaveCpuMpData (
>  }
> 
>  /**
> +/**
> +  Checks APs status and updates APs status if needed.
> +
> +**/
> +VOID
> +CheckAndUpdateAPsStatus (
> +  VOID
> +  )
> +{
> +}
> +
> +/**
> +  Checks APs' status periodically.
> +
> +  This function is triggerred by timer perodically to check the
> +  state of APs for StartupAllAPs() and StartupThisAP() executed
> +  in non-blocking mode.
> +
> +  @param[in]  EventEvent triggered.
> +  @param[in]  Context  Parameter passed with the event.
> +
> +**/
> +VOID
> +EFIAPI
> +CheckAPsStatus (
> +  IN  EFI_EVENT   Event,
> +  IN  VOID*Context
> +  )
> +{
> +  //
> +  // If CheckAPsStatus() is not stopped, otherwise return immediately.
> +  //
> +  if (!mStopCheckAllAPsStatus) {
> +CheckAndUpdateAPsStatus ();
> +  }
> +}
> +/**
>Initialize global data for MP support.
> 
>@param[in] CpuMpData  The pointer to CPU MP Data structure.
> @@ -52,8 +95,19 @@ InitMpGlobalData (
>IN CPU_MP_DATA   *CpuMpData
>)
>  {
> +  EFI_STATUS Status;
> +
>SaveCpuMpData (CpuMpData);
> 
> +  Status = gBS->CreateEvent (
> +  EVT_TIMER | EVT_NOTIFY_SIGNAL,
> +  TPL_NOTIFY,
> +  CheckAPsStatus,
> +  NULL,
> +  
> +  );
> +  ASSERT_EFI_ERROR (Status);
> +
>  }
> 
>  /**
> --
> 2.7.4.windows.1

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


Re: [edk2] [PATCH 4/4] IntelFspWrapperPkg: Add missing License.txt.

2016-07-22 Thread Mudusuru, Giri P
Reviewed the Series. The copyright year should be updated. 
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com>


> -Original Message-
> From: Yao, Jiewen
> Sent: Friday, July 22, 2016 6:27 PM
> To: edk2-devel@lists.01.org
> Cc: Mudusuru, Giri P <giri.p.mudus...@intel.com>
> Subject: [PATCH 4/4] IntelFspWrapperPkg: Add missing License.txt.
> 
> Add missing License.txt.
> 
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jiewen Yao <jiewen@intel.com>
> ---
>  IntelFspWrapperPkg/License.txt | 25 +
>  1 file changed, 25 insertions(+)
>  create mode 100644 IntelFspWrapperPkg/License.txt
> 
> diff --git a/IntelFspWrapperPkg/License.txt b/IntelFspWrapperPkg/License.txt
> new file mode 100644
> index 000..be68999
> --- /dev/null
> +++ b/IntelFspWrapperPkg/License.txt
> @@ -0,0 +1,25 @@
> +Copyright (c) 2012, Intel Corporation. All rights reserved.
> +
> +Redistribution and use in source and binary forms, with or without
> +modification, are permitted provided that the following conditions
> +are met:
> +
> +* Redistributions of source code must retain the above copyright
> +  notice, this list of conditions and the following disclaimer.
> +* Redistributions in binary form must reproduce the above copyright
> +  notice, this list of conditions and the following disclaimer in
> +  the documentation and/or other materials provided with the
> +  distribution.
> +
> +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
> CONTRIBUTORS
> +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
> +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
> +COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
> INDIRECT,
> +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
> (INCLUDING,
> +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
> +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
> +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
> +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
> +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
> +POSSIBILITY OF SUCH DAMAGE.
> --
> 2.7.4.windows.1

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


Re: [edk2] [Patch v2 07/40] UefiCpuPkg/MpInitLib: Add AsmRellocateApLoop() assembly code

2016-07-21 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com>

Fix typo Rellocate to Relocate

Thanks,
-Giri 

> -Original Message-
> From: Fan, Jeff
> Sent: Thursday, July 21, 2016 8:14 PM
> To: edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Tian, Feng
> <feng.t...@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>; Laszlo
> Ersek <ler...@redhat.com>
> Subject: [Patch v2 07/40] UefiCpuPkg/MpInitLib: Add AsmRellocateApLoop()
> assembly code
> 
> AsmRellocateApLoop() is used to place APs into MWAIT-loop if MonitorMwait
> feature is supported before hand-off to OS, or place APs into HLT-loop if
> MonitorMwait feature is not supported.
> 
> If the current mode is long mode, we will switch APs to protected mode
> before placing APs in MWAIT-loop or HLT-loop. Thus, once APs wakeup from
> loop, APs needn't the page table that may be crashed by OS.
> 
> Cc: Michael Kinney <michael.d.kin...@intel.com>
> Cc: Feng Tian <feng.t...@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Cc: Laszlo Ersek <ler...@redhat.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff@intel.com>
> ---
>  UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm | 24 
>  UefiCpuPkg/Library/MpInitLib/MpLib.h   | 21 ++
>  UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm  | 53
> ++
>  3 files changed, 98 insertions(+)
> 
> diff --git a/UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm
> b/UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm
> index 338c9a2..a289f24 100644
> --- a/UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm
> +++ b/UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm
> @@ -168,3 +168,27 @@ CProcedureInvoke:
>  jmp$ ; Never reach here
>  RendezvousFunnelProcEnd:
> 
> +;-
> +;  AsmRellocateApLoop (MwaitSupport, ApTargetCState, PmCodeSegment);
> +;-
> +global ASM_PFX(AsmRellocateApLoop)
> +ASM_PFX(AsmRellocateApLoop):
> +AsmRellocateApLoopStart:
> +cmpbyte [esp + 4], 1
> +jnzHltLoop
> +MwaitLoop:
> +moveax, esp
> +xorecx, ecx
> +xoredx, edx
> +monitor
> +moveax, [esp + 8]; Mwait Cx, Target C-State per eax[7:4]
> +shleax, 4
> +mwait
> +jmpMwaitLoop
> +HltLoop:
> +cli
> +hlt
> +jmpHltLoop
> +ret
> +AsmRellocateApLoopEnd:
> +
> diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.h
> b/UefiCpuPkg/Library/MpInitLib/MpLib.h
> index 28a3cd4..ffa12af 100644
> --- a/UefiCpuPkg/Library/MpInitLib/MpLib.h
> +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.h
> @@ -60,5 +60,26 @@ typedef struct {
>  } MP_CPU_EXCHANGE_INFO;
> 
>  #pragma pack()
> +/**
> +  Assembly code to place AP into safe loop mode.
> +
> +  Place AP into targeted C-State if mwait-monitor is supported, otherwise
> +  place AP into hlt state.
> +  Place AP in protected mode if the current is long mode. Due to AP maybe
> +  wakeup by some hardware event. It could avoid accessing page table that
> +  may not available during booting to OS.
> +
> +  @param[in] MwaitSupportTRUE indicates mwait-monitor is supported.
> + FALSE indicates mwait-monitor is not supported.
> +  @param[in] ApTargetCState  Target C-State value.
> +  @param[in] PmCodeSegment   Proteced mode code segement value.
> +**/
> +typedef
> +VOID
> +(EFIAPI * ASM_RELLOCATE_AP_LOOP) (
> +  IN BOOLEAN MwaitSupport,
> +  IN UINTN   ApTargetCState,
> +  IN UINTN   PmCodeSegment
> +  );
>  #endif
> 
> diff --git a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm
> b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm
> index b26325f..ff413be 100644
> --- a/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm
> +++ b/UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm
> @@ -176,3 +176,56 @@ CProcedureInvoke:
> 
>  RendezvousFunnelProcEnd:
> 
> +;-
> +;  AsmRellocateApLoop (MwaitSupport, ApTargetCState, PmCodeSegment);
> +;-
> +global ASM_PFX(AsmRellocateApLoop)
> +ASM_PFX(AsmRellocateApLoop):
> +AsmRellocateApLoopStart:
> +push   rcx
> +push   rdx
> +
> +learsi, [PmEntry]; rsi <- The start address of transition 
> code
> +

Re: [edk2] [Patch v2 06/40] UefiCpuPkg/MpInitLib: Add AP assembly code and MP_CPU_EXCHANGE_INFO

2016-07-21 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com>

1) fix typo NumApsExecutingLoction to NumApsExecutingLocation
2) add space after ; and before comment lines 172 & 173 in MpFuncs.nasm

Thanks,
-Giri

> -Original Message-
> From: Fan, Jeff
> Sent: Thursday, July 21, 2016 8:14 PM
> To: edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Tian, Feng
> <feng.t...@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>; Laszlo
> Ersek <ler...@redhat.com>
> Subject: [Patch v2 06/40] UefiCpuPkg/MpInitLib: Add AP assembly code and
> MP_CPU_EXCHANGE_INFO
> 
> Add assembly code for AP reset vector and the definition of
> MP_CPU_EXCHANGE_INFO
> that are used to exchange the data between C code and assembly code when AP
> wake
> up.
> 
> Cc: Michael Kinney <michael.d.kin...@intel.com>
> Cc: Feng Tian <feng.t...@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Cc: Laszlo Ersek <ler...@redhat.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff@intel.com>
> ---
>  UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf  |   8 ++
>  UefiCpuPkg/Library/MpInitLib/Ia32/MpEqu.inc|  37 +
>  UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm | 170
> +++
>  UefiCpuPkg/Library/MpInitLib/MpLib.h   |  24 
>  UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf  |   8 ++
>  UefiCpuPkg/Library/MpInitLib/X64/MpEqu.inc |  39 ++
>  UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm  | 178
> +
>  7 files changed, 464 insertions(+)
>  create mode 100644 UefiCpuPkg/Library/MpInitLib/Ia32/MpEqu.inc
>  create mode 100644 UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm
>  create mode 100644 UefiCpuPkg/Library/MpInitLib/X64/MpEqu.inc
>  create mode 100644 UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm
> 
> diff --git a/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
> b/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
> index 1f131c0..e9a2725 100644
> --- a/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
> +++ b/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
> @@ -27,6 +27,14 @@
>  #  VALID_ARCHITECTURES   = IA32 X64
>  #
> 
> +[Sources.IA32]
> +  Ia32/MpEqu.inc
> +  Ia32/MpFuncs.nasm
> +
> +[Sources.X64]
> +  X64/MpEqu.inc
> +  X64/MpFuncs.nasm
> +
>  [Sources.common]
>DxeMpLib.c
>MpLib.c
> diff --git a/UefiCpuPkg/Library/MpInitLib/Ia32/MpEqu.inc
> b/UefiCpuPkg/Library/MpInitLib/Ia32/MpEqu.inc
> new file mode 100644
> index 000..f460f7a
> --- /dev/null
> +++ b/UefiCpuPkg/Library/MpInitLib/Ia32/MpEqu.inc
> @@ -0,0 +1,37 @@
> +;--
>  ;
> +; Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
> +; This program and the accompanying materials
> +; are licensed and made available under the terms and conditions of the BSD
> License
> +; which accompanies this distribution.  The full text of the license may be 
> found
> at
> +; 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.
> +;
> +; Module Name:
> +;
> +;   MpEqu.inc
> +;
> +; Abstract:
> +;
> +;   This is the equates file for Multiple Processor support
> +;
> +;---
> +
> +VacantFlagequ00h
> +NotVacantFlag equ0ffh
> +
> +LockLocation  equ(RendezvousFunnelProcEnd -
> RendezvousFunnelProcStart)
> +StackStartAddressLocation equLockLocation + 04h
> +StackSizeLocation equLockLocation + 08h
> +ApProcedureLocation   equLockLocation + 0Ch
> +GdtrLocation  equLockLocation + 10h
> +IdtrLocation  equLockLocation + 16h
> +BufferStartLocation   equLockLocation + 1Ch
> +ModeOffsetLocationequLockLocation + 20h
> +NumApsExecutingLoctionequLockLocation + 24h
> +CodeSegmentLocation   equLockLocation + 28h
> +DataSegmentLocation   equLockLocation + 2Ch
> +EnableExecuteDisableLocation  equLockLocation + 30h
> +Cr3Location   equLockLocation + 3Ch
> +
> diff --git a/UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm
> b/UefiCpuPkg/Library/MpInitLib/Ia32/MpFuncs.nasm
> new file mode 100644
> index 000..338c9a2
> --- /dev/null
> +++ b/Ue

Re: [edk2] [Patch v2 05/40] UefiCpuPkg/MpInitLib: Add two instances PeiMpInitLib and DxeMpInitLib

2016-07-21 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com>

1) Change MpInitLibSwitchBsp to MpInitLibSwitchBSP (BSP caps to match the PI 
spec and consistent with other functions)

Thanks,
-Giri

> -Original Message-
> From: Fan, Jeff
> Sent: Thursday, July 21, 2016 8:14 PM
> To: edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Tian, Feng
> <feng.t...@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>; Laszlo
> Ersek <ler...@redhat.com>
> Subject: [Patch v2 05/40] UefiCpuPkg/MpInitLib: Add two instances PeiMpInitLib
> and DxeMpInitLib
> 
> Add two MP Initialize Library instances PeiMpInitLib.inf and DxeMpInitLib.inf
> with NULL implementation.
> 
> Cc: Michael Kinney <michael.d.kin...@intel.com>
> Cc: Feng Tian <feng.t...@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Cc: Laszlo Ersek <ler...@redhat.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff@intel.com>
> ---
>  UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf |  61 ++
>  UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.uni |  22 +++
>  UefiCpuPkg/Library/MpInitLib/DxeMpLib.c   | 266
> +
>  UefiCpuPkg/Library/MpInitLib/MpLib.c  | 119 
>  UefiCpuPkg/Library/MpInitLib/MpLib.h  |  40 
>  UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf |  61 ++
>  UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.uni |  22 +++
>  UefiCpuPkg/Library/MpInitLib/PeiMpLib.c   | 269
> ++
>  UefiCpuPkg/UefiCpuPkg.dsc |   3 +-
>  9 files changed, 862 insertions(+), 1 deletion(-)
>  create mode 100644 UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
>  create mode 100644 UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.uni
>  create mode 100644 UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
>  create mode 100644 UefiCpuPkg/Library/MpInitLib/MpLib.c
>  create mode 100644 UefiCpuPkg/Library/MpInitLib/MpLib.h
>  create mode 100644 UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
>  create mode 100644 UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.uni
>  create mode 100644 UefiCpuPkg/Library/MpInitLib/PeiMpLib.c
> 
> diff --git a/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
> b/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
> new file mode 100644
> index 000..1f131c0
> --- /dev/null
> +++ b/UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf
> @@ -0,0 +1,61 @@
> +## @file
> +#  MP Initialize Library instance for DXE driver.
> +#
> +#  Copyright (c) 2016, Intel Corporation. All rights reserved.
> +#  This program and the accompanying materials
> +#  are licensed and made available under the terms and conditions of the BSD
> License
> +#  which accompanies this distribution.  The full text of the license may be
> found at
> +#  http://opensource.org/licenses/bsd-license.php
> +#
> +#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS"
> BASIS,
> +#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER
> EXPRESS OR IMPLIED.
> +#
> +##
> +
> +[Defines]
> +  INF_VERSION= 0x00010005
> +  BASE_NAME  = DxeMpInitLib
> +  MODULE_UNI_FILE= DxeMpInitLib.uni
> +  FILE_GUID  = B88F7146-9834-4c55-BFAC-481CC0C33736
> +  MODULE_TYPE= DXE_DRIVER
> +  VERSION_STRING = 1.1
> +  LIBRARY_CLASS  = MpInitLib|DXE_DRIVER
> +
> +#
> +# The following information is for reference only and not required by the 
> build
> tools.
> +#
> +#  VALID_ARCHITECTURES   = IA32 X64
> +#
> +
> +[Sources.common]
> +  DxeMpLib.c
> +  MpLib.c
> +  MpLib.h
> +
> +[Packages]
> +  MdePkg/MdePkg.dec
> +  UefiCpuPkg/UefiCpuPkg.dec
> +
> +[LibraryClasses]
> +  BaseLib
> +  LocalApicLib
> +  MemoryAllocationLib
> +  HobLib
> +  MtrrLib
> +  CpuLib
> +  UefiCpuLib
> +  UefiBootServicesTableLib
> +  HobLib
> +
> +[Guids]
> +  gEfiEventExitBootServicesGuid ## CONSUMES  ## Event
> +
> +[Pcd]
> +  gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber##
> CONSUMES
> +  gUefiCpuPkgTokenSpaceGuid.PcdCpuApInitTimeOutInMicroSeconds  ##
> SOMETIMES_CONSUMES
> +  gUefiCpuPkgTokenSpaceGuid.PcdCpuApStackSize  ## 
> CONSUMES
> +  gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchAddress##
> CONSUMES
> +  gUefiCpuPkgTokenSpaceGuid.PcdCpuMicrocodePatchRegionSize ##
> CONSUMES
> +  gUefiCpuPkgTokenSpaceGuid.PcdCpuApLoopMode   ##
> CONSUMES
> +  gUefiCpuPkgTokenSpaceGuid.PcdCpuApTargetCstate   ##
> SOM

Re: [edk2] [Patch v2 04/40] UefiCpuPkg/MpInitLib: Add MP Initialize library class definition

2016-07-21 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com>

1) Add space before ( in line #65 MpInitLibInitialize(
2) Change MpInitLibSwitchBsp to MpInitLibSwitchBSP (BSP caps to match the PI 
spec and consistent with other functions)

Thanks,
-Giri

> -Original Message-
> From: Fan, Jeff
> Sent: Thursday, July 21, 2016 8:14 PM
> To: edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Tian, Feng
> <feng.t...@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>; Laszlo
> Ersek <ler...@redhat.com>
> Subject: [Patch v2 04/40] UefiCpuPkg/MpInitLib: Add MP Initialize library 
> class
> definition
> 
> MP Initialize library provides basic functionalities to do APs initialization,
> to manage MP information and to wakeup APs to execute AP task.
> 
> It could be consumed by CPU MP PEI or DXE drivers to provide CPU MP
> PPI/Protocol
> services.
> 
> Cc: Michael Kinney <michael.d.kin...@intel.com>
> Cc: Feng Tian <feng.t...@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Cc: Laszlo Ersek <ler...@redhat.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff@intel.com>
> ---
>  UefiCpuPkg/Include/Library/MpInitLib.h | 352
> +
>  UefiCpuPkg/UefiCpuPkg.dec  |   4 +
>  2 files changed, 356 insertions(+)
>  create mode 100644 UefiCpuPkg/Include/Library/MpInitLib.h
> 
> diff --git a/UefiCpuPkg/Include/Library/MpInitLib.h
> b/UefiCpuPkg/Include/Library/MpInitLib.h
> new file mode 100644
> index 000..ad6fc8a
> --- /dev/null
> +++ b/UefiCpuPkg/Include/Library/MpInitLib.h
> @@ -0,0 +1,352 @@
> +/** @file
> +  Multiple-Processor initialization Library.
> +
> +  Copyright (c) 2016, Intel Corporation. All rights reserved.
> +  This program and the accompanying materials
> +  are licensed and made available under the terms and conditions of the BSD
> License
> +  which accompanies this distribution.  The full text of the license may be 
> found
> at
> +  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 __MP_INIT_LIB_H__
> +#define __MP_INIT_LIB_H__
> +
> +#include 
> +
> +/**
> +  MP Initialize Library initialization.
> +
> +  This service will allocate AP reset vector and wakeup all APs to do APs
> +  initialization.
> +
> +  This service must be invoked before all other MP Initialize Library
> +  service are invoked.
> +
> +  @retval  EFI_SUCCESS   MP initialization succeeds.
> +  @retval  OthersMP initialization fails.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +MpInitLibInitialize(
> +  VOID
> +  );
> +
> +/**
> +  Retrieves the number of logical processor in the platform and the number of
> +  those logical processors that are enabled on this boot. This service may 
> only
> +  be called from the BSP.
> +
> +  @param[out] NumberOfProcessors  Pointer to the total number of
> logical
> +  processors in the system, 
> including the BSP
> +  and disabled APs.
> +  @param[out] NumberOfEnabledProcessors   Pointer to the number of
> enabled logical
> +  processors that exist in system, 
> including
> +  the BSP.
> +
> +  @retval EFI_SUCCESS The number of logical processors and 
> enabled
> +  logical processors was retrieved.
> +  @retval EFI_DEVICE_ERRORThe calling processor is an AP.
> +  @retval EFI_INVALID_PARAMETER   NumberOfProcessors is NULL and
> NumberOfEnabledProcessors
> +  is NULL.
> +  @retval EFI_NOT_READY   MP Initialize Library is not initialized.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +MpInitLibGetNumberOfProcessors (
> +  OUT UINTN *NumberOfProcessors,   OPTIONAL
> +  OUT UINTN *NumberOfEnabledProcessors OPTIONAL
> +  );
> +
> +/**
> +  Gets detailed MP-related information on the requested processor at the
> +  instant this call is made. This service may only be called from the BSP.
> +
> +  @param[in]  ProcessorNumber   The handle number of processor.
> +  @param[out] ProcessorInfoBuffer   A pointer to the buffer where information
> for
> +the requested processor is deposited.
> +  @param[out]  He

Re: [edk2] [Patch v2 03/40] UefiCpuPkg/CpuS3DataDxe: Move StartupVector allocation to EndOfDxe()

2016-07-21 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Fan, Jeff
> Sent: Thursday, July 21, 2016 8:14 PM
> To: edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Tian, Feng
> <feng.t...@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>; Laszlo
> Ersek <ler...@redhat.com>
> Subject: [Patch v2 03/40] UefiCpuPkg/CpuS3DataDxe: Move StartupVector
> allocation to EndOfDxe()
> 
> Currently, we will allocate StartupVector buffer under 1MB at entry point
> function. But some modules may allocate some hard code address under 1MB.
> For example, LegacyBiosDxe driver tries to manage some legacy range under
> 640KB.
> 
> To avoid the conflicts, we move StartupVector buffer allocation to End Of
> DXE event callback function.
> 
> Cc: Michael Kinney <michael.d.kin...@intel.com>
> Cc: Feng Tian <feng.t...@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Cc: Laszlo Ersek <ler...@redhat.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff@intel.com>
> ---
>  UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c  | 39 ++--
> 
>  UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe.inf |  2 +-
>  2 files changed, 23 insertions(+), 18 deletions(-)
> 
> diff --git a/UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c
> b/UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c
> index 9fb47dc..9e76cae 100644
> --- a/UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c
> +++ b/UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c
> @@ -9,7 +9,7 @@ number of CPUs reported by the MP Services Protocol, so
> this module does not
>  support hot plug CPUs.  This module can be copied into a CPU specific package
>  and customized if these additional features are required.
> 
> -Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.
> +Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.
>  Copyright (c) 2015, Red Hat, Inc.
> 
>  This program and the accompanying materials
> @@ -45,6 +45,8 @@ typedef struct {
>IA32_DESCRIPTOR   IdtrProfile;
>  } ACPI_CPU_DATA_EX;
> 
> +ACPI_CPU_DATA  *mAcpiCpuData;
> +
>  /**
>Allocate EfiACPIMemoryNVS below 4G memory address.
> 
> @@ -84,18 +86,31 @@ AllocateAcpiNvsMemoryBelow4G (
>  /**
>Callback function executed when the EndOfDxe event group is signaled.
> 
> -  We delay saving the MTRR settings until BDS signals EndOfDxe.
> +  We delay allocating StartupVector and saving the MTRR settings until BDS
> signals EndOfDxe.
> 
>@param[in]  EventEvent whose notification function is being invoked.
>@param[out] Context  Pointer to the MTRR_SETTINGS buffer to fill in.
>  **/
>  VOID
>  EFIAPI
> -SaveMtrrsOnEndOfDxe (
> +CpuS3DataOnEndOfDxe (
>IN  EFI_EVENT  Event,
>OUT VOID   *Context
>)
>  {
> +  EFI_STATUS  Status;
> +  //
> +  // Allocate a 4KB reserved page below 1MB
> +  //
> +  mAcpiCpuData->StartupVector = BASE_1MB - 1;
> +  Status = gBS->AllocatePages (
> +  AllocateMaxAddress,
> +  EfiReservedMemoryType,
> +  1,
> +  >StartupVector
> +  );
> +  ASSERT_EFI_ERROR (Status);
> +
>DEBUG ((EFI_D_VERBOSE, "%a\n", __FUNCTION__));
>MtrrGetAllMtrrs (Context);
> 
> @@ -162,18 +177,6 @@ CpuS3DataInitialize (
>ASSERT_EFI_ERROR (Status);
> 
>//
> -  // Allocate a 4KB reserved page below 1MB
> -  //
> -  AcpiCpuData->StartupVector = BASE_1MB - 1;
> -  Status = gBS->AllocatePages (
> -  AllocateMaxAddress,
> -  EfiReservedMemoryType,
> -  1,
> -  >StartupVector
> -  );
> -  ASSERT_EFI_ERROR (Status);
> -
> -  //
>// Get the number of CPUs
>//
>Status = MpServices->GetNumberOfProcessors (
> @@ -255,17 +258,19 @@ CpuS3DataInitialize (
> 
>//
>// Register EFI_END_OF_DXE_EVENT_GROUP_GUID event.
> -  // The notification function saves MTRRs for ACPI_CPU_DATA
> +  // The notification function allocates StartupVector and saves MTRRs for
> ACPI_CPU_DATA
>//
>Status = gBS->CreateEventEx (
>EVT_NOTIFY_SIGNAL,
>TPL_CALLBACK,
> -  SaveMtrrsOnEndOfDxe,
> +  CpuS3DataOnEndOfDxe,
>>MtrrTable,
>,
>
>);
>ASSERT_EFI_ERROR (Status);
> 
> +  mAcpiCpuData = AcpiCpuData;
> +
>return EFI_SUCCESS;
>  }
> diff --git a/UefiCpuPkg/CpuS3DataDxe/CpuS3DataDxe

Re: [edk2] [Patch v2 02/40] UefiCpuPkg/MpInitLib: Add microcode definitions defined in IA32 SDM

2016-07-21 Thread Mudusuru, Giri P
Few comments
1) Please update the SDM reference to the latest version from June.
2) Add comment for Microcode date CPU_MICROCODE_DATE that it is in BCD format
3) use /** **/ block comments for multiple line comments
4) change ProcessorChecksum to Checksum in CPU_MICROCODE_EXTENDED_TABLE to 
align with SDM

Thanks,
-Giri

> -Original Message-
> From: Fan, Jeff
> Sent: Thursday, July 21, 2016 8:14 PM
> To: edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Tian, Feng
> <feng.t...@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>; Laszlo
> Ersek <ler...@redhat.com>
> Subject: [Patch v2 02/40] UefiCpuPkg/MpInitLib: Add microcode definitions
> defined in IA32 SDM
> 
> Add microcode definitions defined in Intel(R) 64 and IA-32 Architectures
> Software Developer's Manual Volume 3A, Section 9.11.
> 
> Cc: Michael Kinney <michael.d.kin...@intel.com>
> Cc: Feng Tian <feng.t...@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Cc: Laszlo Ersek <ler...@redhat.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff@intel.com>
> ---
>  UefiCpuPkg/Include/Register/Microcode.h | 196
> 
>  1 file changed, 196 insertions(+)
>  create mode 100644 UefiCpuPkg/Include/Register/Microcode.h
> 
> diff --git a/UefiCpuPkg/Include/Register/Microcode.h
> b/UefiCpuPkg/Include/Register/Microcode.h
> new file mode 100644
> index 000..213f659
> --- /dev/null
> +++ b/UefiCpuPkg/Include/Register/Microcode.h
> @@ -0,0 +1,196 @@
> +/** @file
> +  Microcode Definitions.
> +
> +  Microcode Definitions based on contents of the
> +  Intel(R) 64 and IA-32 Architectures Software Developer's Manual
> +Volume 3A, Section 9.11  Microcode Definitions
> +
> +  Copyright (c) 2016, Intel Corporation. All rights reserved.
> +  This program and the accompanying materials
> +  are licensed and made available under the terms and conditions of the BSD
> License
> +  which accompanies this distribution.  The full text of the license may be 
> found
> at
> +  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.
> +
> +  @par Specification Reference:
> +  Intel(R) 64 and IA-32 Architectures Software Developer's Manual, Volume 3A,
> +  April 2016, Chapter 9 Processor Management and Initialization, Section 
> 9-11.
> +
> +**/
> +
> +#ifndef __MICROCODE_H__
> +#define __MICROCODE_H__
> +
> +///
> +/// CPU Microcode Date format
> +///
> +typedef union {
> +  struct {
> +UINT32   Year:16;
> +UINT32   Day:8;
> +UINT32   Month:8;
> +  } Bits;
> +  UINT32 Uint32;
> +} CPU_MICROCODE_DATE;
> +
> +///
> +/// CPU Microcode Processor Signature format
> +///
> +typedef union {
> +  struct {
> +UINT32   Stepping:4;
> +UINT32   Model:4;
> +UINT32   Family:4;
> +UINT32   Type:2;
> +UINT32   Reserved1:2;
> +UINT32   ExtendedModel:4;
> +UINT32   ExtendedFamily:8;
> +UINT32   Reserved2:4;
> +  } Bits;
> +  UINT32 Uint32;
> +} CPU_MICROCODE_PROCESSOR_SIGNATURE;
> +
> +///
> +/// Microcode Update Format definition
> +///
> +typedef struct {
> +  ///
> +  /// Version number of the update header
> +  ///
> +  UINT32HeaderVersion;
> +  ///
> +  /// Unique version number for the update, the basis for the update
> +  /// signature provided by the processor to indicate the current update
> +  /// functioning within the processor. Used by the BIOS to authenticate
> +  /// the update and verify that the processor loads successfully. The
> +  /// value in this field cannot be used for processor stepping 
> identification
> +  /// alone. This is a signed 32-bit number.
> +  ///
> +  UINT32UpdateRevision;
> +  ///
> +  /// Date of the update creation in binary format: mmdd (e.g.
> +  /// 07/18/98 is 07181998H).
> +  ///
> +  CPU_MICROCODE_DATEDate;
> +  ///
> +  /// Extended family, extended model, type, family, model, and stepping
> +  /// of processor that requires this particular update revision (e.g.,
> +  /// 0650H). Each microcode update is designed specifically for a
> +  /// given extended family, extended model, type, family, model, and
> +  /// stepping of the processor.
> +  /// The BIOS uses the processor signature field in conjunction with the
> +  /// CPUID instruction to determine whether or not an update is
> +  /// appropria

Re: [edk2] [Patch v2 01/40] UefiCpuPkg/LocalApic.h: Remove duplicated/conflicted definitions

2016-07-21 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Fan, Jeff
> Sent: Thursday, July 21, 2016 8:14 PM
> To: edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Tian, Feng
> <feng.t...@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>; Laszlo
> Ersek <ler...@redhat.com>
> Subject: [Patch v2 01/40] UefiCpuPkg/LocalApic.h: Remove
> duplicated/conflicted definitions
> 
> #define MSR_IA32_APIC_BASE_ADDRESS is duplicated with #define
> MSR_IA32_APIC_BASE
> defined in UefiCpuPkg/Include/Register/ArchitecturalMsr.h, so we could remove
> it
> and update the modules to use MSR_IA32_APIC_BASE from ArchitecturalMsr.h.
> 
> Structure MSR_IA32_APIC_BASE conflicts with #define MSR_IA32_APIC_BASE
> defined in
> UefiCpuPkg/Include/Register/ArchitecturalMsr.h, so we could remove it and
> update
> the modules to use structure MSR_IA32_APIC_BASE_REGISTER from
> ArchitecturalMsr.h.
> 
> Cc: Michael Kinney <michael.d.kin...@intel.com>
> Cc: Feng Tian <feng.t...@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Cc: Laszlo Ersek <ler...@redhat.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff@intel.com>
> ---
>  UefiCpuPkg/CpuMpPei/CpuMpPei.h |  1 +
>  UefiCpuPkg/CpuMpPei/PeiMpServices.c| 20 -
>  UefiCpuPkg/Include/Register/LocalApic.h| 20 +
>  UefiCpuPkg/Library/BaseXApicLib/BaseXApicLib.c | 29 ++--
>  .../BaseXApicX2ApicLib/BaseXApicX2ApicLib.c| 51 
> +++---
>  5 files changed, 53 insertions(+), 68 deletions(-)
> 
> diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.h
> b/UefiCpuPkg/CpuMpPei/CpuMpPei.h
> index b2e578b..0d1a14a 100644
> --- a/UefiCpuPkg/CpuMpPei/CpuMpPei.h
> +++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.h
> @@ -25,6 +25,7 @@
> 
>  #include 
>  #include 
> +#include 
> 
>  #include 
>  #include 
> diff --git a/UefiCpuPkg/CpuMpPei/PeiMpServices.c
> b/UefiCpuPkg/CpuMpPei/PeiMpServices.c
> index e784377..e06fdf1 100644
> --- a/UefiCpuPkg/CpuMpPei/PeiMpServices.c
> +++ b/UefiCpuPkg/CpuMpPei/PeiMpServices.c
> @@ -1,7 +1,7 @@
>  /** @file
>Implementation of Multiple Processor PPI services.
> 
> -  Copyright (c) 2015, Intel Corporation. All rights reserved.
> +  Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
>This program and the accompanying materials
>are licensed and made available under the terms and conditions of the BSD
> License
>which accompanies this distribution.  The full text of the license may be 
> found
> at
> @@ -729,9 +729,9 @@ PeiSwitchBSP (
>IN  BOOLEAN  EnableOldBSP
>)
>  {
> -  PEI_CPU_MP_DATA *PeiCpuMpData;
> -  UINTN   CallerNumber;
> -  MSR_IA32_APIC_BASE  ApicBaseMsr;
> +  PEI_CPU_MP_DATA  *PeiCpuMpData;
> +  UINTNCallerNumber;
> +  MSR_IA32_APIC_BASE_REGISTER  ApicBaseMsr;
> 
>PeiCpuMpData = GetMpHobData ();
>if (PeiCpuMpData == NULL) {
> @@ -774,9 +774,9 @@ PeiSwitchBSP (
>//
>// Clear the BSP bit of MSR_IA32_APIC_BASE
>//
> -  ApicBaseMsr.Uint64 = AsmReadMsr64 (MSR_IA32_APIC_BASE_ADDRESS);
> -  ApicBaseMsr.Bits.Bsp = 0;
> -  AsmWriteMsr64 (MSR_IA32_APIC_BASE_ADDRESS, ApicBaseMsr.Uint64);
> +  ApicBaseMsr.Uint64 = AsmReadMsr64 (MSR_IA32_APIC_BASE);
> +  ApicBaseMsr.Bits.BSP = 0;
> +  AsmWriteMsr64 (MSR_IA32_APIC_BASE, ApicBaseMsr.Uint64);
> 
>PeiCpuMpData->BSPInfo.State = CPU_SWITCH_STATE_IDLE;
>PeiCpuMpData->APInfo.State  = CPU_SWITCH_STATE_IDLE;
> @@ -805,9 +805,9 @@ PeiSwitchBSP (
>//
>// Set the BSP bit of MSR_IA32_APIC_BASE on new BSP
>//
> -  ApicBaseMsr.Uint64 = AsmReadMsr64 (MSR_IA32_APIC_BASE_ADDRESS);
> -  ApicBaseMsr.Bits.Bsp = 1;
> -  AsmWriteMsr64 (MSR_IA32_APIC_BASE_ADDRESS, ApicBaseMsr.Uint64);
> +  ApicBaseMsr.Uint64 = AsmReadMsr64 (MSR_IA32_APIC_BASE);
> +  ApicBaseMsr.Bits.BSP = 1;
> +  AsmWriteMsr64 (MSR_IA32_APIC_BASE, ApicBaseMsr.Uint64);
>//
>// Set old BSP enable state
>//
> diff --git a/UefiCpuPkg/Include/Register/LocalApic.h
> b/UefiCpuPkg/Include/Register/LocalApic.h
> index 346cce6..cfb6d76 100644
> --- a/UefiCpuPkg/Include/Register/LocalApic.h
> +++ b/UefiCpuPkg/Include/Register/LocalApic.h
> @@ -1,7 +1,7 @@
>  /** @file
>IA32 Local APIC Definitions.
> 
> -  Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.
> +  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
>This program and the accompanying materials
>are 

Re: [edk2] [PATCH v2 3/5] BaseTools/tools_def: enable Os optimization for GCC X64 builds

2016-07-17 Thread Mudusuru, Giri P
Here is the summary of discussion I understand from this thread
 
-RELEASE - Debug logs are OFF, Optimization ON, Symbolic debug OFF
-DEBUG - Debug logs are ON, Optimization ON, Symbolic debug ON
-NOOPT - Debug logs are ON, Optimization OFF, Symbolic debug ON

Use case for enabling symbolic debug on release mode could be during debug of 
timing related bugs where enabling debug logs resolves the issues. In this use 
case we might want Symbolic debug on RELEASE build also.

Use case for disable optimization on release mode is to debug some compiler 
optimization issues, in which we might need to disable optimization in release 
mode.

As long as we have independent control of Debug Logs, Optimization and Symbolic 
debug we can have any possible combination.

How about we have -RELEASE and -DEBUG (same as discussed and most commonly used)

-RELEASE - Debug logs are OFF, Optimization ON, Symbolic debug OFF
-DEBUG - Debug logs are ON, Optimization ON, Symbolic debug ON

and independent flags for -NOOPT and -SOURCE_DEBUG (Symbolic debug) as two 
independent options for special debug purposes? 

Thanks,
-Giri 

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Laszlo Ersek
> Sent: Saturday, July 16, 2016 11:22 AM
> To: Kinney, Michael D ; Ard Biesheuvel
> 
> Cc: Bruce Cran ; Scott Duplichan ;
> Justen, Jordan L ; edk2-devel@lists.01.org
> ; af...@apple.com; Gao, Liming
> ; Paolo Bonzini 
> Subject: Re: [edk2] [PATCH v2 3/5] BaseTools/tools_def: enable Os
> optimization for GCC X64 builds
> 
> On 07/16/16 19:43, Kinney, Michael D wrote:
> > Laszlo,
> >
> > Symbolic debugging should be fully supported at all optimization levels.
> The
> > compiler/linker generates .pdb files for MSFT and .debug sections for GCC.
> >
> > The purpose of NOOPT is not to support source level debug.  It is to make
> > debug easier.  When optimizations are turned up, many of the call
> parameters and
> > local variables can may be optimized into registers and calls can be 
> > inlined.
> > Also, the same register may be used for multiple parameters or locals
> depending
> > on how they are used in the function.  Not all debuggers are aware of
> these
> > register optimizations and may show incorrect values for parameters and
> locals.
> 
> I may not have used the correct terminology, but the case when -b DEBUG
> enables the intrusive optimizations that you describe (i.e., the source
> code cannot be uniquely matched to the firmware state) is practically
> undistinguishable from the case when no debug symbols exist at all. It
> is unusable for analysis with sufficient detail.
> 
> In that sense, to me at least, the difference between DEBUG and NOOPT is
> not "symbolic debugging is hard or easy"; it is "symbolic debugging is
> unusable (as if the symbols don't exist) vs. fully supported".
> 
> Like everyone else, I've debugged normal Linux userspace processes that
> were built with "-g -O2", and their core dumps are useless for any
> efficient purposes. One is able to narrow it down to a more or less
> tight function context, but for understanding local variables, one has
> to look at registers and disassembly (and even that isn't guaranteed to
> produce results). Single stepping simply doesn't work; gcc can routinely
> reorder the assembly so that it loses any resemblance with the original
> code (the Linux kernel disables some of these gcc optimization features
> individually). So, as far as I'm concerned, symbolic debugging is
> entirely defeated by -O2 or -Os, regardless of -g. This is why I equate
> 
> - NOOPT to "symbolic debug works"
> - DEBUG to "symbolic debug doesn't work, but ASSERT() and friends do"
> - RELEASE to "neither of those work".
> 
> > When a difficult bug is being evaluated, it is sometimes easier to make sure
> > these register optimization are disabled and function inlining id disables
> > so the debugger can show correct values for parameters and locals on
> every call
> > in the call stack.
> 
> This is something that I expect by default from a binary whose build
> options are supposed to support symbolic debugging.
> 
> > In this case, a single module under debug may disable
> > optimization in DSC  or INF [BuildOptions], or if all modules
> > need optimization disabled to debug across the entire call stack, NOOPT
> > can be used.
> 
> I accept that your description defines the official meaning for NOOPT /
> DEBUG / RELEASE, and I thank you for educating me on them. For practical
> purposes though, I'll have to stick with my (non-official) definitions
> -- if we add -Os to DEBUG (and I don't mind if we do), then to me
> personally, it won't be suitable for source level debugging. Only NOOPT
> will be (to be added later).
> 
> Thanks!
> Laszlo
> 
> > Best regards,
> >
> > 

Re: [edk2] [Patch 2/3] IntelFsp2WrapperPkg: Add missing modules in Package DSC

2016-07-14 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com>   

> -Original Message-
> From: Gao, Liming
> Sent: Thursday, July 14, 2016 10:05 PM
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen....@intel.com>; Mudusuru, Giri P
> <giri.p.mudus...@intel.com>
> Subject: [Patch 2/3] IntelFsp2WrapperPkg: Add missing modules in Package
> DSC
> 
> Package DSC is used to verify the module source build.
> 
> Cc: Jiewen Yao <jiewen@intel.com>
> Cc: Giri Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao <liming@intel.com>
> ---
>  IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc | 7 +++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> index 70541c8..8292030 100644
> --- a/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> +++ b/IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dsc
> @@ -75,10 +75,17 @@
>HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
> 
>  [Components.Ia32]
> +
> IntelFsp2WrapperPkg/Library/BaseFspWrapperApiTestLibNull/BaseFspWrap
> perApiTestLibNull.inf
> +
> IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecFsp
> WrapperPlatformSecLibSample.inf
> +
> IntelFsp2WrapperPkg/Library/PeiFspWrapperHobProcessLibSample/PeiFsp
> WrapperHobProcessLibSample.inf
> +
> IntelFsp2WrapperPkg/Library/PeiFspWrapperApiTestLib/PeiFspWrapperApiT
> estLib.inf
> +
>IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.inf
>IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.inf
> 
>  [Components.IA32, Components.X64]
> +
> IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/BaseFspWrapperApiLi
> b.inf
> +
> IntelFsp2WrapperPkg/Library/BaseFspWrapperPlatformLibSample/BaseFsp
> WrapperPlatformLibSample.inf
>IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.inf
> 
>  [PcdsFixedAtBuild.common]
> --
> 2.8.0.windows.1

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


Re: [edk2] [Patch 3/3] IntelFsp2Pkg: Add missing modules in Package DSC

2016-07-14 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com>  

> -Original Message-
> From: Gao, Liming
> Sent: Thursday, July 14, 2016 10:05 PM
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen....@intel.com>; Mudusuru, Giri P
> <giri.p.mudus...@intel.com>
> Subject: [Patch 3/3] IntelFsp2Pkg: Add missing modules in Package DSC
> 
> Package DSC is used to verify the module source build.
> 
> Cc: Jiewen Yao <jiewen@intel.com>
> Cc: Giri Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao <liming@intel.com>
> ---
>  IntelFsp2Pkg/IntelFsp2Pkg.dsc | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/IntelFsp2Pkg/IntelFsp2Pkg.dsc b/IntelFsp2Pkg/IntelFsp2Pkg.dsc
> index 3b50bbf..61eb6f1 100644
> --- a/IntelFsp2Pkg/IntelFsp2Pkg.dsc
> +++ b/IntelFsp2Pkg/IntelFsp2Pkg.dsc
> @@ -65,6 +65,8 @@
> 
> IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/BaseFspDebugLibSerialPort
> .inf
>IntelFsp2Pkg/Library/BaseFspPlatformLib/BaseFspPlatformLib.inf
>IntelFsp2Pkg/Library/BaseFspSwitchStackLib/BaseFspSwitchStackLib.inf
> +
> IntelFsp2Pkg/Library/BaseDebugDeviceLibNull/BaseDebugDeviceLibNull.inf
> +
> IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/SecFspSecPlatformLibNull.in
> f
> 
>IntelFsp2Pkg/FspSecCore/FspSecCoreT.inf
>IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf
> --
> 2.8.0.windows.1

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


Re: [edk2] [Patch 1/3] IntelFsp2WrapperPkg SecFspWrapperPlatformSecLibSample:Update code to pass build

2016-07-14 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Gao, Liming
> Sent: Thursday, July 14, 2016 10:05 PM
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen....@intel.com>; Mudusuru, Giri P
> <giri.p.mudus...@intel.com>
> Subject: [Patch 1/3] IntelFsp2WrapperPkg
> SecFspWrapperPlatformSecLibSample:Update code to pass build
> 
> 1. Update its library class to PlatformSecLib
> 2. Update source code to refer to the matched header file
> 
> Cc: Jiewen Yao <jiewen@intel.com>
> Cc: Giri Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao <liming@intel.com>
> ---
>  .../FspWrapperPlatformSecLibSample.c|  2 ++
>  .../SecFspWrapperPlatformSecLibSample.inf   |  4 +++-
>  .../SecFspWrapperPlatformSecLibSample/SecTempRamDone.c  | 13
> +
>  3 files changed, 10 insertions(+), 9 deletions(-)
> 
> diff --git
> a/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/FspW
> rapperPlatformSecLibSample.c
> b/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/Fsp
> WrapperPlatformSecLibSample.c
> index 19379c2..697381e 100644
> ---
> a/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/FspW
> rapperPlatformSecLibSample.c
> +++
> b/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/Fsp
> WrapperPlatformSecLibSample.c
> @@ -18,6 +18,8 @@
>  #include 
> 
>  #include 
> +#include 
> +#include 
> 
>  /**
>This interface conveys state information out of the Security (SEC) phase
> into PEI.
> diff --git
> a/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecFs
> pWrapperPlatformSecLibSample.inf
> b/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecF
> spWrapperPlatformSecLibSample.inf
> index bcb76b8..dfa5c15 100644
> ---
> a/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecFs
> pWrapperPlatformSecLibSample.inf
> +++
> b/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecF
> spWrapperPlatformSecLibSample.inf
> @@ -23,7 +23,7 @@
>FILE_GUID  = 8F1AC44A-CE7E-4E29-95BB-92E321BB1573
>MODULE_TYPE= SEC
>VERSION_STRING = 1.0
> -  LIBRARY_CLASS  = FspWrapperPlatformSecLib
> +  LIBRARY_CLASS  = PlatformSecLib
> 
>  #
>  # The following information is for reference only and not required by the
> build tools.
> @@ -68,6 +68,8 @@
>  [LibraryClasses]
>LocalApicLib
>SerialPortLib
> +  DebugLib
> +  BaseMemoryLib
> 
>  [Ppis]
>gEfiSecPlatformInformationPpiGuid   ## CONSUMES
> diff --git
> a/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecT
> empRamDone.c
> b/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecT
> empRamDone.c
> index 76d2f42..b7a6227 100644
> ---
> a/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecT
> empRamDone.c
> +++
> b/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/SecT
> empRamDone.c
> @@ -14,14 +14,11 @@
> 
>  #include 
> 
> -#include 
> -
> -#include 
>  #include 
>  #include 
> -#include 
> -#include 
> -#include 
> +#include 
> +#include 
> +#include 
> 
>  /**
>  This interface disables temporary memory in SEC Phase.
> @@ -43,8 +40,8 @@ SecPlatformDisableTemporaryMemory (
> 
>DEBUG((DEBUG_INFO, "SecPlatformDisableTemporaryMemory enter\n"));
> 
> -  TempRamExitParam = GetTempRamExitParam ();
> -  Status = CallTempRamExit (FspHeader, TempRamExitParam);
> +  TempRamExitParam = UpdateTempRamExitParam ();
> +  Status = CallTempRamExit (TempRamExitParam);
>DEBUG((DEBUG_INFO, "TempRamExit status: 0x%x\n", Status));
>ASSERT_EFI_ERROR(Status);
> 
> --
> 2.8.0.windows.1

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


Re: [edk2] [Patch] IntelFsp2WrapperPkg: Remove unused header files from Fspm and Fsps WrapperPeim

2016-07-13 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Gao, Liming
> Sent: Wednesday, July 13, 2016 7:16 PM
> To: edk2-devel@lists.01.org
> Cc: Mudusuru, Giri P <giri.p.mudus...@intel.com>; Yao, Jiewen
> <jiewen@intel.com>
> Subject: [Patch] IntelFsp2WrapperPkg: Remove unused header files from
> Fspm and Fsps WrapperPeim
> 
> PlatformSecLib.h is not used and removed.
> 
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Cc: Jiewen Yao <jiewen@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao <liming@intel.com>
> ---
>  IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c | 1 -
>  IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c | 1 -
>  2 files changed, 2 deletions(-)
> 
> diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> index c98513e..0f6a7bd 100644
> --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> @@ -36,7 +36,6 @@
>  #include 
>  #include 
>  #include 
> -#include 
>  #include 
>  #include 
> 
> diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> index c923690..1701b63 100644
> --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> @@ -36,7 +36,6 @@
>  #include 
>  #include 
>  #include 
> -#include 
>  #include 
>  #include 
> 
> --
> 2.8.0.windows.1

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


Re: [edk2] [Patch v3 7/7] UefiCpuPkg/CpuMpPei: Remove PmodeOffset and LmodeOffset

2016-07-13 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Fan, Jeff
> Sent: Tuesday, July 12, 2016 4:45 AM
> To: edk2-de...@ml01.01.org
> Cc: Tian, Feng <feng.t...@intel.com>; Kinney, Michael D
> <michael.d.kin...@intel.com>; Mudusuru, Giri P
> <giri.p.mudus...@intel.com>
> Subject: [Patch v3 7/7] UefiCpuPkg/CpuMpPei: Remove PmodeOffset and
> LmodeOffset
> 
> Remove Pmode(Entry)Offset/Lmode(Entry)Offset and use unified
> Mode(Entry)Offset
> to clean up the definition of MP_ASSEMBLY_ADDRESS_MAP and
> MP_CPU_EXCHANGE_INFO.
> 
> Cc: Feng Tian <feng.t...@intel.com>
> Cc: Michael Kinney <michael.d.kin...@intel.com>
> Cc: Giri Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff@intel.com>
> ---
>  UefiCpuPkg/CpuMpPei/CpuMpPei.c| 3 +--
>  UefiCpuPkg/CpuMpPei/CpuMpPei.h| 6 ++
>  UefiCpuPkg/CpuMpPei/Ia32/MpEqu.inc| 2 +-
>  UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm  | 7 +++
>  UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.nasm | 5 ++---
>  UefiCpuPkg/CpuMpPei/X64/MpEqu.inc | 5 ++---
>  UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm   | 7 +++
>  UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm  | 7 +++
>  8 files changed, 17 insertions(+), 25 deletions(-)
> 
> diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.c
> b/UefiCpuPkg/CpuMpPei/CpuMpPei.c
> index d84d02c..caee379 100644
> --- a/UefiCpuPkg/CpuMpPei/CpuMpPei.c
> +++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.c
> @@ -428,8 +428,7 @@ WakeUpAP (
>ExchangeInfo->StackStart = PeiCpuMpData->Buffer;
>ExchangeInfo->StackSize  = PeiCpuMpData->CpuApStackSize;
>ExchangeInfo->BufferStart= PeiCpuMpData->WakeupBuffer;
> -  ExchangeInfo->PmodeOffset= PeiCpuMpData-
> >AddressMap.PModeEntryOffset;
> -  ExchangeInfo->LmodeOffset= PeiCpuMpData-
> >AddressMap.LModeEntryOffset;
> +  ExchangeInfo->ModeOffset = PeiCpuMpData-
> >AddressMap.ModeEntryOffset;
>ExchangeInfo->Cr3= AsmReadCr3 ();
>ExchangeInfo->CodeSegment= AsmReadCs ();
>ExchangeInfo->DataSegment= AsmReadDs ();
> diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.h
> b/UefiCpuPkg/CpuMpPei/CpuMpPei.h
> index d5682c6..205ce41 100644
> --- a/UefiCpuPkg/CpuMpPei/CpuMpPei.h
> +++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.h
> @@ -66,8 +66,7 @@ typedef enum {
>  //
>  typedef struct {
>UINT8 *RendezvousFunnelAddress;
> -  UINTN PModeEntryOffset;
> -  UINTN LModeEntryOffset;
> +  UINTN ModeEntryOffset;
>UINTN RendezvousFunnelSize;
>  } MP_ASSEMBLY_ADDRESS_MAP;
> 
> @@ -98,11 +97,10 @@ typedef struct {
>IA32_DESCRIPTOR   GdtrProfile;
>IA32_DESCRIPTOR   IdtrProfile;
>UINTN BufferStart;
> -  UINTN PmodeOffset;
> +  UINTN ModeOffset;
>UINTN NumApsExecuting;
>UINTN CodeSegment;
>UINTN DataSegment;
> -  UINTN LmodeOffset;
>UINTN Cr3;
>PEI_CPU_MP_DATA   *PeiCpuMpData;
>  } MP_CPU_EXCHANGE_INFO;
> diff --git a/UefiCpuPkg/CpuMpPei/Ia32/MpEqu.inc
> b/UefiCpuPkg/CpuMpPei/Ia32/MpEqu.inc
> index 50111e5..773eab3 100644
> --- a/UefiCpuPkg/CpuMpPei/Ia32/MpEqu.inc
> +++ b/UefiCpuPkg/CpuMpPei/Ia32/MpEqu.inc
> @@ -32,7 +32,7 @@ ApProcedureLocation   equLockLocation + 0Ch
>  GdtrLocation  equLockLocation + 10h
>  IdtrLocation  equLockLocation + 16h
>  BufferStartLocation   equLockLocation + 1Ch
> -PmodeOffsetLocation   equLockLocation + 20h
> +ModeOffsetLocationequLockLocation + 20h
>  NumApsExecutingLoctionequLockLocation + 24h
>  CodeSegmentLocation   equLockLocation + 28h
>  DataSegmentLocation   equLockLocation + 2Ch
> diff --git a/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm
> b/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm
> index 71e680f..ea5393a 100644
> --- a/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm
> +++ b/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm
> @@ -52,7 +52,7 @@ RendezvousFunnelProcStart::
>  db 66h,  8Bh, 1Ch   ; movebx,dword ptr [si]
> 
>  db 0BEh ; opcode of mov si, mem16
> -dw PmodeOffsetLocation  ; movsi,  PmodeOffsetLocation
> +dw ModeOffsetLocation   ; movsi,  ModeOffsetLocation
>  db 66h,  8Bh,  04h  ; moveax, [si]
>  db 0BEh   

Re: [edk2] [Patch v3 6/7] UefiCpuPkg/CpuMpPei: Remove un-used variables and functions

2016-07-13 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Fan, Jeff
> Sent: Tuesday, July 12, 2016 4:45 AM
> To: edk2-de...@ml01.01.org
> Cc: Tian, Feng <feng.t...@intel.com>; Kinney, Michael D
> <michael.d.kin...@intel.com>; Mudusuru, Giri P
> <giri.p.mudus...@intel.com>
> Subject: [Patch v3 6/7] UefiCpuPkg/CpuMpPei: Remove un-used variables
> and functions
> 
> Cc: Feng Tian <feng.t...@intel.com>
> Cc: Michael Kinney <michael.d.kin...@intel.com>
> Cc: Giri Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff@intel.com>
> ---
>  UefiCpuPkg/CpuMpPei/CpuMpPei.c| 24 
>  UefiCpuPkg/CpuMpPei/CpuMpPei.h| 19 ---
>  UefiCpuPkg/CpuMpPei/Ia32/MpEqu.inc|  3 ---
>  UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm  | 27 ---
>  UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.nasm | 25 -
>  UefiCpuPkg/CpuMpPei/X64/MpEqu.inc |  5 -
>  UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm   | 26 --
>  UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm  | 27 ---
>  8 files changed, 156 deletions(-)
> 
> diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.c
> b/UefiCpuPkg/CpuMpPei/CpuMpPei.c
> index f3bf8ee..d84d02c 100644
> --- a/UefiCpuPkg/CpuMpPei/CpuMpPei.c
> +++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.c
> @@ -14,30 +14,6 @@
> 
>  #include "CpuMpPei.h"
> 
> -//
> -// Global Descriptor Table (GDT)
> -//
> -GLOBAL_REMOVE_IF_UNREFERENCED IA32_GDT mGdtEntries[] = {
> -/* selector { Global Segment Descriptor  } */
> -/* 0x00 */  {{0,  0,  0,  0,0,  0,  0,  0,0,  0, 0,  0,  0}}, 
> //null descriptor
> -/* 0x08 */  {{0x, 0,  0,  0x2,  1,  0,  1,  0xf,  0,  0, 1,  1,  0}}, 
> //linear data
> segment descriptor
> -/* 0x10 */  {{0x, 0,  0,  0xf,  1,  0,  1,  0xf,  0,  0, 1,  1,  0}}, 
> //linear code
> segment descriptor
> -/* 0x18 */  {{0x, 0,  0,  0x3,  1,  0,  1,  0xf,  0,  0, 1,  1,  0}}, 
> //system data
> segment descriptor
> -/* 0x20 */  {{0x, 0,  0,  0xa,  1,  0,  1,  0xf,  0,  0, 1,  1,  0}}, 
> //system code
> segment descriptor
> -/* 0x28 */  {{0,  0,  0,  0,0,  0,  0,  0,0,  0, 0,  0,  0}}, 
> //spare segment
> descriptor
> -/* 0x30 */  {{0x, 0,  0,  0x2,  1,  0,  1,  0xf,  0,  0, 1,  1,  0}}, 
> //system data
> segment descriptor
> -/* 0x38 */  {{0x, 0,  0,  0xa,  1,  0,  1,  0xf,  0,  1, 0,  1,  0}}, 
> //system code
> segment descriptor
> -/* 0x40 */  {{0,  0,  0,  0,0,  0,  0,  0,0,  0, 0,  0,  0}}, 
> //spare segment
> descriptor
> -};
> -
> -//
> -// IA32 Gdt register
> -//
> -GLOBAL_REMOVE_IF_UNREFERENCED IA32_DESCRIPTOR mGdt = {
> -  sizeof (mGdtEntries) - 1,
> -  (UINTN) mGdtEntries
> -  };
> -
>  GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_NOTIFY_DESCRIPTOR
> mNotifyList = {
>(EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK |
> EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
>,
> diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.h
> b/UefiCpuPkg/CpuMpPei/CpuMpPei.h
> index 78bffd1..d5682c6 100644
> --- a/UefiCpuPkg/CpuMpPei/CpuMpPei.h
> +++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.h
> @@ -85,25 +85,6 @@ typedef struct _PEI_CPU_MP_DATA
> PEI_CPU_MP_DATA;
> 
>  #pragma pack(1)
> 
> -typedef union {
> -  struct {
> -UINT32  LimitLow: 16;
> -UINT32  BaseLow : 16;
> -UINT32  BaseMid : 8;
> -UINT32  Type: 4;
> -UINT32  System  : 1;
> -UINT32  Dpl : 2;
> -UINT32  Present : 1;
> -UINT32  LimitHigh   : 4;
> -UINT32  Software: 1;
> -UINT32  Reserved: 1;
> -UINT32  DefaultSize : 1;
> -UINT32  Granularity : 1;
> -UINT32  BaseHigh: 8;
> -  } Bits;
> -  UINT64  Uint64;
> -} IA32_GDT;
> -
>  //
>  // MP CPU exchange information for AP reset code
>  // This structure is required to be packed because fixed field offsets
> diff --git a/UefiCpuPkg/CpuMpPei/Ia32/MpEqu.inc
> b/UefiCpuPkg/CpuMpPei/Ia32/MpEqu.inc
> index a88185e..50111e5 100644
> --- a/UefiCpuPkg/CpuMpPei/Ia32/MpEqu.inc
> +++ b/UefiCpuPkg/CpuMpPei/Ia32/MpEqu.inc
> @@ -18,9 +18,6 @@
>  ;
>  
> ;---
> 
> -PROTECT_MODE_CS   equ10h
> -PROTECT_MODE_DS   equ18h
> -
>  VacantFlagequ00h
>  NotVacantFlag equ0ffh
> 
> diff --git a/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm
> b/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm
> i

Re: [edk2] [Patch v3 5/7] UefiCpuPkg/CpuMpPei: Do not load new GDT table

2016-07-13 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Fan, Jeff
> Sent: Tuesday, July 12, 2016 4:44 AM
> To: edk2-de...@ml01.01.org
> Cc: Tian, Feng <feng.t...@intel.com>; Kinney, Michael D
> <michael.d.kin...@intel.com>; Mudusuru, Giri P
> <giri.p.mudus...@intel.com>
> Subject: [Patch v3 5/7] UefiCpuPkg/CpuMpPei: Do not load new GDT table
> 
> Do not load the new GDT table and just to use the exiting BSP's GDT table set
> up
> by SEC phase.
> 
> Cc: Feng Tian <feng.t...@intel.com>
> Cc: Michael Kinney <michael.d.kin...@intel.com>
> Cc: Giri Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff@intel.com>
> ---
>  UefiCpuPkg/CpuMpPei/CpuMpPei.c | 6 +-
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.c
> b/UefiCpuPkg/CpuMpPei/CpuMpPei.c
> index ba4fb27..f3bf8ee 100644
> --- a/UefiCpuPkg/CpuMpPei/CpuMpPei.c
> +++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.c
> @@ -464,7 +464,7 @@ WakeUpAP (
>//
>// Get the BSP's data of GDT and IDT
>//
> -  CopyMem ((VOID *)>GdtrProfile, , sizeof(mGdt));
> +  AsmReadGdtr ((IA32_DESCRIPTOR *) >GdtrProfile);
>AsmReadIdtr ((IA32_DESCRIPTOR *) >IdtrProfile);
> 
>if (PeiCpuMpData->ApLoopMode == ApInMwaitLoop) {
> @@ -860,10 +860,6 @@ CpuMpPeimInit (
>EFI_PEI_VECTOR_HANDOFF_INFO_PPI *VectorHandoffInfoPpi;
> 
>//
> -  // Load new GDT table on BSP
> -  //
> -  AsmInitializeGdt ();
> -  //
>// Get Vector Hand-off Info PPI
>//
>VectorInfo = NULL;
> --
> 2.7.4.windows.1

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


Re: [edk2] [Patch v3 4/7] UefiCpuPkg/CpuMpPei/X64: Use CodeSegment and DataSegment fields

2016-07-13 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com>

Please review and add white space after "," in comments during submission

> -Original Message-
> From: Fan, Jeff
> Sent: Tuesday, July 12, 2016 4:44 AM
> To: edk2-de...@ml01.01.org
> Cc: Tian, Feng <feng.t...@intel.com>; Kinney, Michael D
> <michael.d.kin...@intel.com>; Mudusuru, Giri P
> <giri.p.mudus...@intel.com>
> Subject: [Patch v3 4/7] UefiCpuPkg/CpuMpPei/X64: Use CodeSegment and
> DataSegment fields
> 
> Using CodeSegment and DataSegment fields in ExchangeInfo instead of the
> hardcode
> MACROs for x64 arch. Switch AP from real mode to long mode directly, so
> needn't
> the CS/DS of protected mode.
> 
> Cc: Feng Tian <feng.t...@intel.com>
> Cc: Michael Kinney <michael.d.kin...@intel.com>
> Cc: Giri Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff@intel.com>
> ---
>  UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm  | 79 -
> ---
>  UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm | 67 +
> -
>  2 files changed, 62 insertions(+), 84 deletions(-)
> 
> diff --git a/UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm
> b/UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm
> index 1bb3b6d..57a995e 100644
> --- a/UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm
> +++ b/UefiCpuPkg/CpuMpPei/X64/MpFuncs.asm
> @@ -1,5 +1,5 @@
>  
> ;--
>  ;
> -; Copyright (c) 2015, Intel Corporation. All rights reserved.
> +; Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
>  ; This program and the accompanying materials
>  ; are licensed and made available under the terms and conditions of the BSD
> License
>  ; which accompanies this distribution.  The full text of the license may be
> found at
> @@ -47,25 +47,18 @@ RendezvousFunnelProcStart::
>  dw BufferStartLocation; movsi, BufferStartLocation
>  db 66h,  8Bh, 1Ch ; movebx,dword ptr [si]
> 
> -db 0BFh   ; opcode of mov di, mem16
> -dw PmodeOffsetLocation; movdi, PmodeOffsetLocation
> -db 66h,  8Bh, 05h ; moveax,dword ptr [di]
> -db 8Bh,  0F8h ; movdi, ax
> -db 83h,  0EFh,06h ; subdi, 06h
> -db 66h,  03h, 0C3h; addeax, ebx
> -db 66h,  89h, 05h ; movdword ptr [di],eax
> -
> -db 0BFh   ; opcode of mov di, mem16
> -dw LmodeOffsetLocation; movdi, LmodeOffsetLocation
> -db 66h,  8Bh, 05h ; moveax,dword ptr [di]
> -db 8Bh,  0F8h ; movdi, ax
> -db 83h,  0EFh,06h ; subdi, 06h
> -db 66h,  03h, 0C3h; addeax, ebx
> -db 66h,  89h, 05h ; movdword ptr [di],eax
> -
> -db 0BEh
> -dw Cr3Location; movsi, Cr3Location
> -db 66h,  8Bh, 0Ch ; movecx,dword ptr [si] ; 
> ECX is keeping
> the value of CR3
> +db 0BFh   ; opcode of mov di, mem16
> +dw LmodeOffsetLocation; movdi,  LmodeOffsetLocation
> +db 66h, 8Bh, 05h  ; moveax, [di]
> +db 0BFh   ; opcode of mov di, mem16
> +dw CodeSegmentLocation; movdi,  CodeSegmentLocation
> +db 66h, 8Bh, 15h  ; movedx, [di]
> +db 89h, 0C7h  ; movdi,  ax
> +db 83h, 0EFh, 02h ; subdi,  02h
> +db 89h, 15h   ; mov[di],dx; Patch 
> long mode CS
> +db 83h, 0EFh, 04h ; subdi,  04h
> +db 66h, 01h, 0D8h ; addeax, ebx
> +db 66h, 89h, 05h  ; mov[di],eax   ; Patch 
> address
> 
>  db 0BEh   ; opcode of mov si, mem16
>  dw GdtrLocation   ; movsi, GdtrLocation
> @@ -77,48 +70,44 @@ RendezvousFunnelProcStart::
>  db 66h; db 66h
>  db 2Eh,0Fh, 01h, 1Ch  ; lidt   fword ptr cs:[si]
> 
> -db 33h,  0C0h ; xorax,  ax
> -db 8Eh,  0D8h ; movds,  ax
> +db 0BFh   ; opcode of mov di, mem16
> +dw DataSegmentLocation; movdi,  DataSegmentLocation
> +

Re: [edk2] [Patch v3 3/7] UefiCpuPkg/CpuMpPei/X64: Remove hard code CPU BIST value

2016-07-13 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Fan, Jeff
> Sent: Tuesday, July 12, 2016 4:44 AM
> To: edk2-de...@ml01.01.org
> Cc: Tian, Feng <feng.t...@intel.com>; Kinney, Michael D
> <michael.d.kin...@intel.com>; Mudusuru, Giri P
> <giri.p.mudus...@intel.com>
> Subject: [Patch v3 3/7] UefiCpuPkg/CpuMpPei/X64: Remove hard code CPU
> BIST value
> 
> Cc: Feng Tian <feng.t...@intel.com>
> Cc: Michael Kinney <michael.d.kin...@intel.com>
> Cc: Giri Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff@intel.com>
> ---
>  UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm | 7 +++
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm
> b/UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm
> index 00e5f58..7e7f405 100644
> --- a/UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm
> +++ b/UefiCpuPkg/CpuMpPei/X64/MpFuncs.nasm
> @@ -1,5 +1,5 @@
>  
> ;--
>  ;
> -; Copyright (c) 2015, Intel Corporation. All rights reserved.
> +; Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
>  ; This program and the accompanying materials
>  ; are licensed and made available under the terms and conditions of the BSD
> License
>  ; which accompanies this distribution.  The full text of the license may be
> found at
> @@ -37,10 +37,9 @@ ASM_PFX(RendezvousFunnelProc):
>  RendezvousFunnelProcStart:
>  ; At this point CS = 0x(vv00) and ip= 0x0.
>  ; Save BIST information to ebp firstly
> -BITS 16
> 
> -moveax, 1234h
> -movebp, eax; save BIST information
> +BITS 16
> +movebp, eax; Save BIST information
> 
>  movax, cs
>  movds, ax
> --
> 2.7.4.windows.1

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


Re: [edk2] [Patch v3 2/7] UefiCpuPkg/CpuMpPei/Ia32: Use CodeSegment and DataSegment fields

2016-07-13 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com>

Please add a whitespace before eax in the comments during submission.
mov[di],eax

> -Original Message-
> From: Fan, Jeff
> Sent: Tuesday, July 12, 2016 4:44 AM
> To: edk2-de...@ml01.01.org
> Cc: Tian, Feng <feng.t...@intel.com>; Kinney, Michael D
> <michael.d.kin...@intel.com>; Mudusuru, Giri P
> <giri.p.mudus...@intel.com>
> Subject: [Patch v3 2/7] UefiCpuPkg/CpuMpPei/Ia32: Use CodeSegment and
> DataSegment fields
> 
> Using CodeSegment and DataSegment fields in ExchangeInfo instead of the
> hardcode
> MACROs.
> 
> Cc: Feng Tian <feng.t...@intel.com>
> Cc: Michael Kinney <michael.d.kin...@intel.com>
> Cc: Giri Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff@intel.com>
> ---
>  UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm  | 38
> +--
>  UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.nasm | 28 ---
> ---
>  2 files changed, 40 insertions(+), 26 deletions(-)
> 
> diff --git a/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm
> b/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm
> index ab78bcc..c3a5a52 100644
> --- a/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm
> +++ b/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.asm
> @@ -1,5 +1,5 @@
>  
> ;--
>  ;
> -; Copyright (c) 2015, Intel Corporation. All rights reserved.
> +; Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
>  ; This program and the accompanying materials
>  ; are licensed and made available under the terms and conditions of the BSD
> License
>  ; which accompanies this distribution.  The full text of the license may be
> found at
> @@ -51,13 +51,22 @@ RendezvousFunnelProcStart::
>  dw BufferStartLocation  ; movsi, BufferStartLocation
>  db 66h,  8Bh, 1Ch   ; movebx,dword ptr [si]
> 
> -db 0BFh ; opcode of mov di, mem16
> -dw PmodeOffsetLocation  ; movdi, PmodeOffsetLocation
> -db 66h,  8Bh, 05h   ; moveax,dword ptr [di]
> -db 8Bh,  0F8h   ; movdi, ax
> -db 83h,  0EFh,06h   ; subdi, 06h
> -db 66h,  03h, 0C3h  ; addeax, ebx
> -db 66h,  89h, 05h   ; movdword ptr [di],eax
> +db 0BEh ; opcode of mov si, mem16
> +dw PmodeOffsetLocation  ; movsi,  PmodeOffsetLocation
> +db 66h,  8Bh,  04h  ; moveax, [si]
> +db 0BEh ; opcode of mov si, mem16
> +dw CodeSegmentLocation  ; movsi,  CodeSegmentLocation
> +db 66h,  8Bh,  14h  ; movedx, [si]
> +db 89h, 0C7h; movdi,  ax
> +db 83h, 0EFh,  02h  ; subdi,  02h
> +db 89h,  15h; mov[di], dx
> +db 83h, 0EFh,  04h  ; subdi,  04h
> +db 66h,  01h, 0D8h  ; addeax, ebx
> +db 66h,  89h,  05h  ; mov[di],eax
> +
> +db 0BEh ; opcode of mov si, mem16
> +dw DataSegmentLocation  ; movsi,  DataSegmentLocation
> +db 66h,  8Bh,  14h  ; movedx, [si]
> 
>  db 0BEh ; opcode of mov si, mem16
>  dw GdtrLocation ; movsi, GdtrLocation
> @@ -78,15 +87,14 @@ RendezvousFunnelProcStart::
> 
>  db 66h,  67h, 0EAh  ; far jump
>  dd 0h   ; 32-bit offset
> -dw PROTECT_MODE_CS  ; 16-bit selector
> +dw 0h   ; 16-bit selector
> 
>  Flat32Start::   ; protected mode entry point
> -movax, PROTECT_MODE_DS
> -movds, ax
> -moves, ax
> -movfs, ax
> -movgs, ax
> -movss, ax
> +movds, dx
> +moves, dx
> +movfs, dx
> +movgs, dx
> +movss, dx
> 
>  movesi, ebx
>  movedi, esi
> diff --git a/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.nasm
> b/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.nasm
> index 2ff16dc..577ca4e 100644
> --- a/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.nasm
> +++ b/UefiCpuPkg/CpuMpPei/Ia32/MpFuncs.nasm
> @@ -1,5 +1,5 @@
>  
> ;

Re: [edk2] [Patch v3 1/7] UefiCpuPkg/CpuMpPei: Add CodeSegment and DataSegment fields

2016-07-13 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com>

> -Original Message-
> From: Fan, Jeff
> Sent: Tuesday, July 12, 2016 4:44 AM
> To: edk2-de...@ml01.01.org
> Cc: Tian, Feng <feng.t...@intel.com>; Kinney, Michael D
> <michael.d.kin...@intel.com>; Mudusuru, Giri P
> <giri.p.mudus...@intel.com>
> Subject: [Patch v3 1/7] UefiCpuPkg/CpuMpPei: Add CodeSegment and
> DataSegment fields
> 
> Added CodeSegment and DataSegment fields in MP_CPU_EXCHANGE_INFO.
> They are set
> to the values of current BSP's CS and DS.
> 
> Cc: Feng Tian <feng.t...@intel.com>
> Cc: Michael Kinney <michael.d.kin...@intel.com>
> Cc: Giri Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff@intel.com>
> ---
>  UefiCpuPkg/CpuMpPei/CpuMpPei.c | 2 ++
>  UefiCpuPkg/CpuMpPei/CpuMpPei.h | 2 ++
>  UefiCpuPkg/CpuMpPei/Ia32/MpEqu.inc | 4 +++-
>  UefiCpuPkg/CpuMpPei/X64/MpEqu.inc  | 8 +---
>  4 files changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.c
> b/UefiCpuPkg/CpuMpPei/CpuMpPei.c
> index 4ed1da9..ba4fb27 100644
> --- a/UefiCpuPkg/CpuMpPei/CpuMpPei.c
> +++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.c
> @@ -455,6 +455,8 @@ WakeUpAP (
>ExchangeInfo->PmodeOffset= PeiCpuMpData-
> >AddressMap.PModeEntryOffset;
>ExchangeInfo->LmodeOffset= PeiCpuMpData-
> >AddressMap.LModeEntryOffset;
>ExchangeInfo->Cr3= AsmReadCr3 ();
> +  ExchangeInfo->CodeSegment= AsmReadCs ();
> +  ExchangeInfo->DataSegment= AsmReadDs ();
>ExchangeInfo->CFunction  = (UINTN) ApCFunction;
>ExchangeInfo->NumApsExecuting= 0;
>ExchangeInfo->PeiCpuMpData   = PeiCpuMpData;
> diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.h
> b/UefiCpuPkg/CpuMpPei/CpuMpPei.h
> index afbcb6e..78bffd1 100644
> --- a/UefiCpuPkg/CpuMpPei/CpuMpPei.h
> +++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.h
> @@ -119,6 +119,8 @@ typedef struct {
>UINTN BufferStart;
>UINTN PmodeOffset;
>UINTN NumApsExecuting;
> +  UINTN CodeSegment;
> +  UINTN DataSegment;
>UINTN LmodeOffset;
>UINTN Cr3;
>PEI_CPU_MP_DATA   *PeiCpuMpData;
> diff --git a/UefiCpuPkg/CpuMpPei/Ia32/MpEqu.inc
> b/UefiCpuPkg/CpuMpPei/Ia32/MpEqu.inc
> index fc637cc..a88185e 100644
> --- a/UefiCpuPkg/CpuMpPei/Ia32/MpEqu.inc
> +++ b/UefiCpuPkg/CpuMpPei/Ia32/MpEqu.inc
> @@ -1,5 +1,5 @@
>  
> ;--
>  ;
> -; Copyright (c) 2015, Intel Corporation. All rights reserved.
> +; Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
>  ; This program and the accompanying materials
>  ; are licensed and made available under the terms and conditions of the BSD
> License
>  ; which accompanies this distribution.  The full text of the license may be
> found at
> @@ -37,4 +37,6 @@ IdtrLocation  equLockLocation + 16h
>  BufferStartLocation   equLockLocation + 1Ch
>  PmodeOffsetLocation   equLockLocation + 20h
>  NumApsExecutingLoctionequLockLocation + 24h
> +CodeSegmentLocation   equLockLocation + 28h
> +DataSegmentLocation   equLockLocation + 2Ch
> 
> diff --git a/UefiCpuPkg/CpuMpPei/X64/MpEqu.inc
> b/UefiCpuPkg/CpuMpPei/X64/MpEqu.inc
> index ab851cf..30c7f61 100644
> --- a/UefiCpuPkg/CpuMpPei/X64/MpEqu.inc
> +++ b/UefiCpuPkg/CpuMpPei/X64/MpEqu.inc
> @@ -1,5 +1,5 @@
>  
> ;--
>  ;
> -; Copyright (c) 2015, Intel Corporation. All rights reserved.
> +; Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
>  ; This program and the accompanying materials
>  ; are licensed and made available under the terms and conditions of the BSD
> License
>  ; which accompanies this distribution.  The full text of the license may be
> found at
> @@ -39,7 +39,9 @@ IdtrLocation  equLockLocation + 2Ah
>  BufferStartLocation   equLockLocation + 34h
>  PmodeOffsetLocation   equLockLocation + 3Ch
>  NumApsExecutingLoctionequLockLocation + 44h
> -LmodeOffsetLocation   equLockLocation + 4Ch
> -Cr3Location   equLockLocation + 54h
> +CodeSegmentLocation   equLockLocation + 4Ch
> +DataSegmentLocation   equLockLocation + 54h
> +LmodeOffsetLocation   equLockLocation + 5Ch
> +Cr3Location   equLockLocation + 64h
> 
>  
> ;---
> --
> 2.7.4.windows.1

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


Re: [edk2] [PATCH] IntelFsp2Pkg-BaseFspPlatformLib: Remove Boot Loader tempram Migration

2016-07-13 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

Fix typo during submitting patch in description: fucntion to function.

> -Original Message-
> From: Yarlagadda, Satya P
> Sent: Wednesday, July 13, 2016 6:03 AM
> To: edk2-devel@lists.01.org
> Cc: Mudusuru, Giri P <giri.p.mudus...@intel.com>; Yao, Jiewen
> <jiewen@intel.com>
> Subject: [PATCH] IntelFsp2Pkg-BaseFspPlatformLib: Remove Boot Loader
> tempram Migration
> 
> In FSP2.0, Boot loader should migrate its temp ram before
> calling the tempramexit API to tear down the tempram. so, we don't need
> the
> fucntion to migrate the BL TempRam in the IntelFsp2Pkg.
> 
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Cc: Jiewen Yao <jiewen@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Satya Yarlagadda <satya.p.yarlaga...@intel.com>
> ---
>  IntelFsp2Pkg/Include/Library/FspPlatformLib.h  |  9 ---
>  .../Library/BaseFspPlatformLib/FspPlatformMemory.c | 67 -
> -
>  2 files changed, 76 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Include/Library/FspPlatformLib.h
> b/IntelFsp2Pkg/Include/Library/FspPlatformLib.h
> index 9247bd5..61e77bd 100644
> --- a/IntelFsp2Pkg/Include/Library/FspPlatformLib.h
> +++ b/IntelFsp2Pkg/Include/Library/FspPlatformLib.h
> @@ -38,15 +38,6 @@ FspGetSystemMemorySize (
>IN OUT UINT64  *HighMemoryLength
>);
> 
> -/**
> -  Migrate BootLoader data before destroying CAR.
> -
> -**/
> -VOID
> -EFIAPI
> -FspMigrateTemporaryMemory (
> -  VOID
> -  );
> 
>  /**
>Set a new stack frame for the continuation function.
> diff --git a/IntelFsp2Pkg/Library/BaseFspPlatformLib/FspPlatformMemory.c
> b/IntelFsp2Pkg/Library/BaseFspPlatformLib/FspPlatformMemory.c
> index d6684f3..edb8d67 100644
> --- a/IntelFsp2Pkg/Library/BaseFspPlatformLib/FspPlatformMemory.c
> +++ b/IntelFsp2Pkg/Library/BaseFspPlatformLib/FspPlatformMemory.c
> @@ -120,70 +120,3 @@ FspGetSystemMemorySize (
>  Hob.Raw = GET_NEXT_HOB (Hob);
>}
>  }
> -
> -/**
> -  Migrate BootLoader data before destroying CAR.
> -
> -**/
> -VOID
> -EFIAPI
> -FspMigrateTemporaryMemory (
> -  VOID
> - )
> -{
> -  UINT32BootLoaderTempRamStart;
> -  UINT32BootLoaderTempRamEnd;
> -  UINT32BootLoaderTempRamSize;
> -  UINT32OffsetGap;
> -  UINT32FspParamPtr;
> -  VOID  *BootLoaderTempRamHob;
> -  UINT32MemoryInitUpdPtr;
> -  VOID  *PlatformDataPtr;
> -
> -  //
> -  // Get the temporary memory range used by the BootLoader
> -  //
> -  BootLoaderTempRamStart = GetFspCarBase ();
> -  BootLoaderTempRamSize  = GetFspCarSize () -
> PcdGet32(PcdFspTemporaryRamSize);
> -
> -  BootLoaderTempRamEnd   = BootLoaderTempRamStart +
> BootLoaderTempRamSize;
> -
> -  //
> -  // Build a Boot Loader Temporary Memory GUID HOB
> -  //
> -  BootLoaderTempRamHob = (VOID *)AllocatePages (EFI_SIZE_TO_PAGES
> (BootLoaderTempRamSize));
> -  ASSERT(BootLoaderTempRamHob != NULL);
> -
> -  DEBUG ((DEBUG_INFO,
> "FSP_BOOT_LOADER_TEMPORARY_MEMORY_HOB\n"));
> -  DEBUG ((DEBUG_INFO, "FspBootLoaderTemporaryMemory Base : %x\n",
> BootLoaderTempRamStart));
> -  DEBUG ((DEBUG_INFO, "FspBootLoaderTemporaryMemory Size : %x\n",
> BootLoaderTempRamSize));
> -
> -  CopyMem (BootLoaderTempRamHob, (VOID *)BootLoaderTempRamStart,
> BootLoaderTempRamSize);
> -  OffsetGap = (UINT32)BootLoaderTempRamHob -
> BootLoaderTempRamStart;
> -
> -  //
> -  // Fix the FspMemoryinit Parameter Pointers to the new location.
> -  //
> -  FspParamPtr = GetFspApiParameter ();
> -  if ((VOID *)FspParamPtr != NULL && FspParamPtr >=
> BootLoaderTempRamStart &&
> -  FspParamPtr < BootLoaderTempRamEnd) {
> -SetFspApiParameter (FspParamPtr + OffsetGap);
> -  }
> -
> -  //
> -  // Update UPD pointer in FSP Global Data
> -  //
> -  MemoryInitUpdPtr = (UINT32)((UINT32
> *)GetFspMemoryInitUpdDataPointer ());
> -  if (MemoryInitUpdPtr >= BootLoaderTempRamStart &&
> MemoryInitUpdPtr < BootLoaderTempRamEnd) {
> -SetFspMemoryInitUpdDataPointer ((VOID *)(MemoryInitUpdPtr +
> OffsetGap));
> -  }
> -
> -  //
> -  // Update Platform data pointer in FSP Global Data
> -  //
> -  PlatformDataPtr = GetFspPlatformDataPointer ();
> -  if (((UINT32)PlatformDataPtr >= BootLoaderTempRamStart) &&
> -  ((UINT32)PlatformDataPtr <  BootLoaderTempRamEnd)) {
> -SetFspPlatformDataPointer ((UINT8 *)PlatformDataPtr + OffsetGap);
> -  }
> -}
> --
> 2.9.0.windows.1

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


Re: [edk2] [Patch 2/5] IntelFsp2WrapperPkg SecFspWrapperPlatformSecLibSample: Remove MASM/GAS files

2016-07-08 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Gao, Liming
> Sent: Friday, July 8, 2016 7:49 AM
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen....@intel.com>; Mudusuru, Giri P
> <giri.p.mudus...@intel.com>
> Subject: [Patch 2/5] IntelFsp2WrapperPkg
> SecFspWrapperPlatformSecLibSample: Remove MASM/GAS files
> 
> Keep NASM file only for new added modules.
> 
> Cc: Jiewen Yao <jiewen@intel.com>
> Cc: Giri Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao <liming@intel.com>
> ---
>  .../Ia32/PeiCoreEntry.S| 130 
>  .../Ia32/PeiCoreEntry.asm  | 140 
>  .../Ia32/SecEntry.S| 336 
>  .../Ia32/SecEntry.asm  | 353 
> -
>  .../SecFspWrapperPlatformSecLibSample/Ia32/Stack.S |  77 -
>  .../Ia32/Stack.asm |  82 -
>  .../SecFspWrapperPlatformSecLibSample.inf  |   6 -
>  7 files changed, 1124 deletions(-)
>  delete mode 100644
> IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/Ia32/PeiCo
> reEntry.S
>  delete mode 100644
> IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/Ia32/PeiCo
> reEntry.asm
>  delete mode 100644
> IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/Ia32/SecEn
> try.S
>  delete mode 100644
> IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/Ia32/SecEn
> try.asm
>  delete mode 100644
> IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/Ia32/Stack.
> S
>  delete mode 100644
> IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/Ia32/Stack.
> asm
> 
> diff --git
> a/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/Ia32/Pei
> CoreEntry.S
> b/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/Ia32/Pei
> CoreEntry.S
> deleted file mode 100644
> index c35f02b..000
> ---
> a/IntelFsp2WrapperPkg/Library/SecFspWrapperPlatformSecLibSample/Ia32/Pei
> CoreEntry.S
> +++ /dev/null
> @@ -1,130 +0,0 @@
> -#--
> -#
> -# Copyright (c) 2014, Intel Corporation. All rights reserved.
> -# This program and the accompanying materials
> -# are licensed and made available under the terms and conditions of the BSD
> License
> -# which accompanies this distribution.  The full text of the license may be 
> found
> at
> -# 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.
> -#
> -# Module Name:
> -#
> -#  PeiCoreEntry.S
> -#
> -# Abstract:
> -#
> -#   Find and call SecStartup
> -#
> -#--
> -
> -ASM_GLOBAL ASM_PFX(CallPeiCoreEntryPoint)
> -ASM_PFX(CallPeiCoreEntryPoint):
> -  #
> -  # Obtain the hob list pointer
> -  #
> -  movl0x4(%esp), %eax
> -  #
> -  # Obtain the stack information
> -  #   ECX: start of range
> -  #   EDX: end of range
> -  #
> -  movl0x8(%esp), %ecx
> -  movl0xC(%esp), %edx
> -
> -  #
> -  # Platform init
> -  #
> -  pushal
> -  pushl %edx
> -  pushl %ecx
> -  pushl %eax
> -  call  ASM_PFX(PlatformInit)
> -  popl  %eax
> -  popl  %eax
> -  popl  %eax
> -  popal
> -
> -  #
> -  # Set stack top pointer
> -  #
> -  movl%edx, %esp
> -
> -  #
> -  # Push the hob list pointer
> -  #
> -  pushl   %eax
> -
> -  #
> -  # Save the value
> -  #   ECX: start of range
> -  #   EDX: end of range
> -  #
> -  movl%esp, %ebp
> -  pushl   %ecx
> -  pushl   %edx
> -
> -  #
> -  # Push processor count to stack first, then BIST status (AP then BSP)
> -  #
> -  movl$1, %eax
> -  cpuid
> -  shr $16, %ebx
> -  andl$0x00FF, %ebx
> -  cmp $1, %bl
> -  jae PushProcessorCount
> -
> -  #
> -  # Some processors report 0 logical processors.  Effectively 0 = 1.
> -  # So we fix up the processor count
> -  #
> -  inc %ebx
> -
> -PushProcessorCount:
> -  pushl   %ebx
> -
> -  #
> -  # We need to implement a long-term solution for BIST capture.  For now, we
> just copy BSP BIST
> -  # for all processor threads
> -  #
> -  xorl%ecx, %ecx
> -  movb%bl, %cl
> -PushBist:
> -  movd%mm0, %eax
> -  pushl   %eax
> -  loop

Re: [edk2] [Patch 1/5] IntelFsp2WrapperPkg BaseFspWrapperApiLib: Remove MASM/GAS files

2016-07-08 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Gao, Liming
> Sent: Friday, July 8, 2016 7:49 AM
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen....@intel.com>; Mudusuru, Giri P
> <giri.p.mudus...@intel.com>
> Subject: [Patch 1/5] IntelFsp2WrapperPkg BaseFspWrapperApiLib: Remove
> MASM/GAS files
> 
> Keep NASM file only for new added modules.
> 
> Cc: Jiewen Yao <jiewen@intel.com>
> Cc: Giri Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao <liming@intel.com>
> ---
>  .../BaseFspWrapperApiLib/BaseFspWrapperApiLib.inf  |   2 -
>  .../Library/BaseFspWrapperApiLib/X64/Thunk64To32.S | 230 
> -
>  .../BaseFspWrapperApiLib/X64/Thunk64To32.asm   | 230 
> -
>  3 files changed, 462 deletions(-)
>  delete mode 100644
> IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/X64/Thunk64To32.S
>  delete mode 100644
> IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/X64/Thunk64To32.asm
> 
> diff --git
> a/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/BaseFspWrapperApiLib.i
> nf
> b/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/BaseFspWrapperApiLib.i
> nf
> index f2cef05..b52cfeb 100644
> ---
> a/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/BaseFspWrapperApiLib.i
> nf
> +++
> b/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/BaseFspWrapperApiLib.i
> nf
> @@ -43,12 +43,10 @@
>  [Sources.IA32]
>IA32/DispatchExecute.c
> 
>  [Sources.X64]
>X64/DispatchExecute.c
> -  X64/Thunk64To32.asm
> -  X64/Thunk64To32.S
>X64/Thunk64To32.nasm
> 
> 
> #
> ###
>  #
>  # Package Dependency Section - list of Package files that are required for
> diff --git
> a/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/X64/Thunk64To32.S
> b/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/X64/Thunk64To32.S
> deleted file mode 100644
> index b6b5c1a..000
> --- a/IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/X64/Thunk64To32.S
> +++ /dev/null
> @@ -1,230 +0,0 @@
> -#
> -# Copyright (c) 2014, Intel Corporation. All rights reserved.
> -# This program and the accompanying materials
> -# are licensed and made available under the terms and conditions of the BSD
> License
> -# which accompanies this distribution.  The full text of the license may be 
> found
> at
> -# 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.
> -#
> -#
> -# Module Name:
> -#
> -#Thunk64To32.asm
> -#
> -# Abstract:
> -#
> -#   This is the assembly code to transition from long mode to compatibility
> mode to execute 32-bit code and then
> -#   transit back to long mode.
> -#
> -#---
> -
> -#
> -# Procedure:AsmExecute32BitCode
> -#
> -# Input:None
> -#
> -# Output:   None
> -#
> -# Prototype:UINT32
> -#   AsmExecute32BitCode (
> -# IN UINT64   Function,
> -# IN UINT64   Param1,
> -# IN UINT64   Param2,
> -# IN IA32_DESCRIPTOR  *InternalGdtr
> -# );
> -#
> -#
> -# Description:  A thunk function to execute 32-bit code in long mode.
> -#
> -#
> -
> -ASM_GLOBAL ASM_PFX(AsmExecute32BitCode)
> -ASM_PFX(AsmExecute32BitCode):
> -#
> -# save IFLAG and disable it
> -#
> -pushfq
> -cli
> -
> -#
> -# save orignal GDTR and CS
> -#
> -movl%ds, %eax
> -push%rax
> -movl%cs, %eax
> -push%rax
> -subq$0x10, %rsp
> -sgdt(%rsp)
> -#
> -# load internal GDT
> -#
> -lgdt(%r9)
> -#
> -# Save general purpose register and rflag register
> -#
> -pushfq
> -push%rdi
> -push%rsi
> -push%rbp
> -push%rbx
> -
> -#
> -# save CR3
> -#
> -movq%cr3, %rax
> -movq%rax, %rbp
> -
> -#
> -# Prepare the CS and return address for the transition from 32-bit to 
> 64-bit
> mode
> -#
> -movq$0x10, %rax  # load long mode selector
&

Re: [edk2] [Patch 3/5] IntelFsp2Pkg BaseFspDebugLibSerialPort: Remove MASM/GAS files

2016-07-08 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Gao, Liming
> Sent: Friday, July 8, 2016 7:49 AM
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen....@intel.com>; Mudusuru, Giri P
> <giri.p.mudus...@intel.com>
> Subject: [Patch 3/5] IntelFsp2Pkg BaseFspDebugLibSerialPort: Remove
> MASM/GAS files
> 
> Keep NASM file only for new added modules.
> 
> Cc: Jiewen Yao <jiewen@intel.com>
> Cc: Giri Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao <liming@intel.com>
> ---
>  .../BaseFspDebugLibSerialPort.inf  |  2 --
>  .../BaseFspDebugLibSerialPort/Ia32/FspDebug.asm| 34 
> --
>  .../BaseFspDebugLibSerialPort/Ia32/FspDebug.s  | 30 ---
>  3 files changed, 66 deletions(-)
>  delete mode 100644
> IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/Ia32/FspDebug.asm
>  delete mode 100644
> IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/Ia32/FspDebug.s
> 
> diff --git
> a/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/BaseFspDebugLibSerialPort.i
> nf
> b/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/BaseFspDebugLibSerialPort.i
> nf
> index 33e72a6..49adfd8 100644
> ---
> a/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/BaseFspDebugLibSerialPort.i
> nf
> +++
> b/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/BaseFspDebugLibSerialPort.i
> nf
> @@ -27,12 +27,10 @@
>  [Sources]
>DebugLib.c
> 
>  [Sources.Ia32]
>Ia32/FspDebug.nasm
> -  Ia32/FspDebug.asm
> -  Ia32/FspDebug.s
> 
>  [Packages]
>MdePkg/MdePkg.dec
>IntelFsp2Pkg/IntelFsp2Pkg.dec
> 
> diff --git a/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/Ia32/FspDebug.asm
> b/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/Ia32/FspDebug.asm
> deleted file mode 100644
> index 8ac18ec..000
> --- a/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/Ia32/FspDebug.asm
> +++ /dev/null
> @@ -1,34 +0,0 @@
> -;--
> -;
> -; Copyright (c) 2014, Intel Corporation. All rights reserved.
> -; This program and the accompanying materials
> -; are licensed and made available under the terms and conditions of the BSD
> License
> -; which accompanies this distribution.  The full text of the license may be 
> found
> at
> -; 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.
> -;
> -; Abstract:
> -;
> -;   FSP Debug functions
> -;
> -;--
> -
> -.386
> -.model  flat,C
> -.code
> -
> -;--
> -; UINT32 *
> -; EFIAPI
> -; GetStackFramePointer (
> -;   VOID
> -;   );
> -;--
> -GetStackFramePointer  PROC  PUBLIC
> -mov eax, ebp
> -ret
> -GetStackFramePointer  ENDP
> -
> -END
> diff --git a/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/Ia32/FspDebug.s
> b/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/Ia32/FspDebug.s
> deleted file mode 100644
> index 0f8475f..000
> --- a/IntelFsp2Pkg/Library/BaseFspDebugLibSerialPort/Ia32/FspDebug.s
> +++ /dev/null
> @@ -1,30 +0,0 @@
> -#--
> -#
> -# Copyright (c) 2014, Intel Corporation. All rights reserved.
> -# This program and the accompanying materials
> -# are licensed and made available under the terms and conditions of the BSD
> License
> -# which accompanies this distribution.  The full text of the license may be 
> found
> at
> -# 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.
> -#
> -# Abstract:
> -#
> -#   FSP Debug functions
> -#
> -#--
> -
> -#--
> -# UINT32 *
> -# EFIAPI
> -# GetStackFramePointer (
> -#   VOID
> -#   )
> -#--
> -ASM_GLOBAL ASM_PFX(GetStackFramePointer)
> -ASM_PFX(GetStackFramePointer):
> -mov%ebp, %eax
> -ret
> -
> -
> --
> 1.9.5.msysgit.0

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


Re: [edk2] [Patch 4/5] IntelFsp2Pkg BaseFspSwitchStackLib: Remove MASM/GAS files

2016-07-08 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Gao, Liming
> Sent: Friday, July 8, 2016 7:49 AM
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen....@intel.com>; Mudusuru, Giri P
> <giri.p.mudus...@intel.com>
> Subject: [Patch 4/5] IntelFsp2Pkg BaseFspSwitchStackLib: Remove MASM/GAS
> files
> 
> Keep NASM file only for new added modules.
> 
> Cc: Jiewen Yao <jiewen@intel.com>
> Cc: Giri Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao <liming@intel.com>
> ---
>  .../BaseFspSwitchStackLib.inf  |  2 -
>  .../Library/BaseFspSwitchStackLib/Ia32/Stack.asm   | 77 -
>  .../Library/BaseFspSwitchStackLib/Ia32/Stack.s | 78 
> --
>  3 files changed, 157 deletions(-)
>  delete mode 100644
> IntelFsp2Pkg/Library/BaseFspSwitchStackLib/Ia32/Stack.asm
>  delete mode 100644 IntelFsp2Pkg/Library/BaseFspSwitchStackLib/Ia32/Stack.s
> 
> diff --git
> a/IntelFsp2Pkg/Library/BaseFspSwitchStackLib/BaseFspSwitchStackLib.inf
> b/IntelFsp2Pkg/Library/BaseFspSwitchStackLib/BaseFspSwitchStackLib.inf
> index cef8d68..b3c673a 100644
> --- a/IntelFsp2Pkg/Library/BaseFspSwitchStackLib/BaseFspSwitchStackLib.inf
> +++ b/IntelFsp2Pkg/Library/BaseFspSwitchStackLib/BaseFspSwitchStackLib.inf
> @@ -22,12 +22,10 @@
> 
>  [Sources.IA32]
>FspSwitchStackLib.c
> 
>  [Sources.IA32]
> -  Ia32/Stack.asm
> -  Ia32/Stack.s
>Ia32/Stack.nasm
> 
>  [Packages]
>MdePkg/MdePkg.dec
>IntelFsp2Pkg/IntelFsp2Pkg.dec
> diff --git a/IntelFsp2Pkg/Library/BaseFspSwitchStackLib/Ia32/Stack.asm
> b/IntelFsp2Pkg/Library/BaseFspSwitchStackLib/Ia32/Stack.asm
> deleted file mode 100644
> index 1efab52..000
> --- a/IntelFsp2Pkg/Library/BaseFspSwitchStackLib/Ia32/Stack.asm
> +++ /dev/null
> @@ -1,77 +0,0 @@
> -;--
> -;
> -; Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.
> -; This program and the accompanying materials
> -; are licensed and made available under the terms and conditions of the BSD
> License
> -; which accompanies this distribution.  The full text of the license may be 
> found
> at
> -; 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.
> -;
> -; Abstract:
> -;
> -;   Switch the stack from temporary memory to permenent memory.
> -;
> -;--
> -
> -.586p
> -.model  flat,C
> -.code
> -
> -;--
> -; UINT32
> -; EFIAPI
> -; Pei2LoaderSwitchStack (
> -;   VOID
> -;   )
> -;--
> -EXTERNDEF  C   MeasurePoint:PROC
> -Pei2LoaderSwitchStack   PROC C PUBLIC
> -xor eax, eax
> -jmp FspSwitchStack
> -Pei2LoaderSwitchStack   ENDP
> -
> -;--
> -; UINT32
> -; EFIAPI
> -; Loader2PeiSwitchStack (
> -;   VOID
> -;   )
> -;--
> -Loader2PeiSwitchStack   PROC C PUBLIC
> -jmp FspSwitchStack
> -Loader2PeiSwitchStack   ENDP
> -
> -;--
> -; UINT32
> -; EFIAPI
> -; FspSwitchStack (
> -;   VOID
> -;   )
> -;--
> -EXTERNDEF  C   SwapStack:PROC
> -FspSwitchStack   PROC C PUBLIC
> -; Save current contexts
> -pusheax
> -pushfd
> -cli
> -pushad
> -sub esp, 8
> -sidtfword ptr [esp]
> -
> -; Load new stack
> -pushesp
> -callSwapStack
> -mov esp, eax
> -
> -; Restore previous contexts
> -lidtfword ptr [esp]
> -add esp, 8
> -popad
> -popfd
> -add esp, 4
> -ret
> -FspSwitchStack   ENDP
> -
> -END
> diff --git a/IntelFsp2Pkg/Library/BaseFspSwitchStackLib/Ia32/Stack.s
> b/IntelFsp2Pkg/Library/BaseFspSwitchStackLib/Ia32/Stack.s
> deleted file mode 100644
> index a21a5b6..000
> --- a/IntelFsp2Pkg/Library/BaseFspSwitchStackLib/Ia32/Stack.s
> +++ /dev/null
> @@ -1,78 +0,0 @@
> -#-

Re: [edk2] [Patch 5/5] IntelFsp2Pkg SecFspSecPlatformLibNull: Remove MASM/GAS files

2016-07-08 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Gao, Liming
> Sent: Friday, July 8, 2016 7:49 AM
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen....@intel.com>; Mudusuru, Giri P
> <giri.p.mudus...@intel.com>
> Subject: [Patch 5/5] IntelFsp2Pkg SecFspSecPlatformLibNull: Remove
> MASM/GAS files
> 
> Keep NASM file only for new added modules.
> 
> Cc: Jiewen Yao <jiewen@intel.com>
> Cc: Giri Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao <liming@intel.com>
> ---
>  .../SecFspSecPlatformLibNull/Ia32/Flat32.asm   | 131 
> -
>  .../Library/SecFspSecPlatformLibNull/Ia32/Flat32.s | 110 -
>  .../SecFspSecPlatformLibNull/Ia32/SecCarInit.asm   |  51 
>  .../SecFspSecPlatformLibNull/Ia32/SecCarInit.s |  37 --
>  .../SecFspSecPlatformLibNull.inf   |   6 +-
>  5 files changed, 1 insertion(+), 334 deletions(-)
>  delete mode 100644
> IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/Ia32/Flat32.asm
>  delete mode 100644
> IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/Ia32/Flat32.s
>  delete mode 100644
> IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/Ia32/SecCarInit.asm
>  delete mode 100644
> IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/Ia32/SecCarInit.s
> 
> diff --git a/IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/Ia32/Flat32.asm
> b/IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/Ia32/Flat32.asm
> deleted file mode 100644
> index 9f144fc..000
> --- a/IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/Ia32/Flat32.asm
> +++ /dev/null
> @@ -1,131 +0,0 @@
> -;; @file
> -;  This is the code that goes from real-mode to protected mode.
> -;  It consumes the reset vector, configures the stack.
> -;
> -; Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
> -; This program and the accompanying materials
> -; are licensed and made available under the terms and conditions of the BSD
> License
> -; which accompanies this distribution.  The full text of the license may be 
> found
> at
> -; 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 assembler characteristics
> -;
> -.586p
> -.xmm
> -.model flat, c
> -
> -EXTRN   TempRamInitApi:NEAR
> -
> -.code
> -
> -RET_ESI  MACRO
> -
> -  movdesi, mm7  ; restore ESP from MM7
> -  jmp esi
> -
> -ENDM
> -
> -;
> -; Perform early platform initialization
> -;
> -SecPlatformInitPROCNEARPUBLIC
> -
> -  RET_ESI
> -
> -SecPlatformInitENDP
> -
> -;
> -; Protected mode portion initializes stack, configures cache, and calls C 
> entry
> point
> -;
> -
> -;
> -;
> -; Procedure:ProtectedModeEntryPoint
> -;
> -; Input:Executing in 32 Bit Protected (flat) mode
> -;   cs: 0-4GB
> -;   ds: 0-4GB
> -;   es: 0-4GB
> -;   fs: 0-4GB
> -;   gs: 0-4GB
> -;   ss: 0-4GB
> -;
> -; Output:   This function never returns
> -;
> -; Destroys:
> -;   ecx
> -;   edi
> -;   esi
> -;   esp
> -;
> -; Description:
> -;   Perform any essential early platform initilaisation
> -;   Setup a stack
> -;
> -;
> -
> -ProtectedModeEntryPoint PROC NEAR C PUBLIC
> -  ;
> -  ; Dummy function. Consume 2 API to make sure they can be linked.
> -  ;
> -  mov  eax, TempRamInitApi
> -
> -  ; Should never return
> -  jmp  $
> -
> -ProtectedModeEntryPoint ENDP
> -
> -;
> -; ROM-based Global-Descriptor Table for the PEI Phase
> -;
> -align 16
> -PUBLIC  BootGdtTable
> -
> -;
> -; GDT[0]: 0x00: Null entry, never used.
> -;
> -NULL_SELequ $ - GDT_BASE; Selector [0]
> -GDT_BASE:
> -BootGdtTableDD  0
> -DD  0
> -;
> -; Linear code segment descriptor
> -;
> -LINEAR_CODE_SEL equ $ - GDT_BASE; Selector [0x8]
> -DW  0h  ; limit 0x
> -DW  0   ; base 0
> -DB  0
> -DB  09Bh; present, ring 0, data, 
> expand-up, not-writable
> - 

Re: [edk2] Intel FSP Firmware Volume content

2016-07-08 Thread Mudusuru, Giri P
Hi Marvin, Rafael,

Thank you for your studies on FSP. 

FSP is a self-contained binary. Since the silicon code implementation is based 
on edk2, some modules are redundant like PeiCore, DxeIpl as Rafael explained 
below (Thanks Rafael). 
While it is redundant, it is a small price to make FSP binary pluggable into 
different bootloaders (EDK2, Coreboot etc...)

Also entire FSP is implemented in PEI phase and DXE code is built in Dual mode 
(DXE and PEI for FSP) which is why you see *DxeFsp

Hope this clarifies your questions

Thanks and Regards,
-Giri

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Rafael
> Machado
> Sent: Thursday, July 7, 2016 4:31 AM
> To: Marvin H?user ; edk2-devel@lists.01.org
> Cc: Yao, Jiewen 
> Subject: Re: [edk2] Intel FSP Firmware Volume content
> 
> Hi Marvin
> 
> I'm also starting my studies on FSP, but I think I can help with at least
> one of the questions.
> About the two Sec cores.
> 
> The existence of two sec cores represents what is called "FSP Normal Boot"
> There is the main sec core, and another sec core that is placed inside the
> FspInitPei. They communicate to each other so the needed information is
> passed correctly.
> 
> Each sec core has it's responsibilities, so they don't do the same thing.
> 
> Hope this can help you to find more information.
> 
> Thanks and Regards
> Rafael R. Machado
> 
> 
> 
> Em qua, 6 de jul de 2016 às 20:40, Marvin H?user
> 
> escreveu:
> 
> > Dear EDK2 community members,
> >
> > Recently, I have gained interest in the Intel FSP and have been reading
> > the Intel documents regarding its design and integration with EDK2.
> > In the white paper 'A Tour Beyond BIOS Using the Intel(r) Firmware Support
> > Package with the EFI Developer Kit II', the chapter 'FSP Wrapper Boot Flow'
> > mentions different ways of how SecCore and following can interact with FSP.
> > This, in my opinion, implies that SecCore is present in source-form (likely
> > IntelFspWrapperPkg/FspWrapperSecCore), while the actual silicon
> > initialization is of course within the FSP binary. This is how I understood
> > it and thought it made sense.
> > However, when I opened a few of the FSP Firmware Volume files, I
> > discovered that it did not only have the FSP header and initialization
> > PEIMs/drivers, but also SecCore, PeiCore and FspDxeIpl embedded. For what
> > reason are these generic modules embedded? Until discovering them within
> > the image, I had assumed these would be provided by the consumer package.
> > To better understand the creation and consumption of Intel FSP, I have
> > looked at Quark and Braswell Reference Codes provided within the
> > edk2-platforms tree. BraswellPlatformPkg, which consumes BSWFSP.fd that
> has
> > SecCore embedded, also consumes FspWrapperSecCore (seen here:
> > https://github.com/tianocore/edk2-platforms/blob/pentium-celeron-n-
> udk2015/BraswellPlatformPkg/PlatformPkg.fdf#L387)
> > from the source tree. If I am not mistaken, building it would end up having
> > SecCore duplicated - once as part of the FSP volume (binary) and once
> > within the FVRECOVERY volume (source). As SecCore includes the Reset
> > Vector, wouldn't one of the two be obsolete as it would never be invoked?
> > The same applies to PeiCore and a few other generic modules which are part
> > oft he chain.
> >
> > Furthermore, a couple of modules that have 'Dxe' in their name are
> > declared as PEI module in their FFS header, for example 'PchInitDxeFsp'. I
> > have observed this in all FSP version I have looked at, including Braswell,
> > Broadwell and Ivy Bridge. Is there any special reason for that? Is it
> > because the FSP initialization code is what has them loaded and called, so
> > it doesn't matter?
> >
> > Please forgive me for my ignorance and thank you in advance for your time!
> >
> > Best regards,
> > Marvin.
> > ___
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
> >
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 07/16] SecurityPkg: Series of patches to fix typos - availabe to available

2016-07-07 Thread Mudusuru, Giri P
Sure, will send updated V2 patch with copyrights updated

Thanks,
-Giri

> -Original Message-
> From: Zhang, Chao B
> Sent: Thursday, July 7, 2016 1:34 AM
> To: Mudusuru, Giri P <giri.p.mudus...@intel.com>; edk2-devel@lists.01.org
> Subject: RE: [edk2] [PATCH 07/16] SecurityPkg: Series of patches to fix typos 
> -
> availabe to available
> 
> Giri:
>Please update copyright. Others are good to me.
> 
> 
> 
> 
> 
> 
> Thanks & Best regards
> Chao Zhang
> 
> 
> -Original Message-
> From: Mudusuru, Giri P
> Sent: Thursday, July 07, 2016 3:48 PM
> To: edk2-devel@lists.01.org
> Cc: Zhang, Chao B
> Subject: [edk2] [PATCH 07/16] SecurityPkg: Series of patches to fix typos -
> availabe to available
> 
> Cc: Chao Zhang <chao.b.zh...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Giri P Mudusuru <giri.p.mudus...@intel.com>
> ---
>  SecurityPkg/Hash2DxeCrypto/Driver.c | 2 +-
>  SecurityPkg/Hash2DxeCrypto/Driver.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/SecurityPkg/Hash2DxeCrypto/Driver.c
> b/SecurityPkg/Hash2DxeCrypto/Driver.c
> index ba2fe6a..df0c416 100644
> --- a/SecurityPkg/Hash2DxeCrypto/Driver.c
> +++ b/SecurityPkg/Hash2DxeCrypto/Driver.c
> @@ -30,7 +30,7 @@ EFI_SERVICE_BINDING_PROTOCOL
> mHash2ServiceBindingProtocol = {
> 
>@retval EFI_SUCCES The protocol was added to ChildHandle.
>@retval EFI_INVALID_PARAMETER  ChildHandle is NULL.
> -  @retval EFI_OUT_OF_RESOURCES   There are not enough resources
> availabe to
> +  @retval EFI_OUT_OF_RESOURCES   There are not enough resources
> available to
>   create the child.
>@retval Others The child handle was not created.
> 
> diff --git a/SecurityPkg/Hash2DxeCrypto/Driver.h
> b/SecurityPkg/Hash2DxeCrypto/Driver.h
> index a145858..c0a2087 100644
> --- a/SecurityPkg/Hash2DxeCrypto/Driver.h
> +++ b/SecurityPkg/Hash2DxeCrypto/Driver.h
> @@ -87,7 +87,7 @@ typedef struct {
> 
>@retval EFI_SUCCES The protocol was added to ChildHandle.
>@retval EFI_INVALID_PARAMETER  ChildHandle is NULL.
> -  @retval EFI_OUT_OF_RESOURCES   There are not enough resources
> availabe to
> +  @retval EFI_OUT_OF_RESOURCES   There are not enough resources
> available to
>   create the child.
>@retval Others The child handle was not created.
> 
> --
> 2.9.0.windows.1

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


Re: [edk2] [PATCH 14/16] OvmfPkg: Series of patches to fix typos - accessibla to accessible - exeuction to execution - iff to if

2016-07-07 Thread Mudusuru, Giri P
Thanks Laszlo for your comments. Will send updated patch addressing your 
comments.

Thanks,
-Giri

> -Original Message-
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: Thursday, July 7, 2016 2:00 AM
> To: Mudusuru, Giri P <giri.p.mudus...@intel.com>
> Cc: edk2-de...@ml01.01.org; Justen, Jordan L <jordan.l.jus...@intel.com>
> Subject: Re: [edk2] [PATCH 14/16] OvmfPkg: Series of patches to fix typos -
> accessibla to accessible - exeuction to execution - iff to if
> 
> Giri,
> 
> On 07/07/16 09:47, Giri P Mudusuru wrote:
> > Cc: Jordan Justen <jordan.l.jus...@intel.com>
> > Cc: Laszlo Ersek <ler...@redhat.com>
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Giri P Mudusuru <giri.p.mudus...@intel.com>
> > ---
> >  OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c | 2 +-
> >  OvmfPkg/Include/IndustryStandard/Xen/arch-arm/xen.h | 2 +-
> >  OvmfPkg/SmmAccess/SmramInternal.c   | 4 ++--
> >  OvmfPkg/SmmAccess/SmramInternal.h   | 4 ++--
> >  OvmfPkg/VirtioBlkDxe/VirtioBlk.c| 8 
> >  OvmfPkg/VirtioBlkDxe/VirtioBlk.h| 4 ++--
> >  OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c| 2 +-
> >  OvmfPkg/XenIoPciDxe/XenIoPciDxe.c   | 2 +-
> >  8 files changed, 14 insertions(+), 14 deletions(-)
> 
> thanks for this contribution. I have some comments:
> 
> (1) The subject line is way too long. It should be 74 characters tops
> (maybe a bit more, 76-78, if it's simply impossible to squeeze the
> information in 74 characters).
> 
> (2) The subject line is not correct. First, it is just one patch for
> OvmfPkg, not a series of patches. Second, you don't need to list all the
> typos you fix. I think the following would be better, as subject:
> 
> OvmfPkg: fix typos
> 
> and in the commit message body you can summarize the typos that you fix.
> 
> (3) The word "iff" is not a typo. It means "if and only if". Please
> refer to:
> 
> https://en.wiktionary.org/wiki/iff
> 
> (4) In the commit message, the various labels (Cc:, Contributed-under:,
> Signed-off-by:) should be indented fully to the left.
> 
> I think you used "git show" to see an example, and copied that block
> into your commit message. That's okay, but "git show" automatically
> indents the commit message by 4 spaces, so you have to undo that when
> pasting.
> 
> Thank you,
> Laszlo
> 
> 
> >
> > diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
> b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
> > index faaff37..5ab8b8c 100644
> > --- a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
> > +++ b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
> > @@ -35,7 +35,7 @@ typedef struct {
> >  // key.
> >UINTN   Size; // The number of bytes in this 
> > blob.
> >UINT8   *Base;// Pointer to the blob data.
> > -  BOOLEAN HostsOnlyTableData;   // TRUE iff the blob has been 
> > found to
> > +  BOOLEAN HostsOnlyTableData;   // TRUE if the blob has been found 
> > to
> >  // only contain data that is 
> > directly
> >  // part of ACPI tables.
> >  } BLOB;
> > diff --git a/OvmfPkg/Include/IndustryStandard/Xen/arch-arm/xen.h
> b/OvmfPkg/Include/IndustryStandard/Xen/arch-arm/xen.h
> > index 625a0fc..83615a9 100644
> > --- a/OvmfPkg/Include/IndustryStandard/Xen/arch-arm/xen.h
> > +++ b/OvmfPkg/Include/IndustryStandard/Xen/arch-arm/xen.h
> > @@ -341,7 +341,7 @@ typedef UINT64 xen_callback_t;
> >  #define PSR_MODE_SYS 0x1f
> >
> >  /* 64 bit modes */
> > -#define PSR_MODE_BIT  0x10 /* Set iff AArch32 */
> > +#define PSR_MODE_BIT  0x10 /* Set if AArch32 */
> >  #define PSR_MODE_EL3h 0x0d
> >  #define PSR_MODE_EL3t 0x0c
> >  #define PSR_MODE_EL2h 0x09
> > diff --git a/OvmfPkg/SmmAccess/SmramInternal.c
> b/OvmfPkg/SmmAccess/SmramInternal.c
> > index c3267ca..d31056f 100644
> > --- a/OvmfPkg/SmmAccess/SmramInternal.c
> > +++ b/OvmfPkg/SmmAccess/SmramInternal.c
> > @@ -30,10 +30,10 @@
> >the LockState and OpenState fields being up-to-date on entry, and they 
> > need
> >to restore the same invariant on exit, if they touch the bits in 
> > question.
> >
> > -  @param[out] LockState  Reflects the D_LCK bit on output; TRUE iff SMRAM
> is
> > +  @param[out] LockState  Reflects the D_LCK bit on output; TRUE if SMRAM

Re: [edk2] [PATCH 06/16] StdLib: Series of patches to fix typos - availabe to available

2016-07-07 Thread Mudusuru, Giri P
Thanks Daryl. These seem to be implementation typos. I just cross checked in 
spec and it looks good.

Thanks,
-Giri

> -Original Message-
> From: Daryl McDaniel [mailto:edk2-li...@mc2research.org]
> Sent: Thursday, July 7, 2016 9:42 AM
> To: Carsey, Jaben <jaben.car...@intel.com>; Mudusuru, Giri P
> <giri.p.mudus...@intel.com>; edk2-devel@lists.01.org
> Subject: RE: [edk2] [PATCH 06/16] StdLib: Series of patches to fix typos -
> availabe to available
> 
> Someone should also check the UEFI file where these return values are defined
> and make sure that the typo isn't there too.
> 
> Reviewed-by: Daryl McDaniel <edk2-li...@mc2research.org>
> 
> 
> Daryl McDaniel
> 
> > -Original Message-
> > From: Carsey, Jaben [mailto:jaben.car...@intel.com]
> > Sent: Thursday, July 07, 2016 7:47 AM
> > To: Mudusuru, Giri P <giri.p.mudus...@intel.com>; edk2-devel@lists.01.org
> > Cc: Daryl McDaniel <edk2-li...@mc2research.org>; Carsey, Jaben
> > <jaben.car...@intel.com>
> > Subject: RE: [edk2] [PATCH 06/16] StdLib: Series of patches to fix typos -
> > availabe to available
> >
> > Reviewed-by: Jaben Carsey <jaben.car...@intel.com>
> >
> > > -Original Message-
> > > From: Mudusuru, Giri P
> > > Sent: Thursday, July 07, 2016 12:48 AM
> > > To: edk2-devel@lists.01.org
> > > Cc: Carsey, Jaben <jaben.car...@intel.com>; Daryl McDaniel  > > li...@mc2research.org>
> > > Subject: [edk2] [PATCH 06/16] StdLib: Series of patches to fix typos -
> availabe
> > > to available
> > > Importance: High
> > >
> > > Cc: Jaben Carsey <jaben.car...@intel.com>
> > > Cc: Daryl McDaniel <edk2-li...@mc2research.org>
> > > Contributed-under: TianoCore Contribution Agreement 1.0
> > > Signed-off-by: Giri P Mudusuru <giri.p.mudus...@intel.com>
> > > ---
> > >  StdLib/EfiSocketLib/DxeSupport.c  | 2 +-
> > >  StdLib/Include/Efi/EfiSocketLib.h | 2 +-
> > >  2 files changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/StdLib/EfiSocketLib/DxeSupport.c
> > > b/StdLib/EfiSocketLib/DxeSupport.c
> > > index 808b710..9630aed 100644
> > > --- a/StdLib/EfiSocketLib/DxeSupport.c
> > > +++ b/StdLib/EfiSocketLib/DxeSupport.c
> > > @@ -32,7 +32,7 @@
> > >
> > >@retval EFI_SUCCESS   The protocol was added to ChildHandle.
> > >@retval EFI_INVALID_PARAMETER ChildHandle is NULL.
> > > -  @retval EFI_OUT_OF_RESOURCES  There are not enough resources
> > > availabe to create
> > > +  @retval EFI_OUT_OF_RESOURCES  There are not enough resources
> > > available to create
> > >  the child
> > >@retval other The child handle was not created
> > >
> > > diff --git a/StdLib/Include/Efi/EfiSocketLib.h
> > > b/StdLib/Include/Efi/EfiSocketLib.h
> > > index 7618d02..73288af 100644
> > > --- a/StdLib/Include/Efi/EfiSocketLib.h
> > > +++ b/StdLib/Include/Efi/EfiSocketLib.h
> > > @@ -185,7 +185,7 @@ extern CONST UINTN cEslSocketBindingEntries;
> > > ///<  Number of network serv
> > >
> > >@retval EFI_SUCCESS   The protocol was added to ChildHandle.
> > >@retval EFI_INVALID_PARAMETER ChildHandle is NULL.
> > > -  @retval EFI_OUT_OF_RESOURCES  There are not enough resources
> > > availabe to create
> > > +  @retval EFI_OUT_OF_RESOURCES  There are not enough resources
> > > available to create
> > >  the child
> > >@retval other The child handle was not created
> > >
> > > --
> > > 2.9.0.windows.1

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


Re: [edk2] [Patch 3/3] UefiCpuPkg/CpuMpPei: Remove unnecessary variable

2016-07-01 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Fan, Jeff
> Sent: Friday, July 1, 2016 12:02 AM
> To: edk2-de...@ml01.01.org
> Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Tian, Feng
> <feng.t...@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>
> Subject: [Patch 3/3] UefiCpuPkg/CpuMpPei: Remove unnecessary variable
> 
> Cc: Michael Kinney <michael.d.kin...@intel.com>
> Cc: Feng Tian <feng.t...@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff@intel.com>
> ---
>  UefiCpuPkg/CpuMpPei/Microcode.c | 3 ---
>  UefiCpuPkg/CpuMpPei/Microcode.h | 1 -
>  2 files changed, 4 deletions(-)
> 
> diff --git a/UefiCpuPkg/CpuMpPei/Microcode.c
> b/UefiCpuPkg/CpuMpPei/Microcode.c
> index 51a0737..f91f658 100644
> --- a/UefiCpuPkg/CpuMpPei/Microcode.c
> +++ b/UefiCpuPkg/CpuMpPei/Microcode.c
> @@ -209,8 +209,5 @@ MicrocodeDetect (
>  loaded microcode signature [0x%08x]\n", CurrentRevision,
> LatestRevision));
>ReleaseSpinLock(>MpLock);
>  }
> -MicrocodeInfo.Load = TRUE;
> -  } else {
> -MicrocodeInfo.Load = FALSE;
>}
>  }
> diff --git a/UefiCpuPkg/CpuMpPei/Microcode.h
> b/UefiCpuPkg/CpuMpPei/Microcode.h
> index f7d23a0..9656045 100644
> --- a/UefiCpuPkg/CpuMpPei/Microcode.h
> +++ b/UefiCpuPkg/CpuMpPei/Microcode.h
> @@ -25,7 +25,6 @@ typedef struct {
>VOID *MicrocodeData;
>UINTNMicrocodeSize;
>UINT32   ProcessorId;
> -  BOOLEAN  Load;
>  } MICROCODE_INFO;
> 
>  //
> --
> 2.7.4.windows.1

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


Re: [edk2] [Patch 2/3] UefiCpuPkg/CpuMpPei: Dump message if microcode signature not matched

2016-07-01 Thread Mudusuru, Giri P
Thanks Jeff, 
Please use @param[in] instead of @param.

Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Fan, Jeff
> Sent: Friday, July 1, 2016 12:02 AM
> To: edk2-de...@ml01.01.org
> Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Tian, Feng
> <feng.t...@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>
> Subject: [Patch 2/3] UefiCpuPkg/CpuMpPei: Dump message if microcode
> signature not matched
> 
> Verification microcode signature is one enhancement and not one
> requirement from
> IA32 SDM. This update is just to dump debug message instead of ASSERT() if
> the
> updated microcode signature does not match the loaded microcode
> signature.
> 
> Cc: Michael Kinney <michael.d.kin...@intel.com>
> Cc: Feng Tian <feng.t...@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff@intel.com>
> ---
>  UefiCpuPkg/CpuMpPei/CpuMpPei.c  |  4 ++--
>  UefiCpuPkg/CpuMpPei/CpuMpPei.h  | 10 ++
>  UefiCpuPkg/CpuMpPei/Microcode.c | 33 +++
> --
>  UefiCpuPkg/CpuMpPei/Microcode.h |  9 -
>  4 files changed, 31 insertions(+), 25 deletions(-)
> 
> diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.c
> b/UefiCpuPkg/CpuMpPei/CpuMpPei.c
> index 4ed1da9..bccff24 100644
> --- a/UefiCpuPkg/CpuMpPei/CpuMpPei.c
> +++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.c
> @@ -302,7 +302,7 @@ ApCFunction (
>// Sync BSP's Mtrr table to all wakeup APs and load microcode on APs.
>//
>MtrrSetAllMtrrs (>MtrrTable);
> -  MicrocodeDetect ();
> +  MicrocodeDetect (PeiCpuMpData);
>PeiCpuMpData->CpuData[ProcessorNumber].State = CpuStateIdle;
>  } else {
>//
> @@ -624,7 +624,7 @@ CountProcessorNumber (
>//
>// Load Microcode on BSP
>//
> -  MicrocodeDetect ();
> +  MicrocodeDetect (PeiCpuMpData);
>//
>// Store BSP's MTRR setting
>//
> diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.h
> b/UefiCpuPkg/CpuMpPei/CpuMpPei.h
> index afbcb6e..5e56934 100644
> --- a/UefiCpuPkg/CpuMpPei/CpuMpPei.h
> +++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.h
> @@ -321,4 +321,14 @@ SecPlatformInformation2 (
>   OUT EFI_SEC_PLATFORM_INFORMATION_RECORD2
> *PlatformInformationRecord2
>);
> 
> +/**
> +  Detect whether specified processor can find matching microcode patch
> and load it.
> +
> +  @param PeiCpuMpDataPointer to PEI CPU MP Data
> +**/
> +VOID
> +MicrocodeDetect (
> +  IN PEI_CPU_MP_DATA*PeiCpuMpData
> +  );
> +
>  #endif
> diff --git a/UefiCpuPkg/CpuMpPei/Microcode.c
> b/UefiCpuPkg/CpuMpPei/Microcode.c
> index 8e7f3b0..51a0737 100644
> --- a/UefiCpuPkg/CpuMpPei/Microcode.c
> +++ b/UefiCpuPkg/CpuMpPei/Microcode.c
> @@ -36,10 +36,11 @@ GetCurrentMicrocodeSignature (
>  /**
>Detect whether specified processor can find matching microcode patch and
> load it.
> 
> +  @param PeiCpuMpDataPointer to PEI CPU MP Data
>  **/
>  VOID
>  MicrocodeDetect (
> -  VOID
> +  IN PEI_CPU_MP_DATA*PeiCpuMpData
>)
>  {
>UINT64  MicrocodePatchAddress;
> @@ -187,25 +188,29 @@ MicrocodeDetect (
>  MicrocodeEntryPoint = (EFI_CPU_MICROCODE_HEADER *) (((UINTN)
> MicrocodeEntryPoint) + TotalSize);
>} while (((UINTN) MicrocodeEntryPoint < MicrocodeEnd));
> 
> -  if (LatestRevision > 0) {
> +  if (LatestRevision > CurrentRevision) {
>  //
>  // BIOS only authenticate updates that contain a numerically larger 
> revision
>  // than the currently loaded revision, where Current Signature < New
> Update
>  // Revision. A processor with no loaded update is considered to have a
>  // revision equal to zero.
>  //
> -if (LatestRevision > GetCurrentMicrocodeSignature ()) {
> -  AsmWriteMsr64 (
> -EFI_MSR_IA32_BIOS_UPDT_TRIG,
> -(UINT64) (UINTN) MicrocodeInfo.MicrocodeData
> -);
> -  //
> -  // Get and verify new microcode signature
> -  //
> -  ASSERT (LatestRevision == GetCurrentMicrocodeSignature ());
> -  MicrocodeInfo.Load = TRUE;
> -} else {
> -  MicrocodeInfo.Load = FALSE;
> +AsmWriteMsr64 (
> +  EFI_MSR_IA32_BIOS_UPDT_TRIG,
> +  (UINT64) (UINTN) MicrocodeInfo.MicrocodeData
> +  );
> +//
> +// Get and check new microcode signature
> +//
> +CurrentRevision = GetCurrentMicrocodeSignature ();
> +if (CurrentRevision != LatestRevision) {
> +  AcquireSpinLock(>MpLock);
> +  DEBUG ((EFI_D_ERROR, 

Re: [edk2] [Patch 1/3] UefiCpuPkg/CpuMpPei: Skip microcode check/load if it has been loaded

2016-07-01 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> 

> -Original Message-
> From: Fan, Jeff
> Sent: Friday, July 1, 2016 12:02 AM
> To: edk2-de...@ml01.01.org
> Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Tian, Feng
> <feng.t...@intel.com>; Mudusuru, Giri P <giri.p.mudus...@intel.com>
> Subject: [Patch 1/3] UefiCpuPkg/CpuMpPei: Skip microcode check/load if it
> has been loaded
> 
> Actually, there is only one microcode region in platform. If microcode has
> been
> loaded, its signature will not be zero and should be loaded successfully.
> We needn't to check microcode region and load microcode again. This update
> is to
> skip checking/loading microcode if current microcode signature is not zero.
> 
> Cc: Michael Kinney <michael.d.kin...@intel.com>
> Cc: Feng Tian <feng.t...@intel.com>
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jeff Fan <jeff@intel.com>
> ---
>  UefiCpuPkg/CpuMpPei/Microcode.c | 9 +
>  1 file changed, 9 insertions(+)
> 
> diff --git a/UefiCpuPkg/CpuMpPei/Microcode.c
> b/UefiCpuPkg/CpuMpPei/Microcode.c
> index 9dcbf99..8e7f3b0 100644
> --- a/UefiCpuPkg/CpuMpPei/Microcode.c
> +++ b/UefiCpuPkg/CpuMpPei/Microcode.c
> @@ -53,6 +53,7 @@ MicrocodeDetect (
>UINTN   Index;
>UINT8   PlatformId;
>UINT32  RegEax;
> +  UINT32  CurrentRevision;
>UINT32  LatestRevision;
>UINTN   TotalSize;
>UINT32  CheckSum32;
> @@ -69,6 +70,14 @@ MicrocodeDetect (
>  return;
>}
> 
> +  CurrentRevision = GetCurrentMicrocodeSignature ();
> +  if (CurrentRevision != 0) {
> +//
> +// Skip loading microcode if it has been loaded successfully
> +//
> +return;
> +  }
> +
>ExtendedTableLength = 0;
>//
>// Here data of CPUID leafs have not been collected into context buffer, so
> --
> 2.7.4.windows.1

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


Re: [edk2] [PATCH 1/6] EdkCompatibilityPkg: fix ASSERT_EFI_ERROR() typos

2016-06-30 Thread Mudusuru, Giri P
Thanks Laszlo for notifying. Sorry, it was by accident and didn't mean to send 
multiple R-b's :)

Thanks,
-Giri

> -Original Message-
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: Thursday, June 30, 2016 3:23 AM
> To: Mudusuru, Giri P <giri.p.mudus...@intel.com>
> Cc: Gao, Liming <liming@intel.com>; edk2-devel-01  de...@ml01.01.org>
> Subject: Re: [edk2] [PATCH 1/6] EdkCompatibilityPkg: fix
> ASSERT_EFI_ERROR() typos
> 
> Hi Giri,
> 
> On 06/30/16 06:40, Mudusuru, Giri P wrote:
> > Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com>
> 
> Thank you for the reviews -- I did find and pick up your R-b messages
> soon after you sent them.
> 
> There's no need to send repeated R-b's to the same patches. For example,
> this patch has two R-b's from you at the moment:
> 
> http://thread.gmane.org/gmane.comp.bios.edk2.devel/13736/focus=13764
> http://thread.gmane.org/gmane.comp.bios.edk2.devel/13736/focus=13884
> 
> I've been waiting for a maintainer R-b for patch #4 -- that's the one
> piece missing for me to commit the series.
> 
> Thank you
> Laszlo

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


Re: [edk2] [PATCH 2/6] NetworkPkg: fix ASSERT_EFI_ERROR() typos

2016-06-29 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru  

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Wu, Jiaxin
> Sent: Wednesday, June 29, 2016 2:35 AM
> To: Laszlo Ersek ; edk2-devel-01  de...@ml01.01.org>
> Cc: Fu, Siyuan 
> Subject: Re: [edk2] [PATCH 2/6] NetworkPkg: fix ASSERT_EFI_ERROR() typos
> 
> Reviewed-By: Wu Jiaxin 
> 
> Best Regards!
> Jiaxin
> 
> > -Original Message-
> > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> > Laszlo Ersek
> > Sent: Tuesday, June 28, 2016 9:26 PM
> > To: edk2-devel-01 
> > Cc: Fu, Siyuan ; Wu, Jiaxin 
> > Subject: [edk2] [PATCH 2/6] NetworkPkg: fix ASSERT_EFI_ERROR() typos
> >
> > A number of code locations use
> >
> >   ASSERT_EFI_ERROR (BooleanExpression)
> >
> > instead of
> >
> >   ASSERT (BooleanExpression)
> >
> > Fix them.
> >
> > Cc: Siyuan Fu 
> > Cc: Jiaxin Wu 
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Laszlo Ersek 
> > ---
> >
> > Notes:
> > build tested only
> >
> >  NetworkPkg/IpSecDxe/Ikev2/Sa.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/NetworkPkg/IpSecDxe/Ikev2/Sa.c
> > b/NetworkPkg/IpSecDxe/Ikev2/Sa.c index 74ef79c23719..4cbfac33b134
> > 100644
> > --- a/NetworkPkg/IpSecDxe/Ikev2/Sa.c
> > +++ b/NetworkPkg/IpSecDxe/Ikev2/Sa.c
> > @@ -384,7 +384,7 @@ Ikev2InitPskParser (
> >  // 5. Generate Nr_b
> >  //
> >  IkeSaSession->NrBlock   = IkeGenerateNonce (IKE_NONCE_SIZE);
> > -ASSERT_EFI_ERROR (IkeSaSession->NrBlock != NULL);
> > +ASSERT (IkeSaSession->NrBlock != NULL);
> >  IkeSaSession->NrBlkSize = IKE_NONCE_SIZE;
> >
> >  //
> > --
> > 1.8.3.1
> >
> >
> > ___
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 5/6] UefiCpuPkg: fix ASSERT_EFI_ERROR() typos

2016-06-29 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru  

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Kinney, Michael D
> Sent: Wednesday, June 29, 2016 2:26 PM
> To: Laszlo Ersek ; edk2-devel-01  de...@ml01.01.org>; Kinney, Michael D 
> Cc: Fan, Jeff 
> Subject: Re: [edk2] [PATCH 5/6] UefiCpuPkg: fix ASSERT_EFI_ERROR() typos
> 
> Reviewed-by: Michael Kinney 
> 
> Mike
> 
> > -Original Message-
> > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Laszlo Ersek
> > Sent: Tuesday, June 28, 2016 6:26 AM
> > To: edk2-devel-01 
> > Cc: Fan, Jeff 
> > Subject: [edk2] [PATCH 5/6] UefiCpuPkg: fix ASSERT_EFI_ERROR() typos
> >
> > A number of code locations use
> >
> >   ASSERT_EFI_ERROR (BooleanExpression)
> >
> > instead of
> >
> >   ASSERT (BooleanExpression)
> >
> > Fix them.
> >
> > Cc: Jeff Fan 
> > Reported-by: Gerd Hoffmann 
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Laszlo Ersek 
> > ---
> >  UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmProfileArch.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmProfileArch.c
> > b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmProfileArch.c
> > index 79e23ef6476e..065fb2c24c7d 100644
> > --- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmProfileArch.c
> > +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmProfileArch.c
> > @@ -78,7 +78,7 @@ InitPagesForPFHandler (
> >//
> >Address = NULL;
> >Address = AllocatePages (MAX_PF_PAGE_COUNT);
> > -  ASSERT_EFI_ERROR (Address != NULL);
> > +  ASSERT (Address != NULL);
> >
> >mPFPageBuffer =  (UINT64)(UINTN) Address;
> >mPFPageIndex = 0;
> > --
> > 1.8.3.1
> >
> >
> > ___
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 3/6] QuarkPlatformPkg: fix ASSERT_EFI_ERROR() typos

2016-06-29 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru  

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Kinney, Michael D
> Sent: Wednesday, June 29, 2016 2:27 PM
> To: Laszlo Ersek ; edk2-devel-01  de...@ml01.01.org>; Kinney, Michael D 
> Subject: Re: [edk2] [PATCH 3/6] QuarkPlatformPkg: fix ASSERT_EFI_ERROR()
> typos
> 
> Reviewed-by: Michael Kinney 
> 
> Mike
> 
> > -Original Message-
> > From: Laszlo Ersek [mailto:ler...@redhat.com]
> > Sent: Tuesday, June 28, 2016 6:26 AM
> > To: edk2-devel-01 
> > Cc: Kinney, Michael D ; Steele, Kelly
> > 
> > Subject: [PATCH 3/6] QuarkPlatformPkg: fix ASSERT_EFI_ERROR() typos
> >
> > A number of code locations use
> >
> >   ASSERT_EFI_ERROR (BooleanExpression)
> >
> > instead of
> >
> >   ASSERT (BooleanExpression)
> >
> > Fix them.
> >
> > Cc: Michael D Kinney 
> > Cc: Kelly Steele 
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Laszlo Ersek 
> > ---
> >
> > Notes:
> > not even build tested
> >
> >  QuarkPlatformPkg/Acpi/Dxe/AcpiPlatform/AcpiPlatform.c  | 2 +-
> >  QuarkPlatformPkg/Acpi/Dxe/AcpiPlatform/MadtPlatform.c  | 2 +-
> >  QuarkPlatformPkg/Library/PlatformHelperLib/PlatformHelperDxe.c | 2 +-
> >  QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c| 2 +-
> >  4 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/QuarkPlatformPkg/Acpi/Dxe/AcpiPlatform/AcpiPlatform.c
> > b/QuarkPlatformPkg/Acpi/Dxe/AcpiPlatform/AcpiPlatform.c
> > index 309eb041ee92..36300efd3146 100644
> > --- a/QuarkPlatformPkg/Acpi/Dxe/AcpiPlatform/AcpiPlatform.c
> > +++ b/QuarkPlatformPkg/Acpi/Dxe/AcpiPlatform/AcpiPlatform.c
> > @@ -680,7 +680,7 @@ AcpiPlatformEntryPoint (
> >// Init Pci Device PRT PRW information structure from PCD
> >//
> >mConfigData = (PCI_DEVICE_SETTING *)AllocateZeroPool (sizeof
> (PCI_DEVICE_SETTING));
> > -  ASSERT_EFI_ERROR (mConfigData);
> > +  ASSERT (mConfigData != NULL);
> >InitPciDeviceInfoStructure (mConfigData);
> >//
> >// Get the Acpi SDT protocol for manipulation on acpi table
> > diff --git a/QuarkPlatformPkg/Acpi/Dxe/AcpiPlatform/MadtPlatform.c
> > b/QuarkPlatformPkg/Acpi/Dxe/AcpiPlatform/MadtPlatform.c
> > index 11781e03f4c5..98035bedd58f 100644
> > --- a/QuarkPlatformPkg/Acpi/Dxe/AcpiPlatform/MadtPlatform.c
> > +++ b/QuarkPlatformPkg/Acpi/Dxe/AcpiPlatform/MadtPlatform.c
> > @@ -218,7 +218,7 @@ MadtTableInitialize (
> >//ASSERT (NumberOfCPUs <= 2 && NumberOfCPUs > 0);
> >MadtSize = GetAcutalMadtTableSize (,
> NumberOfCPUs);
> >Madt = (EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER
> *)AllocateZeroPool
> > (MadtSize);
> > -  ASSERT_EFI_ERROR (Madt);
> > +  ASSERT (Madt != NULL);
> >//
> >// Initialize MADT Header information
> >//
> > diff --git
> a/QuarkPlatformPkg/Library/PlatformHelperLib/PlatformHelperDxe.c
> > b/QuarkPlatformPkg/Library/PlatformHelperLib/PlatformHelperDxe.c
> > index 441f7609a536..39185bc0d5ff 100644
> > --- a/QuarkPlatformPkg/Library/PlatformHelperLib/PlatformHelperDxe.c
> > +++ b/QuarkPlatformPkg/Library/PlatformHelperLib/PlatformHelperDxe.c
> > @@ -174,7 +174,7 @@ PlatformFlashLockConfig (
> >//
> >
> >SpiProtocol = LocateSpiProtocol (NULL);  // This routine will not be 
> > called
> in SMM.
> > -  ASSERT_EFI_ERROR (SpiProtocol != NULL);
> > +  ASSERT (SpiProtocol != NULL);
> >if (SpiProtocol != NULL) {
> >  Status = SpiProtocol->Lock (SpiProtocol);
> >
> > diff --git a/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c
> > b/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c
> > index df6c1cc23240..6b07d7829328 100644
> > --- a/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c
> > +++ b/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c
> > @@ -1034,7 +1034,7 @@ InstallS3Memory (
> >// memory above 1MB. So Memory Callback can set cache for the system
> memory
> >// correctly on S3 boot path, just like it does on Normal boot path.
> >//
> > -  ASSERT_EFI_ERROR ((S3MemoryRangeData->SystemMemoryLength -
> 0x10) > 0);
> > +  ASSERT ((S3MemoryRangeData->SystemMemoryLength - 0x10) >
> 0);
> >BuildResourceDescriptorHob (
> >  EFI_RESOURCE_SYSTEM_MEMORY,
> >  (
> > --
> > 1.8.3.1
> >
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2] IntelFsp2WrapperPkg: Add error handling for possible NULL ptr dereference

2016-06-29 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru  

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Hao Wu
> Sent: Wednesday, June 29, 2016 6:57 PM
> To: edk2-devel@lists.01.org
> Cc: Wu, Hao A ; Yao, Jiewen 
> Subject: [edk2] [PATCH v2] IntelFsp2WrapperPkg: Add error handling for
> possible NULL ptr dereference
> 
> Possible NULL pointer dereference for FspmHeaderPtr/FspsHeaderPtr in
> module FspmWrapperPeim/FspsWrapperPeim.
> 
> Add error handling codes to avoid this issue.
> 
> Cc: Jiewen Yao 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Hao Wu 
> ---
>  IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c | 5 +
>  IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c | 5 +
>  2 files changed, 10 insertions(+)
> 
> diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> index 6144ad7..c98513e 100644
> --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> @@ -68,6 +68,11 @@ PeiFspMemoryInit (
>// Copy default FSP-M UPD data from Flash
>//
>FspmHeaderPtr = (FSP_INFO_HEADER *)FspFindFspHeader (PcdGet32
> (PcdFspmBaseAddress));
> +  DEBUG ((DEBUG_INFO, "FspmHeaderPtr - 0x%x\n", FspmHeaderPtr));
> +  if (FspmHeaderPtr == NULL) {
> +return EFI_DEVICE_ERROR;
> +  }
> +
>FspmUpdDataPtr = (FSPM_UPD_COMMON *)AllocateZeroPool
> ((UINTN)FspmHeaderPtr->CfgRegionSize);
>ASSERT (FspmUpdDataPtr != NULL);
>SourceData = (UINTN *)((UINTN)FspmHeaderPtr->ImageBase +
> (UINTN)FspmHeaderPtr->CfgRegionOffset);
> diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> index 7a65ad7..c923690 100644
> --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> @@ -241,6 +241,11 @@ PeiMemoryDiscoveredNotify (
>// Copy default FSP-S UPD data from Flash
>//
>FspsHeaderPtr = (FSP_INFO_HEADER *)FspFindFspHeader (PcdGet32
> (PcdFspsBaseAddress));
> +  DEBUG ((DEBUG_INFO, "FspsHeaderPtr - 0x%x\n", FspsHeaderPtr));
> +  if (FspsHeaderPtr == NULL) {
> +return EFI_DEVICE_ERROR;
> +  }
> +
>FspsUpdDataPtr = (FSPS_UPD_COMMON *)AllocateZeroPool
> ((UINTN)FspsHeaderPtr->CfgRegionSize);
>ASSERT (FspsUpdDataPtr != NULL);
>SourceData = (UINTN *)((UINTN)FspsHeaderPtr->ImageBase +
> (UINTN)FspsHeaderPtr->CfgRegionOffset);
> --
> 1.9.5.msysgit.0
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] IntelFsp2WrapperPkg: Add NULL pointer check by using ASSERT()

2016-06-29 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru 


> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Hao Wu
> Sent: Wednesday, June 29, 2016 6:22 PM
> To: edk2-devel@lists.01.org
> Cc: Wu, Hao A ; Yao, Jiewen 
> Subject: [edk2] [PATCH] IntelFsp2WrapperPkg: Add NULL pointer check by
> using ASSERT()
> 
> Possible NULL pointer dereference for FspmHeaderPtr/FspsHeaderPtr in
> module FspmWrapperPeim/FspsWrapperPeim.
> 
> Cc: Jiewen Yao 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Hao Wu 
> ---
>  IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c | 1 +
>  IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> index 6144ad7..71157c3 100644
> --- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> +++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
> @@ -68,6 +68,7 @@ PeiFspMemoryInit (
>// Copy default FSP-M UPD data from Flash
>//
>FspmHeaderPtr = (FSP_INFO_HEADER *)FspFindFspHeader (PcdGet32
> (PcdFspmBaseAddress));
> +  ASSERT (FspmHeaderPtr != NULL);
>FspmUpdDataPtr = (FSPM_UPD_COMMON *)AllocateZeroPool
> ((UINTN)FspmHeaderPtr->CfgRegionSize);
>ASSERT (FspmUpdDataPtr != NULL);
>SourceData = (UINTN *)((UINTN)FspmHeaderPtr->ImageBase +
> (UINTN)FspmHeaderPtr->CfgRegionOffset);
> diff --git a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> index 7a65ad7..3415629 100644
> --- a/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> +++ b/IntelFsp2WrapperPkg/FspsWrapperPeim/FspsWrapperPeim.c
> @@ -241,6 +241,7 @@ PeiMemoryDiscoveredNotify (
>// Copy default FSP-S UPD data from Flash
>//
>FspsHeaderPtr = (FSP_INFO_HEADER *)FspFindFspHeader (PcdGet32
> (PcdFspsBaseAddress));
> +  ASSERT (FspsHeaderPtr != NULL);
>FspsUpdDataPtr = (FSPS_UPD_COMMON *)AllocateZeroPool
> ((UINTN)FspsHeaderPtr->CfgRegionSize);
>ASSERT (FspsUpdDataPtr != NULL);
>SourceData = (UINTN *)((UINTN)FspsHeaderPtr->ImageBase +
> (UINTN)FspsHeaderPtr->CfgRegionOffset);
> --
> 1.9.5.msysgit.0
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Patch] IntelFrameworkModulePkg StatusCode RuntimeDxe: Remove duplicated structure.

2016-06-29 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru 

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Fan, Jeff
> Sent: Wednesday, June 29, 2016 8:21 PM
> To: Gao, Liming ; edk2-devel@lists.01.org
> Subject: Re: [edk2] [Patch] IntelFrameworkModulePkg StatusCode
> RuntimeDxe: Remove duplicated structure.
> 
> Reviewed-by: Jeff Fan 
> 
> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Liming Gao
> Sent: Thursday, June 30, 2016 10:38 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [Patch] IntelFrameworkModulePkg StatusCode RuntimeDxe:
> Remove duplicated structure.
> 
> RUNTIME_MEMORY_STATUSCODE_HEADER has been moved into
> MdeModulePkg public header file
> Include/Guid/MemoryStatusCodeRecord.h. It should be removed from the
> driver.
> 
> Cc: Cinnamon Shia 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao 
> ---
>  .../Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.h   | 9 -
> 
>  1 file changed, 9 deletions(-)
> 
> diff --git
> a/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCod
> eRuntimeDxe.h
> b/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCo
> deRuntimeDxe.h
> index 9d0ed19..ae20f5b 100644
> ---
> a/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCod
> eRuntimeDxe.h
> +++
> b/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCo
> de
> +++ RuntimeDxe.h
> @@ -53,15 +53,6 @@ typedef struct {
>  } DATAHUB_STATUSCODE_RECORD;
> 
> 
> -//
> -// Runtime memory status code worker definition -// -typedef struct {
> -  UINT32   RecordIndex;
> -  UINT32   NumberOfRecords;
> -  UINT32   MaxRecordsNumber;
> -} RUNTIME_MEMORY_STATUSCODE_HEADER;
> -
>  extern RUNTIME_MEMORY_STATUSCODE_HEADER
> *mRtMemoryStatusCodeTable;
> 
>  /**
> --
> 2.8.0.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 1/6] EdkCompatibilityPkg: fix ASSERT_EFI_ERROR() typos

2016-06-29 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru  

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Gao, Liming
> Sent: Tuesday, June 28, 2016 11:37 PM
> To: Laszlo Ersek ; edk2-devel-01  de...@ml01.01.org>
> Subject: Re: [edk2] [PATCH 1/6] EdkCompatibilityPkg: fix
> ASSERT_EFI_ERROR() typos
> 
> Reviewed-by: Liming Gao 
> 
> -Original Message-
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: Tuesday, June 28, 2016 9:26 PM
> To: edk2-devel-01 
> Cc: Gao, Liming 
> Subject: [PATCH 1/6] EdkCompatibilityPkg: fix ASSERT_EFI_ERROR() typos
> 
> A number of code locations use
> 
>   ASSERT_EFI_ERROR (BooleanExpression)
> 
> instead of
> 
>   ASSERT (BooleanExpression)
> 
> Fix them.
> 
> Cc: Liming Gao 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
> build tested only
> 
> 
> EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatabas
> e.c | 2 +-
>  EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Utility.c
> | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git
> a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatab
> ase.c
> b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatab
> ase.c
> index 386ff327f81b..2d456da30353 100644
> ---
> a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatab
> ase.c
> +++
> b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatab
> ase.c
> @@ -494,7 +494,7 @@ HiiGetSecondaryLanguages (
>UnicodeStrToAsciiStr (PrimaryLanguage, PrimaryLang639);
> 
>PrimaryLang4646 = ConvertLanguagesIso639ToRfc4646 (PrimaryLang639);
> -  ASSERT_EFI_ERROR (PrimaryLang4646 != NULL);
> +  ASSERT (PrimaryLang4646 != NULL);
> 
>SecLangCodes4646 = HiiGetSupportedSecondaryLanguages (UefiHiiHandle,
> PrimaryLang4646);
> 
> diff --git
> a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Utility.c
> b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Utility.c
> index f6d97f63444f..d269b8e4d6ba 100644
> ---
> a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Utility.c
> +++
> b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Utility.c
> @@ -153,7 +153,7 @@ ExportPackageLists (
> ,
> PackageListHdr
> );
> -  ASSERT_EFI_ERROR (Status != EFI_BUFFER_TOO_SMALL);
> +  ASSERT (Status != EFI_BUFFER_TOO_SMALL);
> 
>if (Status == EFI_BUFFER_TOO_SMALL) {
>  PackageListHdr = AllocateZeroPool (Size);
> --
> 1.8.3.1
> 
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] MdeModulePkg/PiSmmCore: Replace BASE_4GB with MAX_ADDRESS check.

2016-06-29 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru  

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Jiewen Yao
> Sent: Tuesday, June 28, 2016 7:30 PM
> To: edk2-devel@lists.01.org
> Cc: Kinney, Michael D ; Fan, Jeff
> 
> Subject: [edk2] [PATCH] MdeModulePkg/PiSmmCore: Replace BASE_4GB
> with MAX_ADDRESS check.
> 
> PI specification Vol 4 - SMM does not have any limitation of BASE_4GB for
> SMM.
> So we should replace BASE_4GB check with MAX_ADDRESS check to make
> sure
> the SMM memory is accessible by SMM Core.
> 
> Cc: Jeff Fan 
> Cc: Michael D Kinney 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jiewen Yao 
> ---
>  MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c | 2 +-
>  MdeModulePkg/Core/PiSmmCore/Pool.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
> b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
> index acfcc83..3788bd5 100644
> --- a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
> +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c
> @@ -1556,7 +1556,7 @@ SmmIplEntry (
>  }
> 
>  if (gSmmCorePrivate->SmramRanges[Index].CpuStart >= BASE_1MB) {
> -  if ((gSmmCorePrivate->SmramRanges[Index].CpuStart +
> gSmmCorePrivate->SmramRanges[Index].PhysicalSize) <= BASE_4GB) {
> +  if ((gSmmCorePrivate->SmramRanges[Index].CpuStart +
> gSmmCorePrivate->SmramRanges[Index].PhysicalSize) <= MAX_ADDRESS) {
>  if (gSmmCorePrivate->SmramRanges[Index].PhysicalSize >= MaxSize) {
>MaxSize = gSmmCorePrivate->SmramRanges[Index].PhysicalSize;
>mCurrentSmramRange = >SmramRanges[Index];
> diff --git a/MdeModulePkg/Core/PiSmmCore/Pool.c
> b/MdeModulePkg/Core/PiSmmCore/Pool.c
> index 761988e..e493fd2 100644
> --- a/MdeModulePkg/Core/PiSmmCore/Pool.c
> +++ b/MdeModulePkg/Core/PiSmmCore/Pool.c
> @@ -67,7 +67,7 @@ SmmInitializeMemoryServices (
>}
> 
>if (SmramRanges[Index].CpuStart >= BASE_1MB) {
> -if ((SmramRanges[Index].CpuStart + SmramRanges[Index].PhysicalSize)
> <= BASE_4GB) {
> +if ((SmramRanges[Index].CpuStart + SmramRanges[Index].PhysicalSize)
> <= MAX_ADDRESS) {
>if (SmramRanges[Index].PhysicalSize >= MaxSize) {
>  MaxSize = SmramRanges[Index].PhysicalSize;
>  CurrentSmramRangesIndex = Index;
> --
> 2.7.4.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] MdeModulePkg VariableInfo: Fix GCC build failure

2016-06-29 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru  

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Star Zeng
> Sent: Wednesday, June 29, 2016 7:24 AM
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen 
> Subject: [edk2] [PATCH] MdeModulePkg VariableInfo: Fix GCC build failure
> 
> GCC build failure: 'RealCommSize' may be used uninitialized
> 
> Cc: Jiewen Yao 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Star Zeng 
> ---
>  MdeModulePkg/Application/VariableInfo/VariableInfo.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/MdeModulePkg/Application/VariableInfo/VariableInfo.c
> b/MdeModulePkg/Application/VariableInfo/VariableInfo.c
> index df91c1451c19..a88b7f1ec42c 100644
> --- a/MdeModulePkg/Application/VariableInfo/VariableInfo.c
> +++ b/MdeModulePkg/Application/VariableInfo/VariableInfo.c
> @@ -104,6 +104,7 @@ PrintInfoFromSmm (
>}
> 
>CommBuffer = NULL;
> +  RealCommSize = 0;
>Status = EfiGetSystemConfigurationTable (
>   ,
>   (VOID **) 
> --
> 2.7.0.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 5/6] UefiCpuPkg: fix ASSERT_EFI_ERROR() typos

2016-06-28 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru  

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Fan,
> Jeff
> Sent: Tuesday, June 28, 2016 7:02 PM
> To: Laszlo Ersek ; edk2-devel-01  de...@ml01.01.org>
> Subject: Re: [edk2] [PATCH 5/6] UefiCpuPkg: fix ASSERT_EFI_ERROR() typos
> 
> Reviewed-by: Jeff Fan 
> 
> -Original Message-
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: Tuesday, June 28, 2016 9:26 PM
> To: edk2-devel-01
> Cc: Fan, Jeff
> Subject: [PATCH 5/6] UefiCpuPkg: fix ASSERT_EFI_ERROR() typos
> 
> A number of code locations use
> 
>   ASSERT_EFI_ERROR (BooleanExpression)
> 
> instead of
> 
>   ASSERT (BooleanExpression)
> 
> Fix them.
> 
> Cc: Jeff Fan 
> Reported-by: Gerd Hoffmann 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Laszlo Ersek 
> ---
>  UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmProfileArch.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmProfileArch.c
> b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmProfileArch.c
> index 79e23ef6476e..065fb2c24c7d 100644
> --- a/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmProfileArch.c
> +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmProfileArch.c
> @@ -78,7 +78,7 @@ InitPagesForPFHandler (
>//
>Address = NULL;
>Address = AllocatePages (MAX_PF_PAGE_COUNT);
> -  ASSERT_EFI_ERROR (Address != NULL);
> +  ASSERT (Address != NULL);
> 
>mPFPageBuffer =  (UINT64)(UINTN) Address;
>mPFPageIndex = 0;
> --
> 1.8.3.1
> 
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 3/6] QuarkPlatformPkg: fix ASSERT_EFI_ERROR() typos

2016-06-28 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru  

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Laszlo
> Ersek
> Sent: Tuesday, June 28, 2016 6:26 AM
> To: edk2-devel-01 
> Cc: Kinney, Michael D 
> Subject: [edk2] [PATCH 3/6] QuarkPlatformPkg: fix ASSERT_EFI_ERROR() typos
> 
> A number of code locations use
> 
>   ASSERT_EFI_ERROR (BooleanExpression)
> 
> instead of
> 
>   ASSERT (BooleanExpression)
> 
> Fix them.
> 
> Cc: Michael D Kinney 
> Cc: Kelly Steele 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
> not even build tested
> 
>  QuarkPlatformPkg/Acpi/Dxe/AcpiPlatform/AcpiPlatform.c  | 2 +-
>  QuarkPlatformPkg/Acpi/Dxe/AcpiPlatform/MadtPlatform.c  | 2 +-
>  QuarkPlatformPkg/Library/PlatformHelperLib/PlatformHelperDxe.c | 2 +-
>  QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c| 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/QuarkPlatformPkg/Acpi/Dxe/AcpiPlatform/AcpiPlatform.c
> b/QuarkPlatformPkg/Acpi/Dxe/AcpiPlatform/AcpiPlatform.c
> index 309eb041ee92..36300efd3146 100644
> --- a/QuarkPlatformPkg/Acpi/Dxe/AcpiPlatform/AcpiPlatform.c
> +++ b/QuarkPlatformPkg/Acpi/Dxe/AcpiPlatform/AcpiPlatform.c
> @@ -680,7 +680,7 @@ AcpiPlatformEntryPoint (
>// Init Pci Device PRT PRW information structure from PCD
>//
>mConfigData = (PCI_DEVICE_SETTING *)AllocateZeroPool (sizeof
> (PCI_DEVICE_SETTING));
> -  ASSERT_EFI_ERROR (mConfigData);
> +  ASSERT (mConfigData != NULL);
>InitPciDeviceInfoStructure (mConfigData);
>//
>// Get the Acpi SDT protocol for manipulation on acpi table
> diff --git a/QuarkPlatformPkg/Acpi/Dxe/AcpiPlatform/MadtPlatform.c
> b/QuarkPlatformPkg/Acpi/Dxe/AcpiPlatform/MadtPlatform.c
> index 11781e03f4c5..98035bedd58f 100644
> --- a/QuarkPlatformPkg/Acpi/Dxe/AcpiPlatform/MadtPlatform.c
> +++ b/QuarkPlatformPkg/Acpi/Dxe/AcpiPlatform/MadtPlatform.c
> @@ -218,7 +218,7 @@ MadtTableInitialize (
>//ASSERT (NumberOfCPUs <= 2 && NumberOfCPUs > 0);
>MadtSize = GetAcutalMadtTableSize (, NumberOfCPUs);
>Madt = (EFI_ACPI_2_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER
> *)AllocateZeroPool (MadtSize);
> -  ASSERT_EFI_ERROR (Madt);
> +  ASSERT (Madt != NULL);
>//
>// Initialize MADT Header information
>//
> diff --git a/QuarkPlatformPkg/Library/PlatformHelperLib/PlatformHelperDxe.c
> b/QuarkPlatformPkg/Library/PlatformHelperLib/PlatformHelperDxe.c
> index 441f7609a536..39185bc0d5ff 100644
> --- a/QuarkPlatformPkg/Library/PlatformHelperLib/PlatformHelperDxe.c
> +++ b/QuarkPlatformPkg/Library/PlatformHelperLib/PlatformHelperDxe.c
> @@ -174,7 +174,7 @@ PlatformFlashLockConfig (
>//
> 
>SpiProtocol = LocateSpiProtocol (NULL);  // This routine will not be 
> called in
> SMM.
> -  ASSERT_EFI_ERROR (SpiProtocol != NULL);
> +  ASSERT (SpiProtocol != NULL);
>if (SpiProtocol != NULL) {
>  Status = SpiProtocol->Lock (SpiProtocol);
> 
> diff --git a/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c
> b/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c
> index df6c1cc23240..6b07d7829328 100644
> --- a/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c
> +++ b/QuarkPlatformPkg/Platform/Pei/PlatformInit/MrcWrapper.c
> @@ -1034,7 +1034,7 @@ InstallS3Memory (
>// memory above 1MB. So Memory Callback can set cache for the system
> memory
>// correctly on S3 boot path, just like it does on Normal boot path.
>//
> -  ASSERT_EFI_ERROR ((S3MemoryRangeData->SystemMemoryLength -
> 0x10) > 0);
> +  ASSERT ((S3MemoryRangeData->SystemMemoryLength - 0x10) > 0);
>BuildResourceDescriptorHob (
>  EFI_RESOURCE_SYSTEM_MEMORY,
>  (
> --
> 1.8.3.1
> 
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 6/6] Vlv2TbltDevicePkg: fix ASSERT_EFI_ERROR() typos

2016-06-28 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru 


> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Laszlo
> Ersek
> Sent: Tuesday, June 28, 2016 6:26 AM
> To: edk2-devel-01 
> Cc: He, Tim ; Wei, David 
> Subject: [edk2] [PATCH 6/6] Vlv2TbltDevicePkg: fix ASSERT_EFI_ERROR() typos
> 
> A number of code locations use
> 
>   ASSERT_EFI_ERROR (BooleanExpression)
> 
> instead of
> 
>   ASSERT (BooleanExpression)
> 
> Fix them.
> 
> Cc: David Wei 
> Cc: Tim He 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
> not even build tested
> 
>  Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c   | 6 
> +++---
>  Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGens/BoardClkGens.c | 8
> 
>  Vlv2TbltDevicePkg/Library/MultiPlatformLib/PlatformInfoHob.c   | 2 +-
>  3 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c
> b/Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c
> index da7dce6e13c7..7c95c107e600 100644
> --- a/Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c
> +++ b/Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c
> @@ -154,7 +154,7 @@ FvbGetVolumeAttributes (
>  {
>EFI_FW_VOL_INSTANCE *FwInstance = NULL;
>FwInstance = GetFvbInstance(Instance);
> -  ASSERT_EFI_ERROR (FwInstance != NULL);
> +  ASSERT (FwInstance != NULL);
> 
>if ( FwInstance != NULL ) {
>  return FwInstance->VolumeHeader.Attributes;
> @@ -208,7 +208,7 @@ FvbGetLbaAddress (
>StartLba  = 0;
>Offset= 0;
>BlockMap  = &(FwhInstance->VolumeHeader.BlockMap[0]);
> -  ASSERT_EFI_ERROR (BlockMap != NULL);
> +  ASSERT (BlockMap != NULL);
> 
>//
>// Parse the blockmap of the FV to find which map entry the Lba belongs to.
> @@ -512,7 +512,7 @@ FvbSetVolumeAttributes (
>FwhInstance = GetFvbInstance (Instance);
> 
>AttribPtr = (EFI_FVB_ATTRIBUTES_2 *) & (FwhInstance-
> >VolumeHeader.Attributes);
> -  ASSERT_EFI_ERROR (AttribPtr != NULL);
> +  ASSERT (AttribPtr != NULL);
> 
>if ( AttribPtr != NULL) {
>  OldAttributes = *AttribPtr;
> diff --git
> a/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGens/BoardClkGens.c
> b/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGens/BoardClkGens.c
> index e38633b2b3ae..7d740df2fef9 100644
> ---
> a/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGens/BoardClkGens.c
> +++
> b/Vlv2TbltDevicePkg/Library/MultiPlatformLib/BoardClkGens/BoardClkGens.c
> @@ -69,10 +69,10 @@ ConfigureClockGenerator (
>//
>// Verify input arguments
>//
> -  ASSERT_EFI_ERROR (ConfigurationTableLength >= 6);
> -  ASSERT_EFI_ERROR (ConfigurationTableLength <=
> MAX_CLOCK_GENERATOR_BUFFER_LENGTH);
> -  ASSERT_EFI_ERROR (ClockType < ClockGeneratorMax);
> -  ASSERT_EFI_ERROR (ConfigurationTable != NULL);
> +  ASSERT (ConfigurationTableLength >= 6);
> +  ASSERT (ConfigurationTableLength <=
> MAX_CLOCK_GENERATOR_BUFFER_LENGTH);
> +  ASSERT (ClockType < ClockGeneratorMax);
> +  ASSERT (ConfigurationTable != NULL);
> 
>//
>// Read the clock generator
> diff --git a/Vlv2TbltDevicePkg/Library/MultiPlatformLib/PlatformInfoHob.c
> b/Vlv2TbltDevicePkg/Library/MultiPlatformLib/PlatformInfoHob.c
> index ebaaf40a165e..9d77e86678fe 100644
> --- a/Vlv2TbltDevicePkg/Library/MultiPlatformLib/PlatformInfoHob.c
> +++ b/Vlv2TbltDevicePkg/Library/MultiPlatformLib/PlatformInfoHob.c
> @@ -49,7 +49,7 @@ GetPlatformInfoHob (
>//
>// PlatformInfo PEIM should provide this HOB data, if not ASSERT and return
> error.
>//
> -  ASSERT_EFI_ERROR (*PlatformInfoHob != NULL);
> +  ASSERT (*PlatformInfoHob != NULL);
>if (!(*PlatformInfoHob)) {
>  return EFI_NOT_FOUND;
>}
> --
> 1.8.3.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 4/6] ShellPkg: don't call functions with side effects in ASSERT_EFI_ERROR()

2016-06-28 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru 


> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Laszlo
> Ersek
> Sent: Tuesday, June 28, 2016 6:26 AM
> To: edk2-devel-01 
> Cc: Carsey, Jaben ; Qiu, Shumin
> 
> Subject: [edk2] [PATCH 4/6] ShellPkg: don't call functions with side effects 
> in
> ASSERT_EFI_ERROR()
> 
> When ASSERT_EFI_ERROR() is compiled out, dependent on build flags, only
> the status checking should be removed; the function calls should stay.
> 
> Cc: Jaben Carsey 
> Cc: Shumin Qiu 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
> build tested
> 
>  ShellPkg/Library/UefiShellLevel1CommandsLib/If.c | 10 --
>  ShellPkg/Library/UefiShellLib/UefiShellLib.c |  5 -
>  2 files changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c
> b/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c
> index 7abfd8944b92..dc96bffde7d3 100644
> --- a/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c
> +++ b/ShellPkg/Library/UefiShellLevel1CommandsLib/If.c
> @@ -991,8 +991,11 @@ ShellCommandRunElse (
>IN EFI_SYSTEM_TABLE  *SystemTable
>)
>  {
> +  EFI_STATUS  Status;
>SCRIPT_FILE *CurrentScriptFile;
> -  ASSERT_EFI_ERROR(CommandInit());
> +
> +  Status = CommandInit ();
> +  ASSERT_EFI_ERROR (Status);
> 
>if (gEfiShellParametersProtocol->Argc > 1) {
>  ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY),
> gShellLevel1HiiHandle, L"if");
> @@ -1066,8 +1069,11 @@ ShellCommandRunEndIf (
>IN EFI_SYSTEM_TABLE  *SystemTable
>)
>  {
> +  EFI_STATUS  Status;
>SCRIPT_FILE *CurrentScriptFile;
> -  ASSERT_EFI_ERROR(CommandInit());
> +
> +  Status = CommandInit ();
> +  ASSERT_EFI_ERROR (Status);
> 
>if (gEfiShellParametersProtocol->Argc > 1) {
>  ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY),
> gShellLevel1HiiHandle, L"if");
> diff --git a/ShellPkg/Library/UefiShellLib/UefiShellLib.c
> b/ShellPkg/Library/UefiShellLib/UefiShellLib.c
> index cf89a4ac87ed..35a1a7169c8b 100644
> --- a/ShellPkg/Library/UefiShellLib/UefiShellLib.c
> +++ b/ShellPkg/Library/UefiShellLib/UefiShellLib.c
> @@ -373,6 +373,8 @@ EFIAPI
>  ShellInitialize (
>)
>  {
> +  EFI_STATUS Status;
> +
>//
>// if auto initialize is not false then skip
>//
> @@ -383,7 +385,8 @@ ShellInitialize (
>//
>// deinit the current stuff
>//
> -  ASSERT_EFI_ERROR(ShellLibDestructor(gImageHandle, gST));
> +  Status = ShellLibDestructor (gImageHandle, gST);
> +  ASSERT_EFI_ERROR (Status);
> 
>//
>// init the new stuff
> --
> 1.8.3.1
> 
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 1/6] EdkCompatibilityPkg: fix ASSERT_EFI_ERROR() typos

2016-06-28 Thread Mudusuru, Giri P
Reviewed-by: Giri P Mudusuru 


> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Laszlo
> Ersek
> Sent: Tuesday, June 28, 2016 6:26 AM
> To: edk2-devel-01 
> Cc: Gao, Liming 
> Subject: [edk2] [PATCH 1/6] EdkCompatibilityPkg: fix ASSERT_EFI_ERROR() typos
> 
> A number of code locations use
> 
>   ASSERT_EFI_ERROR (BooleanExpression)
> 
> instead of
> 
>   ASSERT (BooleanExpression)
> 
> Fix them.
> 
> Cc: Liming Gao 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
> build tested only
> 
> 
> EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatabase.c
> | 2 +-
>  EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Utility.c | 
> 2
> +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git
> a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatabase
> .c
> b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatabase
> .c
> index 386ff327f81b..2d456da30353 100644
> ---
> a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatabase
> .c
> +++
> b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/HiiDatabase
> .c
> @@ -494,7 +494,7 @@ HiiGetSecondaryLanguages (
>UnicodeStrToAsciiStr (PrimaryLanguage, PrimaryLang639);
> 
>PrimaryLang4646 = ConvertLanguagesIso639ToRfc4646 (PrimaryLang639);
> -  ASSERT_EFI_ERROR (PrimaryLang4646 != NULL);
> +  ASSERT (PrimaryLang4646 != NULL);
> 
>SecLangCodes4646 = HiiGetSupportedSecondaryLanguages (UefiHiiHandle,
> PrimaryLang4646);
> 
> diff --git
> a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Utility.c
> b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Utility.c
> index f6d97f63444f..d269b8e4d6ba 100644
> --- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Utility.c
> +++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Utility.c
> @@ -153,7 +153,7 @@ ExportPackageLists (
> ,
> PackageListHdr
> );
> -  ASSERT_EFI_ERROR (Status != EFI_BUFFER_TOO_SMALL);
> +  ASSERT (Status != EFI_BUFFER_TOO_SMALL);
> 
>if (Status == EFI_BUFFER_TOO_SMALL) {
>  PackageListHdr = AllocateZeroPool (Size);
> --
> 1.8.3.1
> 
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Patch 2/2] PcAtChipsetPkg: Update ResetSystemLib with PCDs

2016-06-23 Thread Mudusuru, Giri P
Thanks for clarification Liming.

Reviewed-by: Giri P Mudusuru 
<giri.p.mudus...@intel.com<mailto:giri.p.mudus...@intel.com>>

From: Gao, Liming
Sent: Thursday, June 23, 2016 9:11 PM
To: Mudusuru, Giri P <giri.p.mudus...@intel.com>; edk2-devel@lists.01.org
Subject: RE: [edk2] [Patch 2/2] PcAtChipsetPkg: Update ResetSystemLib with PCDs

Giri:
  Thanks for your comment. I thought this option before. For this library 
implementation, its WarmReset is same to CodeReset. So, I just introduce one 
PCD to configure it. If this library is expected to have the different 
WarmReset, I can add warm reset value later.

Thanks
Liming
From: Mudusuru, Giri P
Sent: Thursday, June 23, 2016 11:12 PM
To: Gao, Liming <liming@intel.com<mailto:liming@intel.com>>; 
edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Subject: RE: [edk2] [Patch 2/2] PcAtChipsetPkg: Update ResetSystemLib with PCDs

Looks good to me. Can you also use the PCD control for Warm and add new PCD for 
warm reset value in separate patch?

Reviewed-by: Giri P Mudusuru

Thanks,
-Giri

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Liming Gao
> Sent: Thursday, June 23, 2016 2:54 AM
> To: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> Subject: [edk2] [Patch 2/2] PcAtChipsetPkg: Update ResetSystemLib with PCDs
>
> Update ResetSystemLib with PCDs for Reset Control Register and Value
> instead of hard code 0x64 and 0xFE.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao
> ---
> PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c | 6 +++---
> PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf | 6 +-
> 2 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
> b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
> index 6a9dd71..b3b2efb 100644
> --- a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
> +++ b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
> @@ -1,7 +1,7 @@
> /** @file
> Reset System Library functions for PCAT platforms
>
> - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.

> + Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.

> This program and the accompanying materials
> are licensed and made available under the terms and conditions of the BSD
> License
> which accompanies this distribution. The full text of the license may be found
> at
> @@ -32,7 +32,7 @@ ResetCold (
> VOID
> )
> {
> - IoWrite8 (0x64, 0xfe);
> + IoWrite8 ((UINTN) PcdGet64 (PcdResetControlRegister), PcdGet8
> (PcdResetControlValueColdReset));
> }
>
> /**
> @@ -48,7 +48,7 @@ ResetWarm (
> VOID
> )
> {
> - IoWrite8 (0x64, 0xfe);
> + IoWrite8 ((UINTN) PcdGet64 (PcdResetControlRegister), PcdGet8
> (PcdResetControlValueColdReset));
> }
>
> /**
> diff --git a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
> b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
> index c994827..2384efa 100644
> --- a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
> +++ b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
> @@ -1,7 +1,7 @@
> ## @file
> # Library instance for ResetSystem library class for PCAT systems
> #
> -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.

> +# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.

> # This program and the accompanying materials
> # are licensed and made available under the terms and conditions of the BSD
> License
> # which accompanies this distribution. The full text of the license may be 
> found
> at
> @@ -32,8 +32,12 @@
>
> [Packages]
> MdePkg/MdePkg.dec
> + PcAtChipsetPkg/PcAtChipsetPkg.dec
>
> [LibraryClasses]
> DebugLib
> IoLib
>
> +[Pcd]
> + gPcAtChipsetPkgTokenSpaceGuid.PcdResetControlRegister ## CONSUMES
> + gPcAtChipsetPkgTokenSpaceGuid.PcdResetControlValueColdReset ##
> CONSUMES
> --
> 2.8.0.windows.1
>
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] IntelFsp2Pkg-BaseFspCommonLib: Add funtion to return the reset required status

2016-06-23 Thread Mudusuru, Giri P
Looks good to me. 

Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com>


> -Original Message-
> From: Yao, Jiewen
> Sent: Thursday, June 23, 2016 8:21 PM
> To: Yarlagadda, Satya P <satya.p.yarlaga...@intel.com>; edk2-
> de...@lists.01.org
> Cc: Mudusuru, Giri P <giri.p.mudus...@intel.com>
> Subject: RE: [PATCH] IntelFsp2Pkg-BaseFspCommonLib: Add funtion to return
> the reset required status
> 
> Reviewed-by: jiewen@intel.com
> 
> > -Original Message-
> > From: Yarlagadda, Satya P
> > Sent: Friday, June 24, 2016 10:38 AM
> > To: edk2-devel@lists.01.org
> > Cc: Mudusuru, Giri P <giri.p.mudus...@intel.com>; Yao, Jiewen
> > <jiewen@intel.com>
> > Subject: [PATCH] IntelFsp2Pkg-BaseFspCommonLib: Add funtion to return the
> > reset required status
> >
> > Added new funtion in FSPCommonLib to update the FSP API return status
> > with
> > the requested return status and return the control to the boot loader.
> >
> > Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> > Cc: Jiewen Yao <jiewen@intel.com>
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Satya Yarlagadda <satya.p.yarlaga...@intel.com>
> > ---
> >  IntelFsp2Pkg/Include/Library/FspCommonLib.h| 11 
> >  .../Library/BaseFspCommonLib/BaseFspCommonLib.inf  |  1 +
> >  .../Library/BaseFspCommonLib/FspCommonLib.c| 29
> > ++
> >  3 files changed, 41 insertions(+)
> >
> > diff --git a/IntelFsp2Pkg/Include/Library/FspCommonLib.h
> > b/IntelFsp2Pkg/Include/Library/FspCommonLib.h
> > index e13d0c3..231f1e4 100644
> > --- a/IntelFsp2Pkg/Include/Library/FspCommonLib.h
> > +++ b/IntelFsp2Pkg/Include/Library/FspCommonLib.h
> > @@ -309,4 +309,15 @@ GetFspCarSize (
> >VOID
> >);
> >
> > +/**
> > +  This function updates the return status of the FSP API with requested
> > reset type and returns to Boot Loader.
> > +
> > +  @param[in] FspResetType Reset type that needs to returned as API
> > return status
> > +
> > +**/
> > +VOID
> > +EFIAPI
> > +FspApiReturnStatusReset (
> > +  IN UINT32   FspResetType
> > +  );
> >  #endif
> > diff --git
> > a/IntelFsp2Pkg/Library/BaseFspCommonLib/BaseFspCommonLib.inf
> > b/IntelFsp2Pkg/Library/BaseFspCommonLib/BaseFspCommonLib.inf
> > index 0b0741b..df8803a 100644
> > --- a/IntelFsp2Pkg/Library/BaseFspCommonLib/BaseFspCommonLib.inf
> > +++ b/IntelFsp2Pkg/Library/BaseFspCommonLib/BaseFspCommonLib.inf
> > @@ -28,6 +28,7 @@
> >
> >  [LibraryClasses]
> >BaseMemoryLib
> > +  FspSwitchStackLib
> >
> >  [Pcd]
> >gIntelFsp2PkgTokenSpaceGuid.PcdGlobalDataPointerAddress  ##
> > CONSUMES
> > diff --git a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> > b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> > index 151b189..0c5f0b3 100644
> > --- a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> > +++ b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> > @@ -18,6 +18,7 @@
> >  #include 
> >  #include 
> >  #include 
> > +#include 
> >
> >  #pragma pack(1)
> >
> > @@ -544,3 +545,31 @@ GetFspCarSize (
> >}
> >return CarSize;
> >  }
> > +
> > +/**
> > +  This function updates the return status of the FSP API with requested
> > reset type and returns to Boot Loader.
> > +
> > +  @param[in] FspResetType Reset type that needs to returned as API
> > return status
> > +
> > +**/
> > +VOID
> > +EFIAPI
> > +FspApiReturnStatusReset (
> > +  IN UINT32   FspResetType
> > +  )
> > +{
> > +  volatile BOOLEAN  LoopUntilReset;
> > +
> > +  LoopUntilReset = TRUE;
> > +  DEBUG ((DEBUG_INFO, "FSP returning control to Bootloader with reset
> > required return status %x\n",FspResetType));
> > +  ///
> > +  /// Below code is not an infinite loop.The control will go back to API
> > calling function in BootLoader each time BootLoader
> > +  /// calls the FSP API without honoring the reset request by FSP
> > +  ///
> > +  do {
> > +SetFspApiReturnStatus ((EFI_STATUS)FspResetType);
> > +Pei2LoaderSwitchStack ();
> > +DEBUG ((DEBUG_ERROR, "!!!ERROR: FSP has requested BootLoader
> > for reset. But BootLoader has not honored the reset\n"));
> > +DEBUG ((DEBUG_ERROR, "!!!ERROR: Please add support in
> > BootLoader to honour the reset request from FSP\n"));
> > +  } while (LoopUntilReset);
> > +}
> > --
> > 2.9.0.windows.1

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


Re: [edk2] [Patch 2/2] PcAtChipsetPkg: Update ResetSystemLib with PCDs

2016-06-23 Thread Mudusuru, Giri P
Looks good to me. Can you also use the PCD control for Warm and add new PCD for 
warm reset value in separate patch?

Reviewed-by: Giri P Mudusuru 

Thanks,
-Giri

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Liming Gao
> Sent: Thursday, June 23, 2016 2:54 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [Patch 2/2] PcAtChipsetPkg: Update ResetSystemLib with PCDs
> 
> Update ResetSystemLib with PCDs for Reset Control Register and Value
> instead of hard code 0x64 and 0xFE.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao 
> ---
>  PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c   | 6 +++---
>  PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf | 6 +-
>  2 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
> b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
> index 6a9dd71..b3b2efb 100644
> --- a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
> +++ b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.c
> @@ -1,7 +1,7 @@
>  /** @file
>Reset System Library functions for PCAT platforms
> 
> -  Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
> +  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
>This program and the accompanying materials
>are licensed and made available under the terms and conditions of the BSD
> License
>which accompanies this distribution.  The full text of the license may be 
> found
> at
> @@ -32,7 +32,7 @@ ResetCold (
>VOID
>)
>  {
> -  IoWrite8 (0x64, 0xfe);
> +  IoWrite8 ((UINTN) PcdGet64 (PcdResetControlRegister), PcdGet8
> (PcdResetControlValueColdReset));
>  }
> 
>  /**
> @@ -48,7 +48,7 @@ ResetWarm (
>VOID
>)
>  {
> -  IoWrite8 (0x64, 0xfe);
> +  IoWrite8 ((UINTN) PcdGet64 (PcdResetControlRegister), PcdGet8
> (PcdResetControlValueColdReset));
>  }
> 
>  /**
> diff --git a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
> b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
> index c994827..2384efa 100644
> --- a/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
> +++ b/PcAtChipsetPkg/Library/ResetSystemLib/ResetSystemLib.inf
> @@ -1,7 +1,7 @@
>  ## @file
>  #   Library instance for ResetSystem library class for PCAT systems
>  #
> -#  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
> +#  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
>  #  This program and the accompanying materials
>  #  are licensed and made available under the terms and conditions of the BSD
> License
>  #  which accompanies this distribution.  The full text of the license may be 
> found
> at
> @@ -32,8 +32,12 @@
> 
>  [Packages]
>MdePkg/MdePkg.dec
> +  PcAtChipsetPkg/PcAtChipsetPkg.dec
> 
>  [LibraryClasses]
>DebugLib
>IoLib
> 
> +[Pcd]
> +  gPcAtChipsetPkgTokenSpaceGuid.PcdResetControlRegister## CONSUMES
> +  gPcAtChipsetPkgTokenSpaceGuid.PcdResetControlValueColdReset  ##
> CONSUMES
> --
> 2.8.0.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Patch 1/2] SecurityPkg: Add PcdUserPhysicalPresence to indicate use physical presence.

2016-06-23 Thread Mudusuru, Giri P
Looks good to me.
Reviewed-by: Giri P Mudusuru  

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Liming Gao
> Sent: Thursday, June 23, 2016 2:50 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [Patch 1/2] SecurityPkg: Add PcdUserPhysicalPresence to
> indicate use physical presence.
> 
> This PCD supports all configuration type. Its default value is FALSE.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao 
> ---
>  SecurityPkg/SecurityPkg.dec | 6 ++
>  SecurityPkg/SecurityPkg.uni | 9 +
>  2 files changed, 15 insertions(+)
> 
> diff --git a/SecurityPkg/SecurityPkg.dec b/SecurityPkg/SecurityPkg.dec
> index a9da5a6..f4f4d19 100644
> --- a/SecurityPkg/SecurityPkg.dec
> +++ b/SecurityPkg/SecurityPkg.dec
> @@ -414,6 +414,12 @@
># @Prompt Length(in bytes) of the TCG2 Final event log area.
> 
> gEfiSecurityPkgTokenSpaceGuid.PcdTcg2FinalLogAreaLen|0x8000|UINT32|0x00
> 010018
> 
> +  ## Indicate whether a physical presence user exist.
> +  # When it is configured to Dynamic or DynamicEx, it can be set through
> detection using
> +  # a platform-specific method (e.g. Button pressed) in a actual platform in
> early boot phase.
> +  # @Prompt A physical presence user status
> +
> gEfiSecurityPkgTokenSpaceGuid.PcdUserPhysicalPresence|FALSE|BOOLEAN|0x0
> 0010019
> +
>  [PcdsDynamic, PcdsDynamicEx]
> 
>## This PCD indicates Hash mask for TPM 2.0.
> diff --git a/SecurityPkg/SecurityPkg.uni b/SecurityPkg/SecurityPkg.uni
> index 432a77b..17a6842 100644
> --- a/SecurityPkg/SecurityPkg.uni
> +++ b/SecurityPkg/SecurityPkg.uni
> @@ -205,3 +205,12 @@
> 
>  #string
> STR_gEfiSecurityPkgTokenSpaceGuid_PcdTcgPhysicalPresenceInterfaceVer_HEL
> P  #language en-US "Null-terminated string of the Version of Physical Presence
> interface supported by platform."
> 
> +#string
> STR_gEfiSecurityPkgTokenSpaceGuid_PcdUserPhysicalPresence_PROMPT
> +#language en-US
> +"A physical presence user status"
> +
> +#string STR_gEfiSecurityPkgTokenSpaceGuid_PcdUserPhysicalPresence_HELP
> +#language en-US
> +"Indicate whether a physical presence user exist. "
> +"When it is configured to Dynamic or DynamicEx, it can be set through
> detection using "
> +"a platform-specific method (e.g. Button pressed) in a actual platform in 
> early
> boot phase."
> --
> 2.8.0.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Patch 1/2] PcAtChipsetPkg: Add two PCDs for Reset Control Register and Value

2016-06-23 Thread Mudusuru, Giri P
Looks good to me.
Reviewed-by: Giri P Mudusuru 


> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Liming Gao
> Sent: Thursday, June 23, 2016 2:54 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [Patch 1/2] PcAtChipsetPkg: Add two PCDs for Reset Control
> Register and Value
> 
> PcdResetControlRegister for Reset Control Register address.
> PcdResetControlValueColdReset for Reset Control Register code reset value.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao 
> ---
>  PcAtChipsetPkg/PcAtChipsetPkg.dec |  8 
>  PcAtChipsetPkg/PcAtChipsetPkg.uni | 15 +++
>  2 files changed, 23 insertions(+)
> 
> diff --git a/PcAtChipsetPkg/PcAtChipsetPkg.dec
> b/PcAtChipsetPkg/PcAtChipsetPkg.dec
> index cbd5707..b0b2b62 100644
> --- a/PcAtChipsetPkg/PcAtChipsetPkg.dec
> +++ b/PcAtChipsetPkg/PcAtChipsetPkg.dec
> @@ -173,5 +173,13 @@
># @Prompt ACPI IO Port Base Address Mask
>gPcAtChipsetPkgTokenSpaceGuid.PcdAcpiIoPortBaseAddressMask
> |0xFFFE|UINT16|0x0018
> 
> +  ## Reset Control Register address in I/O space.
> +  # @Prompt Reset Control Register address
> +
> gPcAtChipsetPkgTokenSpaceGuid.PcdResetControlRegister|0x64|UINT64|0x00
> 19
> +
> +  ## 8bit Reset Control Register value for cold reset.
> +  # @Prompt Reset Control Register value for cold reset
> +
> gPcAtChipsetPkgTokenSpaceGuid.PcdResetControlValueColdReset|0xFE|UINT8
> |0x001A
> +
>  [UserExtensions.TianoCore."ExtraFiles"]
>PcAtChipsetPkgExtra.uni
> diff --git a/PcAtChipsetPkg/PcAtChipsetPkg.uni
> b/PcAtChipsetPkg/PcAtChipsetPkg.uni
> index 87f9396..530e9ae 100644
> --- a/PcAtChipsetPkg/PcAtChipsetPkg.uni
> +++ b/PcAtChipsetPkg/PcAtChipsetPkg.uni
> @@ -141,3 +141,18 @@
> 
>  #string STR_gPcAtChipsetPkgTokenSpaceGuid_ERR_8001  #language en-US
> "Invalid value provided."
> 
> +#string
> STR_gPcAtChipsetPkgTokenSpaceGuid_PcdResetControlRegister_PROMPT
> +#language en-US
> +"Reset Control Register address"
> +
> +#string STR_gPcAtChipsetPkgTokenSpaceGuid_PcdResetControlRegister_HELP
> +#language en-US
> +"Reset Control Register address in I/O space."
> +
> +#string
> STR_gPcAtChipsetPkgTokenSpaceGuid_PcdResetControlValueColdReset_PROM
> PT
> +#language en-US
> +"Reset Control Register value for cold reset"
> +
> +#string
> STR_gPcAtChipsetPkgTokenSpaceGuid_PcdResetControlValueColdReset_HELP
> +#language en-US
> +"8bit Reset Control Register value for cold reset."
> --
> 2.8.0.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Patch 2/2] SecurityPkg: Update PlatformSecureLibNull with PCD to get physical presence.

2016-06-23 Thread Mudusuru, Giri P
Looks good to me.
Reviewed-by: Giri P Mudusuru 


> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Liming Gao
> Sent: Thursday, June 23, 2016 2:53 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [Patch 2/2] SecurityPkg: Update PlatformSecureLibNull with PCD
> to get physical presence.
> 
> This is an incompatible change. It uses PcdUserPhysicalPresence value instead
> of hard code TRUE. Because PcdUserPhysicalPresence default value is FALSE,
> this patch changes UserPhysicalPresent() return value from TRUE to FALSE.
> 
> From Security point, it is not safe to always return TRUE. If user wants this
> behavior, he can still configure PcdUserPhysicalPresence value to TRUE in
> the platform DSC file.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Liming Gao 
> ---
>  .../PlatformSecureLibNull/PlatformSecureLibNull.c  | 29
> --
>  .../PlatformSecureLibNull.inf  |  9 +--
>  2 files changed, 34 insertions(+), 4 deletions(-)
> 
> diff --git a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
> b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
> index 1450ac4..8dc07ec 100644
> --- a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
> +++ b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.c
> @@ -4,7 +4,7 @@
>related features during platform enabling and development. It should be
> replaced
>by a platform-specific method(e.g. Button pressed) in a real platform for
> product.
> 
> -Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.
> +Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
>  This program and the accompanying materials
>  are licensed and made available under the terms and conditions of the BSD
> License
>  which accompanies this distribution.  The full text of the license may be 
> found
> at
> @@ -15,6 +15,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY
> KIND, EITHER EXPRESS OR IMPLIED.
> 
>  **/
> 
> +BOOLEAN   mUserPhysicalPresence  = FALSE;
> +
>  /**
> 
>This function provides a platform-specific method to detect whether the
> platform
> @@ -38,5 +40,28 @@ UserPhysicalPresent (
>VOID
>)
>  {
> -  return TRUE;
> +  return mUserPhysicalPresence;
> +}
> +
> +
> +/**
> +  Save user physical presence state from a PCD to mUserPhysicalPresence.
> +
> +  @param  ImageHandle   ImageHandle of the loaded driver.
> +  @param  SystemTable   Pointer to the EFI System Table.
> +
> +  @retval  EFI_SUCCESS  PcdUserPhysicalPresence is got successfully.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +PlatformSecureLibNullConstructor (
> +  IN EFI_HANDLEImageHandle,
> +  IN EFI_SYSTEM_TABLE  *SystemTable
> +  )
> +{
> +
> +  mUserPhysicalPresence = PcdGetBool(PcdUserPhysicalPresence);
> +
> +  return EFI_SUCCESS;
>  }
> diff --git 
> a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
> b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
> index 7a5229d..be415f4 100644
> --- a/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
> +++ b/SecurityPkg/Library/PlatformSecureLibNull/PlatformSecureLibNull.inf
> @@ -6,7 +6,7 @@
>  #  related features during platform enabling and development. It should be
> replaced
>  #  by a platform-specific method(e.g. Button pressed) in a real platform for
> product.
>  #
> -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.
> +# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
>  # This program and the accompanying materials
>  # are licensed and made available under the terms and conditions of the BSD
> License
>  # which accompanies this distribution. The full text of the license may be 
> found
> at
> @@ -24,7 +24,7 @@
>MODULE_TYPE= DXE_DRIVER
>VERSION_STRING = 1.0
>LIBRARY_CLASS  = PlatformSecureLib|DXE_RUNTIME_DRIVER
> DXE_SMM_DRIVER DXE_DRIVER
> -
> +  CONSTRUCTOR= PlatformSecureLibNullConstructor
> 
>  #
>  # The following information is for reference only and not required by the 
> build
> tools.
> @@ -37,3 +37,8 @@
> 
>  [Packages]
>MdePkg/MdePkg.dec
> +  SecurityPkg/SecurityPkg.dec
> +
> +[Pcd]
> +  gEfiSecurityPkgTokenSpaceGuid.PcdUserPhysicalPresence## CONSUMES
> +
> --
> 2.8.0.windows.1
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Patch] Vlv2TbltDevicePkg:Use PiSmmCpu of UefiCpuPkg replace IA32FamilyCpuPkg.

2016-06-20 Thread Mudusuru, Giri P
Looks good to me. Thanks for eliminating the binaries and using the UefiCpuPkg.

One feedback is to remove the commented lines like comment is to remove 
DigitalThermalSensor

Reviewed-by: Giri P Mudusuru 

Thanks,
-Giri 

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Lu,
> ShifeiX A
> Sent: Monday, June 20, 2016 7:30 PM
> To: Wei, David ; edk2-devel@lists.01.org
> Cc: Yao, Jiewen 
> Subject: Re: [edk2] [Patch] Vlv2TbltDevicePkg:Use PiSmmCpu of UefiCpuPkg
> replace IA32FamilyCpuPkg.
> 
> Thanks David, I will correct this change in the commit-log.
> 
> 
> Shifei
> -Original Message-
> From: Wei, David
> Sent: Tuesday, June 21, 2016 10:28 AM
> To: Lu, ShifeiX A; edk2-devel@lists.01.org
> Cc: Wei, David; Yao, Jiewen
> Subject: RE: [Patch] Vlv2TbltDevicePkg:Use PiSmmCpu of UefiCpuPkg replace
> IA32FamilyCpuPkg.
> 
> Looks like PiSmmCommunicationSmm are also replaced. Could you also describe
> this change in the commit-log? And also there is grammar error in the title " 
> Use
> PiSmmCpu of UefiCpuPkg replace IA32FamilyCpuPkg."
> 
> Thanks,
> David  Wei
> 
> Intel SSG BIOS Team
> 
> 
> -Original Message-
> From: Lu, ShifeiX A
> Sent: Tuesday, June 21, 2016 10:16 AM
> To: edk2-devel@lists.01.org
> Cc: Wei; Wei, David 
> Subject: [Patch] Vlv2TbltDevicePkg:Use PiSmmCpu of UefiCpuPkg replace
> IA32FamilyCpuPkg.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: lushifex 
> ---
>  Vlv2TbltDevicePkg/PlatformPkg.fdf   | 4 ++--
>  Vlv2TbltDevicePkg/PlatformPkgGcc.fdf| 4 ++--
>  Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 6 --
>  Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   | 6 --
>  Vlv2TbltDevicePkg/PlatformPkgX64.dsc| 6 --
>  5 files changed, 16 insertions(+), 10 deletions(-)
> 
> diff --git a/Vlv2TbltDevicePkg/PlatformPkg.fdf
> b/Vlv2TbltDevicePkg/PlatformPkg.fdf
> index a499006..2ce2217 100644
> --- a/Vlv2TbltDevicePkg/PlatformPkg.fdf
> +++ b/Vlv2TbltDevicePkg/PlatformPkg.fdf
> @@ -540,15 +540,15 @@ INF RuleOverride = BINARY
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET
>#
># SMM
>#
>  INF MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
>  INF MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
> -INF RuleOverride = BINARY
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARC
> HITECTURE)/PiSmmCpuDxeSmm.inf
> +INF UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
> 
>  INF UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
>  INF MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf
> -INF RuleOverride = BINARY
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARC
> HITECTURE)/PiSmmCommunicationSmm.inf
> +INF UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf
>  INF
> $(PLATFORM_PACKAGE)/SmmSwDispatch2OnSmmSwDispatchThunk/SmmSwDis
> patch2OnSmmSwDispatchThunk.inf
>  INF RuleOverride = BINARY
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARC
> HITECTURE)/PowerManagement2.inf
>  # INF
> Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/Dts/Smm/DigitalThermalSensor.in
> f
>  INF RuleOverride = BINARY
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARC
> HITECTURE)/DigitalThermalSensor.inf
>#
> diff --git a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
> b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
> index 72a0d2b..92284ee 100644
> --- a/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
> +++ b/Vlv2TbltDevicePkg/PlatformPkgGcc.fdf
> @@ -497,15 +497,15 @@ INF RuleOverride = BINARY
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET
>#
># SMM
>#
>  INF MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf
>  INF MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf
> -INF RuleOverride = BINARY
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARC
> HITECTURE)/PiSmmCpuDxeSmm.inf
> +INF UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf
> 
>  INF UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.inf
>  INF MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf
> -INF RuleOverride = BINARY
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARC
> HITECTURE)/PiSmmCommunicationSmm.inf
> +INF UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationSmm.inf
>  INF
> $(PLATFORM_PACKAGE)/SmmSwDispatch2OnSmmSwDispatchThunk/SmmSwDis
> patch2OnSmmSwDispatchThunk.inf
>  INF RuleOverride = BINARY
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARC
> HITECTURE)/PowerManagement2.inf
>  # INF
> Vlv2DeviceRefCodePkg/ValleyView2Soc/CPU/Dts/Smm/DigitalThermalSensor.in
> f
>  INF RuleOverride = BINARY
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/$(DXE_ARC
> HITECTURE)/DigitalThermalSensor.inf
>#
> diff --git a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> index 466de88..9865785 100644
> --- a/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> +++ b/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> @@ -398,10 +398,12 @@
> 
> 

Re: [edk2] [RFC V2] Proposal to organize packages into directories

2016-06-17 Thread Mudusuru, Giri P
Thanks Mike. My preference is Silicon as it is generic and represents broadly 
CPU/Memory/Chipset/SoC etc...

Thanks,
-Giri

> -Original Message-
> From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Kinney, Michael D
> Sent: Friday, June 17, 2016 10:50 AM
> To: Justen, Jordan L ; edk2-devel@lists.01.org;
> Kinney, Michael D 
> Subject: Re: [edk2] [RFC V2] Proposal to organize packages into directories
> 
> Hi Jordan,
> 
> Yes.  Many terms were considered other than Silicon, except Carbon :)
> 
> None of the terms we have considered are a perfect match.
> 
> We are wanting to keep modules for controllers attached to I/O subsystems
> and modules for peripherals separate from modules that perform basic
> CPU/Memory/Chipset/SoC init.
> 
> Is there any preference on the list between Silicon, Chip, or Device
> or other names for basic CPU/Memory/Chipset/SoC init?
> 
> Thanks,
> 
> Mike
> 
> 
> > -Original Message-
> > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
> Jordan Justen
> > Sent: Wednesday, June 1, 2016 1:07 PM
> > To: Kinney, Michael D ; edk2-
> de...@lists.01.org; Kinney,
> > Michael D 
> > Subject: Re: [edk2] [RFC V2] Proposal to organize packages into directories
> >
> > On 2016-05-25 19:03:38, Kinney, Michael D wrote:
> > > # Top Level Directory Structure (Listed Alphabetically)
> > > ```
> > > edk2
> > >   Application   Applications and application support libraries
> > >   BaseTools EDK II build tools/scripts
> > >   Conf  EDK II build configuration files
> > >   Core  Platform agnostic packages for core FW services
> > >   DeprecatedPackages that will be removed from edk2/master soon
> > >   DriverEDK II Drivers (no platform assumptions)
> > >   Non-Vendor specific EDK II drivers
> > >   Non-Vendor specific EDK II drivers
> > > . . .
> > > Vendor  Vendor specific EDK II drivers
> > >   
> > >   
> > >   Platform  Platforms used to validate edk2/master features
> > > Common  Non-vendor specific platform packages
> > > EmulatedNon-vendor specific emulated platform packages
> > > Arm ARM specific platform packages
> > > Intel   Intel specific platform packages
> > > specific platform packages
> > > specific platform packages
> > >   Silicon   CPU/Chipset/SoC packages
> >
> > Were any other terms considered? Chip, Device?
> >
> > Carbon? ;)
> >
> > -Jordan
> >
> > > Common  Non-vendor specific CPU/Chipset/SoC drivers
> > > Arm Arm specific CPU/Chipset/SoC drivers
> > > Intel   Intel specific CPU/Chipset/SoC drivers
> > > specific CPU/Chipset/SoC drivers
> > > specific CPU/Chipset/SoC drivers
> > > ```
> > >
> > ___
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] IntelFsp2Pkg: rename GetFspVpdDataPointer() to GetFspCfgRegionDataPointer()

2016-06-17 Thread Mudusuru, Giri P
Thanks for aligning to the FSP spec.
Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com>


> -Original Message-
> From: Chan, Amy
> Sent: Friday, June 17, 2016 2:40 AM
> To: Yao, Jiewen <jiewen@intel.com>; edk2-devel@lists.01.org
> Cc: Mudusuru, Giri P <giri.p.mudus...@intel.com>; Yarlagadda, Satya P
> <satya.p.yarlaga...@intel.com>; Ma, Maurice <maurice...@intel.com>
> Subject: RE: [PATCH] IntelFsp2Pkg: rename GetFspVpdDataPointer() to
> GetFspCfgRegionDataPointer()
> 
> Thanks Jiewen. Looks good to me.
> 
> Reviewed-by: Chan, Amy <amy.c...@intel.com>
> 
> -Original Message-
> From: Yao, Jiewen
> Sent: Friday, June 17, 2016 5:25 PM
> To: edk2-devel@lists.01.org
> Cc: Mudusuru, Giri P <giri.p.mudus...@intel.com>; Chan, Amy
> <amy.c...@intel.com>; Yarlagadda, Satya P <satya.p.yarlaga...@intel.com>;
> Ma, Maurice <maurice...@intel.com>
> Subject: [PATCH] IntelFsp2Pkg: rename GetFspVpdDataPointer() to
> GetFspCfgRegionDataPointer()
> 
> FSP2.0 removed VPD concept.
> Rename GetFspVpdDataPointer() to GetFspCfgRegionDataPointer() to follow
> FSP2.0 specification (CfgRegionOffset).
> 
> Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
> Cc: Amy Chan <amy.c...@intel.com>
> Cc: Satya Yarlagadda <satya.p.yarlaga...@intel.com>
> Cc: Maurice Ma <maurice...@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jiewen Yao <jiewen@intel.com>
> ---
>  IntelFsp2Pkg/Include/Library/FspCommonLib.h  | 6 +++---
>  IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c | 6 +++---
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Include/Library/FspCommonLib.h
> b/IntelFsp2Pkg/Include/Library/FspCommonLib.h
> index 0bb0c53..e13d0c3 100644
> --- a/IntelFsp2Pkg/Include/Library/FspCommonLib.h
> +++ b/IntelFsp2Pkg/Include/Library/FspCommonLib.h
> @@ -234,13 +234,13 @@ GetFspInfoHeaderFromApiContext (
>);
> 
>  /**
> -  This function gets the VPD data pointer.
> +  This function gets the CfgRegion data pointer.
> 
> -  @return VpdDataRgnPtr   VPD data pointer.
> +  @return CfgRegion data pointer.
>  **/
>  VOID *
>  EFIAPI
> -GetFspVpdDataPointer (
> +GetFspCfgRegionDataPointer (
>VOID
>);
> 
> diff --git a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> index efd55f4..151b189 100644
> --- a/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> +++ b/IntelFsp2Pkg/Library/BaseFspCommonLib/FspCommonLib.c
> @@ -425,13 +425,13 @@ GetFspInfoHeaderFromApiContext (  }
> 
>  /**
> -  This function gets the VPD data pointer.
> +  This function gets the CfgRegion data pointer.
> 
> -  @return VpdDataRgnPtr   VPD data pointer.
> +  @return CfgRegion data pointer.
>  **/
>  VOID *
>  EFIAPI
> -GetFspVpdDataPointer (
> +GetFspCfgRegionDataPointer (
>VOID
>)
>  {
> --
> 2.7.4.windows.1

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


Re: [edk2] [PATCH] IntelFsp2WrapperPkg: Add support to handle ResetRequired return Status from FSP.

2016-06-16 Thread Mudusuru, Giri P
Thanks Jiewen. Looks good to me.

Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com>


-Original Message-
From: Yao, Jiewen 
Sent: Thursday, June 16, 2016 7:40 PM
To: edk2-devel@lists.01.org
Cc: Mudusuru, Giri P <giri.p.mudus...@intel.com>; Chan, Amy 
<amy.c...@intel.com>; Yarlagadda, Satya P <satya.p.yarlaga...@intel.com>
Subject: [PATCH] IntelFsp2WrapperPkg: Add support to handle ResetRequired 
return Status from FSP.

As per FSP 2.0 spec, FSP shall not trigger system reset and instead it shall 
return from the FSP API to the BL/Wrapper with the required reset type. The 
changes are to handle the ResetRequired return code from FSP APIs and provide 
lib interface for platform to trigger the actual reset.

Cc: Giri P Mudusuru <giri.p.mudus...@intel.com>
Cc: Amy Chan <amy.c...@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Satya Yarlagadda <satya.p.yarlaga...@intel.com>
Signed-off-by: Jiewen Yao <jiewen@intel.com>
---
 .../FspWrapperNotifyDxe/FspWrapperNotifyDxe.c  | 28 ++
 .../FspWrapperNotifyDxe/FspWrapperNotifyDxe.inf|  1 +
 .../FspmWrapperPeim/FspmWrapperPeim.c  |  9 ++
 .../FspsWrapperPeim/FspsWrapperPeim.c  | 33 ++
 .../Include/Library/FspWrapperPlatformLib.h| 13 +
 .../FspWrapperPlatformLibSample.c  | 22 ++-
 6 files changed, 105 insertions(+), 1 deletion(-)

diff --git a/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c 
b/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c
index 30c06b8..0797f44 100644
--- a/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c
+++ b/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -93,6 +94,15 @@ OnPciEnumerationComplete (
   PERF_START_EX(, "EventRec", NULL, 0, 0x6000);
   Status = CallFspNotifyPhase ();
   PERF_END_EX(, "EventRec", NULL, 0, 0x607F);
+
+  //
+  // Reset the system if FSP API returned FSP_STATUS_RESET_REQUIRED 
+ status  //  if ((Status >= FSP_STATUS_RESET_REQUIRED_COLD) && (Status 
+ <= FSP_STATUS_RESET_REQUIRED_8)) {
+DEBUG((DEBUG_INFO, "FSP NotifyPhase AfterPciEnumeration requested reset 
0x%x\n", Status));
+CallFspWrapperResetSystem ((UINT32)Status);  }
+
   if (Status != EFI_SUCCESS) {
 DEBUG((DEBUG_ERROR, "FSP NotifyPhase AfterPciEnumeration failed, status: 
0x%x\n", Status));
   } else {
@@ -130,6 +140,15 @@ OnReadyToBoot (
   PERF_START_EX(, "EventRec", NULL, 0, 0x4000);
   Status = CallFspNotifyPhase ();
   PERF_END_EX(, "EventRec", NULL, 0, 0x407F);
+
+  //
+  // Reset the system if FSP API returned FSP_STATUS_RESET_REQUIRED 
+ status  //  if ((Status >= FSP_STATUS_RESET_REQUIRED_COLD) && (Status 
+ <= FSP_STATUS_RESET_REQUIRED_8)) {
+DEBUG((DEBUG_INFO, "FSP NotifyPhase ReadyToBoot requested reset 0x%x\n", 
Status));
+CallFspWrapperResetSystem ((UINT32)Status);  }
+
   if (Status != EFI_SUCCESS) {
 DEBUG((DEBUG_ERROR, "FSP NotifyPhase ReadyToBoot failed, status: 0x%x\n", 
Status));
   } else {
@@ -179,6 +198,15 @@ OnEndOfFirmware (
   PERF_START_EX(, "EventRec", NULL, 0, 0x2000);
   Status = CallFspNotifyPhase ();
   PERF_END_EX(, "EventRec", NULL, 0, 0x207F);
+
+  //
+  // Reset the system if FSP API returned FSP_STATUS_RESET_REQUIRED 
+ status  //  if ((Status >= FSP_STATUS_RESET_REQUIRED_COLD) && (Status 
+ <= FSP_STATUS_RESET_REQUIRED_8)) {
+DEBUG((DEBUG_INFO, "FSP NotifyPhase EndOfFirmware requested reset 0x%x\n", 
Status));
+CallFspWrapperResetSystem ((UINT32)Status);  }
+
   if (Status != EFI_SUCCESS) {
 DEBUG((DEBUG_ERROR, "FSP NotifyPhase EndOfFirmware failed, status: 
0x%x\n", Status));
   } else {
diff --git a/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.inf 
b/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.inf
index d8af0aa..f851f68 100644
--- a/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.inf
+++ b/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.inf
@@ -49,6 +49,7 @@
   DxeServicesLib
   PerformanceLib
   HobLib
+  FspWrapperPlatformLib
 
 [Protocols]
   gEfiPciEnumerationCompleteProtocolGuid## CONSUMES
diff --git a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c 
b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
index 2eb3625..6144ad7 100644
--- a/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
+++ b/IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c
@@ -88,6 +88,15 @@ PeiFspMemoryInit (
   PERF_START_EX(, "EventRec", NULL, 
TimeStampCounterStart, 0xD000);
   PERF_END_EX(, "EventRec", NULL, 0, 0xD07F);
   DEBUG ((DEBUG_INFO, "Total time spent e

  1   2   >