Re: [edk2-devel] [PATCH V2 00/10] Multiple Controllers Support solution

2019-08-13 Thread Liming Gao
Eric: I push the first 3 patches 82407bd129dca8ec6d96e85f541b0974c8d7e087..1f06aa24c29405f271f514f01c396c2ba19c1370. Then, the changes in edk2 platform can be submitted. After edk2platform change is ready, I will push the remaining patch set. Thanks Liming >-Original Message-

Re: [edk2-devel] [PATCH v2] IntelSiliconPkg-Vtd: A new PMR interface

2019-08-13 Thread Yao, Jiewen
Evelyn I still saw below EFIAPI missing issue: +UINTN +GetGlobalVtdPmrAlignment ( +); Thank you Yao jiewen > -Original Message- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Evelyn Wang > Sent: Monday, August 12, 2019 12:48 PM > To: devel@edk2.groups.io >

Re: [edk2-devel] [Patch 1/1 V2] BaseTools: Move buildoptions.py to Common folder

2019-08-13 Thread Liming Gao
Reviewed-by: Liming Gao >-Original Message- >From: Feng, Bob C >Sent: Tuesday, August 13, 2019 5:49 PM >To: edk2-de...@lists.01.org; devel@edk2.groups.io >Cc: Gao, Liming ; Feng, Bob C >Subject: [Patch 1/1 V2] BaseTools: Move buildoptions.py to Common folder >

Re: [edk2-devel] [RFC] BZ 2067 BaseTools/Scripts: Add GetUtcDateTime.py for edk2-stable201908 stable tag.

2019-08-13 Thread Chiu, Chasel
Hi Leif, Thanks for the valuable feedbacks and suggestions. I will re-write script and re-send code review. Regards, Chasel > -Original Message- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Leif > Lindholm > Sent: Wednesday, August 14, 2019 2:30 AM > To:

Re: [edk2-devel] [PATCH 1/1] ShellPkg/UefiShellAcpiViewCommandLib: Remove the variable "Index"

2019-08-13 Thread Gao, Zhichao
Reviewed-by: Zhichao Gao Thanks, Zhichao > -Original Message- > From: Zhang, Shenglei > Sent: Wednesday, August 14, 2019 11:07 AM > To: devel@edk2.groups.io > Cc: Carsey, Jaben ; Ni, Ray ; > Gao, Zhichao > Subject: [PATCH 1/1] ShellPkg/UefiShellAcpiViewCommandLib: Remove the > variable

Re: [edk2-devel] [Patch] Vlb2TbltDevicePkg: Add acpiview and IPv6 shell commands

2019-08-13 Thread Gary Lin
On Tue, Aug 13, 2019 at 11:17:08AM -0700, Kinney, Michael D wrote: > Update the integrated UEFI Shell to include the acpiview, > ping6, and ifconfig6 commands. > Those commands are useful. Thanks for the patch. Reviewed-by: Gary Lin > Cc: Zailiang Sun > Cc: Gary Lin > Signed-off-by:

Re: [edk2-devel] [PATCH V2 0/2] Enable Windows Firmware Update Driver Tool

2019-08-13 Thread Bob Feng
For this patch set, Reviewed-by: Bob Feng -Original Message- From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Eric Jin Sent: Monday, August 12, 2019 3:43 PM To: devel@edk2.groups.io Subject: [edk2-devel] [PATCH V2 0/2] Enable Windows Firmware Update Driver Tool

[edk2-devel] [PATCH 1/1] ShellPkg/UefiShellAcpiViewCommandLib: Remove the variable "Index"

2019-08-13 Thread Zhang, Shenglei
In IortParser.c ,the variable Index is set but not used in function DumpIortNodeNamedComponent. This will cause build failure when building ShellPkg with GCC. Cc: Jaben Carsey Cc: Ray Ni Cc: Zhichao Gao Signed-off-by: Shenglei Zhang ---

Re: [edk2-devel] [PATCH 1/1] MdeModulePkg/DxeIplPeim: Relocate the operation of PageMapLevel5Entry++

2019-08-13 Thread Wu, Hao A
> -Original Message- > From: Zhang, Shenglei > Sent: Monday, August 12, 2019 2:25 PM > To: devel@edk2.groups.io > Cc: Bi, Dandan; Gao, Liming; Wu, Hao A; Laszlo Ersek; Dong, Eric > Subject: [PATCH 1/1] MdeModulePkg/DxeIplPeim: Relocate the operation of > PageMapLevel5Entry++ > >

