From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by mx.groups.io with SMTP id smtpd.web10.3788.1689361729529932359 for ; Fri, 14 Jul 2023 12:08:49 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@ventanamicro.com header.s=google header.b=CVN5sfM3; spf=pass (domain: ventanamicro.com, ip: 209.85.214.181, mailfrom: tphan@ventanamicro.com) Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1b9e9765f2cso13275965ad.3 for ; Fri, 14 Jul 2023 12:08:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1689361728; x=1691953728; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2gUYBPAiVRGHk4fijmghKyE1g1/I6mHXc+6Oy2FOr5w=; b=CVN5sfM3ydq6BkRbNsjrsJIXmGLYyuc6Q1NDFsRM5uUiwMzSHqUtNS9SfrZTuuZqkh TRqBi6iOFZekf9O2PBFYMZClVlo6t0+H9W492wESNbnUsQck4DLN+rzuoGtOew1NuZAX nnTDlrcGzAG43Z5fTPkB2Wg7pBG+mOIYTunvWwDhajFbnuvL2RcNTJNoqLAl5w7lTbI4 wkw/PPMKGd4JpzSMCI2p/B+QydooPM2sSUa14fYHb/Lsqj/2OdcV9FODsEhrOYbDzpX3 wsqVlmk0ldxT9GwwGqJUa34zW98xMsCos2ZXnEUtE1mKNy0cnIC322BcI7k9yBPhu+Zv dQkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689361728; x=1691953728; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2gUYBPAiVRGHk4fijmghKyE1g1/I6mHXc+6Oy2FOr5w=; b=BmGPbhJWgSEa/yvzOesTFz7zgXQDe+bXal++oDOVPTn/VFdS2L6hWo0j7ZQMahVh/7 KEIt7E6ZjFhWtKDAsNGl3CRmDwnLgZFW0n5Ade+4g3tZoOAhjPNIMuMOcnmWXjItakoS NfE/kEHkJesf2CGFLWOAHr7cJNy44oVpSBqupT9Fzbfv2vz1sF8AZY0f3puv40YfmfRg NPe0Pg6y26U/z/WQpzYeg8wLhhNSWyS4dP3XyQSWV37YFB6jPqkMYmsGiyUaG/a4GMJC 0Mc+ahUgj1jM2g3g+ejCaWMIbvdLyPmD09i0YeHSvEziENLUTIz9T+iO/yPyL3OwsobH aCAw== X-Gm-Message-State: ABy/qLZzpqDa2fXKjM3H+dWvohB97iON7/d6SfdcXg6IiNcSag0sA3Kp BjC4aOQfV0K6FnF5eiV/d/5nQaC+05fq7No6b3vGBg== X-Google-Smtp-Source: APBJJlGhjOR/F583ncLdXgVgc9jCwZSk/j0vFYfqd0pGvWXqJN6ol4nMMEfvaw8frDIy2f8Fyv7Q3g== X-Received: by 2002:a17:902:bd87:b0:1ac:6d4c:c24b with SMTP id q7-20020a170902bd8700b001ac6d4cc24bmr3529337pls.3.1689361728604; Fri, 14 Jul 2023 12:08:48 -0700 (PDT) Return-Path: Received: from localhost.localdomain (c-174-50-177-95.hsd1.ca.comcast.net. [174.50.177.95]) by smtp.gmail.com with ESMTPSA id p18-20020a170902ead200b001a98f844e60sm8041413pld.263.2023.07.14.12.08.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jul 2023 12:08:48 -0700 (PDT) From: "Tuan Phan" To: devel@edk2.groups.io Cc: michael.d.kinney@intel.com, gaoliming@byosoft.com.cn, zhiguang.liu@intel.com, sunilvl@ventanamicro.com, git@danielschaefer.me, andrei.warkentin@intel.com, ardb+tianocore@kernel.org, Tuan Phan Subject: [PATCH v5 3/7] OvmfPkg/RiscVVirt: VirtNorFlashPlatformLib: Fix wrong flash size Date: Fri, 14 Jul 2023 12:08:20 -0700 Message-Id: <20230714190824.16552-4-tphan@ventanamicro.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230714190824.16552-1-tphan@ventanamicro.com> References: <20230714190824.16552-1-tphan@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable The size should be for single region, not the whole firmware FD. Signed-off-by: Tuan Phan Reviewed-by: Andrei Warkentin Reviewed-by: Sunil V L --- .../Library/VirtNorFlashPlatformLib/VirtNorFlashStaticLib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/RiscVVirt/Library/VirtNorFlashPlatformLib/VirtNorFlash= StaticLib.c b/OvmfPkg/RiscVVirt/Library/VirtNorFlashPlatformLib/VirtNorFlas= hStaticLib.c index fdc2ccb6294e..33f3a01b06f4 100644 --- a/OvmfPkg/RiscVVirt/Library/VirtNorFlashPlatformLib/VirtNorFlashStaticL= ib.c +++ b/OvmfPkg/RiscVVirt/Library/VirtNorFlashPlatformLib/VirtNorFlashStaticL= ib.c @@ -24,7 +24,8 @@ VIRT_NOR_FLASH_DESCRIPTION mNorFlashDevice =3D {=0D FixedPcdGet32 (PcdOvmfFdBaseAddress),=0D FixedPcdGet64 (PcdFlashNvStorageVariableBase),=0D - FixedPcdGet32 (PcdOvmfFirmwareFdSize),=0D + FixedPcdGet32 (PcdOvmfFirmwareFdSize) -=0D + (FixedPcdGet64 (PcdFlashNvStorageVariableBase) - FixedPcdGet32 (PcdOvmfF= dBaseAddress)),=0D QEMU_NOR_BLOCK_SIZE=0D };=0D =0D --=20 2.25.1