Re: [edk2] [PATCH] OvmfPkg: prevent code execution from DXE stack

2015-08-07 Thread Zeng, Star
-Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Laszlo Ersek Sent: Saturday, August 8, 2015 12:00 AM To: edk2-devel-01 Cc: Paolo Bonzini; Zeng, Star; Justen, Jordan L Subject: [edk2] [PATCH] OvmfPkg: prevent code execution from DXE stack

[edk2] [PATCH 0/10] Check arguments for PrintLib format string

2015-08-07 Thread Scott Duplichan
This is essentially the same patch as before, broken up by Pkg. The only change is the macro modifier added to function prototypes now needs only one argument instead of two, as suggested by Andrew. The macro name itself selects between PrintLib style format string and ShellLib style format

[edk2] [PATCH 2/10] DuetPkg: Support format string argument checking

2015-08-07 Thread Scott Duplichan
Support compile time argument consistency checking for functions that accept a PrintLib format string followed by a variable argument list. Macro 'EFIFORMAT' added to the function prototype accepts a single argument indicating which function argument holds the format string. The EFIFORMAT macro

[edk2] [PATCH 3/10] IntelFrameworkModulePkg: Support format string argument checking

2015-08-07 Thread Scott Duplichan
Support compile time argument consistency checking for functions that accept a PrintLib format string followed by a variable argument list. Macro 'EFIFORMAT' added to the function prototype accepts a single argument indicating which function argument holds the format string. The EFIFORMAT macro

[edk2] [PATCH 4/10] MdeModulePkg: Support format string argument checking

2015-08-07 Thread Scott Duplichan
Support compile time argument consistency checking for functions that accept a PrintLib format string followed by a variable argument list. Macro 'EFIFORMAT' added to the function prototype accepts a single argument indicating which function argument holds the format string. The EFIFORMAT macro

Re: [edk2] [PATCH v2 0/7] small model and clang support for AARCH64

2015-08-07 Thread Leif Lindholm
Thanks Ard, Tested on Juno/FVP. I can see two issues: - While building, clang gives a fair amount of clang: warning: argument unused during compilation: '-I some dir'. - The increase in code size compared to GCC means that Juno with IntelBds no longer fits in the FV. But the latter is not

Re: [edk2] [edk2} [MinnowBoard] Firmware 0.82 Build error on Windows (VS2008)..?

2015-08-07 Thread Gerard Bucas
Hi Andrew I started from scratch (deleted all my old versions exported only the required version from svn) so I am sure I don't have any mixed versions on my computer. I would have thought that the scripts would have everything in the right places.. :( I am using windows to build it

[edk2] [Patch] MdeModulePkg: Fix issue about Ip4Dxe implementation for DHCP DORA process

2015-08-07 Thread Jiaxin Wu
DHCP policy is applied as default at boot time on all NICs in the system, which results in all NIC ports attempting DHCP and trying to acquire IP addresses during boot. Ip4 driver should only set dhcp as default policy, and not trigger DORA at driver binding start(). We should start DORA until

Re: [edk2] [PATCH] MdeModulePkg DxeIpl: Fix IA32 build failure with GCC 5.1.1

2015-08-07 Thread Qiu, Shumin
Reviewed-by: Qiu Shumin shumin@intel.com -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Star Zeng Sent: Friday, August 07, 2015 9:46 AM To: edk2-devel@lists.01.org Cc: David Woodhouse; Woodhouse, David Subject: [edk2] [PATCH] MdeModulePkg

Re: [edk2] [Patch 0/3] Use new BDS and UiApp for OvmfPkg