Re: [edk2-devel] [Patch 1/1] BaseTools: Fix incremental build bug

2019-08-13 Thread Michael D Kinney
Bob, I have verified that the shell is rebuilt correctly when the number of NULL lib instances are changed. Tested-by: Michael D Kinney Mike > -Original Message- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] > On Behalf Of Bob Feng > Sent: Monday, August 12, 2019 9:12 PM

Re: [edk2-devel] CPU hotplug using SMM with QEMU+OVMF

2019-08-13 Thread Laszlo Ersek
On 08/13/19 18:09, Laszlo Ersek wrote: > On 08/13/19 16:16, Laszlo Ersek wrote: >> (06) Host CPU: (SMM) Save 38000, Update 38000 -- fill simple SMM >> rebase code. >> >> (07) Host CPU: (SMM) Send message to New CPU to Enable SMI. > > Aha, so this is the SMM-only register you mention in step

Re: [edk2-devel] [RFC] BZ 2067 BaseTools/Scripts: Add GetUtcDateTime.py for edk2-stable201908 stable tag.

2019-08-13 Thread Leif Lindholm
I am not fundamentally opposed to merging a simple script that does not affect other code in the tree. *But* the fact that we have multiple occurrences of this this time around *is* a bit of a concern for me. Yes, they won't affect the workings of anything else as part of the release. But they

Re: [edk2-devel] CPU hotplug using SMM with QEMU+OVMF

2019-08-13 Thread Laszlo Ersek
On 08/13/19 16:16, Laszlo Ersek wrote: > Yingwen and Jiewen suggested the following process. > > Legend: > > - "New CPU": CPU being hot-added > - "Host CPU": existing CPU > - (Flash):code running from flash > - (SMM): code running from SMRAM > > Steps: > > (01) New CPU: (Flash) enter

Re: [edk2-devel] [RFC] BZ 1837 Enable Windows Firmware Update Driver Tool in Edk2/BaseTools for 201908 stable tag

2019-08-13 Thread Leif Lindholm
Hi Liming, This is the other one. As I said, the fact that we are slipping multiple scripts in *just* before freeze is a concern for me. I have no objection to the code here though. I would however request that Sean is set as author on patch 1/2 as he was the original author of the script.

[edk2-devel] [Patch] Vlb2TbltDevicePkg: Add acpiview and IPv6 shell commands

2019-08-13 Thread Michael D Kinney
Update the integrated UEFI Shell to include the acpiview, ping6, and ifconfig6 commands. Cc: Zailiang Sun Cc: Gary Lin Signed-off-by: Michael D Kinney --- Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc | 2 ++ Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc | 2 ++ 2 files changed,

[edk2-devel] [Patch v1] ShellPkg: update drivers command for more children

2019-08-13 Thread Carsey, Jaben
this allows for > 99 children Cc: ray ni Cc: linson augustine Cc: zhichao gao Signed-off-by: Jaben Carsey --- ShellPkg/Library/UefiShellDriver1CommandsLib/Drivers.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[edk2-devel] CPU hotplug using SMM with QEMU+OVMF

2019-08-13 Thread Laszlo Ersek
Hi, this message is a problem statement, and an initial recommendation for solving it, from Jiewen, Paolo, Yingwen, and others. I'm cross-posting the thread starter to the , and lists. Please use "Reply All" when commenting. In response to the initial posting, I plan to ask a number of

Re: [edk2-devel] [RFC] BZ 1837 Enable Windows Firmware Update Driver Tool in Edk2/BaseTools for 201908 stable tag

2019-08-13 Thread Liming Gao
I see this patch was sent a week ago. This is a standalone tool. There is no impact on normal build and boot. I am OK to add it for 201908 stable tag. Thanks Liming From: Jin, Eric Sent: Monday, August 12, 2019 3:09 PM To: r...@edk2.groups.io Cc: Gao, Liming ; Jin, Eric ; devel@edk2.groups.io;

Re: [edk2-devel] [RFC] BZ 2067 BaseTools/Scripts: Add GetUtcDateTime.py for edk2-stable201908 stable tag.

2019-08-13 Thread Liming Gao
This is a small helper script. I am OK to add it for edk2-stable201908 stable tag. Thanks Liming From: Chiu, Chasel Sent: Monday, August 12, 2019 3:45 PM To: r...@edk2.groups.io Cc: Gao, Liming ; Feng, Bob C ; devel@edk2.groups.io Subject: [RFC] BZ 2067 BaseTools/Scripts: Add GetUtcDateTime.py

