Re: [edk2-devel] [edk2-platforms] [PATCH 1/5] MinPlatformPkg: Added GCC5 build support

2019-05-17 Thread Nate DeSimone
1. RuleInclude.fdf - There are now two [Rule.Common.PEIM] sections in this 
file, which seems wrong. Please just change the one above it from PE32 to TE.

2. There is a spelling error on line 7 of Stack.nasm: Switch the stack from 
temporary memory to permenent memory.
"permenent" should be "permanent"

3. SecFspWrapperPlatformSecLib.inf - You updated the copyright year from 2017 
to 2018. You should have updated it to 2019.

4. build_bios.py - Why should the script fail if the PYTHON_HOME environment 
variable is not set? You are already running inside a Python interpreter since 
you are a Python script, if PYTHON_HOME is not set, just use sys.executable to 
get the patch of the currently running Python interpreter.

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Agyeman, Prince
Sent: Wednesday, May 15, 2019 10:36 AM
To: devel@edk2.groups.io
Cc: Agyeman, Prince ; Kubacki, Michael A 
; Kinney, Michael D ; 
Desimone, Nathaniel L ; Gao, Liming 
; Sinha, Ankit 
Subject: [edk2-devel] [edk2-platforms] [PATCH 1/5] MinPlatformPkg: Added GCC5 
build support

From: Prince Agyeman <mailto:prince.agye...@intel.com>

Fixes:
* Replacing .asm and .S with nasm in SecFspWrapperPlatformSecLib for 
cross-platform build support
* Modified RuleInclude.fdf
* Modified python files to be OS independent

Gcc build was tested on Ubuntu 16.04.5 LTS with gcc version 5.4.0, nasm version 
2.11.08

Cc: Michael Kubacki <mailto:michael.a.kuba...@intel.com>
Cc: Michael D Kinney <mailto:michael.d.kin...@intel.com>
Cc: Nate DeSimone <mailto:nathaniel.l.desim...@intel.com>
Cc: Liming Gao <mailto:liming@intel.com>
Cc: Ankit Sinha <mailto:ankit.si...@intel.com>

TianoCore Contribution Agreement 1.1
Signed-off-by: Prince Agyeman <mailto:prince.agye...@intel.com>
---
 .../Ia32/PeiCoreEntry.S| 123 
 .../Ia32/{PeiCoreEntry.asm => PeiCoreEntry.nasm}   |  52 ++-
 .../SecFspWrapperPlatformSecLib/Ia32/SecEntry.S| 348 -
 .../Ia32/{SecEntry.asm => SecEntry.nasm}   | 138 
 .../SecFspWrapperPlatformSecLib/Ia32/Stack.S   |  73 -
 .../Ia32/{Stack.asm => Stack.nasm} |  45 ++-
 .../SecFspWrapperPlatformSecLib.inf|  18 +-
 .../MinPlatformPkg/Include/Fdf/RuleInclude.fdf |  19 +-
 .../Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py   |   2 +-
 .../MinPlatformPkg/Tools/PatchFv/PatchBinFv.py |  16 +-
 .../MinPlatformPkg/Tools/PatchFv/RebaseBinFv.py|  23 +-
 Platform/Intel/build_bios.py   |  25 +-
 12 files changed, 152 insertions(+), 730 deletions(-)  delete mode 100644 
Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/PeiCoreEntry.S
 rename 
Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/{PeiCoreEntry.asm
 => PeiCoreEntry.nasm} (59%)  delete mode 100644 
Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/SecEntry.S
 rename 
Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/{SecEntry.asm
 => SecEntry.nasm} (69%)  delete mode 100644 
Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/Stack.S
 rename 
Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/{Stack.asm
 => Stack.nasm} (50%)

diff --git 
a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/PeiCoreEntry.S
 
b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/PeiCoreEntry.S
deleted file mode 100644
index 8923577..000
--- 
a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/PeiCoreEntry.S
+++ /dev/null
@@ -1,123 +0,0 @@
-## @file
-# Find and call SecStartup
-#
-# Copyright (c) 2017, Intel Corporation. All rights reserved. -# This 
program and the accompanying materials are licensed and made available under -# 
the terms and conditions of the BSD License that accompanies this distribution.
-# The full text of the license may be found at -# 
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.
-#
-##
-
-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

