From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: mx.groups.io; dkim=pass header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=LnBWyp/e; spf=none, err=SPF record not found (domain: semihalf.com, ip: 209.85.208.179, mailfrom: mw@semihalf.com) Received: by mail-lj1-f179.google.com with SMTP id 131so31721263ljj.3 for ; Sun, 23 May 2021 20:54:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=s/B98lvna2r2h+bynZ1OjZRds8PH9hwHT4rPMLdZHq4=; b=LnBWyp/ehxCs28B7duuxwxpiLIV4vJ9CCBqCFJWstKy2jo2BhI+Yt+fdyYB38Y+P5G KDMft3I2yl9m6mYwQNmr0lkN9/WlAeP3fWcszXOTke9wR2PF5nOiEaX10IpLYXj77BqF FA0jMkvKk0CIE5f5DrFR+O1uYfEvi6WGM9z9yR8T3Lq65+FGk1fssY5uwWTRFtrJNaRs Wybt+8WDWztSmmO+AUsM+g6exLCtGshHa86i+lu1B5sBMBGQQl1TDAvHmPZ4DamNrYwK zXM0ez4fjnDvud2ygjlcHNnmSUBnI9SeSBZsb5V6G4oj1DP3NU0WYmGu5QOWNq02pTIU giyQ== 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:mime-version :content-transfer-encoding; bh=s/B98lvna2r2h+bynZ1OjZRds8PH9hwHT4rPMLdZHq4=; b=WfaQJHPIUkLyFQRVGa/wYNuRCj6SxIr3DDiEMGiHoQbV1KH/xdVglQ9O4W5RzMaZwO FPtvgwTtrUdhMzq4XOn9Cojg3cys3m+aoSyriGDiRibESw7FVtpxSyHRSBJQY8VP0Kea JwTNd4fwKdMXyhiQ63WZyKzbipMAshkoFNJNBcNQI/hq6wvdazMEhTccNVZ2wTBuw5UF M8K8ZtUqctsFukDAQijycQ8SETqCeglUHVGIsRagpGiP1+CDcxwPP/jMajXZujiEqpol h8iyHUDA7KcEeMipA0B2VxGtpOdh44eZXpnxlBva5MmHH1ZwcSxHGPdVYnHqn1cx6tfG 48dg== X-Gm-Message-State: AOAM530XBmrrEAgpTwUpt3ky1nZEHLFpFc+Oc0HXIcfdPPofxOCbVlRq 0HWTMsh3zdvhRzNr4jrlKZX+kCH+v/W5CThS 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) Return-Path: 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: [PATCH] EmbeddedPkg/RealTimeClockRuntimeDxe: Improve GetWakeupTime Date: Mon, 24 May 2021 05:54:41 +0200 Message-Id: <20210524035441.2489465-1-mw@semihalf.com> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 --- 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=0D )=0D {=0D + if (Time =3D=3D NULL || Enabled =3D=3D NULL || Pending =3D=3D NULL) {=0D + return EFI_INVALID_PARAMETER;=0D + }=0D +=0D + //=0D + // Set these first so the RealTimeClockLib implementation=0D + // can override them based on its own settings.=0D + //=0D + Time->TimeZone =3D mTimeSettings.TimeZone;=0D + Time->Daylight =3D mTimeSettings.Daylight;=0D +=0D return LibGetWakeupTime (Enabled, Pending, Time);=0D }=0D =0D --=20 2.29.0