From patchwork Fri Mar 16 16:13: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: 131931 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp939753ljb; Fri, 16 Mar 2018 09:13:37 -0700 (PDT) X-Google-Smtp-Source: AG47ELtEgy3EPf3M1CkGpN7vHQkeP4y6NuKfhwUtY+vjDddjvkCWxHHoo9Xpvj0whpyKgILOGoW8 X-Received: by 2002:a17:902:d20a:: with SMTP id t10-v6mr2729103ply.123.1521216817452; Fri, 16 Mar 2018 09:13:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521216817; cv=none; d=google.com; s=arc-20160816; b=U2hAVfjag766f8CcAMqRfGeD8qbifV78Fd9TRYtxzGX/NUfI7DlA/wo9ameUKZeZ5b 9G60T2HLTyygsMIHV98QI5bEzJNYS4/uNVDE74sSS3+m0MpJ56bQ9hXvh0hbfBJn+7kX sjeoY7C0Y08dtMw09idQT8Z8W7cfeHXr6g9yqad7HW1SQgyPWFTU5Lq3ONB60vgYzf8k 6JtAkoGr1mhy3DU/L8TC1ds5qUSSzhCdfPlxmAWbYEHak8vdWOUBUo9ThprWfz0ND4fz QU0wu8VkRJTttk5jQ5YUx70MhDaOCMGAduG3f1e19Quu23ay947R8ecoEKd72nJNJvls xc2Q== 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=KL3S3Y0EyakQLG3zA16anRm0Ty2jGPss7TwBUFt+fEA=; b=RM/6w3aTd+dhd1EqEKxc3AhAFaQExfahmSdvNTtWmLYfxlo0Yaw2ky5atzfd1DV0bB z+YpQMyEcup8gzSvl628RqfxN8eKimxV/p7NbDHbkhSacgN5lUTKj6b0Z1jB205zn5PL fIcl9AED412VaNBj3kBPuaV66ZnOSpTKA7SFUgKChrCXxJHHT8a3R+I78jyYIUTA6sJ3 ZJZ4/g1Lga12lKeJ5O4N8vhG5MTg+dEK0bqx1HNiH95t5EvEO9KyAz9kNfFTV2IDecsT ASMfL2jc4m4aZiiIyX3hW0fhAlLZCuMm5cE5xHq9Ngg2AC5MGTOnU4gOEI7/NjzP0b08 cmRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=SRU8VCRC; 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 e26si5659123pfi.171.2018.03.16.09.13.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Mar 2018 09:13:37 -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=SRU8VCRC; 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 64A4521E49029; Fri, 16 Mar 2018 09:07:10 -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::244; helo=mail-wr0-x244.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x244.google.com (mail-wr0-x244.google.com [IPv6:2a00:1450:400c:c0c::244]) (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 E421E20954BB2 for ; Fri, 16 Mar 2018 09:07:07 -0700 (PDT) Received: by mail-wr0-x244.google.com with SMTP id h2so12204036wre.12 for ; Fri, 16 Mar 2018 09:13:33 -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=WXaYHjYEe6/nlwT9JWXFcLEkXj9565ICXBYMJ7hq+dE=; b=SRU8VCRCT7liC+7sam6LpvSi6+j7BP2YHXzKsxUMQfqrVVLfN0CIyz3NLM6dh16BLD Uz/51iA/4h+YAbPqMh2HAaAm6MR/AHVVsypdT1cqRMTrZXD3dsDgb902jm8s712NmvVw t37GOPX8LHZRDoKLofIL0bwUGl6YvJVzYudxo= 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=WXaYHjYEe6/nlwT9JWXFcLEkXj9565ICXBYMJ7hq+dE=; b=rYEjS0ZWhxfcp2GkVIEkKac2Qi5n0+cRJ2C3zmi36/zU9Gi3lQyqAufwEtubWoV91F pVjF5fF2vPFxMhFn+rFrd7Ile8+tJ/DTvX+p8znMdMO2/ei5FhifFyqWE8USiUeZIUsz Rjq30EM+LijloIY+QUJrQeYvT7f7vcOz1bbXMGVURfKMgj+TRMJRRRZANna1ez2V2jBB tqxCCjtiHf/us6+/83XYpMB2lFsyHceMOgaQMqZ6ilncZIRDOyO7P/lKZOIOWc8NpQjS L7xLimfeP1F5zoO8jqCMtVtNmE1Hw5XeZ/chNqJEZIM1H0/Fg4fRZ/V11gSlQm+rQ0jt +6lw== X-Gm-Message-State: AElRT7GLVgIFJXG/nBWDkICMkiurm4+eGESzdBNmIT8z9oRtdVNJFb8y VB+cKJZTmwdCWhSFdgWhWeO4oCg9Jk0= X-Received: by 10.223.174.247 with SMTP id y110mr2168505wrc.68.1521216811644; Fri, 16 Mar 2018 09:13:31 -0700 (PDT) Received: from localhost.localdomain ([105.142.191.63]) by smtp.gmail.com with ESMTPSA id n8sm7876242wrf.12.2018.03.16.09.13.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Mar 2018 09:13:30 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 16 Mar 2018 16:13:17 +0000 Message-Id: <20180316161322.6756-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180316161322.6756-1-ard.biesheuvel@linaro.org> References: <20180316161322.6756-1-ard.biesheuvel@linaro.org> Subject: [edk2] [RFC PATCH edk2-platforms 1/6] Silicon/SynQuacerPlatformFlashAccessLib: fix return value on no FVB found X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 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" If no suitable FVB protocol implementation is found to apply the capsule update, and the last one we disregarded was ruled out because it has the read-only attribute, we will exit the function returning EFI_SUCCESS without assigning a value to *OutFvb, resulting in a crash when it subsequently gets dereferenced. So set the correct value for Status for that case. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c | 1 + 1 file changed, 1 insertion(+) -- 2.15.1 _______________________________________________ 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 fbb8f1f9e48c..1af4abc16aa5 100644 --- a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c +++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c @@ -99,6 +99,7 @@ GetFvbByAddress ( DEBUG ((DEBUG_INFO, "%a: ignoring read-only FVB protocol implementation\n", __FUNCTION__)); + Status = EFI_NOT_FOUND; continue; } From patchwork Fri Mar 16 16:13: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: 131932 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp939788ljb; Fri, 16 Mar 2018 09:13:39 -0700 (PDT) X-Google-Smtp-Source: AG47ELuCEgD66vRV5sNNrFgvJVhUwPIHUF+44dqgqHAlCp1ivfIyub3vxBW60i3Xc5hSDi0DYNnf X-Received: by 2002:a17:902:858c:: with SMTP id e12-v6mr2772414plo.39.1521216819484; Fri, 16 Mar 2018 09:13:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521216819; cv=none; d=google.com; s=arc-20160816; b=JDr/6ZvcwsclwciKW4VWMp85BmQfJ/GUy9hy1mA+IHrqQy/MD8f4dT41rAuS1M8dE4 rRtjtci3+Nvj650+VGkO1Q7/G8et5reME5FrjddwaL5+/eUXZgFfiaS20O090MVpsDXQ 2fzf48M0kCViJeAP1EHRxbQzS/jf4ENaYo2bxPKba6fxqiLRNlSN628RZVvwq/Ym0i9A ahyqZkSDe8SH9qstUMCKaamu1ErNQLZGWRNOWnxqXXfiYa8EqwhfD+4QgiBnxpns3uBP 78zTJxEwkyIAkZch+ZOOo+59Ts9b2V5UX9neng3wc9wY3k9R/8pjbVrbu+3aq5QVF9Cp z4zA== 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=7f36Y8719UueeMPyDnFU54KtPzGCOquQZcOGO+krYQA=; b=VKognzmyJB0Nbi4oMkJ30hDx6pW3iQBx0rSL/KqXjmkuViZqzg7Yme7NBmqMQe4U6b 9nMaSlWiP/g2ciibHsqWeYfQha3OAVNwmirlvX6T8kPvT0lVhOXxMiNlEeMmtH/dQwrK 3EllivkDVT7fBGAUXRuihjUmmTIeVrGbR9zwId/Nrd6ndy79Ncgpm8zT+mXeD53OW+6l K+JmXAmVLKInrkiGSZZuw/DSeweB1yM8DVqJ84gC4965iO9bXVftF7oOKzZ1QhzDc0Vs RoWY1PKuVlTW10tQ0PcfSZHJ4fzBXYWUlB9kpvk18qtUORrnCs+7wpzUoqMD/JQk9s0r utoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=C/sIPMqB; 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 13-v6si6451116ple.157.2018.03.16.09.13.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Mar 2018 09:13:39 -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=C/sIPMqB; 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 CA255223CDC1D; Fri, 16 Mar 2018 09:07:11 -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::243; helo=mail-wr0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (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 E5F6020956060 for ; Fri, 16 Mar 2018 09:07:09 -0700 (PDT) Received: by mail-wr0-x243.google.com with SMTP id v65so12209017wrc.11 for ; Fri, 16 Mar 2018 09:13:35 -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=UP79KEtGjrsXu1BisqMygG3vBJQhUaVzyXwNOgD7MbY=; b=C/sIPMqBPcErrjKd5l9y049N4UtUdMd2LrK/rW5w6L738aVe9f4vjNjuVBYbilF2wF tWPeMTnANHt5If5Ij6vgzLXAliQe/9JQiFxhJ6ix6mfc1mayhAiFQgglsrdepToOBM/a DS3r8dUeKO+p58tDqLBKTip7ACsVwSBNBH7UE= 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=UP79KEtGjrsXu1BisqMygG3vBJQhUaVzyXwNOgD7MbY=; b=EcmFbCadx6yJrxf1Rj6HBnUJOE+UGSy8VLMc9bzQO67CUN+7LDKB72QDCMQiMUgFDP ysYsP1bGvV9T0qsoGG1bcTQ2G2QZd+AQm7SKpn6nxXL4p2+yCRwmH0xAN1NAHl7xYEFQ fh9XspRCsy4LN4seWI0a/DBcPI8Rz+bTrhrR1iY/N+0nVPl8tt8lSCWIsHdTzaeENjGc 7AjoAX8BhCq2nPKuXfdFY4h3x9cjZRHiXJ5Z4M3jZzWkLz0tdKkhZy4y+noo9fiCv8Lj 7nOscUwoXnsbA7YdPzUHyMgGilWMpA9yYRTB83Vg5/4yxdrskSw5H6WTYHJSe+2wJmm9 V5tQ== X-Gm-Message-State: AElRT7GTeaWzP7rySnViOSQQOk8ZkotA2lEXRAcvqDnWxuMjwjEkwNfS Be3vztN+RCbKjHEk/okeqdH+PZlt/uc= X-Received: by 10.223.136.183 with SMTP id f52mr2060331wrf.74.1521216813491; Fri, 16 Mar 2018 09:13:33 -0700 (PDT) Received: from localhost.localdomain ([105.142.191.63]) by smtp.gmail.com with ESMTPSA id n8sm7876242wrf.12.2018.03.16.09.13.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Mar 2018 09:13:32 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 16 Mar 2018 16:13:18 +0000 Message-Id: <20180316161322.6756-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180316161322.6756-1-ard.biesheuvel@linaro.org> References: <20180316161322.6756-1-ard.biesheuvel@linaro.org> Subject: [edk2] [RFC PATCH edk2-platforms 2/6] Silicon/SynQuacerPlatformFlashAccessLib: don't dereference FVB header fields X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 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" When we updated the capsule definition to cover the ARM Trusted Firmware binary image as well as the firmware volume containing the EDK2 code, we failed to recognize that the start of the image no longer constitutes a Firmware Volume header, and so we should not interpret the data as such. Note that this makes the FVB protocol slighty less appropriate as the abstraction to use to write this data, but given that there does not appear to be a better match (disk I/O, block I/O), let's stick with it for now, but require the base address to match the capsule's target address exactly rather than reading the size of the FV from the header. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.15.1 _______________________________________________ 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 1af4abc16aa5..82fe3f74aa7f 100644 --- a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c +++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c @@ -53,7 +53,6 @@ GetFvbByAddress ( UINTN HandleCount; UINTN Index; EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb; - EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader; EFI_FVB_ATTRIBUTES_2 Attributes; // @@ -103,8 +102,7 @@ GetFvbByAddress ( continue; } - FwVolHeader = (EFI_FIRMWARE_VOLUME_HEADER *) ((UINTN) *FvbBaseAddress); - if ((Address >= *FvbBaseAddress) && (Address <= (*FvbBaseAddress + FwVolHeader->FvLength))) { + if (Address == *FvbBaseAddress) { *OutFvb = Fvb; Status = EFI_SUCCESS; break; From patchwork Fri Mar 16 16:13:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 131933 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp939814ljb; Fri, 16 Mar 2018 09:13:41 -0700 (PDT) X-Google-Smtp-Source: AG47ELuhh6WXmyeOuPjUIv/WTcWMyEwWjihJ8AiCdeud00bqkB2/lD1x3Pe+sQ88Fc3OItAZhZ0f X-Received: by 2002:a17:902:e83:: with SMTP id 3-v6mr2838445plx.158.1521216821782; Fri, 16 Mar 2018 09:13:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521216821; cv=none; d=google.com; s=arc-20160816; b=A16GaR5UVNGYb5lIAZvVFiRwK6dMDqUXrmmgTmkGvdKBs65VXRN44jF4x/J+EA3BGH VRZn2WrOpASIOdjHUJ/m2e5cBnjgATpNfjI4MfmVKS3tbB1yQx1S4djP5vHobU9MgNHG dEsw1Pna6w+hBHdnB4wFM5izh5ErDfZRZt6pbqa4ianRA/R4tEK8K1F6mrO809UjM3MB GEfzXwGYadkZpP1a2fvlN0eQ6JEkueXnQ3fkiP8JTjKiFH2CaHOW+p0TfyDjd8sSjYHz SjtbuNAU9zXJtQ883RixFYtkn1p6z0qBTKkJOPjb9cczblwa6u+IoNp3b99PatFB4Sv3 ZrXA== 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=zFrowba6D7yL/3hIGkqAluqOMsTSe8Cs8hLc2HXr0MI=; b=VuVY0AKB82xuT3sQwl5EVe7Zkrdi0BQ+478UNz015W6vHPI0etxQ+lPpmiNjupLxe8 RbzCfBH1R3AEeqRiclONDZyhA17Xrad4Z8w3Nn3y0lw+3vCR4d4w8N+TeUcHMwYqRatJ 1cudpBL1a8nbeKGPTxT+cC7c0XVUJ9ZpPln6LL6ZaBSJ0JmbKU3m2EuC9Vn0P+NqfBMj /K4oWtonhEBmcZRutnL4+T+zM+kAARM4MNKWaKY9H1NSpqEbq6winbMEUu0U5kXE4lSg 7+gHo+jz5/TT8LqHpp6pN4yg8NGv8ljMo1Cy3ZWOT3kyvMEgC072xAGjP/k9C60kEu7C 69IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=KQw8rg5K; 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 61-v6si6452873plr.136.2018.03.16.09.13.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Mar 2018 09:13:41 -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=KQw8rg5K; 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 4DF12223FCF36; Fri, 16 Mar 2018 09:07:13 -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::242; helo=mail-wr0-x242.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) (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 717612202E4AF for ; Fri, 16 Mar 2018 09:07:11 -0700 (PDT) Received: by mail-wr0-x242.google.com with SMTP id o1so12233445wro.10 for ; Fri, 16 Mar 2018 09:13:36 -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=5zWoz4XsfNzYO5i7jXhnZx2hjxS46cJVPJpCOxbm2Gs=; b=KQw8rg5K62YAEiZ11U4NGJJ5GmIsjmgI7kOqdr39mMT99aY7OXxPtcSoNnd+Rs0RyE CLFdA5eW1mRhG9XEQZ6b7ZVLrFOymP1RkEpAuyJD/3B85xWcTZtrv/GO+xebrTFhG2ms 1fGwJXPVUTdGfkooHZywaTZSeX7HX2NLqxui0= 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=5zWoz4XsfNzYO5i7jXhnZx2hjxS46cJVPJpCOxbm2Gs=; b=rMqFwZa4dxGea+jTC8cYiiPDRI3P7GuJg+Xe4KRb4Ff2VodscYdLcpV5uRWVryty1i OscN4D5icvS/aeYt9yQ7LSzh1VN2Hp9FuxyHbm7SCuCBoQ2fj/jCTL0TA8qN6JqWbKig T+WK5K7Wjw5anPsvWktPAxCJ/mrU9Z/Zh34TnP5vHo0ozpcvybLzPZsASS7hfOVeo7cw 6c3H6hUMfyR9tTwTIQp8ZHeBTYz5QdT/2CnepD9lSUwjfFMR89je+1M+5+VwvhyOPa5r b4hbQCj08mxVPlnbZHJeNguV2tQq3GyTMFr/NYCA7INLKtFp8SEEzNXZH1CGSN86W6wZ 3SUw== X-Gm-Message-State: AElRT7G7hN23NwjUA9807y4XWRsy+cZC3BeqYsvHWsgdh+H+prgK0shL Lg8VIm7Jbw+dxq0BAlfQ0+DaiQ7OoBs= X-Received: by 10.223.135.148 with SMTP id b20mr2170826wrb.100.1521216815075; Fri, 16 Mar 2018 09:13:35 -0700 (PDT) Received: from localhost.localdomain ([105.142.191.63]) by smtp.gmail.com with ESMTPSA id n8sm7876242wrf.12.2018.03.16.09.13.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Mar 2018 09:13:34 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 16 Mar 2018 16:13:19 +0000 Message-Id: <20180316161322.6756-4-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180316161322.6756-1-ard.biesheuvel@linaro.org> References: <20180316161322.6756-1-ard.biesheuvel@linaro.org> Subject: [edk2] [RFC PATCH edk2-platforms 3/6] Silicon/SynQuacerPlatformFlashAccessLib: skip empty blocks X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 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" Before adding more payload to the capsule which may be only partially occupied, add some logic to skip writing these blocks after erasing them. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c | 41 +++++++++++++++++--- 1 file changed, 36 insertions(+), 5 deletions(-) -- 2.15.1 _______________________________________________ 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 82fe3f74aa7f..0131e33a4fe7 100644 --- a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c +++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c @@ -115,6 +115,35 @@ GetFvbByAddress ( return Status; } +/** + Check whether a buffer has any data in it, i.e., bytes with value != 0xff + + @param[in] Buffer Address of the buffer + @param[in] Length Size of the buffer + + @retval TRUE A non-0xff byte was found + @retval FALSE Buffer has 0xff bytes only + +**/ +STATIC +BOOLEAN +BufferHasData ( + IN VOID *Buffer, + IN UINTN Length + ) +{ + UINT8 *Data; + UINTN Index; + + Data = Buffer; + for (Index = 0; Index < Length; Index++) { + if (Data[Index] != 0xff) { + return TRUE; + } + } + return FALSE; +} + /** Perform flash write operation. @@ -257,11 +286,13 @@ PerformFlashWrite ( __FUNCTION__, BlockSize, Lba)); NumBytes = BlockSize; - Status = Fvb->Write (Fvb, Lba, 0, &NumBytes, Buffer); - if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, - "%a: write of LBA 0x%lx failed - %r (NumBytes == 0x%lx)\n", - __FUNCTION__, Lba, Status, NumBytes)); + if (BufferHasData (Buffer, NumBytes)) { + Status = Fvb->Write (Fvb, Lba, 0, &NumBytes, Buffer); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, + "%a: write of LBA 0x%lx failed - %r (NumBytes == 0x%lx)\n", + __FUNCTION__, Lba, Status, NumBytes)); + } } if (HaveBootGraphics) { From patchwork Fri Mar 16 16:13:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 131934 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp939846ljb; Fri, 16 Mar 2018 09:13:44 -0700 (PDT) X-Google-Smtp-Source: AG47ELtcAurbmZs7HAHaJQc92CKTW0nnYiI2CwrhF2bbHTxKbSKDecbyLeNHOsosygT3GQMU7ykQ X-Received: by 10.99.120.196 with SMTP id t187mr1914029pgc.149.1521216823979; Fri, 16 Mar 2018 09:13:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521216823; cv=none; d=google.com; s=arc-20160816; b=iE0pfETGmFYi1kpHaI0UkhRGlBLxH6wE0q3/ZTwbnnLRVEFSiaGOIEozNuibdq3oYf YqTioT/lTWZNJ/Mk9SNh3Z42Zi13Kojit6VxNNADxEQkeVL4zBUmVINb0K9YPj62z2mH 4kjmBE2zJBzO2S8S6Ka+X3rUYufYJOc7bYSRlYh9J5PIrQziY8goGQw8yaBoDrj/Wzfx H3txk+6ecaHUTKZjX3VfNj0LNA1RG6cARmzyo5lm2qdl3WnjzV2n98PTDxmdWNVxPoHu scd8HimLUzOegfkIBRHtRBTjRDJ0rYpGNJ8W1byN6YNzGxGIYaJlCWUV05SK6rnXV+i3 IGMA== 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=7YqGaOloDnoqwI+6fdeqj3teiiTXnbVKjMp48yVfDlc=; b=fGTSRot2GSQ8hKdiYkFXQCeDVizH+ncVUXdbCteNncyG0hAChRppdcDjgPy5G2PQNb VtwyCt351AJ23chSh9/J4hkb2UroXgqkFoFQXbd1a8Xl554K1KSFd/em+jp7mYZp3obF M7I1RgfrVQ3Q4Mbb4XEcRw7Vwh4eDwTwnDEeHzNSrSX4rcC3GHySiwL5AAsOfYGEbsJ8 IUcyGlojBSFPPs4Mh8qq8WCuYCFLlPdPunz3pdb5GqJRvvIDHPvcq9e3P25/P7QDN+Sg FUb8V0SVp/sUxQVxU2quYFeTi8IPcbsdBZWoRbjZyDaKmzplZ94XXBKdIa14tFky6H/I txyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=RASMuOoL; 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 z2-v6si6432321plk.670.2018.03.16.09.13.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Mar 2018 09:13:43 -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=RASMuOoL; 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 C174322489C84; Fri, 16 Mar 2018 09:07:16 -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::243; helo=mail-wr0-x243.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (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 1DD4320954B86 for ; Fri, 16 Mar 2018 09:07:13 -0700 (PDT) Received: by mail-wr0-x243.google.com with SMTP id c24so442802wrc.6 for ; Fri, 16 Mar 2018 09:13:38 -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=XMzZam2ekqxCRVuPnZz69gxY464/TRcEPOQ5D7O5r30=; b=RASMuOoLxexUICZcX3w8KpNelmbh7dxY5Xylm8RRmb5YPa7DMMtS2GYdLK8alXW4d3 GsfgKs1VPx5gPoKCFz6bmnlPL2/YSy9plL7L2Z4+rUaX1aCvnB9epRHoODOeFjMvb9nO /F+dcaQa6fGIGy2gUC1RKQBlY/g4kDUh3KZmg= 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=XMzZam2ekqxCRVuPnZz69gxY464/TRcEPOQ5D7O5r30=; b=jn0+LX0k0o4WEMThioLV+ys0Nuy0+c4jegPkL9T0X+MwSh9XTiE2dGT7Q/VRHkc8Ck lsRmHwiYwwxKZqfdvTxpfBUg54VC5JwTKG47oYQ/F8WC5Q8hPbplVopUNRoIuWy2ydKM edpsPnO90P+4zOad9V1BczsFYmyUnvsYEhmQOOOP4vhiwwtHzsZH5GsBWXVMve2c9huB FN9z0qXcKSz030/5i6571+xjWilsPR9XuabuiYtVlhwJoGFLL4Hn+r58a4Q82L+u837A 1bIQI+0KAcSboliOnrWPvmEV8rKbOVqIftDJJKkJTbu6S32Wyy8hbVpfeUeOqfbsvuaW K23w== X-Gm-Message-State: AElRT7H81Wfwbl7MjmgbG0q+5l3BzXAC8rZphcwGOaMCn7U749Dhpivn zZ4eEYWL/jxXO1dQq5oWdx36VuR2AkY= X-Received: by 10.223.128.209 with SMTP id 75mr2143667wrl.108.1521216816883; Fri, 16 Mar 2018 09:13:36 -0700 (PDT) Received: from localhost.localdomain ([105.142.191.63]) by smtp.gmail.com with ESMTPSA id n8sm7876242wrf.12.2018.03.16.09.13.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Mar 2018 09:13:36 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 16 Mar 2018 16:13:20 +0000 Message-Id: <20180316161322.6756-5-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180316161322.6756-1-ard.biesheuvel@linaro.org> References: <20180316161322.6756-1-ard.biesheuvel@linaro.org> Subject: [edk2] [RFC PATCH edk2-platforms 4/6] Silicon/SynQuacer: make lowest supported f/w version PCD configurable X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 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" Allow the lowest supported firmware version to be configured by PCD so that each platform can set it individually. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf | 2 ++ Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc | 2 +- Silicon/Socionext/SynQuacer/SynQuacer.dec | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) -- 2.15.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf index 95a5e482a713..db0c9c43b2e5 100644 --- a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf +++ b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf @@ -29,6 +29,7 @@ [Packages] MdeModulePkg/MdeModulePkg.dec MdePkg/MdePkg.dec SignedCapsulePkg/SignedCapsulePkg.dec + Silicon/Socionext/SynQuacer/SynQuacer.dec [LibraryClasses] DebugLib @@ -39,6 +40,7 @@ [LibraryClasses] [FixedPcd] gArmTokenSpaceGuid.PcdFdSize gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision + gSynQuacerTokenSpaceGuid.PcdLowestSupportedFirmwareVersion [Pcd] gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareImageDescriptor diff --git a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc index fb69de078313..12a56315a5ab 100644 --- a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc +++ b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc @@ -25,7 +25,7 @@ #define BUILD_STRING(x) L"build #" __BUILD_STRING(x) #define CURRENT_FIRMWARE_VERSION FixedPcdGet32 (PcdFirmwareRevision) #define CURRENT_FIRMWARE_VERSION_STRING BUILD_STRING (FixedPcdGet32 (PcdFirmwareRevision)) -#define LOWEST_SUPPORTED_FIRMWARE_VERSION 0x00000001 +#define LOWEST_SUPPORTED_FIRMWARE_VERSION FixedPcdGet32 (PcdLowestSupportedFirmwareVersion) #define IMAGE_ID SIGNATURE_64('S', 'N', 'D', 'E', 'V', 'B', 'O', 'X') #define IMAGE_ID_STRING L"Socionext Developer Box" diff --git a/Silicon/Socionext/SynQuacer/SynQuacer.dec b/Silicon/Socionext/SynQuacer/SynQuacer.dec index eb4fc4ace2f7..ccaf80def06b 100644 --- a/Silicon/Socionext/SynQuacer/SynQuacer.dec +++ b/Silicon/Socionext/SynQuacer/SynQuacer.dec @@ -44,6 +44,9 @@ [PcdsFixedAtBuild] gSynQuacerTokenSpaceGuid.PcdI2cReferenceClock|62500000|UINT32|0x00000005 + # for capsule update + gSynQuacerTokenSpaceGuid.PcdLowestSupportedFirmwareVersion|1|UINT32|0x00000009 + [PcdsPatchableInModule, PcdsDynamic] # Enable both RC #0 and RC #1 by default gSynQuacerTokenSpaceGuid.PcdPcieEnableMask|0x3|UINT8|0x00000007 From patchwork Fri Mar 16 16:13:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 131935 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp939888ljb; Fri, 16 Mar 2018 09:13:46 -0700 (PDT) X-Google-Smtp-Source: AG47ELtGjG6q5OMgCEfIFuWautgCU45J4keSsEhpQpANb3qPam+7oelyYbh1X3OqZDfV1mWsebeM X-Received: by 2002:a17:902:bc04:: with SMTP id n4-v6mr2727112pls.97.1521216826566; Fri, 16 Mar 2018 09:13:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521216826; cv=none; d=google.com; s=arc-20160816; b=IxMXIQ/m1cLG6f3Uxn8155SVHGtI8JjItUgZF2Z8/EJ7EQDnA2l0BVbX4a6iATVxoN rchAwKGuNP23FLBn7bXbahuxEJMoHgvMJAe00wBd/IrIry3H0cCen/BivvgBnr/taHwY o8OoSAaI/ZEfhfTISxdmQecglhm+a1igmZ52J2ZtT1F4gIByZaXEw6Xh45tUVoPw/QVf r5h7KEhp4RZoJe0fRhCEB6j0Xrq20/ysrq5BnXtH+kKF3nXiCoaopM10dftTOS4FTqki i06P9bXAoB0umgmHe4gjibiIgWZhDdIi+DyidmfL0GJqjeUA+V5RB/tHKDj+FuY0oxKr ay2w== 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=TnPcz0Gf47Be3MjsWcvLdGaoCiB8tbuUg4uPQjeCRr4=; b=XZsZyu2cc6xvFif68fFWt5i16+G5uU3pNgbL4QMbm9IOpy8LPbEF/G4N2wyQRC8Pj2 V2XFlS4Mac7/wveiE1QocuoXZTOPwjqHLER8z0eB350912veAW0F4V1ij8LFGiPRVh0N Laq7qnek2AdLM3Pbp3XWRK7Fr8gqMdIMlbsY97akBnJ+rajVQBeGA5QrK/gOIP3LMfng XcFy+v/qyOQz9M3qrvkAqOY4qg9fxPZ/vbnwUUNl1UOB0pDjn8Y3rfviMfsj851T0O7B NGeNmBzPA12REnpFpun64CvCtrgcL5sXdMqP8DaJyqf1gZfAidNr72qIhXcVKmMTPhGv 0q6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=jChW1N09; 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 z1-v6si4036563pll.302.2018.03.16.09.13.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Mar 2018 09:13:46 -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=jChW1N09; 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 2B47422489C90; Fri, 16 Mar 2018 09:07:17 -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 F0BFC20954B86 for ; Fri, 16 Mar 2018 09:07:14 -0700 (PDT) Received: by mail-wr0-x241.google.com with SMTP id s18so12206070wrg.9 for ; Fri, 16 Mar 2018 09:13:40 -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=UvgEDsDYCRNbKbBTtx/lwSC50yJMhxlnVB6nwljwR+A=; b=jChW1N09J1yVgRMpjaDMrT/6USAn2zTo9OX3if38RPqFNj6yBNi7vS5q9CAW+3IQEC DO9g4U5B3FNAZMy+lQODsUkHLpAjugfWBTUoIJTj9qrklhpeypwCPyRgxQnq4MQOLI5v f2fs71FUKHYVfZ7VhNj2CxeevF4ZBvcZnQMMo= 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=UvgEDsDYCRNbKbBTtx/lwSC50yJMhxlnVB6nwljwR+A=; b=CF8oZvWCzjTKBhFeL5CDH7DEiW92AcR7xkvtVojer6r6SyKRC3lOjNj0GFXGhbP4zq 5BA/uS33J6UnYDNFdc2NCR68ZPZeQZPa7rYMYXOHc57bDNOdmq59HaC9sSLyLrbmlf/U 3cXzAQ0gY/zxWXGbIHFnxS5WpPWNtkIvPNkwS72NzegWOJ8Qrojlbs8uGx2Vuoki1bjM eTWSWQGiWNAGbhDj0VJQb/ft8GjfvTTTFq2Gmh2JtfWjPrs+DetwKDXn5UqmKnhZvoj+ IZC98hv8toFMGJOPC9k34IJs4e0PLPyp+2jNz8j5jtsYdYQbXuFm21wVnwakbUz7nSS2 wA4Q== X-Gm-Message-State: AElRT7E+MQiY+RJrdjELkcOWjhtrtvGNdGpUf2mP4oySbEhfTvjpWA7M 0UwfbjEBLkQTmx5jfiBelSNV2XhlOLs= X-Received: by 10.223.183.193 with SMTP id t1mr2060192wre.168.1521216818702; Fri, 16 Mar 2018 09:13:38 -0700 (PDT) Received: from localhost.localdomain ([105.142.191.63]) by smtp.gmail.com with ESMTPSA id n8sm7876242wrf.12.2018.03.16.09.13.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Mar 2018 09:13:37 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 16 Mar 2018 16:13:21 +0000 Message-Id: <20180316161322.6756-6-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180316161322.6756-1-ard.biesheuvel@linaro.org> References: <20180316161322.6756-1-ard.biesheuvel@linaro.org> Subject: [edk2] [RFC PATCH edk2-platforms 5/6] TEMPORARY X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 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" Needed to make change to capsule footprint installable via capsule update. Will be reverted in next patch, and will be squashed together before going upstream. --- Silicon/Socionext/SynQuacer/Library/NorFlashSynQuacerLib/NorFlashSynQuacer.c | 4 ++-- Silicon/Socionext/SynQuacer/Library/SynQuacerMemoryInitPeiLib/SynQuacerMemoryInitPeiLib.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) -- 2.15.1 _______________________________________________ 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..cd6ab582fdc5 100644 --- a/Silicon/Socionext/SynQuacer/Library/NorFlashSynQuacerLib/NorFlashSynQuacer.c +++ b/Silicon/Socionext/SynQuacer/Library/NorFlashSynQuacerLib/NorFlashSynQuacer.c @@ -23,8 +23,8 @@ STATIC NOR_FLASH_DESCRIPTION mNorFlashDevices[] = { { // UEFI code region SYNQUACER_SPI_NOR_BASE, // device base - FixedPcdGet64 (PcdFdBaseAddress), // region base - FixedPcdGet32 (PcdFdSize), // region size + 0x8100000, //FixedPcdGet64 (PcdFdBaseAddress), // region base + 0x300000, //FixedPcdGet32 (PcdFdSize), // region size SIZE_64KB, // block size { 0x19c118b0, 0xc423, 0x42be, { 0xb8, 0x0f, 0x70, 0x6f, 0x1f, 0xcb, 0x59, 0x9a } diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerMemoryInitPeiLib/SynQuacerMemoryInitPeiLib.c b/Silicon/Socionext/SynQuacer/Library/SynQuacerMemoryInitPeiLib/SynQuacerMemoryInitPeiLib.c index 1402ecafce4a..963d568e43df 100644 --- a/Silicon/Socionext/SynQuacer/Library/SynQuacerMemoryInitPeiLib/SynQuacerMemoryInitPeiLib.c +++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerMemoryInitPeiLib/SynQuacerMemoryInitPeiLib.c @@ -57,8 +57,8 @@ STATIC CONST EFI_RESOURCE_ATTRIBUTE_TYPE mDramResourceAttributes = STATIC CONST ARM_MEMORY_REGION_DESCRIPTOR mVirtualMemoryTable[] = { // Memory mapped SPI NOR flash - ARM_CACHED_DEVICE_REGION (FixedPcdGet64 (PcdFdBaseAddress), - FixedPcdGet32 (PcdFdSize)), + ARM_CACHED_DEVICE_REGION (0x8100000,//FixedPcdGet64 (PcdFdBaseAddress), + 0x300000),//FixedPcdGet32 (PcdFdSize)), // SynQuacer OnChip peripherals ARM_DEVICE_REGION (SYNQUACER_PERIPHERALS_BASE, From patchwork Fri Mar 16 16:13:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 131936 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp939949ljb; Fri, 16 Mar 2018 09:13:49 -0700 (PDT) X-Google-Smtp-Source: AG47ELt13BRGVXBsjja5Wtkdo+DOrD2R79j+uCvHs4N03dZyLxOtt8GUyWbbXUme3o7uhThMbBOb X-Received: by 10.99.110.137 with SMTP id j131mr1886208pgc.85.1521216829213; Fri, 16 Mar 2018 09:13:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521216829; cv=none; d=google.com; s=arc-20160816; b=xRVTQMJ5dnh/Ei78zBQkVTnPsdhnG2pKWQgqELkF5VtDDgnUz43goc+82rUH69fOPv PesNyCf0rdgzxgBLAAPsePrfDjqp0cfqr+IUiUZaCTf4PLAi6AJD++CVS0GHPP0Lr7Rx 8K7AzEUPEtp4Yh73daJNq7lSji8FrjcooTLojdSHYwExey+dgpcDVkCanThHt3/4TDRO C7PH7ypB2qE6JGP8g8ODJB6tlwg3UYY+zU26zV6Z0yOO6rzY4a+Q9gqLyAJtAJ/pShNW dNx3pRAyaZM6HqmCxVNaLA4QMcWMCtD+jrTMuvJTVB6M6PA28VVdwQq9qMQKsI4ama3T S+PQ== 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=6lWjzp6A6hdtoCFX78VkymW4i8WyKivxzUglw0xC5U4=; b=jOuUMeFK/NJ7rVeo23I7Fb6ZWi+vBuO/1MZIRHN+W+dW8f+BnzZeru2zl5MuN0/t3R uXOtt8b5242uIuhubvTLlG5x9QEjP1u0nYKE9+3JWXDLl2PW/iq987rvN11qAQElOX10 GwVT3dkqddkDnq5OOYbFdJd7m/iBBFsvOaf+Hn8qbokFnqBS82dWclptKhtTielbmyq7 1ijDd3S9CEuBPuW5Pz7eLTJ0mpeFxi1fmuWAx5WqPp8G6NDHIoyGPUtnPQkOCqxhhLqu RpwrZkilHO8r4uAXVJ/kqm704APamjrk2bHbpRBq0zgnPSwce3U3Km0zdhWnRZRYe9Sg nS7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=DuQb1dcP; 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 h67si1174039pgc.353.2018.03.16.09.13.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Mar 2018 09:13:49 -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=DuQb1dcP; 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 8754922489C88; Fri, 16 Mar 2018 09:07:18 -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::242; helo=mail-wr0-x242.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) (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 1E50A22489C88 for ; Fri, 16 Mar 2018 09:07:17 -0700 (PDT) Received: by mail-wr0-x242.google.com with SMTP id z73so8003742wrb.0 for ; Fri, 16 Mar 2018 09:13:42 -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=Y62udVq0VwWhemba8Ll8bVP2+GgxceO3HtTpGgI03hk=; b=DuQb1dcP7P3MxbAB81H8HHQWUxQG/t4VAiqyYu94DHIySrjejLDFmqdn5KcNrOe5nY EoT7yHovwRaWbXYGffG9BHBQFkWvUNPm2ZDTNy/fPKviYKjY9CW3n9ze3Xi4+V0FD8RY wAVKVLGSf2a1HqJmc7bC3vH/TRVzXrRlRGBLA= 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=Y62udVq0VwWhemba8Ll8bVP2+GgxceO3HtTpGgI03hk=; b=QQe7zkqxWQN9WiiOQkerWrB4I9VZumifnId1l6ZwbH4Sw8E+V3m8euMjN7Cz/tw5cf f+kjhY3Z3GAIpPCvEruScnR6Qa+Ou38u+BwsiHdYOO1MOIWvI/M00A05FmDvS2wymbTA Ex4xda8cvDUUoN2e28cNzEBzyfluEMUojeQXRELv03BBA2CT9L+fDrOrOadv720MRjr1 sZkL35pnyaE2zknFoKKkjzv9iMNyV+23chEJXysAOfOMkrTZE9zgdx8Uy3wdc50HKgUV 3y3hJcX2jv1D1yUIOBX0epsNfmae2AhuOmmnX7fg8IT+vHhygdb+yi0tyAKlKcRxkHBW ymkw== X-Gm-Message-State: AElRT7FcZvYFyhI5X7KJCfQmJ9adqQ85vXrDDF39VYrfhZIKDpeXZ56U R9uF+lDfJWX9cs1mx8FxCoIpGcYDF5k= X-Received: by 10.223.153.49 with SMTP id x46mr2281827wrb.224.1521216820631; Fri, 16 Mar 2018 09:13:40 -0700 (PDT) Received: from localhost.localdomain ([105.142.191.63]) by smtp.gmail.com with ESMTPSA id n8sm7876242wrf.12.2018.03.16.09.13.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Mar 2018 09:13:39 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 16 Mar 2018 16:13:22 +0000 Message-Id: <20180316161322.6756-7-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180316161322.6756-1-ard.biesheuvel@linaro.org> References: <20180316161322.6756-1-ard.biesheuvel@linaro.org> Subject: [edk2] [RFC PATCH edk2-platforms 6/6] Platform/Socionext/DeveloperBox: add SCP firmware image to capsule X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 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" Modify the .FDF definitions describing the Flash Device and the capsule payload so that the SCP firmware can be updated along with the ARM Trusted Firmware and EDK2 code. Note that this does not increase the likelihood some kind of recovery is needed when a capsule update fails: the NOR layout has been updated to allow the serial flasher to execute even if the SCP firmware has been corrupted, and a failed flash of just UEFI already requires such recovery anyway. Since this constitutes a backward incompatible changes as far as capsule update is concerned, add a provision for setting the minimum supported firmware version via the build command line. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 3 +++ Platform/Socionext/DeveloperBox/DeveloperBox.fdf | 15 +++++++++------ Platform/Socionext/DeveloperBox/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini | 4 ++-- Silicon/Socionext/SynQuacer/Library/NorFlashSynQuacerLib/NorFlashSynQuacer.c | 4 ++-- Silicon/Socionext/SynQuacer/Library/SynQuacerMemoryInitPeiLib/SynQuacerMemoryInitPeiLib.c | 4 ++-- 5 files changed, 18 insertions(+), 12 deletions(-) -- 2.15.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc index 538488253d9b..af2930bcbba5 100644 --- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc +++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc @@ -29,6 +29,7 @@ [Defines] BUILD_NUMBER = 1 DEFINE DO_X86EMU = FALSE + DEFINE MIN_BUILD_NUMBER = 1 [BuildOptions] RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 @@ -404,6 +405,8 @@ [PcdsFixedAtBuild.common] !endif gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision|$(BUILD_NUMBER) + gSynQuacerTokenSpaceGuid.PcdLowestSupportedFirmwareVersion|$(MIN_BUILD_NUMBER) + # # 96boards mezzanine support # diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.fdf b/Platform/Socionext/DeveloperBox/DeveloperBox.fdf index ddd9757201aa..b2de8a2255c9 100644 --- a/Platform/Socionext/DeveloperBox/DeveloperBox.fdf +++ b/Platform/Socionext/DeveloperBox/DeveloperBox.fdf @@ -26,13 +26,13 @@ ################################################################################ [FD.SPI_NOR_IMAGE] -BaseAddress = 0x08180000|gArmTokenSpaceGuid.PcdFdBaseAddress # The base address of the Firmware in NOR Flash. -Size = 0x00280000|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device +BaseAddress = 0x08100000|gArmTokenSpaceGuid.PcdFdBaseAddress # The base address of the Firmware in NOR Flash. +Size = 0x00300000|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device ErasePolarity = 1 # This one is tricky, it must be: BlockSize * NumBlocks = Size BlockSize = 0x00010000 -NumBlocks = 0x28 +NumBlocks = 0x30 ################################################################################ # @@ -50,13 +50,16 @@ [FD.SPI_NOR_IMAGE] # ################################################################################ -0x00000000|0x00078000 +0x00000000|0x00080000 +FILE = Platform/Socionext/DeveloperBox/scp_firmware.bin + +0x00080000|0x00078000 FILE = Platform/Socionext/DeveloperBox/fip_all_arm_tf.bin -0x00078000|0x00008000 +0x000f8000|0x00008000 FILE = $(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/$(ARCH)/Silicon/Socionext/SynQuacer/Stage2Tables/Stage2Tables/OUTPUT/Stage2Tables.bin -0x00080000|0x00200000 +0x00100000|0x00200000 gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize FV = FVMAIN_COMPACT diff --git a/Platform/Socionext/DeveloperBox/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini b/Platform/Socionext/DeveloperBox/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini index 1f77aeab5049..32b342bd0a1b 100644 --- a/Platform/Socionext/DeveloperBox/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini +++ b/Platform/Socionext/DeveloperBox/SystemFirmwareUpdateConfig/SystemFirmwareUpdateConfig.ini @@ -19,7 +19,7 @@ Update0 = SynQuacerFvMain [SynQuacerFvMain] FirmwareType = 0 # SystemFirmware AddressType = 1 # 0 - relative address, 1 - absolute address. -BaseAddress = 0x08180000 # Base address offset on flash -Length = 0x00240000 # Length +BaseAddress = 0x08100000 # Base address offset on flash +Length = 0x00300000 # Length ImageOffset = 0x00000000 # Image offset of this SystemFirmware image FileGuid = e99b89f7-c120-4b25-4db1-8394edb0b4f5 # PcdEdkiiSystemFirmwareFileGuid diff --git a/Silicon/Socionext/SynQuacer/Library/NorFlashSynQuacerLib/NorFlashSynQuacer.c b/Silicon/Socionext/SynQuacer/Library/NorFlashSynQuacerLib/NorFlashSynQuacer.c index cd6ab582fdc5..816d8ba33f8c 100644 --- a/Silicon/Socionext/SynQuacer/Library/NorFlashSynQuacerLib/NorFlashSynQuacer.c +++ b/Silicon/Socionext/SynQuacer/Library/NorFlashSynQuacerLib/NorFlashSynQuacer.c @@ -23,8 +23,8 @@ STATIC NOR_FLASH_DESCRIPTION mNorFlashDevices[] = { { // UEFI code region SYNQUACER_SPI_NOR_BASE, // device base - 0x8100000, //FixedPcdGet64 (PcdFdBaseAddress), // region base - 0x300000, //FixedPcdGet32 (PcdFdSize), // region size + FixedPcdGet64 (PcdFdBaseAddress), // region base + FixedPcdGet32 (PcdFdSize), // region size SIZE_64KB, // block size { 0x19c118b0, 0xc423, 0x42be, { 0xb8, 0x0f, 0x70, 0x6f, 0x1f, 0xcb, 0x59, 0x9a } diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerMemoryInitPeiLib/SynQuacerMemoryInitPeiLib.c b/Silicon/Socionext/SynQuacer/Library/SynQuacerMemoryInitPeiLib/SynQuacerMemoryInitPeiLib.c index 963d568e43df..1402ecafce4a 100644 --- a/Silicon/Socionext/SynQuacer/Library/SynQuacerMemoryInitPeiLib/SynQuacerMemoryInitPeiLib.c +++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerMemoryInitPeiLib/SynQuacerMemoryInitPeiLib.c @@ -57,8 +57,8 @@ STATIC CONST EFI_RESOURCE_ATTRIBUTE_TYPE mDramResourceAttributes = STATIC CONST ARM_MEMORY_REGION_DESCRIPTOR mVirtualMemoryTable[] = { // Memory mapped SPI NOR flash - ARM_CACHED_DEVICE_REGION (0x8100000,//FixedPcdGet64 (PcdFdBaseAddress), - 0x300000),//FixedPcdGet32 (PcdFdSize)), + ARM_CACHED_DEVICE_REGION (FixedPcdGet64 (PcdFdBaseAddress), + FixedPcdGet32 (PcdFdSize)), // SynQuacer OnChip peripherals ARM_DEVICE_REGION (SYNQUACER_PERIPHERALS_BASE,