From patchwork Thu Jun 7 15:08:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 137895 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp2216412lji; Thu, 7 Jun 2018 08:08:28 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ5b28CNW7hwgNgZGnNiLl4s/eIiK+Mcvur68fDmlFmtmNNtVY+WT0xowyOQJgOszdC9P1c X-Received: by 2002:a63:3807:: with SMTP id f7-v6mr1912092pga.446.1528384108057; Thu, 07 Jun 2018 08:08:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528384108; cv=none; d=google.com; s=arc-20160816; b=WdURTWo1MuSa5MO1202EfbrmaaS9Ub34bsIoDt0aXPNmubtmbOu+L8EMg7FhGMGK1f svJpWveV/5SwOqi5GzCeL7UGv4KANf7POuWJNg6dLJ6nHEu+i8gftLBR7OykSnaceScb TZfWg0n6q/42cWKGmfuRz8+yA6D1LufnERJHx55BBIv1OS9/b/bvW8Qnh+cTf+1sAsMI 62ShUfI8X9xXQQg8fXGAijWpqfH97NDTH65wF1tj/5Vm4RB91sPYp0g+KS08kjQZKTFB p9YAU84QQAdVC+x7ZvraCwXLvIlkPWiAc4BjB5rri6kzCJPh5MjrtMczeglVAdVCr0Vb NRYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=3ltWUcFkh2XTX9VBrTwxSGJ6iEra+MjA8GeV6VbOTnY=; b=WOD12TByg+s1kJx3eo6l52P5q79ABmmusq1bto6vszHhXRWq8nnuLDNhBWxigGmmoh N93XMco9dNo3c8IB++QSD1e5H92fbz/B5hnvHtBE0oFMu7e4PPYgl/n4890U0cJ9GTYD 27FdKFID4aMxmijdxfUfs/qn4muN4EpcuEQqtFIVshnWme7T/V0HEUFDqU4s3SgVKOqL /FJ5yhwxpsSNm/1FtOb4od0IaUcKaCj5EZ2BlWTwdbWpK3cUp097yFPKvXz+IgmmwH4s M+SM8TWQzSPPzA5mn2StlrSDsjXqddEkTxVOw03nkZPlRMc48DABJqwTUnZ8I9t+hLuC onAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Os6DTnbt; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id d34-v6si4486829pld.532.2018.06.07.08.08.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jun 2018 08:08:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Os6DTnbt; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 8C71C2115F510; Thu, 7 Jun 2018 08:08:27 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::241; helo=mail-wr0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 465F82115C30A for ; Thu, 7 Jun 2018 08:08:26 -0700 (PDT) Received: by mail-wr0-x241.google.com with SMTP id l10-v6so10240296wrn.2 for ; Thu, 07 Jun 2018 08:08:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=V0E2QmeeQzMrbdsglLTijrpPO86evB7iDFSC/lSn0nQ=; b=Os6DTnbtTCjiIiYoy2DzqYMR/xHAiJ0D7+NVHlS78aL0ctY/i6AeSzUSS9SHpQIfo7 rPHJ1acQWBHx616EjBaNvNjOMn9p81iXDsEb0SIMhbu4XWaXC+IdwDyc9x0+nFV3mEyy PBPLV1UWYk44WqhHod7mLEOyL6rFWcw5oFm+w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=V0E2QmeeQzMrbdsglLTijrpPO86evB7iDFSC/lSn0nQ=; b=Ry4NE8uXD5iU5oQg61SBFAQQ3TJdEpiCqCxVmVaNJjAEZnnLosmnsA4xEzyl2dKOqj uc57jZjmN4nqB1he1h4uJZLVET5rKGmM+Pi9jxHwamp+fHCwYAedA8WF4890wDPHiugW GDQOr4XQNZaFSHTLdvi/ZDMM8RueCngOBfm1+nVRRWQRBxSITYr1v6CWNpWF282f7bSv 6LDUqlhbroGIPXYkGmZbGoYy55IhEWfYzwJ0okaT09//wvctcDlirmuC9dSMAh1kMDu2 FxOlZ4kQSB4dfH6UylVAe8S98jR7TlVubU2ADokft6lQQ6f45mVUNYbHEANxOhOQGMYA pVAA== X-Gm-Message-State: APt69E3gnMFjgJWmHzdK5L0vOo5NHHht+6WTIX0H+oSWPgrT8wb95sHn BPkyQJ+qXBqM2riuNKrO3FVT7CCFWsg= X-Received: by 2002:adf:ad2f:: with SMTP id p44-v6mr2120460wrc.164.1528384104580; Thu, 07 Jun 2018 08:08:24 -0700 (PDT) Received: from dogfood.home (LFbn-NIC-1-75-91.w2-15.abo.wanadoo.fr. [2.15.165.91]) by smtp.gmail.com with ESMTPSA id v14-v6sm27935985wro.33.2018.06.07.08.08.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jun 2018 08:08:23 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Thu, 7 Jun 2018 17:08:17 +0200 Message-Id: <20180607150818.14393-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180607150818.14393-1-ard.biesheuvel@linaro.org> References: <20180607150818.14393-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH edk2-platforms 1/2] Silicon/SynQuacerPlatformFlashAccessLib: relax FV address check X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" In commit 913fdda9f4b9 ("Silicon/SynQuacerPlatformFlashAccessLib: don't dereference FVB header fields"), we dropped all accesses to FVB header field, which was necessary because the flash partition may not in fact contain such a header. Instead, only an exact match on the base address of the FV compared to the base address of the capsule payload would result in a match, making it difficult to create capsules that only update a subset of the flash contents. Given that the FVB protocol provides a GetBlockSize() method that also returns the number of consecutive blocks of that size, and does not rely on the FVB header contents, we can actually infer the size of the flash partition, and use it to decide whether a capsule payload targets an area that is covered by this partition entirely. This optimization allows us to extend the FV description to include the SCP firmware partition without requiring us to actually provide a payload for that partition immediately, which is useful as a preparatory step. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c | 53 +++++++++----------- 1 file changed, 25 insertions(+), 28 deletions(-) -- 2.17.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c index ebb6ce189aa5..a6843c949a28 100644 --- a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c +++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c @@ -44,8 +44,10 @@ STATIC EFI_STATUS GetFvbByAddress ( IN EFI_PHYSICAL_ADDRESS Address, + IN UINTN Length, OUT EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL **OutFvb, - OUT EFI_PHYSICAL_ADDRESS *FvbBaseAddress + OUT EFI_LBA *Lba, + OUT UINTN *BlockSize ) { EFI_STATUS Status; @@ -54,6 +56,8 @@ GetFvbByAddress ( UINTN Index; EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb; EFI_FVB_ATTRIBUTES_2 Attributes; + EFI_PHYSICAL_ADDRESS FvbBaseAddress; + UINTN NumberOfBlocks; // // Locate all handles with Firmware Volume Block protocol @@ -84,7 +88,7 @@ GetFvbByAddress ( // // Checks if the address range of this handle contains parameter Address // - Status = Fvb->GetPhysicalAddress (Fvb, FvbBaseAddress); + Status = Fvb->GetPhysicalAddress (Fvb, &FvbBaseAddress); if (EFI_ERROR (Status)) { continue; } @@ -102,8 +106,25 @@ GetFvbByAddress ( continue; } - if (Address == *FvbBaseAddress) { + Status = Fvb->GetBlockSize (Fvb, 0, BlockSize, &NumberOfBlocks); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_INFO, "%a: failed to get FVB blocksize - %r, ignoring\n", + __FUNCTION__, Status)); + continue; + } + + if ((Length % *BlockSize) != 0) { + DEBUG ((DEBUG_INFO, + "%a: Length 0x%lx is not a multiple of the blocksize 0x%lx, ignoring\n", + __FUNCTION__, Length, *BlockSize)); + Status = EFI_INVALID_PARAMETER; + continue; + } + + if (Address >= FvbBaseAddress && + (Address + Length) <= (FvbBaseAddress + *BlockSize * NumberOfBlocks)) { *OutFvb = Fvb; + *Lba = (Address - FvbBaseAddress) / *BlockSize; Status = EFI_SUCCESS; break; } @@ -190,9 +211,7 @@ PerformFlashWriteWithProgress ( EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb; EFI_STATUS Status; UINTN BlockSize; - UINTN NumberOfBlocks; EFI_LBA Lba; - EFI_PHYSICAL_ADDRESS FvbBaseAddress; UINTN NumBytes; UINTN Remaining; @@ -216,7 +235,7 @@ PerformFlashWriteWithProgress ( // that covers the system firmware // Fvb = NULL; - Status = GetFvbByAddress (FlashAddress, &Fvb, &FvbBaseAddress); + Status = GetFvbByAddress (FlashAddress, Length, &Fvb, &Lba, &BlockSize); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "%a: failed to locate FVB handle for address 0x%llx - %r\n", @@ -224,28 +243,6 @@ PerformFlashWriteWithProgress ( return Status; } - Status = Fvb->GetBlockSize(Fvb, 0, &BlockSize, &NumberOfBlocks); - if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: failed to get FVB blocksize - %r\n", - __FUNCTION__, Status)); - return Status; - } - - if ((Length % BlockSize) != 0) { - DEBUG ((DEBUG_ERROR, - "%a: Length 0x%lx is not a multiple of the blocksize 0x%lx\n", - __FUNCTION__, Length, BlockSize)); - return EFI_INVALID_PARAMETER; - } - - Lba = (FlashAddress - FvbBaseAddress) / BlockSize; - if (Lba > NumberOfBlocks - 1) { - DEBUG ((DEBUG_ERROR, - "%a: flash device with non-uniform blocksize not supported\n", - __FUNCTION__)); - return EFI_UNSUPPORTED; - } - // // Remap the region as device rather than uncached. // From patchwork Thu Jun 7 15:08:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 137896 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp2216466lji; Thu, 7 Jun 2018 08:08:30 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ97slolHQNPp79CQfXt7Dh0ur72/jpxhZyI72CW+Y1/m59jG545VGcvFuLlCuNesR5FUEo X-Received: by 2002:a63:780b:: with SMTP id t11-v6mr1887132pgc.91.1528384110784; Thu, 07 Jun 2018 08:08:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528384110; cv=none; d=google.com; s=arc-20160816; b=ljgcJY9Ohu+cK9DZOrgfz+UFinBVGeL429KY3f/JEd6oVFMl3FvQaB4f+e9INcDNJF G5klSzkiaBjhxDJd7+PaOi81bJ2YbwQig7r1qtHbIaLs7uksg6onC+5H/HObBQL2gNKF eNyNMNAdZo7Iy0/weBd6Lvx/BcAkNEIXflYnppBOrkTCTwnD0U1gOsvvKK63O2wbWTWK c8rOwNS9Ity2FHMRklBiM2qY0jnEHaway3LHSxknhB/FsyvkLXsj2AqVNiBEh4DB94FA kQfAQ6SXTO6LSpy/VuFgpEdF+pEUYnRnd8F5kYYHRxFCSrkmHz5iajjdRgWVtuRCY2Yp RQrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=P0cwDUKKOuwh9vwTggGGdWn3Lrs0Vm316EVP8pS7D+I=; b=h50N6s3qbmubYLjN93IvZREswH+92yk5cR6UDmlBCgIjl3T0wpQURP7PkMTtY9mf31 Oz+AlNIGgapj5XGID8veumA2cvnh4ntgl2J0jtvx2cEINCqj0L1sFQoFO6Kuhgdo5fTV n3H2NBMvKZTC9EmzNeGV6D6th+xx/ZJchWNACX/SqEHdYsxX3sFFIj6uf3v9+mj5PYMA UMyStxRVcr9VZVt0w63C2WZ4ZSYEQHPjA1JAs0kZUCsBri/7YqcAmDLxHYYKTFP0Yaml TI7sNW0blvpUFu8f4Mvycac8eUnDmtj13a3lRCIEYOnnMaOpz5OSrt+eH82AtW8cFIln 05rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Mr0Aabx5; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id d6-v6si52221136plo.542.2018.06.07.08.08.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jun 2018 08:08:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Mr0Aabx5; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B936821160A20; Thu, 7 Jun 2018 08:08:28 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::241; helo=mail-wr0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 44B4D2115F502 for ; Thu, 7 Jun 2018 08:08:27 -0700 (PDT) Received: by mail-wr0-x241.google.com with SMTP id v13-v6so10226940wrp.13 for ; Thu, 07 Jun 2018 08:08:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qftvnWJd8WddoUOJW4CbekJoVHOY7IuMk9+a81QKZ9o=; b=Mr0Aabx5hzFvzvg+iz9o7MAv/cx09uhM7P8TvHV+6Wj1yGY6w3LAkwqHtgz87AV4SK NZYK3ZzXtQ4X+r7uQ2Y+OTKWWo94yu5yJiwbofIZfeeCXmcoBEZj96bULGIO0982oEDl HD+lyva2Rt2r/5KSgtk+UBIuOHtID8onHqTX8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qftvnWJd8WddoUOJW4CbekJoVHOY7IuMk9+a81QKZ9o=; b=kzn5RIEEis/J7UPJ3ZdaZbkkGVeEZ75MM5s/SLISsLJKYolttn7ou4Ox91kVA+6prJ 3I9unJKqUzqqReZ0N9OyIE1AnREH1m1J3ESKmK9X87c+S7NQPTxxopUSVFivRI6FzfzO TkplAevP282DR0PZRwbUY/VS86JeLpKWb4vIP1/pGM+AZ2sYxY9zXuG4cyEgjtyEb5fs T+HT0eacQHqKHSNP/u1rVjFo7AUe7zIVVHA0w5LX/e+zRMG1NTONu7uVkVH8q9RQ36xe 4KQlp3D2CJJ1HvdJi7Nta3/XgmCyZSpqoEDroBgKocEUKUPbufd205OFajpW8O4gsJzP rf7w== X-Gm-Message-State: APt69E1lErHgKvAS3U7IuIXo3Fdh5nzklEU4m11xdMh1G/BwYtSaORQ+ rwBMpUcLHF/zIkY5tPP0QiHe6Ujgalo= X-Received: by 2002:adf:a319:: with SMTP id c25-v6mr1907411wrb.189.1528384105687; Thu, 07 Jun 2018 08:08:25 -0700 (PDT) Received: from dogfood.home (LFbn-NIC-1-75-91.w2-15.abo.wanadoo.fr. [2.15.165.91]) by smtp.gmail.com with ESMTPSA id v14-v6sm27935985wro.33.2018.06.07.08.08.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jun 2018 08:08:24 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Thu, 7 Jun 2018 17:08:18 +0200 Message-Id: <20180607150818.14393-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180607150818.14393-1-ard.biesheuvel@linaro.org> References: <20180607150818.14393-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH edk2-platforms 2/2] Silicon/NorFlashSynQuacerLib: describe entire firmware region as FV X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" In order to allow for more flexibility when updating parts of the firmware via capsule update, expand the description of the code FV to cover the entire 4 MB region at the base of the NOR flash. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- Silicon/Socionext/SynQuacer/Library/NorFlashSynQuacerLib/NorFlashSynQuacer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.17.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/Silicon/Socionext/SynQuacer/Library/NorFlashSynQuacerLib/NorFlashSynQuacer.c b/Silicon/Socionext/SynQuacer/Library/NorFlashSynQuacerLib/NorFlashSynQuacer.c index 816d8ba33f8c..357082c3d903 100644 --- a/Silicon/Socionext/SynQuacer/Library/NorFlashSynQuacerLib/NorFlashSynQuacer.c +++ b/Silicon/Socionext/SynQuacer/Library/NorFlashSynQuacerLib/NorFlashSynQuacer.c @@ -23,8 +23,9 @@ STATIC NOR_FLASH_DESCRIPTION mNorFlashDevices[] = { { // UEFI code region SYNQUACER_SPI_NOR_BASE, // device base - FixedPcdGet64 (PcdFdBaseAddress), // region base - FixedPcdGet32 (PcdFdSize), // region size + SYNQUACER_SPI_NOR_BASE, // region base + FixedPcdGet32 (PcdFlashNvStorageVariableBase) - + SYNQUACER_SPI_NOR_BASE, // region size SIZE_64KB, // block size { 0x19c118b0, 0xc423, 0x42be, { 0xb8, 0x0f, 0x70, 0x6f, 0x1f, 0xcb, 0x59, 0x9a }