From nobody Sun May 5 14:20:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+84621+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+84621+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1639119043; cv=none; d=zohomail.com; s=zohoarc; b=ZffMAgEtb7iU9pDs3rFuohEAvt2klyQjCt0QsBRJaoACMNJjSeS39f8pW3i293mpiN6F1zYeIeHFH4vuLd+dS1MfCbgvMYQM9nDf5fXdLaNqoUaX7bTVq3Vv3kCfK0TPHbNCkzIVpFOZ58RaQQZ6nR8Pqny2QP95EwfxMcBYIYU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639119043; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=h55AvyfIi8mcw+2xrrCITwzqifO8zi8sXiJFdiJLfrw=; b=PjgMLLctoAFQ8/fYIBd7+J5dskFP+yObtAYCqagyqbVwJC7wY4B/kS4dhM3Qq9+k1ijtAHEBDEYso8QP9Jxo30JNJ+Yhs9J41RyeilnX8NV9v95h3yLLHwdC8dA+SnIhZEMmT8YoFtzTW4BU8D56GWYJsMFw+zBct87BHQ9are0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+84621+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1639119043513706.7140113106954; Thu, 9 Dec 2021 22:50:43 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id lb93YY1788612xbS0d2JdvGG; Thu, 09 Dec 2021 22:50:43 -0800 X-Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mx.groups.io with SMTP id smtpd.web08.4068.1639119042433334757 for ; Thu, 09 Dec 2021 22:50:42 -0800 X-Received: by mail-pf1-f171.google.com with SMTP id g18so7635127pfk.5 for ; Thu, 09 Dec 2021 22:50:42 -0800 (PST) X-Gm-Message-State: ZSXBBpIgPCoAX0qntsQPAcPax1787277AA= X-Google-Smtp-Source: ABdhPJx3eCXnunPwJh/ZbWwNc65FE+AbXGMKQBi85Vt1ZVzSLhj/M9jeuWNjU6muR9j0nh4QfdYyDQ== X-Received: by 2002:a63:c154:: with SMTP id p20mr37475532pgi.132.1639119041913; Thu, 09 Dec 2021 22:50:41 -0800 (PST) X-Received: from localhost.localdomain (122x208x150x49.ap122.ftth.ucom.ne.jp. [122.208.150.49]) by smtp.gmail.com with ESMTPSA id mz7sm11506114pjb.7.2021.12.09.22.50.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Dec 2021 22:50:41 -0800 (PST) From: "Masami Hiramatsu" To: Ard Biesheuvel , Leif Lindholm Cc: devel@edk2.groups.io, Kazuhiko Sakamoto , Masahisa Kojima Subject: [edk2-devel] [PATCH v3 1/6] [edk2-platforms] Silicon/SynQuacerI2cDxe: Wait for bus ready Date: Fri, 10 Dec 2021 15:50:39 +0900 Message-Id: <163911903882.561661.7568498557575354057.stgit@localhost> In-Reply-To: <163911902995.561661.9429300579159746333.stgit@localhost> References: <163911902995.561661.9429300579159746333.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,masami.hiramatsu@linaro.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1639119043; bh=ibs/2EHfrIgv3fgJchRPIxhllDWO3YrwSRNPgU+M9y0=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=i5HnavjKZ7m4erpCO1foF5Xpu7+OUc9OMMnMEGP2TIraJummaPiL/4rLVckcRvDjqvW 3LVrcoXFL1ymuHpfqpo4izR1LYXycks551BulfhFHR51o+WcELK/qZeTOO33b7605FUfR C1s7Ps8G4ZdJJpeOXnWbXLdSghf+Kl+rcxQ= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1639119044393100002 If an EFI application frequently repeats SetTime and GetTime, the I2C bus can be busy and failed to start. To fix this issue, add waiting loop for the bus busy status. (Usually, it is enough to read 3 times for checking, but for safety this sets 10 for timeout.) This also clean up the code path a bit so that it is easy to understand what should do on each combinations of BSR.BB and BCR.MSS. Signed-off-by: Masami Hiramatsu Reported-by: Kazuhiko Sakamoto --- Changes in v3: - Fix LF to CRLF. - Change title to wait for bus ready. Changes in v2: - Rename WAIT_FOR_BUS_BUSY_TIMEOUT to WAIT_FOR_BUS_READY_TIMEOUT - Fix indentation. --- .../Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c | 38 ++++++++++++++--= ---- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI= 2cDxe.c b/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cD= xe.c index 8aa9799018..c8646db800 100644 --- a/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c +++ b/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.c @@ -16,6 +16,8 @@ // #define WAIT_FOR_INTERRUPT_TIMEOUT 50000 =20 +#define WAIT_FOR_BUS_READY_TIMEOUT 10 + /** Set the frequency for the I2C clock line. =20 @@ -152,6 +154,7 @@ SynQuacerI2cMasterStart ( IN EFI_I2C_OPERATION *Op ) { + UINTN Timeout =3D WAIT_FOR_BUS_READY_TIMEOUT; UINT8 Bsr; UINT8 Bcr; =20 @@ -167,24 +170,35 @@ SynQuacerI2cMasterStart ( Bsr =3D MmioRead8 (I2c->MmioBase + F_I2C_REG_BSR); Bcr =3D MmioRead8 (I2c->MmioBase + F_I2C_REG_BCR); =20 - if ((Bsr & F_I2C_BSR_BB) && !(Bcr & F_I2C_BCR_MSS)) { - DEBUG ((DEBUG_INFO, "%a: bus is busy\n", __FUNCTION__)); - return EFI_ALREADY_STARTED; - } + if (!(Bcr & F_I2C_BCR_MSS)) { =20 - if (Bsr & F_I2C_BSR_BB) { // Bus is busy - DEBUG ((DEBUG_INFO, "%a: Continuous Start\n", __FUNCTION__)); - MmioWrite8 (I2c->MmioBase + F_I2C_REG_BCR, Bcr | F_I2C_BCR_SCC); - } else { - if (Bcr & F_I2C_BCR_MSS) { - DEBUG ((DEBUG_WARN, - "%a: is not in master mode\n", __FUNCTION__)); - return EFI_DEVICE_ERROR; + if (Bsr & F_I2C_BSR_BB) { // Bus is busy + do { + Bsr =3D MmioRead8 (I2c->MmioBase + F_I2C_REG_BSR); + } while (Timeout-- && (Bsr & F_I2C_BSR_BB)); + + if (Bsr & F_I2C_BSR_BB) { + DEBUG ((DEBUG_INFO, "%a: bus is busy\n", __FUNCTION__)); + return EFI_ALREADY_STARTED; + } } + DEBUG ((DEBUG_INFO, "%a: Start Condition\n", __FUNCTION__)); MmioWrite8 (I2c->MmioBase + F_I2C_REG_BCR, Bcr | F_I2C_BCR_MSS | F_I2C_BCR_INTE | F_I2C_BCR_BEIE); + + } else { // F_I2C_BCR_MSS is set + + if (!(Bsr & F_I2C_BSR_BB)) { + DEBUG ((DEBUG_WARN, + "%a: is not in master mode\n", __FUNCTION__)); + return EFI_DEVICE_ERROR; + } + + DEBUG ((DEBUG_INFO, "%a: Continuous Start\n", __FUNCTION__)); + MmioWrite8 (I2c->MmioBase + F_I2C_REG_BCR, Bcr | F_I2C_BCR_SCC); } + return EFI_SUCCESS; } =20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#84621): https://edk2.groups.io/g/devel/message/84621 Mute This Topic: https://groups.io/mt/87631124/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun May 5 14:20:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+84622+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+84622+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1639119051; cv=none; d=zohomail.com; s=zohoarc; b=AL0HyHRuyyC/OdOIQE4tI9Yghb+q5Mp8AGfhFV6GkdJnE6WeNJ1XMB5rHoozSaNe/16xCfn2p1U9+UmuC74w5AGtDfiYoeAKMs08Zqfqre7XjVdvfGYppXfge4i2+RVP1fZDHE5wEYBQZX86sB+ErRIzLSl4EGK5RcZcmPbdzio= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639119051; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=vISJNSHc2b4HL23K8yCm+Gn3hFicReiQUlTtzeMBu/U=; b=cIfbvGtNswIseN0+6g3L/RMfjI+PQzZowTMRFVz0+vm8vb73J0QgGCjJ1h/F3CtgR5wXI1wX2li7+NVLXCrmYA5d+2JjZfWDHk/aX3zYiMpsXRxJd8YTUwmPXQNmBrlyvQqCXB1pa6WYhe5sg7ATUNcPbfCtPcUMXGwn19SBLz0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+84622+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1639119051882857.8047300470502; Thu, 9 Dec 2021 22:50:51 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id XFrlYY1788612xjTFejcGboJ; Thu, 09 Dec 2021 22:50:51 -0800 X-Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mx.groups.io with SMTP id smtpd.web08.4069.1639119050698133948 for ; Thu, 09 Dec 2021 22:50:50 -0800 X-Received: by mail-pf1-f174.google.com with SMTP id z6so7630856pfe.7 for ; Thu, 09 Dec 2021 22:50:50 -0800 (PST) X-Gm-Message-State: KaxC8Myzn53gEcM8QbFlA69Ex1787277AA= X-Google-Smtp-Source: ABdhPJxQGMLjj3bjt5vKOmbMizpzY8S89GzbsdJ9N7NHMYQiBbM1c34avDYvdykqcFC3Hi8j8FrHGQ== X-Received: by 2002:a63:4a19:: with SMTP id x25mr37837983pga.202.1639119050185; Thu, 09 Dec 2021 22:50:50 -0800 (PST) X-Received: from localhost.localdomain (122x208x150x49.ap122.ftth.ucom.ne.jp. [122.208.150.49]) by smtp.gmail.com with ESMTPSA id g5sm11258694pjt.15.2021.12.09.22.50.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Dec 2021 22:50:49 -0800 (PST) From: "Masami Hiramatsu" To: Ard Biesheuvel , Leif Lindholm Cc: devel@edk2.groups.io, Kazuhiko Sakamoto , Masahisa Kojima Subject: [edk2-devel] [PATCH v3 2/6] [edk2-platforms] Silicon/Socionext/SynQuacer: Fix GenericWatchdog interrupt number Date: Fri, 10 Dec 2021 15:50:47 +0900 Message-Id: <163911904726.561661.11019780823237451137.stgit@localhost> In-Reply-To: <163911902995.561661.9429300579159746333.stgit@localhost> References: <163911902995.561661.9429300579159746333.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,masami.hiramatsu@linaro.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1639119051; bh=yixBxGhmXMMBZwBlFMaM6sirZCBc6EY/B6fhFX16Ai4=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=jngo00+JhxYj8O+0oXDyCQFVo/6qSar/w65l7zmGXQMM8v+N8Yf6aY/VLixHfCYwXiD AnId7GVB6aLraUPkfTChhzPXUN3QAojrkbCNV7Hie9GNPaBipWPCz+TvOptrl0BIkphVe x7HKd9ic7J8UwOUOYDWKyVg7oIzTxXwxb0Q= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1639119053057100002 This fixes Socionext DeveloperBox GenericWatchdog interrupt number to 93 instead of 94. Since the 93 is the default interrupt number defined in ArmPkg/ArmPkg.dec, this doesn't redefine gArmTokenSpaceGuid.PcdGenericWatchdogEl2IntrNum. Signed-off-by: Masami Hiramatsu Reported-by: Kazuhiko Sakamoto --- Changes in v2: - Just focus on using PcdGenericWatchdogEl2IntrNum in Gtdt.aslc --- .../Socionext/SynQuacer/AcpiTables/AcpiTables.inf | 1 + Silicon/Socionext/SynQuacer/AcpiTables/Gtdt.aslc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf b/Silico= n/Socionext/SynQuacer/AcpiTables/AcpiTables.inf index 96efb2d38e..886777a0fa 100644 --- a/Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf +++ b/Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf @@ -50,6 +50,7 @@ =20 gArmTokenSpaceGuid.PcdGenericWatchdogControlBase gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase + gArmTokenSpaceGuid.PcdGenericWatchdogEl2IntrNum =20 gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemRevision gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorRevision diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/Gtdt.aslc b/Silicon/Soc= ionext/SynQuacer/AcpiTables/Gtdt.aslc index c811fc5a0c..e7ab88b0a8 100644 --- a/Silicon/Socionext/SynQuacer/AcpiTables/Gtdt.aslc +++ b/Silicon/Socionext/SynQuacer/AcpiTables/Gtdt.aslc @@ -76,7 +76,7 @@ EFI_ACPI_6_0_GENERIC_TIMER_DESCRIPTION_TABLES Gtdt =3D { EFI_ACPI_6_0_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT ( FixedPcdGet32 (PcdGenericWatchdogRefreshBase), FixedPcdGet32 (PcdGenericWatchdogControlBase), - 94, + FixedPcdGet32 (PcdGenericWatchdogEl2IntrNum), 0), }; =20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#84622): https://edk2.groups.io/g/devel/message/84622 Mute This Topic: https://groups.io/mt/87631126/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun May 5 14:20:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+84623+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+84623+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1639119060; cv=none; d=zohomail.com; s=zohoarc; b=iV6Rf8YDnYDRUX6KBcn8vOFbicRQyr/7KLsTxpkotwSNgQ2dnpoSeW+rUvDGfFR0raEToE1huKJY4+hyypLwNALyTQQk5Sqbm+oeMvl9fzxm/e18EP+l/UIRpJ5ZJTtQMhnTOn4cVNV1VVLjo1Ke3v4UN8P64lhRAGWAxLd5A9Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639119060; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=m/2cUyZrGFatkfjj6xfU1c5dVXg0ml0hrlXmeD4SiVw=; b=dyvKa4Fv5ZQOCpz0yHOJECgLVpATUTrJHlsiGX1zR+MleHBiHXYbJ2BLU1kvZDHiBrKsEaEZVOz7qOVC7kRzDm8P/88rr+mlrFrvVjDvlb3LnKZN8S6weTB8SUslMl2TzXuzjzs7PKi9E3W1rvIUpP8i5uGFoSyoMC8SGYRMQaA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+84623+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1639119060464416.18163680265593; Thu, 9 Dec 2021 22:51:00 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id jIegYY1788612xVIrUswzUMo; Thu, 09 Dec 2021 22:51:00 -0800 X-Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mx.groups.io with SMTP id smtpd.web12.4023.1639119059067424524 for ; Thu, 09 Dec 2021 22:50:59 -0800 X-Received: by mail-pj1-f50.google.com with SMTP id y14-20020a17090a2b4e00b001a5824f4918so8730813pjc.4 for ; Thu, 09 Dec 2021 22:50:59 -0800 (PST) X-Gm-Message-State: 2SUFZnHLE3SR2kHvoeS8n5CPx1787277AA= X-Google-Smtp-Source: ABdhPJwJlmY8aXfWzTG8kbLVUpYQ90dfIbgr79JoVGdHbGVW7hGhNA5ZkFlvpdsaps23HR8nxVn8lA== X-Received: by 2002:a17:90b:1e4e:: with SMTP id pi14mr21512743pjb.161.1639119058575; Thu, 09 Dec 2021 22:50:58 -0800 (PST) X-Received: from localhost.localdomain (122x208x150x49.ap122.ftth.ucom.ne.jp. [122.208.150.49]) by smtp.gmail.com with ESMTPSA id 38sm1487813pgl.73.2021.12.09.22.50.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Dec 2021 22:50:58 -0800 (PST) From: "Masami Hiramatsu" To: Ard Biesheuvel , Leif Lindholm Cc: devel@edk2.groups.io, Kazuhiko Sakamoto , Masahisa Kojima Subject: [edk2-devel] [PATCH v3 3/6] [edk2-platforms] Silicon/Socionext/SynQuacer: Fix to read watchdog parameters with correct width Date: Fri, 10 Dec 2021 15:50:55 +0900 Message-Id: <163911905553.561661.2074085895260559105.stgit@localhost> In-Reply-To: <163911902995.561661.9429300579159746333.stgit@localhost> References: <163911902995.561661.9429300579159746333.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,masami.hiramatsu@linaro.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1639119060; bh=s2rQAfIQhLyy2wq9RDTSbxNuB34wJPLMQn3EPFuRyWM=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=OCTjueaGUaKgQp6thS6sYc9RYGc3bmRShhkDcs9JcRsLMp1AJo4O0TFzTbN77by1CDg 9X1Wh6i9X/u7VV6GcV76EoakBAOKFgtknFx4iqCqInycELQgOyY9CR7SOEuVfz8dL/Dvh 9UNJjfYNUmSzhfuWYS2Wt9QFH3nafwZaiQ4= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1639119061794100002 Since the RefreshFramePhysicalAddress and WatchdogControlFramePhysicalAddress fields are defined as UINT64 in EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE data structure, and both of gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase and gArmTokenSpaceGuid.PcdGenericWatchdogControlBase are defined as UINT64, FixedPcdGet64() should be used for reading and setting those parameters. Signed-off-by: Masami Hiramatsu --- Silicon/Socionext/SynQuacer/AcpiTables/Gtdt.aslc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/Gtdt.aslc b/Silicon/Soc= ionext/SynQuacer/AcpiTables/Gtdt.aslc index e7ab88b0a8..b045a49efa 100644 --- a/Silicon/Socionext/SynQuacer/AcpiTables/Gtdt.aslc +++ b/Silicon/Socionext/SynQuacer/AcpiTables/Gtdt.aslc @@ -74,8 +74,8 @@ EFI_ACPI_6_0_GENERIC_TIMER_DESCRIPTION_TABLES Gtdt =3D { // UINT32 GTxCommonFlags }, EFI_ACPI_6_0_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT ( - FixedPcdGet32 (PcdGenericWatchdogRefreshBase), - FixedPcdGet32 (PcdGenericWatchdogControlBase), + FixedPcdGet64 (PcdGenericWatchdogRefreshBase), + FixedPcdGet64 (PcdGenericWatchdogControlBase), FixedPcdGet32 (PcdGenericWatchdogEl2IntrNum), 0), }; -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#84623): https://edk2.groups.io/g/devel/message/84623 Mute This Topic: https://groups.io/mt/87631127/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun May 5 14:20:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+84624+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+84624+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1639119068; cv=none; d=zohomail.com; s=zohoarc; b=AXiVMlYBQKFEVBTL/MTR9O+QYuYZPS0r0TbwvRAuo8qPh1OVAFELpc5keNl//vO02WB8//mzY6ychioT5wT+34d/6iH9q+s6LjTVAtIZ96+0BLKfCB6lh/uoo0oRiKM79UT5TEWpyNHcQ1bq1BEzzFFBGoG/8rO+uIYxbRUs2BI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639119068; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=bukhWSvA7gTMl/acjeaDYPnWV/R6cBln/Jdjdgzqqqo=; b=LEFLxZGM/5kzVRo/++wnK4mFMhIhO1hhZQVzLda1Z61ZSbBM57FqlbxaaL5bRiVahAjSz0EKD2/5DgRtlj14WdNv3bRA0wgHgL2LBYBDFFfbrCzXTiHu52q6e5qHxGiS+pZWuFzPAx7A98e8L+Ds0R9XukElXHjeoqtASSHZXNE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+84624+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1639119068655644.1255806570191; Thu, 9 Dec 2021 22:51:08 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id sM8XYY1788612xrZIBI3nAb2; Thu, 09 Dec 2021 22:51:08 -0800 X-Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by mx.groups.io with SMTP id smtpd.web11.4124.1639119067660543796 for ; Thu, 09 Dec 2021 22:51:07 -0800 X-Received: by mail-pj1-f49.google.com with SMTP id gf14-20020a17090ac7ce00b001a7a2a0b5c3so8727173pjb.5 for ; Thu, 09 Dec 2021 22:51:07 -0800 (PST) X-Gm-Message-State: UZSZfLPbYhgPbE10k7UYXhS7x1787277AA= X-Google-Smtp-Source: ABdhPJxES02gsZSH8XZWHydgEEskEqVQ0sQlWylDTyxUC1pFAzyVquzw7iL0Rrk/yyh5/ETxh96N7g== X-Received: by 2002:a17:903:2306:b0:142:123a:24ec with SMTP id d6-20020a170903230600b00142123a24ecmr73621749plh.21.1639119067144; Thu, 09 Dec 2021 22:51:07 -0800 (PST) X-Received: from localhost.localdomain (122x208x150x49.ap122.ftth.ucom.ne.jp. [122.208.150.49]) by smtp.gmail.com with ESMTPSA id q2sm1928770pfj.62.2021.12.09.22.51.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Dec 2021 22:51:06 -0800 (PST) From: "Masami Hiramatsu" To: Ard Biesheuvel , Leif Lindholm Cc: devel@edk2.groups.io, Kazuhiko Sakamoto , Masahisa Kojima Subject: [edk2-devel] [PATCH v3 4/6] [edk2-platforms] Silicon/SynQuacerPlatformFlashAccessLib: Fix the number of erase blocks Date: Fri, 10 Dec 2021 15:51:04 +0900 Message-Id: <163911906395.561661.1999317391358075106.stgit@localhost> In-Reply-To: <163911902995.561661.9429300579159746333.stgit@localhost> References: <163911902995.561661.9429300579159746333.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,masami.hiramatsu@linaro.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1639119068; bh=FNXlbuMRvU359jbjTjLwwBFUWR2bU6boTgEJuRVrzHI=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=dQFwdo0LT9kTPyrJKVxxE6XXG9pVCjXcZubHXaQELJ/w3nKhWyGp5elgEq7fMcRGMCb k0oNzNh605aipzCW4WnNgFMaGkkNhrvm3xLl4O11n7RQcfXH6UIRWEBVdN32zMcAJmRvh wmdLUnlLO3GBVP5cpUsSVqZ6uTLFP0iSWO4= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1639119069149100002 Fix the number of erase blocks by rounding up the result. The erase blocks must include the last block covered by the length bytes. Signed-off-by: Masami Hiramatsu Reported-by: Kazuhiko Sakamoto Reviewed-by: Leif Lindholm --- .../SynQuacerPlatformFlashAccessLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAcce= ssLib/SynQuacerPlatformFlashAccessLib.c b/Silicon/Socionext/SynQuacer/Libra= ry/SynQuacerPlatformFlashAccessLib/SynQuacerPlatformFlashAccessLib.c index bded74dc4f..ad4021cf59 100644 --- a/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/S= ynQuacerPlatformFlashAccessLib.c +++ b/Silicon/Socionext/SynQuacer/Library/SynQuacerPlatformFlashAccessLib/S= ynQuacerPlatformFlashAccessLib.c @@ -283,7 +283,7 @@ PerformFlashWriteWithProgress ( DEBUG ((DEBUG_INFO, "%a: erasing 0x%llx bytes at address %llx (LBA 0x%lx= )\n", __FUNCTION__, Length, FlashAddress, Lba)); =20 - Status =3D Fvb->EraseBlocks (Fvb, Lba, Length / BlockSize, + Status =3D Fvb->EraseBlocks (Fvb, Lba, (Length + BlockSize - 1) / BlockS= ize, EFI_LBA_LIST_TERMINATOR); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "%a: Fvb->EraseBlocks () failed - %r\n", -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#84624): https://edk2.groups.io/g/devel/message/84624 Mute This Topic: https://groups.io/mt/87631128/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun May 5 14:20:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+84625+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+84625+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1639119076; cv=none; d=zohomail.com; s=zohoarc; b=OxXBJH/8FXUBWGWk7yKoT1DyzY+EX+rIaytQM+XJIrRC2eaJ1coqKukVQPcHATtMfPTM8dbD6AeCn+O0SMKC/Tt0Pw2OFd69zhiBm3h1jec1VT+mlDsMajIYU3IOqOZQMeeNKmx5+J9n0odb3WmuQHeCiC87Kapx2S/DrTMqmfk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639119076; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=zjJGp8L9G8EX1OzvBfIY87/nLYmX7pEJ+E2BqIfUVhU=; b=baJrd+0/8Qn0or7mULeMQNYtJjaQ8V8rWh1hfBdIeh8TUIA6fWFk7eYYNEIHStpDM6qcLiKPTNBlmRhTCSmSZFVQbD5cj4ZVKCKVkVd1zij1jgyT7fT0tnmTwNxnUaMqTrDWaq7vLVcSs5Y4sUa5tMT/Tj0f5fFU1TclZK/AxPw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+84625+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1639119076911160.69919421349869; Thu, 9 Dec 2021 22:51:16 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id R4LLYY1788612xv6iDCJb4tN; Thu, 09 Dec 2021 22:51:16 -0800 X-Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by mx.groups.io with SMTP id smtpd.web12.4027.1639119075882991755 for ; Thu, 09 Dec 2021 22:51:16 -0800 X-Received: by mail-pg1-f178.google.com with SMTP id r5so7257904pgi.6 for ; Thu, 09 Dec 2021 22:51:15 -0800 (PST) X-Gm-Message-State: 1knjWM2Dzummu6VnNavnm8ejx1787277AA= X-Google-Smtp-Source: ABdhPJwnWhYUwqrXrNnc3Tfh7uIBttTCXkmwoJqvQJbJco+RlF4U55VvrkA2juPVJkDg5QWaXYZ8Dw== X-Received: by 2002:aa7:8219:0:b0:4a4:bec7:ef10 with SMTP id k25-20020aa78219000000b004a4bec7ef10mr16303843pfi.37.1639119075392; Thu, 09 Dec 2021 22:51:15 -0800 (PST) X-Received: from localhost.localdomain (122x208x150x49.ap122.ftth.ucom.ne.jp. [122.208.150.49]) by smtp.gmail.com with ESMTPSA id c2sm1879213pfv.112.2021.12.09.22.51.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Dec 2021 22:51:15 -0800 (PST) From: "Masami Hiramatsu" To: Ard Biesheuvel , Leif Lindholm Cc: devel@edk2.groups.io, Kazuhiko Sakamoto , Masahisa Kojima Subject: [edk2-devel] [PATCH v3 5/6] [edk2-platforms] Silicon/SynQuacer: add DBG2 ACPI table Date: Fri, 10 Dec 2021 15:51:12 +0900 Message-Id: <163911907249.561661.11382999726925773930.stgit@localhost> In-Reply-To: <163911902995.561661.9429300579159746333.stgit@localhost> References: <163911902995.561661.9429300579159746333.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,masami.hiramatsu@linaro.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1639119076; bh=RNpOgQJcKHxCneCbRenHKYLQGNZ2Gr1/0XF/BLtEQfc=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=C5PX8Ackah6+nzlvAarasEtbl8A6bAiITq9Dz40SaSTPu0um9Ama49AdoNdY7GPluqJ bF6w5krapLutDXOAMeuFpudt36oNBUBAi+J2eBAncsp6jVCwNFWyQEgsqpXfr54TlqmoG SEcg7d4Ap3O20yea1T66g+iTrs9MjESVC5Q= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1639119078200100002 Add DBG2 table to ACPI tables. The COM1 uart port will be used for OS debug, and it is 16550 compatible. Signed-off-by: Masami Hiramatsu --- Changes in v2: - Move Dbg2.aslc before Dsdt.asl to keep the list alphabetically sorted. - Use EFI_ACPI_6_3_SYSTEM_MEMORY and EFI_ACPI_6_3_BYTE for initializatio= n. --- .../Socionext/SynQuacer/AcpiTables/AcpiTables.inf | 1=20 Silicon/Socionext/SynQuacer/AcpiTables/Dbg2.aslc | 70 ++++++++++++++++= ++++ 2 files changed, 71 insertions(+) create mode 100644 Silicon/Socionext/SynQuacer/AcpiTables/Dbg2.aslc diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf b/Silico= n/Socionext/SynQuacer/AcpiTables/AcpiTables.inf index 886777a0fa..e77d7a3056 100644 --- a/Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf +++ b/Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf @@ -19,6 +19,7 @@ [Sources] AcpiTables.h AcpiSsdtRootPci.asl + Dbg2.aslc Dsdt.asl Fadt.aslc Gtdt.aslc diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/Dbg2.aslc b/Silicon/Soc= ionext/SynQuacer/AcpiTables/Dbg2.aslc new file mode 100644 index 0000000000..89c9dbd998 --- /dev/null +++ b/Silicon/Socionext/SynQuacer/AcpiTables/Dbg2.aslc @@ -0,0 +1,70 @@ +/** @file +* Debug Port Table (DBG2) +* +* Copyright (c) 2020,2021 Linaro Ltd. All rights reserved. +* +* SPDX-License-Identifier: BSD-2-Clause-Patent +* +**/ +#include +#include +#include +#include +#include + +#include "AcpiTables.h" + +#pragma pack(1) + +#define SYNQUACER_UART1_STR { '\\', '_', 'S', 'B', '.', 'C', 'O', 'M', '1'= , 0x00 } +#define SQ_GAS32(Address) { EFI_ACPI_6_3_SYSTEM_MEMORY, 32, 0, EFI_ACPI_6_= 3_BYTE, Address } + +typedef struct { + EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT Dbg2Device; + EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE BaseAddressRegister; + UINT32 AddressSize; + UINT8 NameSpaceString[10]; +} DBG2_DEBUG_DEVICE_INFORMATION; + +typedef struct { + EFI_ACPI_DEBUG_PORT_2_DESCRIPTION_TABLE Description; + DBG2_DEBUG_DEVICE_INFORMATION Dbg2DeviceInfo; +} DBG2_TABLE; + + +STATIC DBG2_TABLE Dbg2 =3D { + { + __ACPI_HEADER ( + EFI_ACPI_6_3_DEBUG_PORT_2_TABLE_SIGNATURE, + DBG2_TABLE, + EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT_REVISION + ), + OFFSET_OF (DBG2_TABLE, Dbg2DeviceInfo), + 1 /* NumberOfDebugPorts */ + }, + { + { + EFI_ACPI_DBG2_DEBUG_DEVICE_INFORMATION_STRUCT_REVISION, + sizeof (DBG2_DEBUG_DEVICE_INFORMATION), + 1, /* NumberofGenericAddressRegist= ers */ + 10, /* NameSpaceStringLength */ + OFFSET_OF (DBG2_DEBUG_DEVICE_INFORMATION, NameSpaceString), + 0, /* OemDataLength */ + 0, /* OemDataOffset */ + EFI_ACPI_DBG2_PORT_TYPE_SERIAL, + EFI_ACPI_DBG2_PORT_SUBTYPE_SERIAL_16550_WITH_GAS, + {EFI_ACPI_RESERVED_BYTE, EFI_ACPI_RESERVED_BYTE}, + OFFSET_OF (DBG2_DEBUG_DEVICE_INFORMATION, BaseAddressRegister), + OFFSET_OF (DBG2_DEBUG_DEVICE_INFORMATION, AddressSize) + }, + SQ_GAS32 (SYNQUACER_UART1_BASE), /* BaseAddressRegister */ + SYNQUACER_UART1_SIZE, /* AddressSize */ + SYNQUACER_UART1_STR, /* NameSpaceString */ + } +}; + +#pragma pack() + +// Reference the table being generated to prevent the optimizer from remov= ing +// the data structure from the executable +VOID* CONST ReferenceAcpiTable =3D &Dbg2; -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#84625): https://edk2.groups.io/g/devel/message/84625 Mute This Topic: https://groups.io/mt/87631129/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun May 5 14:20:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+84626+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+84626+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1639119085; cv=none; d=zohomail.com; s=zohoarc; b=e/HvAtq5tLaPFktR1NbN5ksGK+ondFlRcD5RckmfMB0/qlKjYCQdPDwvnZmiM8wJRCkmKhrbOIETLxS3xFj4xIoJl0A+XXRd+45YSo4PvmTNXWvQ3JqBYHHwaHgl8Vj6hB7c6/lr3jspmhAQby8eQpi881QLOelxEAPPICKBj6M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1639119085; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=z0bd5LKRnZWB9l+tbg4Rp4XXLMsMJbiacA1+NFSOa00=; b=fan6Ye2pPcFTCvQSVpXh6bsijCe6/X3cF6zGR6IcTanlivkTalj0hHAMHTUG/HXFwc+Rxzl3XIXBPwHfMjdnckQzZy2msFX8tzGRMMFBvpu1X/f9rIZV3++mAKjKxLxzGV5uWkhFTzBD8UHzW1xxdHc+ewHyX7ohcIi/EAmHiRU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+84626+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1639119085161645.3146865590855; Thu, 9 Dec 2021 22:51:25 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id GO4JYY1788612xfu76VoPL64; Thu, 09 Dec 2021 22:51:24 -0800 X-Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mx.groups.io with SMTP id smtpd.web09.3980.1639119084385684240 for ; Thu, 09 Dec 2021 22:51:24 -0800 X-Received: by mail-pf1-f172.google.com with SMTP id k64so7613825pfd.11 for ; Thu, 09 Dec 2021 22:51:24 -0800 (PST) X-Gm-Message-State: O9j7YFwJAdHHbqzdDmUp2zZKx1787277AA= X-Google-Smtp-Source: ABdhPJwmEOeSwbxJln4+Be6i1E8OFXqOzx1s1mlFVUrYiy0vdmcndvR/x9B/fJwi3v0nLroo+67fOA== X-Received: by 2002:a63:170b:: with SMTP id x11mr34616034pgl.71.1639119083830; Thu, 09 Dec 2021 22:51:23 -0800 (PST) X-Received: from localhost.localdomain (122x208x150x49.ap122.ftth.ucom.ne.jp. [122.208.150.49]) by smtp.gmail.com with ESMTPSA id nv12sm1617590pjb.49.2021.12.09.22.51.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Dec 2021 22:51:23 -0800 (PST) From: "Masami Hiramatsu" To: Ard Biesheuvel , Leif Lindholm Cc: devel@edk2.groups.io, Kazuhiko Sakamoto , Masahisa Kojima Subject: [edk2-devel] [PATCH v3 6/6] [edk2-platforms] Platform/DeveloperBox: Expand NvStorage sizes Date: Fri, 10 Dec 2021 15:51:21 +0900 Message-Id: <163911908077.561661.9441962088868389919.stgit@localhost> In-Reply-To: <163911902995.561661.9429300579159746333.stgit@localhost> References: <163911902995.561661.9429300579159746333.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,masami.hiramatsu@linaro.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1639119084; bh=FGHRKdtij6fJ5zsgJEkXQMlM3P44sZelOhxKTmnEw4A=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=nc495aXO1yLu9O+X/jOuEGP16tmjBF7u3p8oROdTHcWvwGB6UZGgblrviaawbmamtfm HsKBxUG1pGTokvDqWkWaAlT210qo1NwWHu5awzXUv7Acyj0gm2tvsJSAwIEa/yhyQHhNg 9LgRTYd7w+7vp1OULl7ewoAVo3dZcMl/g/o= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1639119086943100001 Add "EXPAND_NVSTORAGE" build option to expand NvStorage Variable size and FTW spare/working size for the DeveloperBox platform. Since the size of the NvStorage VariableSize is not enough large, FWTS uefirttime test, which updates the NV variables in runtime, failes. This expands the size to fix this issue. Note that this is not compatible with previous variable layout on NOR flash, if this option is enabled, the PcdLowestSupportedFirmwareVersion is set to 0x400 (1024). Since the DeveloperBox platform uses the "BUILD_NUMBER" build option for the firmware version (PcdFirmwareRevision), firmware builder must ensure followings; - if the EXPAND_NVSTORAGE=3D1, BUILD_NUMBER must be bigger than 1024, - Or, the BUILD_NUMBER must be less than 1024. Signed-off-by: Masami Hiramatsu Reported-by: Kazuhiko Sakamoto --- Changes in v3: - Expand the NvStorage size with build option. - Update the PcdLowestSupportedFirmwareVersion. --- .../Socionext/DeveloperBox/DeveloperBox.dsc.inc | 9 ++++++++- Silicon/Socionext/SynQuacer/SynQuacer.dec | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc b/Platfor= m/Socionext/DeveloperBox/DeveloperBox.dsc.inc index c034c0a32c..40d0baaa30 100644 --- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc +++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc.inc @@ -280,12 +280,19 @@ gFip006DxeTokenSpaceGuid.PcdFip006DxeMemBaseAddress|0x08000000 =20 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x08400000 +!if $(EXPAND_NVSTORAGE) =3D=3D 1 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x00080000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x08480000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x00080000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x08500000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x00080000 +!else gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x00010000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x08410000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x00010000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x08420000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x00010000 - +!endif gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemId|"SNI " gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemTableId|0x52434155514e59= 53 # SYNQUACR gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorId|0x4f524e4c # LNRO diff --git a/Silicon/Socionext/SynQuacer/SynQuacer.dec b/Silicon/Socionext/= SynQuacer/SynQuacer.dec index 401ac4e78d..bccb88bcca 100644 --- a/Silicon/Socionext/SynQuacer/SynQuacer.dec +++ b/Silicon/Socionext/SynQuacer/SynQuacer.dec @@ -41,7 +41,11 @@ gSynQuacerTokenSpaceGuid.PcdI2cReferenceClock|62500000|UINT32|0x00000005 =20 # for capsule update +!if $(EXPAND_NVSTORAGE) =3D=3D 1 + gSynQuacerTokenSpaceGuid.PcdLowestSupportedFirmwareVersion|1|UINT32|0x00= 000400 +!else gSynQuacerTokenSpaceGuid.PcdLowestSupportedFirmwareVersion|1|UINT32|0x00= 000009 +!endif =20 # for SMBIOS Type17 gSynQuacerTokenSpaceGuid.PcdStoredSpdDDR4Address|0|UINT32|0x0000000A -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#84626): https://edk2.groups.io/g/devel/message/84626 Mute This Topic: https://groups.io/mt/87631131/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-