From nobody Sun May 19 08:30:47 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+75475+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+75475+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1621828501; cv=none; d=zohomail.com; s=zohoarc; b=BRAiXcabsqgwUjGW+OO9ZmDkt0CtwuaRzImqKOkqC7N9hwa1XlxVpkDDvepsk6zGed1hMlR/QdaqqCuYVUek39O4zN3bo+O6SWYKh6JUHdav6+ADren/sbur4fwMPkg0pKn6OBjBRso7cwXPd/Rnc6Fba/fD/qsRtCgmlxU/Obo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621828501; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=1Z2oQN746olj+3SX/LTRHXWp3dg7SVdIpH92iEeYFIo=; b=LF1s5RDMfJAAKlHSHzvV8dmCDKQc4eLzX5KTLt2Qk7GFUxoDEGTwmzE96CcF84NbLkYwYTIrTVUkSkE9IJ0lxJsFFh9yJsSQZcQxffVMrPSTziFtJLlS7v4UkQGRecmTrp+zvCPeTy72Cp7HkPRpOMubXoADF/xL78Yfh1VBy84= 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+75475+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1621828501356336.80386750635023; Sun, 23 May 2021 20:55:01 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id AgeGYY1788612xVbfrNfkvMO; Sun, 23 May 2021 20:55:01 -0700 X-Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) by mx.groups.io with SMTP id smtpd.web12.18507.1621828499735138068 for ; Sun, 23 May 2021 20:55:00 -0700 X-Received: by mail-lj1-f179.google.com with SMTP id 131so31721263ljj.3 for ; Sun, 23 May 2021 20:54:59 -0700 (PDT) X-Gm-Message-State: aV2xmz79xuszEHwoex9BkwJhx1787277AA= X-Google-Smtp-Source: ABdhPJxdmCN/qTxEx64/C7xGOQkg98o+tjuA8/yg2N5sWbiopEMpCHWF0fx5oFY4dEJt9CGmtwagIQ== X-Received: by 2002:a2e:7f16:: with SMTP id a22mr15778562ljd.360.1621828497946; Sun, 23 May 2021 20:54:57 -0700 (PDT) X-Received: from gilgamesh.semihalf.com (host-193.106.246.138.static.3s.pl. [193.106.246.138]) by smtp.gmail.com with ESMTPSA id n7sm1535845ljj.109.2021.05.23.20.54.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 May 2021 20:54:57 -0700 (PDT) From: "Marcin Wojtas" To: devel@edk2.groups.io Cc: michael.d.kinney@intel.com, leif@nuviainc.com, ardb+tianocore@kernel.org, Samer.El-Haj-Mahmoud@arm.com, sunny.Wang@arm.com, gjb@semihalf.com, upstream@semihalf.com, Marcin Wojtas Subject: [edk2-devel] [PATCH] EmbeddedPkg/RealTimeClockRuntimeDxe: Improve GetWakeupTime Date: Mon, 24 May 2021 05:54:41 +0200 Message-Id: <20210524035441.2489465-1-mw@semihalf.com> 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,mw@semihalf.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1621828501; bh=undhnJSWh0nEhhSJssLx94nrhETaOalMgwwQ4AxtiFw=; h=Cc:Date:From:Reply-To:Subject:To; b=MUAf7u7z90hQ87fPCeZEFcg2mgbbSZEUFRIUOC8J92xaJngWbvtt5zBYEXirPB9Fnfc 9XJh/aoiJFiM83GjTBqzCYR76Gl38L3el7rY7ryWDMTYlFAxe04B8Wj9MzBUXKrqcAo93 F86v4FKd/vsSr/E7Rhb26TNK3ViY7YU9oe4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" GetWakeupTime should return full time information, including the daylight/timezone. Make use of the existing non-volatile variables for that purpose. Moreover add an error checking of possibly invalid parameters. This partially fixes FWTS and SCT Set/GetWakeupTime tests on Marvell platforms. Signed-off-by: Marcin Wojtas Reviewed-by: Ard Biesheuvel Reviewed-by: Sunny Wang --- EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c b/Embedded= Pkg/RealTimeClockRuntimeDxe/RealTimeClock.c index e59036badc..85650a6ede 100644 --- a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c +++ b/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c @@ -143,6 +143,17 @@ GetWakeupTime ( OUT EFI_TIME *Time ) { + if (Time =3D=3D NULL || Enabled =3D=3D NULL || Pending =3D=3D NULL) { + return EFI_INVALID_PARAMETER; + } + + // + // Set these first so the RealTimeClockLib implementation + // can override them based on its own settings. + // + Time->TimeZone =3D mTimeSettings.TimeZone; + Time->Daylight =3D mTimeSettings.Daylight; + return LibGetWakeupTime (Enabled, Pending, Time); } =20 --=20 2.29.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 (#75475): https://edk2.groups.io/g/devel/message/75475 Mute This Topic: https://groups.io/mt/83043513/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-