Re: [edk2-devel] [PATCH] MdePkg: Add STATIC_ASSERT macro

2019-08-13 Thread Laszlo Ersek
On 08/12/19 12:05, via Groups.Io wrote: > Implements https://bugzilla.tianocore.org/show_bug.cgi?id=2048. > > Best regards, > Vitaly Cheptsov > > > > > > 0001-MdePkg-Add-STATIC_ASSERT-macro.patch > > > From 4e388637cc9004ef8befdd7fa6c9446c96daf011 Mon Sep 17 00:00:00 2001 > From: Vitaly

Re: [edk2-devel] [PATCH 1/1] MdeModulePkg/DxeIplPeim: Relocate the operation of PageMapLevel5Entry++

2019-08-13 Thread Laszlo Ersek
On 08/12/19 08:24, Zhang, Shenglei wrote: > PageMapLevel5Entry may be uninitialized in original code, which means > uninitialized pointer will be modified at some circumstance. > So relocate the operation of PageMapLevel5Entry++ in order to make sure > the pointer could be modified only when it is

Re: [edk2-devel] ovmf build fail with gcc 4.8.5

2019-08-13 Thread Laszlo Ersek
On 08/13/19 03:13, Chen, Farrah wrote: > Hi, > > When build ovmf with the latest two commits of master branch, we meet error > on Red Hat 7.6 with gcc version 4.8.5, but succeed on Red Hat 8.0 with gcc > version 8.2.1. > > Steps: > git clone https://github.com/tianocore/edk2.git > cd edk2 >

[edk2-devel] [PATCH v5 23/35] OvmfPkg/XenPlatformPei: Rework memory detection

2019-08-13 Thread Anthony PERARD
When running as a Xen PVH guest, there is no CMOS to read the memory size from. Rework GetSystemMemorySize(Below|Above)4gb() so they can work without CMOS by reading the e820 table. Rework XenPublishRamRegions to also care for the reserved and ACPI entry in the e820 table. The region that was

[edk2-devel] [PATCH v5 17/35] OvmfPkg/XenPlatformPei: Reinit XenHypercallLib

2019-08-13 Thread Anthony PERARD
The XenPlatformPei needs to make hypercalls, but the XenHypercallLib was initialised before the HyperPage was ready. Now that XenPlatformPei has initialised the HyperPage, reinitialise the XenHypercallLib. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 Signed-off-by: Anthony PERARD

[edk2-devel] [PATCH v5 31/35] OvmfPkg/PlatformBootManagerLib: Use a Xen console for ConOut/ConIn

2019-08-13 Thread Anthony PERARD
On a Xen PVH guest, none of the existing serial or console interface works, so we add a new one, based on XenConsoleSerialPortLib, and implemented via SerialDxe. That is a simple console implementation that can work on both PVH guest and HVM guests, even if it is rarely going to be used on HVM.

[edk2-devel] [PATCH v5 29/35] OvmfPkg/OvmfXen: Override PcdFSBClock to Xen vLAPIC timer frequency

2019-08-13 Thread Anthony PERARD
PcdFSBClock is used by SecPeiDxeTimerLibCpu, the TimerLib implementation. It will also be used by XenTimerDxe. Override PcdFSBClock to match Xen vLAPIC timer frequency. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 Signed-off-by: Anthony PERARD Acked-by: Laszlo Ersek --- Notes:

[edk2-devel] [PATCH v5 20/35] OvmfPkg/XenPlatformPei: Introduce XenPvhDetected

2019-08-13 Thread Anthony PERARD
XenPvhDetected() can be used to figure out if OVMF has started via the Xen PVH entry point. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 Signed-off-by: Anthony PERARD Acked-by: Laszlo Ersek --- Notes: v5: - in XenPvhDetected, check mXenInfo.HyperPages instead of

[edk2-devel] [PATCH v5 21/35] OvmfPkg: Import XENMEM_memory_map hypercall to Xen/memory.h

2019-08-13 Thread Anthony PERARD
The informations to make a XENMEM_memory_map hypercall is copied over from the public header of the Xen Project, with the type name modified to build on OVMF. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 Signed-off-by: Anthony PERARD Acked-by: Laszlo Ersek --- Notes: v3: -

[edk2-devel] [PATCH v5 19/35] OvmfPkg/XenPlatformPei: Setup HyperPages earlier

