Re: [edk2-devel] [PATCH V3 3/3] MdeModulePkg/PartitionDxe: Add already start check for child hanldes

2020-07-14 Thread Ni, Ray
Looks good to me! Thanks!! > -Original Message- > From: Gao, Zhichao > Sent: Tuesday, July 14, 2020 1:56 PM > To: Ni, Ray ; devel@edk2.groups.io > Cc: Wu, Hao A > Subject: RE: [edk2-devel] [PATCH V3 3/3] MdeModulePkg/PartitionDxe: Add > already start check for child hanldes > > Sure. >

Re: [edk2-devel] [Patch v5 1/1] BaseTools: Add Guid name support in GenFfs.

2020-07-14 Thread Bob Feng
Hi Yuwei, The change history info need to be added below --- so that it will not go to commit message. Thanks, Bob -Original Message- From: devel@edk2.groups.io On Behalf Of Yuwei Chen Sent: Tuesday, July 14, 2020 1:43 PM To: devel@edk2.groups.io Cc: Feng, Bob C ; Gao, Liming

Re: [edk2-devel] [Patch v3 12/16] UnitTestFrameworkPkg/UnitTestLib: Add checks for ASSERT()

2020-07-14 Thread Liming Gao
Mike: -Original Message- From: devel@edk2.groups.io On Behalf Of Michael D Kinney Sent: 2020年7月11日 10:09 To: devel@edk2.groups.io Cc: Sean Brogan ; Bret Barkelew ; Yao, Jiewen Subject: [edk2-devel] [Patch v3 12/16] UnitTestFrameworkPkg/UnitTestLib: Add checks for ASSERT() REF: REF:

Re: [edk2-devel] [Patch v3 00/16] UnitTestFrameworkPkg: Enhancements and bug fixes

2020-07-14 Thread Liming Gao
Mike: Thanks for your update. This patch set is good to me. Reviewed-by: Liming Gao Thanks Liming -Original Message- From: devel@edk2.groups.io On Behalf Of Michael D Kinney Sent: 2020年7月11日 10:09 To: devel@edk2.groups.io Subject: [edk2-devel] [Patch v3 00/16] UnitTestFrameworkPkg:

Re: [edk2-devel] [PATCH 10/11] OvmfPkg/LsiScsiDxe: Process the SCSI Request Packet

2020-07-14 Thread Gary Lin
On Wed, Jul 08, 2020 at 02:02:27PM +0800, Gary Lin via groups.io wrote: > On Tue, Jul 07, 2020 at 02:46:14PM +0200, Laszlo Ersek wrote: > > On 07/01/20 06:04, Gary Lin wrote: > > > This is the second part of LsiScsiPassThru(). LsiScsiProcessRequest() is > > > added to translate the SCSI Request

Re: [edk2-devel] [edk2-platforms][PATCH v3 3/4] Silicon/ARM/N1SoC: Implement the PciHostBridgeLib library

2020-07-14 Thread Leif Lindholm
On Fri, Jul 03, 2020 at 16:48:55 +0530, Pranav Madhu wrote: > From: Deepak Pandey > > Neoverse N1 SoC includes a PCIe root complex to which a AHCI, GbE and > USB controllers are attached as an endpoint. So implement the > PciHostBridgeLib glue layer and enable support for PCIe controller and >

[edk2-devel] [edk2] [edk2-platforms/devel-IntelAtomProcessorE3900] generate new spi chunks files

2020-07-14 Thread Andrey V
Hi I need a help to regenerate new spi chunks for my board I am using FIT tool and setting everything I need, but it will generate .bin IFWI image not a 5 spi chunks the stitching tool needs Who can help to instruct me how can I can convert IFWI image of 8K to 4 spi chunks: 1. SpiChunk1.bin 2.

Re: [edk2-devel] [edk2-platforms][PATCH v3 1/1] Platform/RaspberryPi/Drivers: Add SD/(e)MMC card detection

2020-07-14 Thread Leif Lindholm
On Mon, Jul 13, 2020 at 12:16:20 +0100, Pete Batard wrote: > The Raspberry Pi 3 and Pi 4 platforms (with latest EEPROM) can boot > straight from USB, without the need for an SD card being present. > However, the IsCardPresent () calls from the ArasanMmcHost and SdHost > drivers are currently

Re: [edk2-devel] [PATCH edk2-platforms 1/1] Platform/RaspberryPi: remove unused variable GpuIndex from PlatformLib

2020-07-14 Thread Leif Lindholm
On Tue, Jul 14, 2020 at 13:58:11 +0100, Pete Batard wrote: > Good call. > > On 2020.07.14 13:45, Leif Lindholm wrote: > > Commit 678f6bff3c46 ("RPi4: reserve/map memory above 4GB when present") > > removed the only user of the GpuIndex variable in > > ArmPlatformGetVirtualMemoryMap, which causes

[edk2-devel] [PATCH v10 27/46] OvmfPkg/MemEncryptSevLib: Add an SEV-ES guest indicator function

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Create a function that can be used to determine if the VM is running as an SEV-ES guest. Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Reviewed-by: Laszlo Ersek Signed-off-by: Tom Lendacky ---

[edk2-devel] [PATCH v10 26/46] OvmfPkg/VmgExitLib: Add support for DR7 Read/Write NAE events

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a DR7 read or write intercept generates a #VC exception. The #VC handler must provide special support to the guest for this. On a DR7 write, the #VC handler must cache the value and issue a VMGEXIT to

