From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by mx.groups.io with SMTP id smtpd.web11.19127.1681498716562035141 for ; Fri, 14 Apr 2023 11:58:41 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=Pr1BSMkE; spf=pass (domain: ventanamicro.com, ip: 209.85.216.49, mailfrom: tphan@ventanamicro.com) Received: by mail-pj1-f49.google.com with SMTP id pm7-20020a17090b3c4700b00246f00dace2so11722659pjb.2 for ; Fri, 14 Apr 2023 11:58:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1681498721; x=1684090721; 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=lY4ofM/9sAxJCd1U8JDL5iRTESbgED5YHjxZq3XV8D0=; b=Pr1BSMkEt3CoIhIS17QuuE56pLa7IBCI61ojnTsYfqfNmrTmtMTaEnQTqujE5s4vSY wCVE9PKmvDs3z3YoN+L4tIURfcUwupg7gX5HoU5fEeEujKpqw6/yJJGGzAuMBpmlabnh s4Ji7gp+gb2aY/i8CZHpPF71E8sijiyLr7U171+DV8wl11Qi/zt7O8MzQVFoxSWmpJjD 6Pi4+sjDl4gJptfRuu7nMvM5YjbH1cNDOP4XbvwRS7kO0H0Yh59RnOJkm67nMuhyEXEC /BYxqGbo6a8KKtC94LwXN8UKmce86XFVOSgBZ4lfgjYx/Wo8MG+spSN3X1ttd0i39jH8 M3hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681498721; x=1684090721; 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=lY4ofM/9sAxJCd1U8JDL5iRTESbgED5YHjxZq3XV8D0=; b=MrJUk4ldQVjVmFNu0Z7oPIkF5wRM2vUNyauvaHJ1Xq9C19qX8Jh9jduoxnv1Ozvq2m JuOXp0f5r8oFmUGmyJBDr/xkeQHlQhK1Dv8GeUg7jK0tbcu8Ag15uXmhyqL7L9UHaYEC wT9zH0zAd+5mOiqwJ2cq/eprYItTfKuv+HSxilnhkRSC0UTYdr5rXG9nz3Ef2kCoVw32 HXNgJki78pcIMghYXyYOkCPE3axRgxWJPhqsEQrK1cGZ/H3o9ua6hYSpyXke/2ld5pXI CTmwev0eGEU100OrPWmHnfB0B/89y0M/F5JXnsgfdgeIn7QA0ke7KAPySAeOSOjh3jDU HMHQ== X-Gm-Message-State: AAQBX9c+8RK0G56wEyLhAgL+65gpxdED9iCTCXLRKpTuaelCzs2PYqqJ wI/p/sOPE1tRVIykwb4nolw1Dy2xrf+DKHC2tZKS1w== X-Google-Smtp-Source: AKy350acwF21E3FgaR31isG0W7b3TvOdc9OKu4ODoNdNUQ+S27F7OyEozXGFeiQOD3uv8mKO+TZRZA== X-Received: by 2002:a17:902:cec9:b0:1a1:924d:19f6 with SMTP id d9-20020a170902cec900b001a1924d19f6mr4654252plg.66.1681498720752; Fri, 14 Apr 2023 11:58:40 -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 g20-20020a170902869400b001a681d123a0sm3329760plo.297.2023.04.14.11.58.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Apr 2023 11:58:40 -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, Tuan Phan Subject: [PATCH v2 4/6] OvmfPkg/RiscVVirt: VirtNorFlashPlatformLib: Fix wrong flash size Date: Fri, 14 Apr 2023 11:58:13 -0700 Message-Id: <20230414185815.2994-5-tphan@ventanamicro.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230414185815.2994-1-tphan@ventanamicro.com> References: <20230414185815.2994-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..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