2019-08-13 Thread Anthony PERARD
We are going to need to make an hypercall in order to retreive the E820 table from the hypervisor before been able to setup the memory. Calling XenConnect earlier will allow to setup the XenHypercallLib earlier to allow to make hypercalls. While here, add some comments in XenConnect(). Ref:

[edk2-devel] [PATCH v5 15/35] OvmfPkg/AcpiPlatformDxe: Use Xen PVH RSDP if it exist

2019-08-13 Thread Anthony PERARD
If the firmware have been started via the Xen PVH entry point, a RSDP pointer would have been provided. Use it. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 Signed-off-by: Anthony PERARD Reviewed-by: Laszlo Ersek --- Notes: v4: - fix coding style v3: - patch

[edk2-devel] [PATCH v5 18/35] OvmfPkg/XenPlatformPei: Introduce XenHvmloaderDetected

2019-08-13 Thread Anthony PERARD
This new XenHvmloaderDetected() return true if the hvmloader firmware has runned before OVMF. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 Signed-off-by: Anthony PERARD Acked-by: Laszlo Ersek --- Notes: v3: - Added one sentence in the commit message.

[edk2-devel] [PATCH v5 26/35] OvmfPkg/XenPlatformLib: Cache result for XenDetected

2019-08-13 Thread Anthony PERARD
We are going to replace XenDetected() implementation in PlatformBootManagerLib by the one in XenPlatformLib. PlatformBootManagerLib's implementation does cache the result of GetFirstGuidHob(), so we do something similar in XenPlatformLib. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689

[edk2-devel] [PATCH v5 34/35] OvmfPkg: Move XenRealTimeClockLib from ArmVirtPkg

2019-08-13 Thread Anthony PERARD
Move XenRealTimeClockLib from ArmVirtPkg to OvmfPkg so it can be used from the OvmfPkg by the following patch, "OvmfPkg/OvmfXen: use RealTimeClockRuntimeDxe from EmbeddedPkg" Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 Signed-off-by: Anthony PERARD Reviewed-by: Laszlo Ersek ---

[edk2-devel] [PATCH v5 22/35] OvmfPkg/XenPlatformPei: no hvmloader: get the E820 table via hypercall

2019-08-13 Thread Anthony PERARD
When the Xen PVH entry point has been used, hvmloader hasn't run and hasn't prepared an E820 table. The only way left to get an E820 table is to ask Xen via an hypercall. We keep the result cached to avoid making a second hypercall which would give the same result. Ref:

[edk2-devel] [PATCH v5 10/35] OvmfPkg/XenPlatformPei: Detect OVMF_INFO from hvmloader

2019-08-13 Thread Anthony PERARD
EFI_XEN_OVMF_INFO is only useful to retrieve the E820 table. The mXenHvmloaderInfo isn't used yet, but will be use in a further patch to retrieve the E820 table. Also remove the unused pointer from the XenInfo HOB as that information is only useful in the XenPlatformPei. Ref:

[edk2-devel] [PATCH v5 14/35] OvmfPkg/AcpiPlatformDxe: Use XenPlatformLib

2019-08-13 Thread Anthony PERARD
This patch replace the XenDetected() function by the one in XenPlatformLib. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 Signed-off-by: Anthony PERARD Reviewed-by: Laszlo Ersek --- Notes: v4: - removed gEfiXenInfoGuid from Guids list. v3: - new patch, splited

[edk2-devel] [PATCH v5 35/35] OvmfPkg/OvmfXen: use RealTimeClockRuntimeDxe from EmbeddedPkg

2019-08-13 Thread Anthony PERARD
A Xen PVH guest doesn't have a RTC that OVMF would expect, so PcatRealTimeClockRuntimeDxe fails to initialize and prevent the firmware from finish to boot. To prevent that, we will use XenRealTimeClockLib which simply always return the same time. This will work on both Xen PVH and HVM guests.

[edk2-devel] [PATCH v5 33/35] OvmfPkg: Introduce XenIoPvhDxe to initialize Grant Tables

2019-08-13 Thread Anthony PERARD
XenIoPvhDxe use XenIoMmioLib to reserve some space to be use by the Grant Tables. The call is only done if it is necessary, we simply detect if the guest is PVH, as in this case there is currently no PCI bus, and no PCI Xen platform device which would start the XenIoPciDxe and allocate the space

[edk2-devel] [PATCH v5 16/35] OvmfPkg/XenHypercallLib: Enable it in PEIM

2019-08-13 Thread Anthony PERARD
Allow to use Xen hypercalls earlier, during the PEIM stage, but XenHypercallLibInit() must be called once the XenInfo HOB is created with the HyperPage setup. Change the return value of XenHypercallLibInit so failure can be detected when the call shouldn't fail, but still have the constructor

