From nobody Sun Feb 8 20:08:43 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+109227+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+109227+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1696025472; cv=none; d=zohomail.com; s=zohoarc; b=P6nuk+glit/BW1M15yUF23uk4UYOqrMuC5uK8y9bw0HQT1sTp6BO1tP+JsQEERgve6a2LGrLP/1Zsb+vWbslE0YB0ZP96pywzcyLUexuSc9+swrRQ4gy9NpjMzAEJeK2VhGVql4mXrcPeJwDX685fyisANdg7xMf5PH63Sv3oWQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696025472; 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=5S6sTRyDMAbEQ9OfobYE9iDtbTrdCdvvCUe3mNXkBl8=; b=P4qx0QstL/q99nnWcPDAmME4HpG/X/7+++zaSLEw7RwhxT+S+tWuCvMNFav57IYKv4ClyAg3o4GWkerwUOqV7ea58ikLE4JeKLRJoZ3af05mn3zMQxdcs/mGZ0O+u/GxvWVCpkG2xPeByf7mHhdm5lWJ5Mn1VWC2XsqF+U7D/8U= 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+109227+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 1696025472013893.6365426093336; Fri, 29 Sep 2023 15:11:12 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=myQB46eOrcZtZuh4ttbXojEWr2jX4PP0ND8p24jQHPQ=; 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=1696025471; v=1; b=meXM6nkF9ooZE34FyCZgqF1MFsFMWAMVz6gruFT+DNRF6mKleoyYSVIxqsdsoqZlt/S7TuZv zjqTO1xaJrcV6tuYbG7q6O+H4Hyhz7AdqjSpIn/XExKDoRva3SCSGifilT9j1GU9tPjpuE6f9B8 2rLzJcIgr7R8K/dGjWgqqe2Q= X-Received: by 127.0.0.2 with SMTP id lgQzYY1788612xzfPcSkjRnu; Fri, 29 Sep 2023 15:11:11 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web10.30622.1696025471074929015 for ; Fri, 29 Sep 2023 15:11:11 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10848"; a="361773016" X-IronPort-AV: E=Sophos;i="6.03,188,1694761200"; d="scan'208";a="361773016" X-Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2023 15:11:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10848"; a="785225694" X-IronPort-AV: E=Sophos;i="6.03,188,1694761200"; d="scan'208";a="785225694" X-Received: from nldesimo-desk.amr.corp.intel.com ([10.241.240.72]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2023 15:11:10 -0700 From: "Nate DeSimone" To: devel@edk2.groups.io Cc: Andrew Fish , Ray Ni , Michael D Kinney , Chasel Chiu Subject: [edk2-devel] [PATCH v1] Add EFI_STATUS return to EMU_THUNK_PROTOCOL.SetTime() Date: Fri, 29 Sep 2023 15:10:51 -0700 Message-Id: <20230929221051.1701-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: 3aHYlhY1YqKN0CLZT7Hj1mYix1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1696025474038100003 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 (#109227): https://edk2.groups.io/g/devel/message/109227 Mute This Topic: https://groups.io/mt/101667662/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-