From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by mx.groups.io with SMTP id smtpd.web11.6114.1687545672193293818 for ; Fri, 23 Jun 2023 11:41:12 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@ventanamicro.com header.s=google header.b=P6at5nkU; spf=pass (domain: ventanamicro.com, ip: 209.85.215.181, mailfrom: tphan@ventanamicro.com) Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-52cb8e5e9f5so715409a12.0 for ; Fri, 23 Jun 2023 11:41:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1687545671; x=1690137671; 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=P6at5nkU5hQRL8Y0+ILFkvG8s6/MR1/zSWHrEaFNkOgug/rhy7vg6L5UhjXyPwm8uG 21WsFWmuV+dE94Tt5bqoC0eOia70EpbEZHYsO5lDQCoU0QjiMZtIywsP3RxBBUY93Xsz 3WNyxa6Az9LlFs1tD0yCYKrFYgA7eMtburElaqqX0wSde3VELImM37qY6MaofthcTTG3 v+l8owMtXAAQvHklRAizYAvJ09fMeLBNem7uQT7x8x7HUo6vRAguZzlMnJYwNdZv7C+Z KIgVSJRDeZxm3p9fOc3fRLGmPWcJdBq1Thc21Yp4LKyFyjir3nbZImVq9SF7qC9h9E+J Z6Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687545671; x=1690137671; 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=ISkvcOhnFI9ErjJfWUofsQpLDicIiTmPquBTPtzwNxtadoII1lea2bay8CO0ATxrnq s7ZWH/+4szZmr+3q/yba5V0DP7WlZzuE53IGoB2l+kbkNEykV7+l3EB66t3Q7wi8kgVc CLURqqfRi1Jd0N0K6KweZGpRF5da/QDs/Rpqdg1A5/7137C8eAffhJK8Sww6EEPAdcUz 6thEBpVP2A0Szbdlzd5aL6F0NbW77hIMoDZut/wPZuf5mrjc8ALae3MztzCE99KEfifQ GMsiOHR71/dbvo/DVeY+ERJttrBVnEBZrBeXllgmIVBNMbzbC5MrkCVYSlDpC085SR5C POJA== X-Gm-Message-State: AC+VfDz5FEM1ggwSA8nRa782amZM75jm2DdYDrLQuzmiLeTW7tw4VSLT pSLA12OCU/b+YiPJhoHOmn1GjcLhwvIlRDtzWyBVvw== X-Google-Smtp-Source: ACHHUZ6XTpi8goSrAFaQ+WSr6D9g/CC0FbTMF/G+ihKE7qROwmJ2eegciio4XEA0bNqWyVmy8P3GHg== X-Received: by 2002:a05:6a20:748c:b0:106:9266:4448 with SMTP id p12-20020a056a20748c00b0010692664448mr33931786pzd.16.1687545671254; Fri, 23 Jun 2023 11:41:11 -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 v2-20020aa78502000000b006667b36e904sm6354184pfn.113.2023.06.23.11.41.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jun 2023 11:41:10 -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 v4 3/7] OvmfPkg/RiscVVirt: VirtNorFlashPlatformLib: Fix wrong flash size Date: Fri, 23 Jun 2023 11:39:30 -0700 Message-Id: <20230623183934.23905-4-tphan@ventanamicro.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230623183934.23905-1-tphan@ventanamicro.com> References: <20230623183934.23905-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