[edk2-devel] [PATCH v5 28/35] OvmfPkg/PlatformBootManagerLib: Handle the absence of PCI bus on Xen PVH

2019-08-13 Thread Anthony PERARD
When running in a Xen PVH guest, there's nothing to do in PciAcpiInitialization() because there isn't any PCI bus. When the Host Bridge DID isn't recognised, simply continue. (The value of PcdOvmfHostBridgePciDevId would be 0 because it isn't set.) Ref:

[edk2-devel] [PATCH v5 11/35] OvmfPkg/XenPlatformPei: Use mXenHvmloaderInfo to get E820

2019-08-13 Thread Anthony PERARD
Use the already checked pointer mXenHvmloaderInfo to retrieve the E820 table produced by hvmloader. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 Signed-off-by: Anthony PERARD Acked-by: Laszlo Ersek --- OvmfPkg/XenPlatformPei/Xen.c | 18 +- 1 file changed, 9

[edk2-devel] [PATCH v5 13/35] OvmfPkg/Library/XenPlatformLib: New library

2019-08-13 Thread Anthony PERARD
The purpose of XenPlatformLib is to regroup the few functions that are used in several places to detect if Xen is detected, and to get the XenInfo HOB. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 Signed-off-by: Anthony PERARD Reviewed-by: Laszlo Ersek --- Notes: v4: - fix

[edk2-devel] [PATCH v5 12/35] OvmfPkg/XenPlatformPei: Grab RSDP from PVH guest start of day struct

2019-08-13 Thread Anthony PERARD
Check if there's a start of the day struct provided to PVH guest, save the ACPI RSDP address for later. This patch import import arch-x86/hvm/start_info.h from xen.git. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 Signed-off-by: Anthony PERARD Acked-by: Laszlo Ersek --- Notes:

[edk2-devel] [PATCH v5 27/35] OvmfPkg/PlatformBootManagerLib: Use XenDetected from XenPlatformLib

2019-08-13 Thread Anthony PERARD
Replace the XenDetected() implementation by the one from XenPlatformLib. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 Signed-off-by: Anthony PERARD Reviewed-by: Laszlo Ersek --- Notes: v4: - removed gEfiXenInfoGuid from Guids list and the associated include of

[edk2-devel] [PATCH v5 25/35] OvmfPkg/XenPlatformPei: Ignore missing PCI Host Bridge on Xen PVH

2019-08-13 Thread Anthony PERARD
When the device ID of the host bridge is unknown, check if we are running as a PVH guest as there is no PCI bus in that case. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 Signed-off-by: Anthony PERARD Acked-by: Laszlo Ersek --- Notes: v3: - Remove use of

[edk2-devel] [PATCH v5 30/35] OvmfPkg/OvmfXen: Introduce XenTimerDxe

2019-08-13 Thread Anthony PERARD
"OvmfPkg/8254TimerDxe" is replaced with a Xen-specific EFI_TIMER_ARCH_PROTOCOL implementation. Also remove 8259InterruptControllerDxe as it is not used anymore. This Timer uses the local APIC timer as time source as it can work on both a Xen PVH guest and an HVM one. Based on the

[edk2-devel] [PATCH v5 24/35] OvmfPkg/XenPlatformPei: Reserve VGA memory region, to boot Linux

2019-08-13 Thread Anthony PERARD
Linux panic if the VGA region isn't reserved. When Linux is booted on EFI system, it expects the memory at 0xa to _not_ be conventional memory. Otherwise a variable isn't initialised properly and Linux panic when a virtual console/terminal is asked to be created. See for more detail:

[edk2-devel] [PATCH v5 32/35] OvmfPkg: Introduce PcdXenGrantFrames

2019-08-13 Thread Anthony PERARD
Introduce PcdXenGrantFrames to replace a define in XenBusDxe and allow the same value to be used in a different module. The reason for the number of page to be 4 doesn't exist anymore, so simply remove the comment. Signed-off-by: Anthony PERARD Reviewed-by: Laszlo Ersek --- Notes: v5:

[edk2-devel] [PATCH v5 07/35] OvmfPkg/XenResetVector: Saving start of day pointer for PVH guests

2019-08-13 Thread Anthony PERARD
As described in the Xen PVH documentation [1], "ebx: contains the physical memory address where the loader has placed the boot start info structure". To have this pointer saved to be able to use it later in the PEI phase, we allocate some space in the MEMFD for it. We use 'XPVH' as a signature

