From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mx.groups.io with SMTP id smtpd.web10.5093.1686910620415585390 for ; Fri, 16 Jun 2023 03:17:00 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ventanamicro.com header.s=google header.b=FGvvtkq4; spf=pass (domain: ventanamicro.com, ip: 209.85.214.178, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-1b5018cb4dcso3574055ad.2 for ; Fri, 16 Jun 2023 03:17:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1686910620; x=1689502620; 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=FGvvtkq4NIcyG4Rdwoj9TMcsxsq252xUcxWNkd+QaIv5lVSEXVF2moSqaFH4lIsAj6 OSvTT46kt4ljzCj1LeIKLrlGAOqK8YbHhqeCc/QGQ6DLVd82lg3wjOnmkp2ILoiA+Qg7 5oA/wo/ud6Fb58ljL13TLsF0vaJ7fNbxxxBnkMn2GJwL4J0/qbltiOI7yckcS3HRHJSD j8UdefeAZJtWTbJRuHOXjXJGXMG3T66gW0ai3iST/7T8m5l4xlpfCi1YCd6k5Ar8PLyu rJqMy0upxtnDVTvezzIxKty4iXoHwp1ts1utFkCzWwlzfa+bJO7Af0GMGhEanmjIohJS SfoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686910620; x=1689502620; 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=Y5UyOTlpJPobADKdZ4vDyEisr07qqP18nAWE8CwEv1Pq92a+AA8S1czsS01bP4blO1 T2T4muRMu5d9278X3Snlu4IjDZ63Xl3fMn9TAHzrgGw3x05Xrd2FzPA6S+c4Rns4x7O6 wd4/SLWYqrwW+beiNEojFF87evWSamJyJZ/KDB/lNwTT9RKFuCzpx5Uyk3VTMWB2VbJe RWP71vLcXCMPsdfAhYWffwsofwtkBGu9i8YUsZk7gpDvGlHttUNRR2GHiFletsDCDjFU ziiOb1moi16O7IPx/yz9PbHnoTBxSp3+jGukJTL5OJCWzjKmWml3Qd/Cn4nIfqGB8uym thKw== X-Gm-Message-State: AC+VfDwwt5E59F6lw8oVCLqoxi8JnJhjnqYeGvSPbX7WrytL0xw5aWcG fpHO9FHeO9ksU/nJRmmwBafMqufxI3zJ9/nmBeE= X-Google-Smtp-Source: ACHHUZ50PvGwmNv7op0iGU79vGiLKZ10N1XeSj8vkywtphkyIewQqtjr8jdiKB8sHa8o7XZL3CObvA== X-Received: by 2002:a17:902:bb96:b0:1ac:8837:de9 with SMTP id m22-20020a170902bb9600b001ac88370de9mr1099128pls.3.1686910619705; Fri, 16 Jun 2023 03:16:59 -0700 (PDT) Return-Path: Received: from kerodi.Dlink ([106.51.184.72]) by smtp.gmail.com with ESMTPSA id h12-20020a170902f54c00b001a1a82fc6d3sm15435565plf.268.2023.06.16.03.16.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Jun 2023 03:16: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 v2 1/4] OvmfPkg/RiscVVirt: Fix couple of issues in VarStore Date: Fri, 16 Jun 2023 15:46:48 +0530 Message-Id: <20230616101651.1319722-2-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230616101651.1319722-1-sunilvl@ventanamicro.com> References: <20230616101651.1319722-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