From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mx.groups.io with SMTP id smtpd.web11.18271.1686762120017339764 for ; Wed, 14 Jun 2023 10:02:00 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=Sa3/L4Hj; spf=pass (domain: ventanamicro.com, ip: 209.85.214.169, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-1b4f8523197so8333645ad.1 for ; Wed, 14 Jun 2023 10:01:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1686762119; x=1689354119; 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=555olMBSZLXg3iA2Tr5RTsjjRWv6/DBQJ2gyTCSI/RA=; b=Sa3/L4HjlyuWR5nr/3kb9n7zMa9WFypQ4YjJ+0pVWoJ1Csnn1XwTcfXAMbYzwGodom iVf4N7tb2r30kBqAFmdDZ506B7leLXq31D/tZ+7T6zVz8ZXPXU0y7xTGlcOlTmF1gW5b 4BmKKn0GnypnAYnM1qmXllt6X9MxiSimW87uDUwoqHrqj02BKiGs9xvCafKyHJllfhMn cgN0rxMpEEzGk7M6pA6mrOw6d7qUhzX8Mty4dYTQndDLg53KTA7Mcxh05HT6ImcMjSJH zZNYUMim5E9icJKWMQ0m4y660zyLN03Lf2ZwpQihFqJ8FxngzAzgzEmzLhvEkzYz5MkX HcXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686762119; x=1689354119; 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=555olMBSZLXg3iA2Tr5RTsjjRWv6/DBQJ2gyTCSI/RA=; b=NfxE6ijLMsL/jQA/r1x3Mgr52nvYROe/1sCOmCC8f3FbVicgtnqjA+8E1dUq0t1vE4 iz8KJazKqKjA6DS3GT0jg9shFmojYuYlz+CweUY5wKgHWEcn6wzGA7POKCUR+6meF3rl iKR3cBRBmafdGkL+3sdtJWu3vDPhAPqjz07uxXPgY+iqCTMn4XStuudEMrMOQmiaARyj Q7f0m2E7vOJsypG3cTr+ldHWwv7D7icDQT/+03vOQ33mM33ezP5m9mTz8Z05ce5gWmBm CaloZjLVatJLM9ddYfBgCrWeZ1ylPTyjHLlP8uGwlNndg/rmtuPNv+1o6Hx1U85Dm5Uy a0sA== X-Gm-Message-State: AC+VfDyuJ70xBbTSprr+aL+jPEZFzA8WI489E1pfeYO2wGCVU1OW8/DE xAXoZU0uAUzQcAvJWlHBj/b31K6Grp+T9vkDqWk= X-Google-Smtp-Source: ACHHUZ40EqqlM0IyunYpjrO53V2PeA6jvto7/jJdSSqJj6n9+IdqCrMn44rZHpZeeqfD58hLkjfE8g== X-Received: by 2002:a17:902:e744:b0:1b3:c4c1:ec4e with SMTP id p4-20020a170902e74400b001b3c4c1ec4emr3030244plf.30.1686762119307; Wed, 14 Jun 2023 10:01:59 -0700 (PDT) Return-Path: Received: from kerodi.Dlink ([106.51.184.72]) by smtp.gmail.com with ESMTPSA id s7-20020a170902988700b001b3ef11d8fdsm1850424plp.201.2023.06.14.10.01.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jun 2023 10:01:59 -0700 (PDT) From: "Sunil V L" To: devel@edk2.groups.io Cc: Sunil V L , Ard Biesheuvel , Jiewen Yao , Jordan Justen , Gerd Hoffmann , Andrei Warkentin Subject: [PATCH 1/4] OvmfPkg/RiscVVirt: Fix couple of issues in VarStore Date: Wed, 14 Jun 2023 22:31:48 +0530 Message-Id: <20230614170151.1204982-2-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230614170151.1204982-1-sunilvl@ventanamicro.com> References: <20230614170151.1204982-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The size of the FV and the WriteQueueSize is incorrect which causes the flash to be re-written during boot. Fix them and update the new checksum value. Signed-off-by: Sunil V L Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Cc: Andrei Warkentin --- OvmfPkg/RiscVVirt/VarStore.fdf.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/OvmfPkg/RiscVVirt/VarStore.fdf.inc b/OvmfPkg/RiscVVirt/VarStore.fdf.inc index 30b170d77997..6bc619e50c1a 100644 --- a/OvmfPkg/RiscVVirt/VarStore.fdf.inc +++ b/OvmfPkg/RiscVVirt/VarStore.fdf.inc @@ -25,12 +25,12 @@ # { 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50 }} 0x8D, 0x2B, 0xF1, 0xFF, 0x96, 0x76, 0x8B, 0x4C, 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50, - # FvLength: 0x20000 - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, + # FvLength: 0xC0000 + 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, # Signature "_FVH" # Attributes 0x5f, 0x46, 0x56, 0x48, 0xff, 0xfe, 0x04, 0x00, # HeaderLength # CheckSum # ExtHeaderOffset #Reserved #Revision - 0x48, 0x00, 0x39, 0xF1, 0x00, 0x00, 0x00, 0x02, + 0x48, 0x00, 0x2F, 0xF1, 0x00, 0x00, 0x00, 0x02, # Blockmap[0]: 0x20 Blocks * 0x1000 Bytes / Block 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, # Blockmap[1]: End @@ -60,7 +60,7 @@ $(VARS_FTW_WORKING_OFFSET)|$(VARS_FTW_WORKING_SIZE) gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize # -#NV_FTW_WROK +#NV_FTW_WORK # DATA = { # EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER->Signature = gEdkiiWorkingBlockSignatureGuid = @@ -68,9 +68,9 @@ 0x2b, 0x29, 0x58, 0x9e, 0x68, 0x7c, 0x7d, 0x49, 0xa0, 0xce, 0x65, 0x0, 0xfd, 0x9f, 0x1b, 0x95, # Crc:UINT32 #WorkingBlockValid:1, WorkingBlockInvalid:1, Reserved - 0x2c, 0xaf, 0x2c, 0x64, 0xFE, 0xFF, 0xFF, 0xFF, + 0x5b, 0xe7, 0xc6, 0x86, 0xFE, 0xFF, 0xFF, 0xFF, # WriteQueueSize: UINT64 - 0xE0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + 0xE0, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00 } $(VARS_FTW_SPARE_OFFSET)|$(VARS_FTW_SPARE_SIZE) -- 2.34.1