From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mx.groups.io with SMTP id smtpd.web11.6716.1687255373039001923 for ; Tue, 20 Jun 2023 03:02:53 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@ventanamicro.com header.s=google header.b=kinlxBM7; spf=pass (domain: ventanamicro.com, ip: 209.85.210.178, mailfrom: sunilvl@ventanamicro.com) Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6687446eaccso1946906b3a.3 for ; Tue, 20 Jun 2023 03:02:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1687255372; x=1689847372; 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=oA0nq6olATaRfnKrMtZ9Kr0b8IwOH9L124Os9DnUSDU=; b=kinlxBM7R7tX3vgMQVT4vrT7QtaiUmktINko3ObPeXyKYjxOA4p8iakS6s5GSgg7dN yO5g4Ozc+QQEXUZi3kceHJAwXD0PlmFa88CQT6khnyxTdOrlR9/DyqfOo9hihEHIfhkL eFl40SyUY5HUYor+bz+1vtHDsaG4PHkj2w2+42rGVWJ+SiTzEg2K1Kbjvp9o4XcIaDzU I7eotiPHaxENzEFH6FtLQW1yFPS1z/NDkjdhzApOBMwaheKIGw+lti9iNG6Y45o5QvvK rQ0ZdXT3MZ9h0hbt6J1w/yI5Da8h+nYhE6AB7cDn7Qw1aft4qq9V0Wc4MfYpV1UsmL7a cPng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687255372; x=1689847372; 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=oA0nq6olATaRfnKrMtZ9Kr0b8IwOH9L124Os9DnUSDU=; b=SyWUgIIMJXc0w52JqlSPaxCIGNqKFqiiPXd36Z633fFM9ljF2vU6QdMV5y5SqyQXKD dE55qZh+4cXuhjHM2IhG/m4vD8fjMrfRqFSdcL/TrqSFU3fRPhvoQXOtemEnGunPGski a8Bg0ODx+6J59iv7gmUmEeI3azkN3aFLswcye1seXrBmjE79xQtzsUCzZGThVeK9CwIP icH3LJKlbMfLg3nU8YEqrjf1OHgDWNKLnleQ+5aRA56hqf8p4qXMe3YEsDproEVmOjW7 VYiqXebkxUbLAVbpuG/wSXBRQuRh4+tJCk9F8f4tHd/OY1gSlJUSjzy1oojNPP36WEip RsiA== X-Gm-Message-State: AC+VfDxVRAkJRhMutxGUwqHkAVjU/OCWSBwjjgMA36fiy0MMaw24Wpf4 wtml9Q7ifsGYAF3qfDIup0tbisadPuCDVYX4gQw= X-Google-Smtp-Source: ACHHUZ7qV2QtVJezAsVNVH2Eco+LyTaC3bsFPGJemdcvFhMng3lb3337t7XYFJs+coa6cYHJPyy0Eg== X-Received: by 2002:a05:6a00:1989:b0:668:8b43:8ded with SMTP id d9-20020a056a00198900b006688b438dedmr3864848pfl.26.1687255372366; Tue, 20 Jun 2023 03:02:52 -0700 (PDT) Return-Path: Received: from kerodi.Dlink ([106.51.184.72]) by smtp.gmail.com with ESMTPSA id v14-20020aa7808e000000b00666b3b04758sm1033433pff.37.2023.06.20.03.02.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 03:02:52 -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 , Heinrich Schuchardt Subject: [PATCH v3 1/4] OvmfPkg/RiscVVirt: Fix couple of issues in VarStore Date: Tue, 20 Jun 2023 15:32:41 +0530 Message-Id: <20230620100244.1404606-2-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230620100244.1404606-1-sunilvl@ventanamicro.com> References: <20230620100244.1404606-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 Cc: Heinrich Schuchardt --- 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