From nobody Sun Feb 8 21:32:52 2026 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+109228+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+109228+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1696025523; cv=none; d=zohomail.com; s=zohoarc; b=SOkcLOo8Ix8CkkEdNB0StzXHZBUrNZknISzrygfzqYOSBCwz7NtRVmLtuOmr6usKFWDpK3oE3xFZwHneN1Tq7c7hLGpNJJvYneWlqF5UYZr24XRcAWXdRa2vnE6YtExEe+rY01mXPN/uVumWD6CoqUVzunQtmftV1hRPtH4TWs0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696025523; 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=X3u++q1k4pqdI7n9Ir6xTU1ricSHoLtJ3P8wcOzbZJg=; b=JMO84vVIdIAghJJNMPBSHDXCu+sZCi67OR/ZM21kQjtfc8dVBFAsj/4+eTCJ2wDChsxfKSXkVLsRXuf1tPX2tyODTFxVaFMDwcLhR8k+cIuVCmJBTy6FGs+Cv9a5wr1knMnFDx/p5yaxCAaQET7medD8IvmAjXaM73+VZzU7xqE= 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+109228+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 169602552325623.99565629909023; Fri, 29 Sep 2023 15:12:03 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=NSxUasSIc/a5OEfvUWcyPFa2Kw+pL7bpsmRnXKR44oo=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1696025522; v=1; b=a3aAyrKDkbUJfYsgagXWv7cV82JUsvowZJTC2KJQpSS6005OLOR8UCLKYFl4M9Te6fIfgotO WZ8fdxUJ2E4Ml9ufOJOPR4CVfcE+7O90WM/UYllGl5Z7JlEWjZ030yIPQruOAGmuFaAbfKGc/Cu amo9gpMkkPVsPME6xBNbchQI= X-Received: by 127.0.0.2 with SMTP id mOigYY1788612xPwol30UHsi; Fri, 29 Sep 2023 15:12:02 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web11.30500.1696025521993401019 for ; Fri, 29 Sep 2023 15:12:02 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10848"; a="382301663" X-IronPort-AV: E=Sophos;i="6.03,188,1694761200"; d="scan'208";a="382301663" X-Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2023 15:12:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10848"; a="893582771" X-IronPort-AV: E=Sophos;i="6.03,188,1694761200"; d="scan'208";a="893582771" X-Received: from nldesimo-desk.amr.corp.intel.com ([10.241.240.72]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2023 15:10:46 -0700 From: "Nate DeSimone" To: devel@edk2.groups.io Cc: Andrew Fish , Ray Ni , Michael D Kinney , Chasel Chiu Subject: [edk2-devel] [PATCH v2] EmulatorPkg: Add EFI_STATUS return to EMU_THUNK_PROTOCOL.SetTime() Date: Fri, 29 Sep 2023 15:11:46 -0700 Message-Id: <20230929221146.1727-1-nathaniel.l.desimone@intel.com> MIME-Version: 1.0 Precedence: Bulk 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,nathaniel.l.desimone@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: JLoNd4QOpRk5kfeS2VSUQM0Ex1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1696025525200100003 Content-Type: text/plain; charset="utf-8" There is an inconsistency between the UNIX and Windows implementations of EMU_THUNK_PROTOCOL.SetTime(). The Windows version returns an EFI_STATUS value whereas the the UNIX implementation is VOID. However, the UNIX implementation is an unimplemented stub whereas the Windows version is implementated. The current EMU_THUNK_PROTOCOL function pointer definition specifies a VOID return type. However, EMU_THUNK_PROTOCOL.SetTime() is close to the spec defined gRT->SetTime() except for missing the EFI_STATUS return type. Therefore, I conclude that the most sensible reconciliation is to add the EFI_STATUS return type to the protocol definition. Cc: Andrew Fish Cc: Ray Ni Cc: Michael D Kinney Cc: Chasel Chiu Signed-off-by: Nate DeSimone --- EmulatorPkg/Include/Protocol/EmuThunk.h | 5 +++-- EmulatorPkg/Unix/Host/EmuThunk.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/EmulatorPkg/Include/Protocol/EmuThunk.h b/EmulatorPkg/Include/= Protocol/EmuThunk.h index c419d0a677..bdd57f410b 100644 --- a/EmulatorPkg/Include/Protocol/EmuThunk.h +++ b/EmulatorPkg/Include/Protocol/EmuThunk.h @@ -2,6 +2,7 @@ Emulator Thunk to abstract OS services from pure EFI code =20 Copyright (c) 2008 - 2011, Apple Inc. All rights reserved.
+ Copyright (c) 2023, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -148,12 +149,12 @@ VOID typedef VOID (EFIAPI *EMU_GET_TIME)( - OUT EFI_TIME *Time, + OUT EFI_TIME *Time, OUT EFI_TIME_CAPABILITIES *Capabilities OPTIONAL ); =20 typedef -VOID +EFI_STATUS (EFIAPI *EMU_SET_TIME)( IN EFI_TIME *Time ); diff --git a/EmulatorPkg/Unix/Host/EmuThunk.c b/EmulatorPkg/Unix/Host/EmuTh= unk.c index ee0843eebf..c57c105a53 100644 --- a/EmulatorPkg/Unix/Host/EmuThunk.c +++ b/EmulatorPkg/Unix/Host/EmuThunk.c @@ -387,14 +387,14 @@ SecGetTime ( } } =20 -VOID +EFI_STATUS SecSetTime ( IN EFI_TIME *Time ) { // Don't change the time on the system // We could save delta to localtime() and have SecGetTime adjust return = values? - return; + return EFI_UNSUPPORTED; } =20 EFI_STATUS --=20 2.39.2.windows.1 -=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 (#109228): https://edk2.groups.io/g/devel/message/109228 Mute This Topic: https://groups.io/mt/101667678/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-