[edk2-devel] [PATCH v10 29/46] OvmfPkg: Create a GHCB page for use during Sec phase

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 A GHCB page is needed during the Sec phase, so this new page must be created. Since the #VC exception handler routines assume that a per-CPU variable area is immediately after the GHCB, this per-CPU variable area must

[edk2-devel] [PATCH v10 28/46] OvmfPkg: Add support to perform SEV-ES initialization

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 When SEV-ES is enabled, then SEV is also enabled. Add support to the SEV initialization function to also check for SEV-ES being enabled, and if enabled, set the SEV-ES enabled PCD (PcdSevEsIsEnabled). Cc: Jordan Justen

[edk2-devel] [PATCH v10 25/46] OvmfPkg/VmgExitLib: Add support for MWAIT/MWAITX NAE events

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a MWAIT/MWAITX intercept generates a #VC exception. VMGEXIT must be used to allow the hypervisor to handle this intercept. Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Acked-by: Laszlo Ersek

[edk2-devel] [PATCH v10 02/46] UefiCpuPkg: Create PCD to be used in support of SEV-ES

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 A new dynamic UefiCpuPkg PCD is needed to support SEV-ES under OVMF: - PcdSevEsIsEnabled: BOOLEAN value used to indicate if SEV-ES is enabled Cc: Eric Dong Cc: Ray Ni Cc: Laszlo Ersek Reviewed-by: Eric Dong

[edk2-devel] [PATCH v10 01/46] MdeModulePkg: Create PCDs to be used in support of SEV-ES

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Two new dynamic MdeModulePkg PCDs are needed to support SEV-ES under OVMF: - PcdGhcbBase: UINT64 value that is the base address of the GHCB allocation. - PcdGhcbSize: UINT64 value

[edk2-devel] [PATCH v10 03/46] MdePkg: Add the MSR definition for the GHCB register

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 For SEV-ES, the GHCB page address is stored in the GHCB MSR register (0xc0010130). Define the register and the format used for register during GHCB protocol negotiation. Cc: Michael D Kinney Cc: Liming Gao

[edk2-devel] [PATCH v10 04/46] MdePkg: Add a structure definition for the GHCB

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 The GHCB is used by an SEV-ES guest for communicating between the guest and the hypervisor. Create the GHCB definition as defined by the GHCB protocol definition. Cc: Michael D Kinney Cc: Liming Gao Signed-off-by: Tom

Re: [edk2-devel] [edk2-platforms][PATCH v3 1/1] Platform/RaspberryPi/Drivers: Add SD/(e)MMC card detection

2020-07-14 Thread Leif Lindholm
On Tue, Jul 14, 2020 at 14:49:21 +0100, Pete Batard wrote: > On 2020.07.14 14:25, Leif Lindholm wrote: > > On Mon, Jul 13, 2020 at 12:16:20 +0100, Pete Batard wrote: > > > The Raspberry Pi 3 and Pi 4 platforms (with latest EEPROM) can boot > > > straight from USB, without the need for an SD card

[edk2-devel] [PATCH v10 21/46] OvmfPkg/VmgExitLib: Add support for INVD NAE events

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a INVD intercept generates a #VC exception. VMGEXIT must be used to allow the hypervisor to handle this intercept. Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Acked-by: Laszlo Ersek

[edk2-devel] [PATCH v10 20/46] OvmfPkg/VmgExitLib: Add support for RDPMC NAE events

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a RDPMC intercept generates a #VC exception. VMGEXIT must be used to allow the hypervisor to handle this intercept. Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Acked-by: Laszlo Ersek

[edk2-devel] [PATCH v10 22/46] OvmfPkg/VmgExitLib: Add support for VMMCALL NAE events

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a VMMCALL intercept generates a #VC exception. VMGEXIT must be used to allow the hypervisor to handle this intercept. Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Acked-by: Laszlo Ersek

[edk2-devel] [PATCH v10 23/46] OvmfPkg/VmgExitLib: Add support for RDTSCP NAE events

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a RDTSCP intercept generates a #VC exception. VMGEXIT must be used to allow the hypervisor to handle this intercept. Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Acked-by: Laszlo Ersek

[edk2-devel] [PATCH v10 24/46] OvmfPkg/VmgExitLib: Add support for MONITOR/MONITORX NAE events

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a MONITOR/MONITORX intercept generates a #VC exception. VMGEXIT must be used to allow the hypervisor to handle this intercept. Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Acked-by: Laszlo

[edk2-devel] [PATCH v10 19/46] OvmfPkg/VmgExitLib: Add support for RDTSC NAE events

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a RDTSC intercept generates a #VC exception. VMGEXIT must be used to allow the hypervisor to handle this intercept. Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Acked-by: Laszlo Ersek

Re: [edk2-devel] [PATCH edk2-platforms 1/1] Platform/RaspberryPi: remove unused variable GpuIndex from PlatformLib

2020-07-14 Thread Pete Batard
Good call. On 2020.07.14 13:45, Leif Lindholm wrote: Commit 678f6bff3c46 ("RPi4: reserve/map memory above 4GB when present") removed the only user of the GpuIndex variable in ArmPlatformGetVirtualMemoryMap, which causes a build error of NOOPT profile with gcc 8.3. Delete the variable, and its