[edk2-devel] [PATCH v5 01/35] OvmfPkg/ResetSystemLib: Add missing dependency on PciLib

2019-08-13 Thread Anthony PERARD
Add missing dependency on PciLib and remove extra includes of OvmfPlatforms.h. Signed-off-by: Anthony PERARD Reviewed-by: Laszlo Ersek --- Notes: v2: - also add PciLib.h include to the .c - and remove extra include of OvmfPlatforms.h

[edk2-devel] [PATCH v5 09/35] OvmfPkg/OvmfXen: use a TimerLib instance that depends only on the CPU

2019-08-13 Thread Anthony PERARD
The ACPI Timer isn't present in a PVH guest, but local APIC works on both PVH and HVM. Note that the use of SecPeiDxeTimerLibCpu might be an issue with a driver of type DXE_RUNTIME_DRIVER. I've attempted to find out which of the DXE_RUNTIME_DRIVER uses the TimerLib at runtime. I've done that by

[edk2-devel] [PATCH v5 00/35] Specific platform to run OVMF in Xen PVH and HVM guests

2019-08-13 Thread Anthony PERARD
Patch series available in this git branch: https://xenbits.xen.org/git-http/people/aperard/ovmf.git br.platform-xen-pvh-v5 Changes in v5: - patch 23 got a rework of the lapic range skipping - small fixups in patch 20, 22, 23, 31, 32, 33. see notes for detail. Hi, I've started to create a Xen

[edk2-devel] [PATCH v5 04/35] OvmfPkg: Introduce XenPlatformPei

2019-08-13 Thread Anthony PERARD
Introduce XenPlatformPei, a copy of OvmfPkg/PlatformPei without some of QEMU specific initialization, Xen does not support QemuFwCfg. This new module will be adjusted to accommodate Xen PVH. fw_cfg dependents that have been removed, which are dynamically skipped when running PlatformPei on Xen:

[edk2-devel] [PATCH v5 08/35] OvmfPkg/XenResetVector: Allow jumpstart from either hvmloader or PVH

2019-08-13 Thread Anthony PERARD
This patch allows the ResetVector to be run indenpendently from build time addresses. The goal of the patch is to avoid having to create RAM just below 4G when creating a Xen PVH guest while being compatible with the way hvmloader currently load OVMF, just below 4G. Only the new PVH entry point

[edk2-devel] [PATCH v5 02/35] OvmfPkg: Create platform OvmfXen

2019-08-13 Thread Anthony PERARD
OvmfXen is a copy of OvmfX64, removing VirtIO and some SMM. This new platform will be changed to make it works on two types of Xen guest: HVM and PVH. Compare to OvmfX64, this patch: - changed: PLATFORM_GUID, OUTPUT_DIRECTORY, FLASH_DEFINITION - removed: VirtioLib class resolution - removed:

[edk2-devel] [PATCH v5 03/35] OvmfPkg: Introduce XenResetVector

2019-08-13 Thread Anthony PERARD
Introduce XenResetVector, a copy of OvmfPkg/ResetVector, with one changes: - SEC_DEFAULT_CR0: enable cache (bit 30 or CD set to 0) Xen copies the OVMF code to RAM, there is no need to disable cache. This new module will later be modified to add a new entry point, more detail in a following

[edk2-devel] [PATCH v5 05/35] OvmfPkg/OvmfXen: Creating an ELF header

2019-08-13 Thread Anthony PERARD
This patch changes the flash device image of OvmfXen to make it look like it's an ELF. For this, we replace the empty embedded variable store by a binary array, which is a ELF file header. The ELF header explain to a loader to load the binary at the address 1MB, then jump to the PVH entry point

[edk2-devel] [PATCH v5 06/35] OvmfPkg/XenResetVector: Add new entry point for Xen PVH

2019-08-13 Thread Anthony PERARD
Add a new entry point for Xen PVH that enter directly in 32bits. Information on the expected state of the machine when this entry point is used can be found at: https://xenbits.xenproject.org/docs/unstable/misc/pvh.html Also, compare to the original file [1], the two `nop' of the "resetVector"

Re: [edk2-devel] static data in dxe_runtime modules

2019-08-13 Thread Roman Kagan
On Tue, Aug 13, 2019 at 11:10:27AM +0200, Laszlo Ersek wrote: > On 08/12/19 20:43, Roman Kagan wrote: > > On Fri, Aug 09, 2019 at 04:07:00PM +, Roman Kagan via Groups.Io wrote: > >> On Thu, Aug 08, 2019 at 07:39:14PM +0200, Laszlo Ersek wrote: > >>> On 08/07/19 19:41, Andrew Fish wrote: >