Re: [edk2-devel] [edk2-platforms] [PATCH 1/5] MinPlatformPkg: Added GCC5 build support

2019-05-17 Thread Kubacki, Michael A
In RuleInclude.fdf this declares a duplicate Rule.Common.PEIM rule.

In this case, was there a particular reason to move from PE32 to TE? 
---
The Contributed-under tag is missing but no longer needed as V2 will be
based after the license change.

Thanks,
Michael

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Agyeman, Prince
> Sent: Wednesday, May 15, 2019 10:36 AM
> To: devel@edk2.groups.io
> Cc: Agyeman, Prince ; Kubacki, Michael A
> ; Kinney, Michael D
> ; Desimone, Nathaniel L
> ; Gao, Liming ;
> Sinha, Ankit 
> Subject: [edk2-devel] [edk2-platforms] [PATCH 1/5] MinPlatformPkg: Added
> GCC5 build support
> 
> From: Prince Agyeman 
> 
> Fixes:
> * Replacing .asm and .S with nasm in SecFspWrapperPlatformSecLib for
> cross-platform build support
> * Modified RuleInclude.fdf
> * Modified python files to be OS independent
> 
> Gcc build was tested on Ubuntu 16.04.5 LTS with gcc version 5.4.0, nasm
> version 2.11.08
> 
> Cc: Michael Kubacki 
> Cc: Michael D Kinney 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Cc: Ankit Sinha 
> 
> TianoCore Contribution Agreement 1.1
> Signed-off-by: Prince Agyeman 
> ---
>  .../Ia32/PeiCoreEntry.S| 123 
>  .../Ia32/{PeiCoreEntry.asm => PeiCoreEntry.nasm}   |  52 ++-
>  .../SecFspWrapperPlatformSecLib/Ia32/SecEntry.S| 348 
> -
>  .../Ia32/{SecEntry.asm => SecEntry.nasm}   | 138 
>  .../SecFspWrapperPlatformSecLib/Ia32/Stack.S   |  73 -
>  .../Ia32/{Stack.asm => Stack.nasm} |  45 ++-
>  .../SecFspWrapperPlatformSecLib.inf|  18 +-
>  .../MinPlatformPkg/Include/Fdf/RuleInclude.fdf |  19 +-
>  .../Tools/Fsp/RebaseAndPatchFspBinBaseAddress.py   |   2 +-
>  .../MinPlatformPkg/Tools/PatchFv/PatchBinFv.py |  16 +-
>  .../MinPlatformPkg/Tools/PatchFv/RebaseBinFv.py|  23 +-
>  Platform/Intel/build_bios.py   |  25 +-
>  12 files changed, 152 insertions(+), 730 deletions(-)  delete mode 100644
> Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatfor
> mSecLib/Ia32/PeiCoreEntry.S
>  rename
> Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatfor
> mSecLib/Ia32/{PeiCoreEntry.asm => PeiCoreEntry.nasm} (59%)  delete mode
> 100644
> Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatfor
> mSecLib/Ia32/SecEntry.S
>  rename
> Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatfor
> mSecLib/Ia32/{SecEntry.asm => SecEntry.nasm} (69%)  delete mode 100644
> Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatfor
> mSecLib/Ia32/Stack.S
>  rename
> Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatfor
> mSecLib/Ia32/{Stack.asm => Stack.nasm} (50%)
> 
> diff --git
> a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatfo
> rmSecLib/Ia32/PeiCoreEntry.S
> b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatfo
> rmSecLib/Ia32/PeiCoreEntry.S
> deleted file mode 100644
> index 8923577..000
> ---
> a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatfo
> rmSecLib/Ia32/PeiCoreEntry.S
> +++ /dev/null
> @@ -1,123 +0,0 @@
> -## @file
> -# Find and call SecStartup
> -#
> -# Copyright (c) 2017, Intel Corporation. All rights reserved. -# This
> program and the accompanying materials are licensed and made available
> under -# the terms and conditions of the BSD License that accompanies this
> distribution.
> -# The full text of the license may be found at -#
> 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.
> -#
> -##
> -
> -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
> -  p