2015-08-07 Thread Ni, Ruiyu
Laszlo, Lots of questions were raised. :) Q1. can you please tell me more about the new BDS and UiApp? What the motivation for it was, what it does? Do the GenericBdsLib functions continue to work? Q2. given that ArmVirtPkg is not being modified, it appears that GenericBdsLib is not planned (in

Re: [edk2] some new BFD warnings

2015-08-07 Thread Ard Biesheuvel
On 5 August 2015 at 18:00, Laszlo Ersek ler...@redhat.com wrote: On 08/05/15 17:17, Ard Biesheuvel wrote: On 5 aug. 2015, at 15:53, Laszlo Ersek ler...@redhat.com wrote: Hi, I assume that it is in response to the recent BaseTools changes that now I'm getting the following warnings during

Re: [edk2] apparent SMBASE relocation issue with noexec enabled [was: MdeModulePkg DxeIpl: Add stack NX support]

2015-08-07 Thread Paolo Bonzini
On 07/08/2015 01:02, Laszlo Ersek wrote: The trace covers the full lifetime of the guest (I started tracing before launching the guest, and I passed -no-reboot to qemu, so when the guest crashed, QEMU exited.) This was on 3.10.0-299.el7.x86_64. I repeated the test with EPT off. The

Re: [edk2] [PATCH v3 7/7] BaseTools: add support for CLANG compiler to GCC family

2015-08-07 Thread Ard Biesheuvel
On 7 August 2015 at 16:59, Ard Biesheuvel ard.biesheu...@linaro.org wrote: On 7 August 2015 at 16:51, Jordan Justen jordan.l.jus...@intel.com wrote: I think the subject should say 'Add CLANG toolchain with AARCH64 support' to highlight that a new toolchain name is being defined. OK. I can

[edk2] [PATCH 1/3] ArmPlatformPkg/ArmJunoDxe: drop unused BdsLib dependency

2015-08-07 Thread Ard Biesheuvel
The ArmJunoDxe driver declares a dependency on BdsLib, but never actually uses anything it provides. So drop it from the .inf Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org ---

[edk2] [RFC PATCH 1/4] BaseTools GCC: remove 4.9 specific linker alignment override

2015-08-07 Thread Ard Biesheuvel
If any version of GCC emits any object whose actual alignment requirement exceeds 32 bytes, this actual alignment value will automatically become the PE/COFF section alignment value after PE/COFF conversion now that GenFw propagates the alignment of the ELF input sections. So there is no longer a

[edk2] [RFC PATCH 3/4] BaseTools GCC: unify ARM CC flags for all GCC versions

2015-08-07 Thread Ard Biesheuvel
There is no reason to pass -mno-unaligned-access only to ARM GCC versions 4.7 and up, since version 4.6 understands it just fine. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- BaseTools/Conf/tools_def.template | 4 ++-- 1 file

[edk2] [RFC PATCH 4/4] BaseTools GCC: unify GCC toolchain command line options

2015-08-07 Thread Ard Biesheuvel
This unifies the command line options passed to the various versions of the GCC toolchain. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- BaseTools/Conf/tools_def.template | 306 1 file changed, 117

[edk2] [RFC PATCH 0/4] unify GCC command line options

2015-08-07 Thread Ard Biesheuvel
This unifies all command line option defines in tools_def.txt, in order to reduce the maintenance burden. Note that this does not add or remove any GCC4x toolchains, it just folds the common DEFINEs into a single series of GCC4X defines. Ard Biesheuvel (4): BaseTools GCC: remove 4.9 specific

[edk2] [PATCH] OvmfPkg: prevent code execution from DXE stack

2015-08-07 Thread Laszlo Ersek
SVN rev 18166 (MdeModulePkg DxeIpl: Add stack NX support) enables platforms to request non-executable stack for the DXE phase, by setting PcdSetNxForStack to TRUE. The PCD defaults to FALSE, because: (a) A non-executable DXE stack is a new feature and causes changes in behavior. Some

[edk2] [PATCH 2/3] ArmPlatformPkg/ArmJunoDxe: drop sky2.mac_address kernel argument

2015-08-07 Thread Ard Biesheuvel
When detecting Juno rev1 hardware, we add a sky2.mac_address=xx:xx:... kernel command line parameter, in an apparent attempt to override the MAC address that the Linux driver probes from the hardware. However, the Linux driver does not in fact take a 'mac_address' parameter, so there is no point

[edk2] [PATCH 3/3] ArmPlatformPkg/ArmJunoDxe: use single DTB for Juno rev1 boot options

2015-08-07 Thread Ard Biesheuvel
The ArmJunoDxe driver installs two default boot options: - Boot0001, that exposes only the 2xA57 cluster - Boot0002, that exposes both the 2xA57 and 4xA53 clusters. This is implemented by overriding the DTB passed via the config table with a dtb= kernel command line, which requires that a DTB

Re: [edk2] [PATCH v3 7/7] BaseTools: add support for CLANG compiler to GCC family

2015-08-07 Thread Jordan Justen
I think the subject should say 'Add CLANG toolchain with AARCH64 support' to highlight that a new toolchain name is being defined. Should we consider adding the version to the toolchain name, like CLANG37? Then we can change parameters between major releases. At least for GCC it has proved

Re: [edk2] [PATCH v2 0/7] small model and clang support for AARCH64

2015-08-07 Thread Ard Biesheuvel
On 7 August 2015 at 16:05, Leif Lindholm leif.lindh...@linaro.org wrote: Thanks Ard, Tested on Juno/FVP. I can see two issues: - While building, clang gives a fair amount of clang: warning: argument unused during compilation: '-I some dir'. Yes, this turns out to be the assembler driver

Re: [edk2] [RFC PATCH] ArmPlatformPkg/PlatformIntelBdsLib: remove ARM BDS dependency

2015-08-07 Thread Laszlo Ersek
one remark below On 08/07/15 14:11, Ard Biesheuvel wrote: The Intel BDS platform library still depends on the ARM BDS specific BdsLib. So replace its invocations with GenericBdsLib counterparts, and fix up where neeeded. Contributed-under: TianoCore Contribution Agreement 1.0

[edk2] [PATCH v3 1/7] ArmPkg/GicV3: use GICv3 generic sysreg names only for GNU as

2015-08-07 Thread Ard Biesheuvel
The GNU assembler extends the generic notation for IMPLEMENTATION DEFINED system registers to support any system register, so that system registers defined by newer versions of the architecture can still be used by older versions of the toolchain. Clang before v3.6 supports the generic notation,

[edk2] [PATCH v3 6/7] BaseTools/GenFw: allow AArch64 tiny and small code model relocations

2015-08-07 Thread Ard Biesheuvel
The AArch64 small C model makes extensive use of ADRP/ADD and ADRP/{LDR,STR} pairs to emit PC-relative symbol references with a +/- 4 GB range. Since the relocation pair splits the relative offset into a relative page offset and an absolute offset into a 4 KB page, we need to take extra care to

[edk2] [PATCH v3 4/7] ArmPlatformPkg/ArmJunoPkg: use TE 'auto' alignment for SEC modules

2015-08-07 Thread Ard Biesheuvel
No need to hardcode the TE alignment anymore, now that GenFw sets the PE/COFF alignment according to the alignment requirements of the ELF input sections. Also enable FIXED FFS placement so that we can reclaim some of the space wasted to padding when using clang with 4 KB section alignment.

[edk2] [PATCH v3 3/7] ArmPlatformPkg/ArmJunoPkg: use a rodata symbol for ReferenceAcpiTable

2015-08-07 Thread Ard Biesheuvel
The ACPI .aslc files contain a ReferenceAcpiTable() function whose sole purpose is to ensure that the table itself does not get optimized away. However, when using clang, these dummy functions result in a 4 KB section alignment requirement, which is silly since everything except the .data section

[edk2] [PATCH v3 2/7] ArmPkg/GenericWatchdogDxe: add missing VOID* cast

2015-08-07 Thread Ard Biesheuvel
Use an explicit VOID* cast when passing a static char array into a function taking a void pointer. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org Reviewed-by: Leif Lindholm leif.lindh...@linaro.org Tested-by: Leif Lindholm

[edk2] [PATCH v3 5/7] ArmPlatformPkg/FVP: use 'auto' alignment and FIXED placement for XIP modules

2015-08-07 Thread Ard Biesheuvel
Now that GenFw correctly propagates the minimum alignment of the ELF input sections to the PE/COFF binary, we can simply select 'auto' alignment in the FDF Rule section instead of tweaking it by hand. Also add the FIXED FFS attribute to the module types that may execute in place. This enables a

[edk2] [PATCH v3 7/7] BaseTools: add support for CLANG compiler to GCC family

2015-08-07 Thread Ard Biesheuvel
This adds support for building the AARCH64 platforms using the Clang compiler and assembler combined with the GNU (cross-)linker. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org Reviewed-by: Leif Lindholm leif.lindh...@linaro.org

[edk2] [PATCH v3 0/7] small model and clang support for AARCH64

2015-08-07 Thread Ard Biesheuvel
This is v3 of the followup to the series 'small C model and LLVM/clang support for AARCH64' that I sent out on July 17th. Now that the FFS/FV optimization patches have been merged, this is what remains to allow the AARCH64 platforms to be built using clang, combined with the GNU binutils

[edk2] [RFC PATCH 2/4] BaseTools GCC: unify warning flags for all GCC versions

2015-08-07 Thread Ard Biesheuvel
The warning flags -Wno-address -Wno-unused-but-set-variable are added for version 4.6 and up, but since they are happily accepted by version 4.4 and 4.5 as well, add them there as well. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org

Re: [edk2] [PATCH v3 7/7] BaseTools: add support for CLANG compiler to GCC family

2015-08-07 Thread Jordan Justen
On 2015-08-07 07:59:24, Ard Biesheuvel wrote: On 7 August 2015 at 16:51, Jordan Justen jordan.l.jus...@intel.com wrote: I think the subject should say 'Add CLANG toolchain with AARCH64 support' to highlight that a new toolchain name is being defined. OK. I can fix that up before

Re: [edk2] [PATCH 0/2] ArmPlatformPkg: reduce .data contents of XIP modules

2015-08-07 Thread Leif Lindholm
On Fri, Jul 24, 2015 at 02:38:05PM +0200, Ard Biesheuvel wrote: SEC and PEI modules may be executed in place, in which case their .data sections are read-only. So declare some globals as CONST, so that they are emitted into .text instead. This may result in no .data section being emitted at

Re: [edk2] [PATCH] MdeModulePkg DxeIpl: Add stack NX support

2015-08-07 Thread Laszlo Ersek
On 08/07/15 19:00, Andrew Fish wrote: On Aug 7, 2015, at 5:21 AM, Laszlo Ersek ler...@redhat.com mailto:ler...@redhat.com wrote: On 08/07/15 03:27, Zeng, Star wrote: -Original Message- From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Thursday, August 6, 2015 9:43 PM To: Zeng,

Re: [edk2] [PATCH v3 7/7] BaseTools: add support for CLANG compiler to GCC family

2015-08-07 Thread Ard Biesheuvel
On 7 August 2015 at 18:54, Jordan Justen jordan.l.jus...@intel.com wrote: On 2015-08-07 07:59:24, Ard Biesheuvel wrote: On 7 August 2015 at 16:51, Jordan Justen jordan.l.jus...@intel.com wrote: I think the subject should say 'Add CLANG toolchain with AARCH64 support' to highlight that a new

[edk2] [PATCH] BaseTools: Fix GCC49 build failure

2015-08-07 Thread Scott Duplichan
Some gnu linkers used with GCC44, such as GNU ld 2.19.1, require a --defsym= command line option to precede the --script= option in order for the definition to be available for use by the script. Move the --defsym= command line option to satisfy this requirement and avoid a GCC44 build failure.

[edk2] [RFC PATCH] ArmPlatformPkg/PlatformIntelBdsLib: remove ARM BDS dependency

2015-08-07 Thread Ard Biesheuvel
The Intel BDS platform library still depends on the ARM BDS specific BdsLib. So replace its invocations with GenericBdsLib counterparts, and fix up where neeeded. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org ---

Re: [edk2] [PATCH] MdeModulePkg DxeIpl: Add stack NX support

2015-08-07 Thread Laszlo Ersek
On 08/07/15 03:27, Zeng, Star wrote: -Original Message- From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Thursday, August 6, 2015 9:43 PM To: Zeng, Star; Paolo Bonzini Cc: Andrew Fish; Justen, Jordan L; edk2-de...@ml01.01.org; Yao, Jiewen; Chen Fan; Fan, Jeff Subject: Re: [edk2]

Re: [edk2] [PATCH] UefiCpuPkg CpuDxe: Sync up the settings of Execute Disable to APs

2015-08-07 Thread Laszlo Ersek
On 08/07/15 04:14, Star Zeng wrote: when stack NX has been enabled for BSP. DxeIpl may have enabled Execute Disable for BSP, APs need to get the status and sync up the settings, otherwise EFI_MP_SERVICES_PROTOCOL-StartupAllAPs may not work. Got positive comments and test result from