[edk2-devel] [PATCH] UefiCpuPkg: Adding a new TSC library by using CPUID(0x15) TSC leaf

2019-08-13 Thread Donald Kuo
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1909 Cc: Ray Ni Cc: Star Zeng Cc: Eric Dong Cc: Amy Chan Cc: Rangasai V Chaganty Signed-off-by: Donald Kuo --- UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.c | 41 +++ UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf | 35 +++

[edk2-devel][Patch] MdeModulePkg/DxeCapsuleLibFmp: Improve comparisons in CapsuleOnDisk.c

2019-08-13 Thread Xu, Wei6
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2028 Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=). Cc: Hao A Wu Cc: Liming Gao Signed-off-by: Wei6 Xu --- MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c | 2 +- 1 file changed, 1 insertion(+), 1

[edk2-devel][Patch] MdeModulePkg/CapsuleApp: Improve comparisons in CapsuleOnDisk.c

2019-08-13 Thread Xu, Wei6
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2028 Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=). Cc: Hao A Wu Cc: Liming Gao Signed-off-by: Wei6 Xu --- MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [edk2-devel] [Patch v2 1/6] UefiCpuPkg/RegisterCpuFeaturesLib: Add "Test Then Write" Macros.

2019-08-13 Thread Laszlo Ersek
On 08/12/19 12:31, Dong, Eric wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2040 > > Add below new micros which test the current value before write > the new value. Only write new value when current value not > same as new value. > CPU_REGISTER_TABLE_TEST_THEN_WRITE32 >

Re: [edk2-devel] [Patch v2 5/6] UefiCpuPkg/RegisterCpuFeaturesLib: Supports test then write new value logic.

2019-08-13 Thread Laszlo Ersek
On 08/12/19 12:31, Dong, Eric wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2040 > > Supports new logic which test current value before write new value. > Only write new value when current value not same as new value. > > Signed-off-by: Eric Dong > Cc: Ray Ni > Cc: Laszlo Ersek

Re: [edk2-devel] [Patch v2 6/6] UefiCpuPkg/CpuCommonFeaturesLib: Use new macros.

