From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id F0992740046 for ; Mon, 21 Apr 2025 16:58:39 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=e7A25tqvKqxa1Ac2QRFNSFGPTrR1HFYA5tehArUGH5E=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240830; t=1745254719; v=1; x=1745513918; b=YpyNfexehpRh5bcWxCzj8pZ+fG9qZAXVohWzAmunuD/CXy0gAfMcfr9K3wP7vrQdPq+UWRD+ Tg7DOtCAsM2yyigz9Pu+z6d0oBC7SnHzfPzLB0BvZ4+n2mFRN7zy0uJ9C6p7pNfsS0pksu5MRTA nUAHwZlB7JUnv4NKjxm9+M4RZGDDP+g5CRxLENbhObywo8UQJg6/4HCM6TN/4Ol6Z4NVKlauwu7 cbxRZkQBZJCr9Rywnn4eGqXhSpdwDiHY9oGHYIpQsHEnY7U5RFDq9zYw/9LWDu7l+YmKROfVZ/n w46fPu6KCCew256+qJFpbCyu2BnI2cxG4EEx04YUKZyaQ== X-Received: by 127.0.0.2 with SMTP id gRgnYY7687511xCiqjB9nC3v; Mon, 21 Apr 2025 09:58:38 -0700 X-Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) by mx.groups.io with SMTP id smtpd.web10.19893.1745254717372366736 for ; Mon, 21 Apr 2025 09:58:37 -0700 X-Received: by mail-pf1-f175.google.com with SMTP id d2e1a72fcca58-7399838db7fso3983728b3a.0 for ; Mon, 21 Apr 2025 09:58:37 -0700 (PDT) X-Gm-Message-State: YH5EfXDAgNvN4kEcqIUCZDlsx7686176AA= X-Gm-Gg: ASbGncsKrpeQmSVgZrFodGI0YxUhDNJJhtBhYgG056bEXqVbfKETHWi5WnEIDvlWbB3 MQh2WcnbQll6+cH1i+NANHS7mxoSjcxzXTIeKE72F44hRWLuvBRLpdLGQzd/Yv7q9jWU24k/AWD kI05KO3lWcmER37zzF4CpNLMWqHq8vh3ltKTU+0uZIcqTZMCaEBiSvgX9mdiYV3dhY7WJFGiVhR 4owufx5l60IAjbiC0OFW80iedxvC0H76jfERn0eM4KvYoHTA92eCAB6sonX5fwNrGmq6QeHUBVx CDo+JEEE0s5jECmrtVE4qjYI/bVqiWHxmRhkYrApIVr44vN2DX4SCEFEXeH2e6Ylq/wcCxUgvjP GWJet2FwIoKiREHZc3TFgZ4LlxKMPn/6o9wb/P9f89Zx+KuQDqE5N X-Google-Smtp-Source: AGHT+IGFqovZn6rZWa/SolTAJu8y+pex1ZCQioEDndzWzqFPW48HffmDOkhki6Q8+fAErzRHJAnXvQ== X-Received: by 2002:a05:6a00:843:b0:73b:ac3d:9d6b with SMTP id d2e1a72fcca58-73dc1828e84mr18077903b3a.4.1745254716567; Mon, 21 Apr 2025 09:58:36 -0700 (PDT) X-Received: from DESKTOP-I1ETA6N.dc1.ventanamicro.com (c-174-50-177-196.hsd1.ca.comcast.net. [174.50.177.196]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73dbfa59f87sm7055330b3a.91.2025.04.21.09.58.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Apr 2025 09:58:36 -0700 (PDT) From: "Tuan Phan" To: devel@edk2.groups.io Cc: andyw@imsa.edu, maobibo@loongson.cn, lichao@loongson.cn, kraxel@redhat.com, jiewen.yao@intel.com, leif.lindholm@oss.qualcomm.com, sami.mujawar@arm.com, sunilvl@ventanamicro.com, ardb+tianocore@kernel.org, lixianglai@loongson.cn, Tuan Phan Subject: [edk2-devel] [PATCH 0/3] OvmfPkg/RiscVVirt: Add support for Capsule Firmware Upgrade Date: Mon, 21 Apr 2025 09:58:16 -0700 Message-Id: <20250421165819.18451-1-tphan@ventanamicro.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Mon, 21 Apr 2025 09:58:37 -0700 Resent-From: tphan@ventanamicro.com Reply-To: devel@edk2.groups.io,tphan@ventanamicro.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240830 header.b=YpyNfexe; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io This patch series introduces capsule-based firmware upgrade support for the RISC-V Virt platform. Changes: - Moved low level NOR flash functions to a seperate library. - Implemented capsule firmware upgrade support. Tuan Phan (3): OvmfPkg/VirtNorFlash: Move low level NOR flash functions into library ArmVirtPkg: Link all targets to the new VirtNorFlashDeviceLib OvmfPkg/RiscVVirt: Add support for Capsule Firmware Upgrade ArmVirtPkg/ArmVirtKvmTool.dsc | 1 + ArmVirtPkg/ArmVirtQemu.dsc | 1 + ArmVirtPkg/ArmVirtQemuKernel.dsc | 1 + .../Include/Library/VirtNorFlashDeviceLib.h | 201 +++++ .../VirtNorFlashDeviceLib.c} | 411 ++++++---- .../VirtNorFlashDeviceLib.inf | 30 + OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc | 5 +- OvmfPkg/OvmfPkg.ci.yaml | 3 +- OvmfPkg/OvmfPkg.dec | 4 + .../Capsule/GenerateCapsule/GenCapsule.py | 332 ++++++++ .../CapsuleUpdatePolicyLib.c | 121 +++ .../CapsuleUpdatePolicyLib.inf | 29 + .../CapsuleUpdatePolicyLib.uni | 12 + .../Library/FmpDeviceLib/FmpDeviceLib.c | 774 ++++++++++++++++++ .../Library/FmpDeviceLib/FmpDeviceLib.inf | 46 ++ .../PlatformFlashAccessLib.c | 236 ++++++ .../PlatformFlashAccessLib.h | 95 +++ .../PlatformFlashAccessLib.inf | 34 + OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc | 44 +- OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf | 5 + OvmfPkg/RiscVVirt/RiscVVirtSystemFW.dsc.inc | 61 ++ OvmfPkg/VirtNorFlashDxe/VirtNorFlash.h | 345 -------- OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.c | 180 +--- OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.h | 156 ++++ OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf | 3 +- OvmfPkg/VirtNorFlashDxe/VirtNorFlashFvb.c | 53 +- 26 files changed, 2538 insertions(+), 645 deletions(-) create mode 100644 OvmfPkg/Include/Library/VirtNorFlashDeviceLib.h rename OvmfPkg/{VirtNorFlashDxe/VirtNorFlash.c => Library/VirtNorFlashDeviceLib/VirtNorFlashDeviceLib.c} (63%) create mode 100644 OvmfPkg/Library/VirtNorFlashDeviceLib/VirtNorFlashDeviceLib.inf create mode 100644 OvmfPkg/RiscVVirt/Feature/Capsule/GenerateCapsule/GenCapsule.py create mode 100644 OvmfPkg/RiscVVirt/Feature/Capsule/Library/CapsuleUpdatePolicyLib/CapsuleUpdatePolicyLib.c create mode 100644 OvmfPkg/RiscVVirt/Feature/Capsule/Library/CapsuleUpdatePolicyLib/CapsuleUpdatePolicyLib.inf create mode 100644 OvmfPkg/RiscVVirt/Feature/Capsule/Library/CapsuleUpdatePolicyLib/CapsuleUpdatePolicyLib.uni create mode 100644 OvmfPkg/RiscVVirt/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.c create mode 100644 OvmfPkg/RiscVVirt/Feature/Capsule/Library/FmpDeviceLib/FmpDeviceLib.inf create mode 100644 OvmfPkg/RiscVVirt/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccessLib.c create mode 100644 OvmfPkg/RiscVVirt/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccessLib.h create mode 100644 OvmfPkg/RiscVVirt/Feature/Capsule/Library/PlatformFlashAccessLib/PlatformFlashAccessLib.inf create mode 100644 OvmfPkg/RiscVVirt/RiscVVirtSystemFW.dsc.inc delete mode 100644 OvmfPkg/VirtNorFlashDxe/VirtNorFlash.h create mode 100644 OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.h -- 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#121275): https://edk2.groups.io/g/devel/message/121275 Mute This Topic: https://groups.io/mt/112379037/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-