Re: [edk2-devel] [edk2][PATCH 1/1] BcmGenetDxe: don't consume RX buffer until it's actually copied

2020-07-14 Thread Pete Batard
On 2020.07.14 14:36, Leif Lindholm wrote: On Mon, Jul 13, 2020 at 12:25:18 +0100, Pete Batard wrote: One very minor formatting issue inline (that can be sorted during integration): I would also like to prepend "Silicon/" to the subject line. Please do. It should have been there in the first

[edk2-devel] [PATCH v10 17/46] OvmfPkg/VmgExitLib: Add support for NPF NAE events (MMIO)

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a NPF intercept for an NPT entry with a reserved bit set generates a #VC exception. This condition is assumed to be an MMIO access. VMGEXIT must be used to allow the hypervisor to handle this intercept.

[edk2-devel] [PATCH v10 18/46] OvmfPkg/VmgExitLib: Add support for WBINVD NAE events

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a WBINVD intercept generates a #VC exception. VMGEXIT must be used to allow the hypervisor to handle this intercept. Cc: Jordan Justen Cc: Laszlo Ersek Cc: Ard Biesheuvel Acked-by: Laszlo Ersek

[edk2-devel] [PATCH v10 15/46] OvmfPkg/VmgExitLib: Add support for CPUID NAE events

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a CPUID intercept generates a #VC exception. VMGEXIT must be used to allow the hypervisor to handle this intercept. Add support to construct the required GHCB values to support a CPUID NAE event.

[edk2-devel] [PATCH v10 16/46] OvmfPkg/VmgExitLib: Add support for MSR_PROT NAE events

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a MSR_PROT intercept generates a #VC exception. VMGEXIT must be used to allow the hypervisor to handle this intercept. Add support to construct the required GHCB values to support an MSR_PROT NAE event.

[edk2-devel] [PATCH v10 14/46] OvmfPkg/VmgExitLib: Support string IO for IOIO_PROT NAE events

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Add support to the #VC exception handler to handle string IO. This requires expanding the IO instruction parsing to recognize string based IO instructions as well as preparing an un-encrypted buffer to be used to

[edk2-devel] [PATCH v10 00/46] SEV-ES guest support

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky This patch series provides support for running EDK2/OVMF under SEV-ES. Secure Encrypted Virtualization - Encrypted State (SEV-ES) expands on the SEV support to protect the guest register state from the hypervisor. See "AMD64 Architecture Programmer's Manual Volume 2: System

[edk2-devel] [PATCH v10 33/46] UefiCpuPkg: Create an SEV-ES workarea PCD

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Create an SEV-ES workarea PCD. This PCD will be used for BSP communication during SEC and for AP startup during PEI and DXE phases, the latter is the reason for creating it in the UefiCpuPkg. Cc: Eric Dong Cc: Ray Ni

[edk2-devel] [PATCH v10 35/46] OvmfPkg/PlatformPei: Reserve SEV-ES work area if S3 is supported

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Protect the SEV-ES work area memory used by an SEV-ES guest. Regarding the lifecycle of the SEV-ES memory area: PcdSevEsWorkArea (a) when and how it is initialized after first boot of the VM If SEV-ES is enabled,

[edk2-devel] [PATCH v10 36/46] OvmfPkg/ResetVector: Add support for a 32-bit SEV check

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 During BSP startup, the reset vector code will issue a CPUID instruction while in 32-bit mode. When running as an SEV-ES guest, this will trigger a #VC exception. Add exception handling support to the early reset vector

[edk2-devel] [PATCH v10 37/46] OvmfPkg/Sec: Add #VC exception handling for Sec phase

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 An SEV-ES guest will generate a #VC exception when it encounters a non-automatic exit (NAE) event. It is expected that the #VC exception handler will communicate with the hypervisor using the GHCB to handle the NAE