2019-08-13 Thread Laszlo Ersek
On 08/12/19 12:31, Dong, Eric wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2040 > > Below code is current implementation: > if (MsrRegister[ProcessorNumber].Bits.Lock == 0) { > CPU_REGISTER_TABLE_WRITE_FIELD ( > ProcessorNumber, > Msr, >

Re: [edk2-devel] [Patch v2 4/6] UefiCpuPkg/RegisterCpuFeaturesLib: Combine CR read/write action in one function.

2019-08-13 Thread Laszlo Ersek
On 08/12/19 12:31, Dong, Eric wrote: > Signed-off-by: Eric Dong > Cc: Ray Ni > Cc: Laszlo Ersek > --- > .../CpuFeaturesInitialize.c | 112 ++ > 1 file changed, 64 insertions(+), 48 deletions(-) > > diff --git >

Re: [edk2-devel] [Patch] MdeModulePkg DxeCore: Fix for missing MAT update

2019-08-13 Thread Laszlo Ersek
On 08/13/19 01:22, Kinney, Michael D wrote: > > >> -Original Message- >> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] >> On Behalf Of Laszlo Ersek >> Sent: Monday, August 12, 2019 9:24 AM >> To: devel@edk2.groups.io; Gao, Liming >> >> Cc: Mike Turner ; Wang, Jian J >> ; Wu,

Re: [edk2-devel] [PATCH] MdePkg: Add MmAccess and MmControl definition.

2019-08-13 Thread Liming Gao
Push @6f33f7a262314af35e2b99c849e08928ea49aa55 >-Original Message- >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of >Liming Gao >Sent: Saturday, August 10, 2019 11:34 AM >To: Chen, Marc W ; devel@edk2.groups.io; >ler...@redhat.com; Ni, Ray >Cc: Kinney, Michael D

Re: [edk2-devel] static data in dxe_runtime modules

2019-08-13 Thread Laszlo Ersek
On 08/12/19 20:43, Roman Kagan wrote: > On Fri, Aug 09, 2019 at 04:07:00PM +, Roman Kagan via Groups.Io wrote: >> On Thu, Aug 08, 2019 at 07:39:14PM +0200, Laszlo Ersek wrote: >>> On 08/07/19 19:41, Andrew Fish wrote: > On Aug 7, 2019, at 10:29 AM, Laszlo Ersek wrote: > On 08/05/19

Re: [edk2-devel] [PATCH v4 00/35] Specific platform to run OVMF in Xen PVH and HVM guests

2019-08-13 Thread Laszlo Ersek
On 08/12/19 17:12, Anthony PERARD wrote: > On Tue, Jul 30, 2019 at 03:10:13PM +0200, Laszlo Ersek wrote: >> Hi Anthony, >> >> On 07/29/19 17:39, Anthony PERARD wrote: >>> Patch series available in this git branch: >>> https://xenbits.xen.org/git-http/people/aperard/ovmf.git >>>

[edk2-devel] [PATCH 1/1] CryptoPkg/OpensslLib: Add missing header files in INF file

2019-08-13 Thread Zhang, Shenglei
The header files are used but missing in INF,which causes warning message when building them. https://bugzilla.tianocore.org/show_bug.cgi?id=2036 Cc: Jian Wang Cc: Ting Ye Signed-off-by: Shenglei Zhang --- CryptoPkg/Library/OpensslLib/OpensslLib.inf | 59 +++

[edk2-devel] [PATCH v3 0/5] Build cache enhancement

2019-08-13 Thread Steven Shi
From: "Shi, Steven" Enhance the edk2 build cache with below patches: Patch 01/05: Improve the cache hit rate through new cache checkpoint and hash algorithm Patch 02/05: Print more info to explain why a module build cache miss Patch 03/05: Fix the unsafe [self.Arch][self.Name] key usage in

[edk2-devel] [PATCH v3 4/5] BaseTools: Add GenFds multi-thread support in build cache

2019-08-13 Thread Steven Shi
From: "Shi, Steven" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1923 Fix the issue that the GenFds multi-thread will build fail if enable the build cache together. Cc: Liming Gao Cc: Bob Feng Signed-off-by: Steven Shi --- BaseTools/Source/Python/AutoGen/ModuleAutoGen.py | 23

[edk2-devel] [PATCH v3 2/5] BaseTools: Print first cache missing file for build cachle

2019-08-13 Thread Steven Shi
From: "Shi, Steven" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1925 When a module build cache miss, add support to print the first cache missing file path and name. Cc: Liming Gao Cc: Bob Feng Signed-off-by: Steven Shi --- BaseTools/Source/Python/AutoGen/AutoGenWorker.py | 2 ++

[edk2-devel] [PATCH v3 5/5] BaseTools: Improve the file saving and copying reliability

2019-08-13 Thread Steven Shi
From: "Shi, Steven" BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2079 The Basetool CopyFileOnChange() and SaveFileOnChange() functions might raise the IOError occasionally when build in Windows with multi-process and build cache enabled. The CopyFileOnChange() and SaveFileOnChange() might

[edk2-devel] [PATCH v3 3/5] BaseTools: Change the [Arch][Name] module key in Build cache

2019-08-13 Thread Steven Shi
From: "Shi, Steven" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1951 Current build cache use the module's [self.Arch][self.Name] info as the ModuleAutoGen object key in hash list and dictionary. The [self.Arch][self.Name] is not safe as the module key because there could be two modules

[edk2-devel] [PATCH v3 1/5] BaseTools: Improve the cache hit in the edk2 build cache

2019-08-13 Thread Steven Shi
From: "Shi, Steven" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1927 Current cache hash algorithm does not parse and generate the makefile to get the accurate dependency files for a module. It instead use the platform and package meta files to get the module depenedency in a quick but

[edk2-devel] [PATCH v2 1/1] MdePkg: Add STATIC_ASSERT macro

2019-08-13 Thread vit9696 via Groups.Io
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2048 Provide a macro for compile time assertions. Equivalent to C11 static_assert macro from assert.h. Signed-off-by: Vitaly Cheptsov --- MdePkg/Include/Base.h | 11 +++ 1 file changed, 11 insertions(+) diff --git

[edk2-devel] [PATCH v2 0/1] MdePkg: Add STATIC_ASSERT macro

2019-08-13 Thread vit9696 via Groups.Io
Implements https://bugzilla.tianocore.org/show_bug.cgi?id=2048. Things to note: - _Static_assert is a standard C11 keyword and thus is available on every modern compiler (including Apple Clang, Clang, and GCC). - static_assert is a hack to support MSVC, which implements static assertions with