From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mx.groups.io with SMTP id smtpd.web11.1176.1685143066974375645 for ; Fri, 26 May 2023 16:17:47 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@ventanamicro.com header.s=google header.b=e07CMdPT; spf=pass (domain: ventanamicro.com, ip: 209.85.210.177, mailfrom: tphan@ventanamicro.com) Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-64d3fbb8c1cso1709963b3a.3 for ; Fri, 26 May 2023 16:17:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1685143066; x=1687735066; 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=tMiZ1TLB1ys8QYTqpGhJG6pPEmw34sV4Nz5o6FGajy0=; b=e07CMdPT6BUuHgH1U3GeyrRyH5W72mpE+jDeify76iQqcfhSb9ACRXcTdok9Xu73l2 OLdk4iMSgu0ITQceyW1Ig1CriKDXZ0tlN09OZPfA8egr6BkjsbV4cnrwscujkaceLETh Il5jk2fx2SBl3uGYCoutkCtINL97kawSgOPlOcJhHbCjwuQynOW9t8zOdZkB9n07pnUQ UkExouSdql5F/DlSdTKBYQ9vOHoG8ZalEOJJW2GHvVTIzsjZtmg272E1R/SVxz2uLknM BpqqDjavpwkUQeIdY/iRpAdildjoEPaADeiSgLy+TRjrdWVFk22vspHHne9gqTcTZBs3 AR1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685143066; x=1687735066; 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=tMiZ1TLB1ys8QYTqpGhJG6pPEmw34sV4Nz5o6FGajy0=; b=OzpA+mNFRtITIZ+LlvwFruIxGUHrAEoIaLfixtLK3t96WGND1C8hUb+xdmkNhFUlqp xeqj68/cOSS1rG4PeRL9vLpahQ6cPWcsL+pvTEzaiUYhIV6ny9kEY9Oev86zU75r1Nah NHHSgw/GUnBiuc9Ch3psnf43q4SfxzhXqWJOUj9W0PFdIFfJYjQpwbHWGkxKbfARhnBE OVnXftrrYCsKmAiU4sG/YRhZ0yDCZ92C1GL41kwenUw9wv8ZP8JDKoT3bcn9uk+Y3kBE xx2oLeItwajiB9kspoi1k7zX01ctHaWN/bpkJvFlAtbK/b4cObA3pzY0yZCxb0RYn6Pf bMkg== X-Gm-Message-State: AC+VfDxo3pzLyKeZ2Q3ArIFqb46n6x616Clf0tlaTXFzpK35dssg1rls PM/S2l1fgY4Ti2S6Eheq7pfwPANPNEYN/IkgV18= X-Google-Smtp-Source: ACHHUZ7081Izcwkqj1PKKYp2Cf1o5ktWll0fVXdgh5iJV4ARtg1MP1uw3gXgcLkY+dknzPmyWbxSKg== X-Received: by 2002:a05:6a00:1356:b0:648:1311:fbc4 with SMTP id k22-20020a056a00135600b006481311fbc4mr5640335pfu.33.1685143066123; Fri, 26 May 2023 16:17:46 -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 k3-20020aa792c3000000b005d22639b577sm3106308pfa.165.2023.05.26.16.17.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 16:17:45 -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 v3 5/7] OvmfPkg/RiscVVirt: VirtNorFlashPlatformLib: Fix wrong flash size Date: Fri, 26 May 2023 16:17:31 -0700 Message-Id: <20230526231733.6755-6-tphan@ventanamicro.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230526231733.6755-1-tphan@ventanamicro.com> References: <20230526231733.6755-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 --- .../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