[edk2-devel] [PATCH v10 32/46] OvmfPkg/PlatformPei: Move early GDT into ram when SEV-ES is enabled

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 The SEV support will clear the C-bit from non-RAM areas. The early GDT lives in a non-RAM area, so when an exception occurs (like a #VC) the GDT will be read as un-encrypted even though it is encrypted. This will result

[edk2-devel] [PATCH v10 39/46] OvmfPkg/QemuFlashFvbServicesRuntimeDxe: Bypass flash detection with SEV-ES

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 The flash detection routine will attempt to determine how the flash device behaves (e.g. ROM, RAM, Flash). But when SEV-ES is enabled and the flash device behaves as a ROM device (meaning it is marked read-only by the

[edk2-devel] [PATCH v10 30/46] OvmfPkg/PlatformPei: Reserve GHCB-related areas if S3 is supported

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Protect the memory used by an SEV-ES guest when S3 is supported. This includes the page table used to break down the 2MB page that contains the GHCB so that it can be marked un-encrypted, as well as the GHCB area.

[edk2-devel] [PATCH v10 34/46] OvmfPkg: Reserve a page in memory for the SEV-ES usage

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Reserve a fixed area of memory for SEV-ES use and set a fixed PCD, PcdSevEsWorkAreaBase, to this value. This area will be used by SEV-ES support for two purposes: 1. Communicating the SEV-ES status during BSP boot to

[edk2-devel] [PATCH v10 31/46] OvmfPkg: Create GHCB pages for use during Pei and Dxe phase

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Allocate memory for the GHCB pages and the per-CPU variable pages during SEV initialization for use during Pei and Dxe phases. The GHCB page(s) must be shared pages, so clear the encryption mask from the current page

[edk2-devel] [PATCH v10 38/46] OvmfPkg/Sec: Enable cache early to speed up booting

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Currently, the OVMF code relies on the hypervisor to enable the cache support on the processor in order to improve the boot speed. However, with SEV-ES, the hypervisor is not allowed to change the CR0 register to enable

Re: [edk2-devel] TianoCore Bug Triage - APAC / NAMO - Tue, 07/14/2020 6:30pm-7:30pm #cal-reminder

2020-07-14 Thread Liming Gao
There are only 5 unconfirmed issues this week to be discussed. So, this week Bug Triage will be cancelled. 2850 EDK2 Tools unassig...@tianocore.org UNCO --- Generate compile_commands.json file needed by clangd VS Code

Re: [edk2-devel] [edk2][PATCH 1/1] BcmGenetDxe: don't consume RX buffer until it's actually copied

2020-07-14 Thread Leif Lindholm
On Mon, Jul 13, 2020 at 12:25:18 +0100, Pete Batard wrote: > One very minor formatting issue inline (that can be sorted during > integration): I would also like to prepend "Silicon/" to the subject line. If I can do those two things: Reviewed-by: Leif Lindholm > On 2020.07.12 05:28, Andrei

Re: [edk2-devel] [edk2][PATCH 1/1] BcmGenetDxe: don't consume RX buffer until it's actually copied

2020-07-14 Thread Leif Lindholm
On Mon, Jul 13, 2020 at 12:25:18 +0100, Pete Batard wrote: > One very minor formatting issue inline (that can be sorted during > integration): Will do, thanks for highlighting (and review). / Leif > On 2020.07.12 05:28, Andrei Warkentin wrote: > > This was originally a bit sloppy, and could

Re: [edk2-devel] [edk2-platforms][PATCH v3 1/1] Platform/RaspberryPi/Drivers: Add SD/(e)MMC card detection

2020-07-14 Thread Pete Batard
On 2020.07.14 14:25, Leif Lindholm wrote: On Mon, Jul 13, 2020 at 12:16:20 +0100, Pete Batard wrote: The Raspberry Pi 3 and Pi 4 platforms (with latest EEPROM) can boot straight from USB, without the need for an SD card being present. However, the IsCardPresent () calls from the ArasanMmcHost

[edk2-devel] [PATCH edk2-platforms 1/1] Platform/RaspberryPi: remove unused variable GpuIndex from PlatformLib

2020-07-14 Thread Leif Lindholm
Commit 678f6bff3c46 ("RPi4: reserve/map memory above 4GB when present") removed the only user of the GpuIndex variable in ArmPlatformGetVirtualMemoryMap, which causes a build error of NOOPT profile with gcc 8.3. Delete the variable, and its initialization. Cc: Andrei Warkentin Cc: Pete Batard

[edk2-devel] [PATCH v10 06/46] MdePkg/BaseLib: Add support for the XGETBV instruction

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a CPUID instruction requires the current value of the XCR0 register. In order to retrieve that value, the XGETBV instruction needs to be executed. Provide the necessary support to execute the XGETBV

[edk2-devel] [PATCH v10 08/46] UefiCpuPkg: Implement library support for VMGEXIT

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 To support handling #VC exceptions and issuing VMGEXIT instructions, create a library with functions that can be used to perform these #VC/VMGEXIT related operations. This includes functions for: - Handling #VC

[edk2-devel] [PATCH v10 05/46] MdeModulePkg/DxeIplPeim: Support GHCB pages when creating page tables

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 GHCB pages must be mapped as shared pages, so modify the process of creating identity mapped pagetable entries so that GHCB entries are created without the encryption bit set. The GHCB range consists of two pages per

[edk2-devel] [PATCH v10 11/46] UefiCpuPkg/CpuExceptionHandler: Add base support for the #VC exception

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Add base support to handle #VC exceptions. Update the common exception handlers to invoke the VmgExitHandleVc () function of the VmgExitLib library when a #VC is encountered. A non-zero return code will propagate to the

[edk2-devel] [PATCH v10 10/46] UefiPayloadPkg: Prepare UefiPayloadPkg to use the VmgExitLib library

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Various CpuExceptionHandlerLib libraries will updated to use the new VmgExitLib library. To prevent any build breakage, update the UefiPayloadPkg DSC files that use a form of the CpuExceptionHandlerLib library to include

[edk2-devel] [PATCH v10 12/46] OvmfPkg/VmgExitLib: Implement library support for VmgExitLib in OVMF

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky The base VmgExitLib library provides a default limited interface. As it does not provide full support, create an OVMF version of this library to begin the process of providing full support of SEV-ES within OVMF. SEV-ES support is only provided for X64 builds, so only

[edk2-devel] [PATCH v10 13/46] OvmfPkg/VmgExitLib: Add support for IOIO_PROT NAE events

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Under SEV-ES, a IOIO_PROT intercept generates a #VC exception. VMGEXIT must be used to allow the hypervisor to handle this intercept. Add support to construct the required GHCB values to support a IOIO_PROT NAE event.

[edk2-devel] [PATCH v10 07/46] MdePkg/BaseLib: Add support for the VMGEXIT instruction

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 VMGEXIT is a new instruction used for Hypervisor/Guest communication when running as an SEV-ES guest. A VMGEXIT will cause an automatic exit (AE) to occur, resulting in a #VMEXIT with an exit code value of 0x403.

[edk2-devel] [PATCH v10 09/46] OvmfPkg: Prepare OvmfPkg to use the VmgExitLib library

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Various CpuExceptionHandlerLib libraries will updated to use the new VmgExitLib library. To prevent any build breakage, update the OvmfPkg DSC files that use a form of the CpuExceptionHandlerLib library to include the

Re: [edk2-devel] [edk2][PATCH 1/1] BcmGenetDxe: don't consume RX buffer until it's actually copied

2020-07-14 Thread Leif Lindholm
On Tue, Jul 14, 2020 at 14:51:46 +0100, Pete Batard wrote: > On 2020.07.14 14:36, Leif Lindholm wrote: > > On Mon, Jul 13, 2020 at 12:25:18 +0100, Pete Batard wrote: > > > One very minor formatting issue inline (that can be sorted during > > > integration): > > > > I would also like to prepend

[edk2-devel] [PATCH v10 42/46] UefiCpuPkg: Allow AP booting under SEV-ES

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Typically, an AP is booted using the INIT-SIPI-SIPI sequence. This sequence is intercepted by the hypervisor, which sets the AP's registers to the values requested by the sequence. At that point, the hypervisor can start

[edk2-devel] [PATCH v10 41/46] UefiCpuPkg/MpInitLib: Add CPU MP data flag to indicate if SEV-ES is enabled

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 When starting APs in an SMP configuration, the AP needs to know if it is running as an SEV-ES guest in order to assign a GHCB page. Add a field to the CPU_MP_DATA structure that will indicate if SEV-ES is enabled. This

[edk2-devel] [PATCH v10 40/46] UefiCpuPkg: Add a 16-bit protected mode code segment descriptor

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 A hypervisor is not allowed to update an SEV-ES guests register state, so when booting an SEV-ES guest AP, the hypervisor is not allowed to set the RIP to the guest requested value. Instead, an SEV-ES AP must be

[edk2-devel] [PATCH v10 44/46] OvmfPkg: Move the GHCB allocations into reserved memory

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 After having transitioned from UEFI to the OS, the OS will need to boot the APs. For an SEV-ES guest, the APs will have been parked by UEFI using GHCB pages allocated by UEFI. The hypervisor will write to the GHCB

[edk2-devel] [PATCH v10 46/46] Maintainers.txt: Add reviewers for the OvmfPkg SEV-related files

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky Register reviewers for the SEV-related files in OvmfPkg. Cc: Andrew Fish Cc: Laszlo Ersek Cc: Leif Lindholm Cc: Michael D Kinney Cc: Brijesh Singh Acked-by: Brijesh Singh Reviewed-by: Laszlo Ersek Signed-off-by: Tom Lendacky --- Maintainers.txt | 10 ++ 1

[edk2-devel] [PATCH v10 45/46] UefiCpuPkg/MpInitLib: Prepare SEV-ES guest APs for OS use

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 Before UEFI transfers control to the OS, it must park the AP. This is done using the AsmRelocateApLoop function to transition into 32-bit non-paging mode. For an SEV-ES guest, a few additional things must be done: -

[edk2-devel] [PATCH v10 43/46] OvmfPkg: Use the SEV-ES work area for the SEV-ES AP reset vector

2020-07-14 Thread Lendacky, Thomas
From: Tom Lendacky BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2198 A hypervisor is not allowed to update an SEV-ES guest's register state, so when booting an SEV-ES guest AP, the hypervisor is not allowed to set the RIP to the guest requested value. Instead an SEV-ES AP must be

[edk2-devel] Cancelled Event: TianoCore Bug Triage - APAC / NAMO - Tuesday, 14 July 2020 #cal-cancelled

2020-07-14 Thread devel@edk2.groups.io Calendar
BEGIN:VCALENDAR VERSION:2.0 PRODID:-//Groups.io Inc//Groups.io Calendar//EN METHOD:CANCELLED CALSCALE:GREGORIAN BEGIN:VEVENT UID:mlda.1580078539586725120.r...@groups.io DTSTAMP:20200714T161452Z ORGANIZER;CN=Brian Richardson:mailto:brian.richard...@intel.com DTSTART:20200715T013000Z

[edk2-devel] [PATCH] OvmfPkg/SmmControl2Dxe: negotiate ICH9_LPC_SMI_F_CPU_HOTPLUG

2020-07-14 Thread Laszlo Ersek
The ICH9_LPC_SMI_F_BROADCAST and ICH9_LPC_SMI_F_CPU_HOTPLUG feature flags cause QEMU to behave as follows: BROADCAST CPU_HOTPLUG use case / behavior - --- clear clearOVMF built without SMM_REQUIRE; or very old

Re: [edk2-devel] [Patch v3 12/16] UnitTestFrameworkPkg/UnitTestLib: Add checks for ASSERT()

2020-07-14 Thread Michael D Kinney
Liming, I will fix that one issue in the INF comment block when I push the commits. Thanks, Mike > -Original Message- > From: Gao, Liming > Sent: Monday, July 13, 2020 11:57 PM > To: devel@edk2.groups.io; Kinney, Michael D > > Cc: Sean Brogan ; Bret > Barkelew ; Yao, Jiewen > >

[edk2-devel] [PATCH v3 2/8] ShellPkg/AcpiView: Declutter error counters

2020-07-14 Thread Tomas Pilar (tpilar)
Remove superfluous accessor methods for error and warning counters. Cc: Ray Ni Cc: Zhichao Gao Signed-off-by: Tomas Pilar --- .../UefiShellAcpiViewCommandLib/AcpiParser.c | 54 ++- .../UefiShellAcpiViewCommandLib/AcpiParser.h | 4 ++

[edk2-devel] [PATCH v3 5/8] ShellPkg/AcpiView: Refactor PrintFieldName

2020-07-14 Thread Tomas Pilar (tpilar)
The AcpiView core method is refactored to take format and parameters rather than a fully formatted string. This allows for far more flexible parser writing. Cc: Ray Ni Cc: Zhichao Gao Signed-off-by: Tomas Pilar --- .../UefiShellAcpiViewCommandLib/AcpiParser.c | 30 ---

[edk2-devel] [PATCH v3 3/8] ShellPkg/AcpiView: Modify error message

2020-07-14 Thread Tomas Pilar (tpilar)
Modify the DumpFile error message to be more in line with the rest of the error messages in the same file. Cc: Ray Ni Cc: Zhichao Gao Signed-off-by: Tomas Pilar --- .../UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

[edk2-devel] [PATCH v3 4/8] ShellPkg/AcpiView: Create a logging facility

2020-07-14 Thread Tomas Pilar (tpilar)
Extract error and warning logging into separate methods. Fold highlighting and other output properties into the logging methods. Cc: Ray Ni Cc: Zhichao Gao Signed-off-by: Tomas Pilar --- .../UefiShellAcpiViewCommandLib/AcpiParser.c | 5 +- .../UefiShellAcpiViewCommandLib/AcpiViewLog.c |

[edk2-devel] [PATCH v3 7/8] ShellPkg/AcpiView: Refactor AcpiView

2020-07-14 Thread Tomas Pilar (tpilar)
Refactor logging using the AcpiViewLog facility. Trim some of the source to more elegant state. Cc: Ray Ni Cc: Zhichao Gao Signed-off-by: Tomas Pilar --- .../UefiShellAcpiViewCommandLib/AcpiParser.c | 225 -- .../UefiShellAcpiViewCommandLib/AcpiParser.h | 6 +-

[edk2-devel] [PATCH v3 8/8] ShellPkg/AcpiView: Refactor table parsers

2020-07-14 Thread Tomas Pilar (tpilar)
The tests for checking specific constraints and checking for buffer overflows have been simplified to use a standard set of templates defined in the logging facility. This regularises some of the error handling and makes it easier to write more tests like this in the future. Cc: Ray Ni Cc:

[edk2-devel] [PATCH v3 1/8] ShellPkg/AcpiView: Extract configuration struct

2020-07-14 Thread Tomas Pilar (tpilar)
Remove accessor method bloat by creating a configuration struct that is linked using an extern symbol in the config header file. Directly reference the config struct for all read and write accesses in the entire module. Rationalise the remaining methods in the config header and source. Cc: Ray

[edk2-devel] [PATCH v3 6/8] ShellPkg/AcpiView: Refactor dump helpers

2020-07-14 Thread Tomas Pilar (tpilar)
The dump variable helper functions are refactored into a separate header file as inline functions to declutter code. Cc: Ray Ni Cc: Zhichao Gao Signed-off-by: Tomas Pilar --- .../UefiShellAcpiViewCommandLib/AcpiParser.c | 212 --- .../UefiShellAcpiViewCommandLib/AcpiParser.h |

[edk2-devel] [PATCH v3 0/8] ShellPkg/AcpiView: Refactor Error Logging

2020-07-14 Thread Tomas Pilar (tpilar)
This patch series refactors the error logging in the AcpiView functionality to a newly created logging facility. The new error logging facility in AcpiViewLog.[ch] contains helper functions to log messages of various types and severities, enumerations of known error types as well as common

[edk2-devel] [PATCH v3 3/3] AzurePipelines : Pr Gate: Turn on HBUT for CryptoPkg

2020-07-14 Thread matthewfcarlson
From: Matthew Carlson Turns on Host Based Unit Tests for CryptoPkg by enabling the target NOOPT in the CI pipeline. Cc: Sean Brogan Cc: Bret Barkelew Cc: Michael D Kinney Cc: Liming Gao Signed-off-by: Matthew Carlson --- .azurepipelines/templates/pr-gate-build-job.yml | 2 +- 1 file

[edk2-devel] [PATCH v3 1/3] UnitTestFrameworkPkg : BaseTimerLibPosix: Adds a host-based timer Lib

2020-07-14 Thread matthewfcarlson
From: Matthew Carlson This adds a host based BaseTimerLib that won't assert. Cc: Michael D Kinney Cc: Sean Brogan Cc: Bret Barkelew Signed-off-by: Matthew Carlson --- UnitTestFrameworkPkg/Library/Posix/BaseTimerLibPosix/TimerLibPosix.c | 132

[edk2-devel] [PATCH v3 0/3] Add Unit Tests for BaseCryptLib to CryptoPkg

2020-07-14 Thread matthewfcarlson
From: Matthew Carlson This turns on Host Based Unit Tests for CryptoPkg, adds the unit test itself, and adds a POSIX BaseTimerLib for unit tests. Matthew Carlson (3): UnitTestFrameworkPkg : BaseTimerLibPosix: Adds a host-based timer Lib CryptoPkg: BaseCryptLib: Add unit tests (Host and

Re: [edk2-devel] [Patch v4] BaseTools: Add Guid name support in GenFfs.

2020-07-14 Thread Bob Feng
Reviewed-by: Bob Feng -Original Message- From: devel@edk2.groups.io On Behalf Of Yuwei Chen Sent: Tuesday, July 14, 2020 1:31 PM To: devel@edk2.groups.io Subject: [edk2-devel] [Patch v4] BaseTools: Add Guid name support in GenFfs. REF:

[edk2-devel] [edk2-non-osi] Platform/Qemu/Sbssa: Add TF-A binaries

2020-07-14 Thread Tanmay Jagdale
Add fip.bin and bl1.bin binaries for the Qemu Sbsa model Signed-off-by: Tanmay Jagdale --- Platform/Qemu/Sbsa/License.txt | 25 + Platform/Qemu/Sbsa/Readme.md | 29 + Platform/Qemu/Sbsa/bl1.bin | Bin 0 -> 19301 bytes

Re: [edk2-devel] [PATCH v3 1/1] MdeModulePkg/UsbBusDxe: Rebuild the description table after Reset Device

2020-07-14 Thread Jeremy Linton
Hi, On 5/9/20 3:26 AM, Guomin Jiang wrote: REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2694 When the USB fail and then Reset Device, it should rebuild description. I pulled the latest edk2 a few hours ago and I'm still seeing the assert TrsRing != 0 messages on a real XHCI

Re: [edk2-devel] [PATCH v3 1/1] MdeModulePkg/UsbBusDxe: Rebuild the description table after Reset Device

2020-07-14 Thread Guomin Jiang
Hi Jeremy, We test many different device and found some device haven't reproduced the issue. We need to figure out the root cause rather than work around. Best Regards Guomin > -Original Message- > From: Jeremy Linton > Sent: Wednesday, July 15, 2020 8:19 AM > To: Jiang, Guomin ;

Re: [edk2-devel] [PATCH v10 45/46] UefiCpuPkg/MpInitLib: Prepare SEV-ES guest APs for OS use

2020-07-14 Thread Dong, Eric
Reviewed-by: Eric Dong > -Original Message- > From: Tom Lendacky > Sent: Tuesday, July 14, 2020 10:38 PM > To: devel@edk2.groups.io > Cc: Brijesh Singh ; Ard Biesheuvel > ; Dong, Eric ; Justen, > Jordan L ; Laszlo Ersek ; > Gao, Liming ; Kinney, Michael D > ; Ni, Ray > Subject: [PATCH

Re: [edk2-devel] [PATCH] uefi-sct/SctPkg: Remove gEfiFormBrowserExProtocolGuid

2020-07-14 Thread Irene Park
Hello Edhay, There has been no response from Eric since June 22. Do you have any concerns with this change? It’s very straight forward as indicated in REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2145. Thank you, Irene From: Irene Park Sent: Monday, July 6, 2020 12:48 PM To: Jin, Eric ;

Re: [edk2-devel] [PATCH 1/6] SecurityPkg/TcgPpi: Add TcgPpi header file.

2020-07-14 Thread Yao, Jiewen
Thanks Qi. I just thought one use case that a PEIM may already have a calculated hash (https://github.com/tianocore/edk2/blob/master/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c#L652) We may need add a flag to support this pre-hash use case. Such as: > +(EFIAPI *EDKII_TCG_HASH_LOG_EXTEND_EVENT)( > > +

Re: [edk2-devel] [PATCH v10 42/46] UefiCpuPkg: Allow AP booting under SEV-ES

2020-07-14 Thread Dong, Eric
Reviewed-by: Eric Dong > -Original Message- > From: Tom Lendacky > Sent: Tuesday, July 14, 2020 10:38 PM > To: devel@edk2.groups.io > Cc: Brijesh Singh ; Ard Biesheuvel > ; Dong, Eric ; Justen, > Jordan L ; Laszlo Ersek ; > Gao, Liming ; Kinney, Michael D > ; Ni, Ray > Subject: [PATCH

Re: [edk2-devel] [PATCH 1/6] SecurityPkg/TcgPpi: Add TcgPpi header file.

2020-07-14 Thread Bret Barkelew via groups.io
Since we’re working on early boot TCG interfaces, is this a good time to discuss a standard way to init the log with measurements made by the HW root of trust prior to Tcg2Pei? We were using a NULL lib and a registration pattern on the PEIM, but I’m open to other ideas, too. Thoughts? - Bret

Re: [edk2-devel] [PATCH v3 3/3] AzurePipelines : Pr Gate: Turn on HBUT for CryptoPkg

2020-07-14 Thread Michael D Kinney
Matt, Reviewed-by: Michael D Kinney Mike > -Original Message- > From: matthewfcarl...@gmail.com > > Sent: Tuesday, July 14, 2020 11:23 AM > To: devel@edk2.groups.io > Cc: Sean Brogan ; Bret > Barkelew ; Kinney, Michael > D ; Gao, Liming > > Subject: [PATCH v3 3/3] AzurePipelines :

Re: [edk2-devel] [PATCH v3 1/3] UnitTestFrameworkPkg : BaseTimerLibPosix: Adds a host-based timer Lib

2020-07-14 Thread Michael D Kinney
Matt, Reviewed-by: Michael D Kinney Mike > -Original Message- > From: matthewfcarl...@gmail.com > > Sent: Tuesday, July 14, 2020 11:23 AM > To: devel@edk2.groups.io > Cc: Kinney, Michael D ; Sean > Brogan ; Bret Barkelew > > Subject: [PATCH v3 1/3] UnitTestFrameworkPkg : >

Re: [edk2-devel] [PATCH] Using LLVM compiler set to build BaseTools in Linux

2020-07-14 Thread Yuwei Chen
Reviewed-by: Yuwei Chen > -Original Message- > From: devel@edk2.groups.io On Behalf Of > Zhiguang Liu > Sent: Monday, July 6, 2020 2:38 PM > To: devel@edk2.groups.io > Cc: Feng, Bob C ; Gao, Liming > Subject: [edk2-devel] [PATCH] Using LLVM compiler set to build BaseTools in > Linux >

Re: [edk2-devel] [EXTERNAL] [Patch v3 09/16] UnitTestFrameworkPkg: Change target mode DebugLib mapping

2020-07-14 Thread Bret Barkelew via groups.io
Reviewed-by: Bret Barkelew - Bret From: Michael D Kinney Sent: Friday, July 10, 2020 7:08:57 PM To: devel@edk2.groups.io Cc: Sean Brogan ; Bret Barkelew ; Yao, Jiewen Subject: [EXTERNAL] [Patch v3 09/16] UnitTestFrameworkPkg: Change target mode DebugLib

Re: [edk2-devel] [Patch v3 00/16] UnitTestFrameworkPkg: Enhancements and bug fixes

2020-07-14 Thread Bret Barkelew via groups.io
Reviewed-by: Bret Barkelew - Bret From: devel@edk2.groups.io on behalf of Liming Gao via groups.io Sent: Monday, July 13, 2020 11:54:53 PM To: devel@edk2.groups.io ; Kinney, Michael D Subject: [EXTERNAL] Re: [edk2-devel] [Patch v3 00/16]

Re: [edk2-devel] [EXTERNAL] [Patch v3 12/16] UnitTestFrameworkPkg/UnitTestLib: Add checks for ASSERT()

2020-07-14 Thread Bret Barkelew via groups.io
Reviewed-by: Bret Barkelew - Bret From: Michael D Kinney Sent: Friday, July 10, 2020 7:09 PM To: devel@edk2.groups.io Cc: Sean Brogan; Bret Barkelew; Yao,

Re: [edk2-devel] [EXTERNAL] [Patch v3 11/16] UnitTestFrameworkPkg/UnitTestLib: Fix target mode log messages

2020-07-14 Thread Bret Barkelew via groups.io
Reviewed-by: Bret Barkelew - Bret From: Michael D Kinney Sent: Friday, July 10, 2020 7:08:59 PM To: devel@edk2.groups.io Cc: Sean Brogan ; Bret Barkelew ; Yao, Jiewen Subject: [EXTERNAL] [Patch v3 11/16] UnitTestFrameworkPkg/UnitTestLib: Fix target mode

Re: [edk2-devel] [EXTERNAL] [Patch v3 08/16] UnitTestFrameworkPkg: Set host application stack size to 256KB

2020-07-14 Thread Bret Barkelew via groups.io
Reviewed-by: Bret Barkelew - Bret From: Michael D Kinney Sent: Friday, July 10, 2020 7:09 PM To: devel@edk2.groups.io Cc: Sean Brogan; Bret Barkelew; Yao,

Re: [edk2-devel] [EXTERNAL] [Patch v3 07/16] UnitTestFrameworkPkg: Enable source level debug for host tests

2020-07-14 Thread Bret Barkelew via groups.io
Reviewed-by: Bret Barkelew - Bret From: Michael D Kinney Sent: Friday, July 10, 2020 7:08:55 PM To: devel@edk2.groups.io Cc: Sean Brogan ; Bret Barkelew ; Yao, Jiewen Subject: [EXTERNAL] [Patch v3 07/16] UnitTestFrameworkPkg: Enable source level debug for

Re: [edk2-devel] [EXTERNAL] [Patch v3 06/16] UnitTestFrameworkPkg: Use host libraries from MdePkg

2020-07-14 Thread Bret Barkelew via groups.io
Reviewed-by: Bret Barkelew - Bret From: Michael D Kinney Sent: Friday, July 10, 2020 7:08:54 PM To: devel@edk2.groups.io Cc: Sean Brogan ; Bret Barkelew ; Yao, Jiewen Subject: [EXTERNAL] [Patch v3 06/16] UnitTestFrameworkPkg: Use host libraries from MdePkg

Re: [edk2-devel] [EXTERNAL] [Patch v3 10/16] UnitTestFrameworkPkg/UnitTestLib: Move print log into cleanup

2020-07-14 Thread Bret Barkelew via groups.io
Reviewed-by: Bret Barkelew - Bret From: Michael D Kinney Sent: Friday, July 10, 2020 7:09 PM To: devel@edk2.groups.io Cc: Sean Brogan; Bret Barkelew; Yao,

  1   2   >