From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by mx.groups.io with SMTP id smtpd.web10.1082.1678124011746371711 for ; Mon, 06 Mar 2023 09:33:31 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=mJUT0IsM; spf=pass (domain: ventanamicro.com, ip: 209.85.216.53, mailfrom: tphan@ventanamicro.com) Received: by mail-pj1-f53.google.com with SMTP id l1so10555958pjt.2 for ; Mon, 06 Mar 2023 09:33:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1678124011; 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=BCciH5UpDp5+OLzNvQF4ilTIfK6MlskuG6l2iFLsuSI=; b=mJUT0IsMWpWOpCLpLt4Uv8J7tBoSYG2kAcJEgKrCYObk2AHp+ZM6onNneAj0bUitqG /0C/PLWzxVo6V/2SGOPWE/CydjlCI0Odi6ZwxfASwxCJlb79mh7/CKTvLZxLe8GQlfeX v/R8VPrs9HEPZVWql61llG0+Rx50xyBpzw9hAFc3eSD5X4BW7p500MadGkoIcyvTrHfY u22+GfYTBiVQJ9xGgNKXJZKUocUGiWtpZ2AFNH6uM880AzIf1ErYrRR2zKzDbMvbmBPY lHKIOVNf/R3LQ7ABqSoKV9gTKLlyETwf4cPRNkhH24RfOlPNkkA93EZau323c/6gBgqD koLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678124011; 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=BCciH5UpDp5+OLzNvQF4ilTIfK6MlskuG6l2iFLsuSI=; b=W7lc2MG2eWqjj9S30aFO8Iy6skzJPM3UYC0Sn62goG1MR/WwHGy84RR8S3FMVuU/A0 x+1yZ85Yi7V4Zpur+Hx9bGNjLCqhTFGMMAqSRIUASL2FS9mRXPDrbUq1StAUpD3YFCbf 0955ChsUUCSYZEGqlyptjXxmb6wbylCDYteKKaEVe9Wr40HhUlU5H+HOkFBcYkuXmTSg B2vsWjkELA4gaUBTewhDqyJWfxS4kGjE8aLTjsDTGAbKwA+BUO5Nh6ssHPvMYqeU/SvV nMSxPali51+GnNwwgyfZK+63iEFrZ0oeUKDhG8NWfUyXZ2z/hEztVKncxuV+c64F8mSz iAjQ== X-Gm-Message-State: AO0yUKUaevvp7RDqkwPBQdnXviH/SheyiDa+nGXIMYxgppcPjGAmfGQv Dgv8NmLfX+1WkzKpe0g833yjUSZjv2NTEBGpU1/MpQ== X-Google-Smtp-Source: AK7set8IUZfuZzE5uoPbJbeJQHI1T4bAeefNi8jzBAsvmKzke/TJilSWWwC0PaJC9LOwtM5EWfd71Q== X-Received: by 2002:a05:6a20:8c97:b0:c7:5cb6:2ff7 with SMTP id k23-20020a056a208c9700b000c75cb62ff7mr12229965pzh.22.1678124010905; Mon, 06 Mar 2023 09:33:30 -0800 (PST) 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 v6-20020aa78506000000b005dd975176c3sm6579722pfn.53.2023.03.06.09.33.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Mar 2023 09:33:30 -0800 (PST) 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, Tuan Phan Subject: [PATCH 4/7] OvmfPkg/RiscVVirt: VirtNorFlashPlatformLib: Fix wrong flash size Date: Mon, 6 Mar 2023 09:33:13 -0800 Message-Id: <20230306173316.10319-5-tphan@ventanamicro.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230306173316.10319-1-tphan@ventanamicro.com> References: <20230306173316.10319-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 --- .../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..067065bd6ef9 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 (= PcdOvmfFdBaseAddress)),=0D QEMU_NOR_BLOCK_SIZE=0D };=0D =0D --=20 2.25.1