[edk2-devel] [PATCH v2 0/5] ArmVirtPkg: Add dynamic CFI flash detection for Kvmtool guests

Sami Mujawar posted 5 patches 11 months ago
Failed in applying to current master (apply log)
ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf |  2 +-
ArmVirtPkg/ArmVirtKvmTool.dsc                                    | 11 ++++--
ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.c               | 13 ++++++-
ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf             |  4 ++-
ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c          | 38 +++++++++++++++++---
ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf     |  3 +-
ArmVirtPkg/PrePi/PrePi.c                                         |  4 +--
7 files changed, 63 insertions(+), 12 deletions(-)
[edk2-devel] [PATCH v2 0/5] ArmVirtPkg: Add dynamic CFI flash detection for Kvmtool guests
Posted by Sami Mujawar 11 months ago
Kvmtool allows guest VMs to be launched with or without
a CFI flash device. The guest hardware configuration can
be seen in the device tree that Kvmtool hands off to the
guest firmware.

Therefore, add support to dynamically detect if a CFI
flash device is present. If CFI is present use the
NorFlashDxe driver as the backend for variable services;
otherwise use emulated runtime variables.

The last patch in this series fix a crash due to stack
overflow which is observed when running the UEFI shell
command 'dmpstore'.

The first 4 patches in this series have not been modified
and are resent with the v2 series.

The changes can be seen at:
https://github.com/samimujawar/edk2/tree/2646_dynamic_cfi_detection_v2

Sami Mujawar (5):
  ArmPkg: Configure PcdEmuVariableNvModeEnable as a dynamic PCD
  ArmVirtPkg: Define variables for emulating runtime variables
  ArmVirtPkg: Fallback to variable emulation if no CFI is found
  ArmVirtPkg: Dispatch variable service if variable emulation is enabled
  ArmVirtPkg/PrePi: Allocate separate stack for Dxe phase

 ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf |  2 +-
 ArmVirtPkg/ArmVirtKvmTool.dsc                                    | 11 ++++--
 ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.c               | 13 ++++++-
 ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf             |  4 ++-
 ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c          | 38 +++++++++++++++++---
 ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf     |  3 +-
 ArmVirtPkg/PrePi/PrePi.c                                         |  4 +--
 7 files changed, 63 insertions(+), 12 deletions(-)

-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105076): https://edk2.groups.io/g/devel/message/105076
Mute This Topic: https://groups.io/mt/99013766/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v2 0/5] ArmVirtPkg: Add dynamic CFI flash detection for Kvmtool guests
Posted by Ard Biesheuvel 11 months ago
On Fri, 19 May 2023 at 16:56, Sami Mujawar <sami.mujawar@arm.com> wrote:
>
> Kvmtool allows guest VMs to be launched with or without
> a CFI flash device. The guest hardware configuration can
> be seen in the device tree that Kvmtool hands off to the
> guest firmware.
>
> Therefore, add support to dynamically detect if a CFI
> flash device is present. If CFI is present use the
> NorFlashDxe driver as the backend for variable services;
> otherwise use emulated runtime variables.
>
> The last patch in this series fix a crash due to stack
> overflow which is observed when running the UEFI shell
> command 'dmpstore'.
>
> The first 4 patches in this series have not been modified
> and are resent with the v2 series.
>
> The changes can be seen at:
> https://github.com/samimujawar/edk2/tree/2646_dynamic_cfi_detection_v2
>
> Sami Mujawar (5):
>   ArmPkg: Configure PcdEmuVariableNvModeEnable as a dynamic PCD
>   ArmVirtPkg: Define variables for emulating runtime variables
>   ArmVirtPkg: Fallback to variable emulation if no CFI is found
>   ArmVirtPkg: Dispatch variable service if variable emulation is enabled
>   ArmVirtPkg/PrePi: Allocate separate stack for Dxe phase
>

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>


>  ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf |  2 +-
>  ArmVirtPkg/ArmVirtKvmTool.dsc                                    | 11 ++++--
>  ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.c               | 13 ++++++-
>  ArmVirtPkg/KvmtoolPlatformDxe/KvmtoolPlatformDxe.inf             |  4 ++-
>  ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c          | 38 +++++++++++++++++---
>  ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtoolLib.inf     |  3 +-
>  ArmVirtPkg/PrePi/PrePi.c                                         |  4 +--
>  7 files changed, 63 insertions(+), 12 deletions(-)
>
> --
> 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105314): https://edk2.groups.io/g/devel/message/105314
Mute This Topic: https://groups.io/mt/99013766/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-