From nobody Sun Feb 8 17:21:30 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43061+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43061+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1561949758; cv=none; d=zoho.com; s=zohoarc; b=AgM5DwOkBgHPJukzhovNuuFYp48d4G0O3IbGWQlN+uKySo5pP7SftiF1446YSqRSy/sBzknrq2e5jsaYcZ7QUCdKg67XkaMOSklkqKpADXUoAl7e2vL7zH5G85EYHCf55X0oC0lbHxmCH6qIwcXYEsA2dSU6YRDX1yzaSpWcwDE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561949758; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=wahOZcwKUG/E3MEVwOb2dGKCntLqoYLJsUIrPucxlhk=; b=gvtQUAWW7q1Lp8W9SALk/tMccQTuQhQn1n3TonUpGQt0DtY13O4MLTWEz0051VGxynsWofEUBqpoYgWVOzpTOuhrx+462ya64fjHJvBet9MEb4ibabW3m4wGdbJtBmEa5cmSw8Q6LNooJHwMXUJpIvselq4yg9oUENIDjMr5Ud8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43061+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1561949758730659.8174033582987; Sun, 30 Jun 2019 19:55:58 -0700 (PDT) Return-Path: X-Received: from mga01.intel.com (mga01.intel.com []) by groups.io with SMTP; Sun, 30 Jun 2019 19:55:57 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jun 2019 19:55:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,437,1557212400"; d="scan'208";a="338480162" X-Received: from mdkinney-mobl2.amr.corp.intel.com ([10.251.143.61]) by orsmga005.jf.intel.com with ESMTP; 30 Jun 2019 19:55:56 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian Subject: [edk2-devel] [edk2-platforms Patch 01/14] Vlv2DeviceRefCodePkg: Add gEfiSmmIchnDispatchProtocolGuid Date: Sun, 30 Jun 2019 19:55:40 -0700 Message-Id: <20190701025553.18596-2-michael.d.kinney@intel.com> In-Reply-To: <20190701025553.18596-1-michael.d.kinney@intel.com> References: <20190701025553.18596-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,michael.d.kinney@intel.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=1561949758; bh=Q3SLAk+sFCiR4XgHUF9m470F8xZ5Sk/963C5tTxOJGc=; h=Cc:Date:From:Reply-To:Subject:To; b=iYia0MyeYhna/VcotbTVO73aSkuHeIhLXJrcKfieVHL9+c+shj4E/4uy2T+nRpr6pOq 1TLj9Ivw43+hkXMncIgqtKb1k5BLs+mTtOwn6oBW2stE9ZBiA/BZ+8FdOwn/67vxN4hRh gegXmMJXmDRkBkrVQc5Ms5USBbZ1VjuEm/Q= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" * Add the gEfiSmmIchnDispatchProtocolGuid from the IntelFrameworkPkg to the Si specific Vlv2TbltDevicePkg. This removes a dependency on the IntelFrameworkPkg and adds a Si specific protocol to a Si package. Cc: Zailiang Sun Cc: Yi Qian Signed-off-by: Michael D Kinney Reviewed-By: Zailiang Sun --- .../Include/Protocol/SmmIchnDispatch.h | 183 ++++++++++++++++++ .../Vlv2DeviceRefCodePkg.dec | 5 +- 2 files changed, 186 insertions(+), 2 deletions(-) create mode 100644 Silicon/Intel/Vlv2DeviceRefCodePkg/Include/Protocol/Smm= IchnDispatch.h diff --git a/Silicon/Intel/Vlv2DeviceRefCodePkg/Include/Protocol/SmmIchnDis= patch.h b/Silicon/Intel/Vlv2DeviceRefCodePkg/Include/Protocol/SmmIchnDispat= ch.h new file mode 100644 index 0000000000..3cf86c0ff9 --- /dev/null +++ b/Silicon/Intel/Vlv2DeviceRefCodePkg/Include/Protocol/SmmIchnDispatch.h @@ -0,0 +1,183 @@ +/** @file + Provides the parent dispatch service for a given SMI source generator. + The EFI_SMM_ICHN_DISPATCH_PROTOCOL provides the ability to install child= handlers for + the given event types. + +Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Revision Reference: + This Protocol is defined in Framework of EFI SMM Core Interface Spec + Version 0.9. + +**/ + +#ifndef _EFI_SMM_ICHN_DISPATCH_H_ +#define _EFI_SMM_ICHN_DISPATCH_H_ + + +// +// Global ID for the ICH SMI Protocol +// +#define EFI_SMM_ICHN_DISPATCH_PROTOCOL_GUID \ + { \ + 0xc50b323e, 0x9075, 0x4f2a, {0xac, 0x8e, 0xd2, 0x59, 0x6a, 0x10, 0x85,= 0xcc } \ + } + +typedef struct _EFI_SMM_ICHN_DISPATCH_PROTOCOL EFI_SMM_ICHN_DISPATCH_PROT= OCOL; + +// +// Related Definitions +// +// +// ICHN Specific SMIs. These are miscellaneous SMI sources that are suppo= rted by the +// ICHN specific SMI implementation. These may change over time. TrapNum= ber is only +// valid if the Type is Trap. +// +typedef enum { + // + // NOTE: NEVER delete items from this list/enumeration! Doing so will p= revent other versions + // of the code from compiling. If the ICH version your driver is writte= n for doesn't support + // some of these SMIs, then simply return EFI_UNSUPPORTED when a child/c= lient tries to register + // for them. + // + IchnMch, + IchnPme, + IchnRtcAlarm, + IchnRingIndicate, + IchnAc97Wake, + IchnSerialIrq, + IchnY2KRollover, + IchnTcoTimeout, + IchnOsTco, + IchnNmi, + IchnIntruderDetect, + IchnBiosWp, + IchnMcSmi, + IchnPmeB0, + IchnThrmSts, + IchnSmBus, + IchnIntelUsb2, + IchnMonSmi7, + IchnMonSmi6, + IchnMonSmi5, + IchnMonSmi4, + IchnDevTrap13, + IchnDevTrap12, + IchnDevTrap11, + IchnDevTrap10, + IchnDevTrap9, + IchnDevTrap8, + IchnDevTrap7, + IchnDevTrap6, + IchnDevTrap5, + IchnDevTrap3, + IchnDevTrap2, + IchnDevTrap1, + IchnDevTrap0, + IchnIoTrap3, + IchnIoTrap2, + IchnIoTrap1, + IchnIoTrap0, + IchnPciExpress, + IchnMonitor, + IchnSpi, + IchnQRT, + IchnGpioUnlock, + // + // INSERT NEW ITEMS JUST BEFORE THIS LINE + // + NUM_ICHN_TYPES // the number of items in this enumeration +} EFI_SMM_ICHN_SMI_TYPE; + +typedef struct { + EFI_SMM_ICHN_SMI_TYPE Type; +} EFI_SMM_ICHN_DISPATCH_CONTEXT; + +// +// Member functions +// +/** + Dispatch function for a ICHN specific SMI handler. + + @param DispatchHandle The handle of this dispatch function. + @param DispatchContext The pointer to the dispatch function's con= text. + The DispatchContext fields are filled in + by the dispatching driver prior to + invoking this dispatch function. + + @return None + +**/ +typedef +VOID +(EFIAPI *EFI_SMM_ICHN_DISPATCH)( + IN EFI_HANDLE DispatchHandle, + IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext + ); + +/** + Register a child SMI source dispatch function with a parent SMM driver. + + @param This The pointer to the EFI_SMM_ICHN_DISPATCH_P= ROTOCOL instance. + @param DispatchFunction The function to install. + @param DispatchContext The pointer to the dispatch function's con= text. + The caller fills in this context before ca= lling + the register function to indicate to the r= egister + function the ICHN SMI source for which the= dispatch + function should be invoked. + @param DispatchHandle The handle generated by the dispatcher to = track the function + instance. + + @retval EFI_SUCCESS The dispatch function has been successfully + registered and the SMI source has been ena= bled. + @retval EFI_DEVICE_ERROR The driver could not enable the SMI source. + @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manag= e this + child. + @retval EFI_INVALID_PARAMETER DispatchContext is invalid. The ICHN input= value + is not within valid range. + +**/ +typedef +EFI_STATUS +(EFIAPI *EFI_SMM_ICHN_REGISTER)( + IN EFI_SMM_ICHN_DISPATCH_PROTOCOL *This, + IN EFI_SMM_ICHN_DISPATCH DispatchFunction, + IN EFI_SMM_ICHN_DISPATCH_CONTEXT *DispatchContext, + OUT EFI_HANDLE *DispatchHandle + ); + +/** + Unregister a child SMI source dispatch function with a parent SMM driver + + @param This The pointer to the EFI_SMM_ICHN_DISPATCH_P= ROTOCOL instance. + @param DispatchHandle The handle of the service to remove. + + @retval EFI_SUCCESS The dispatch function has been successfully + unregistered, and the SMI source has been = disabled, + if there are no other registered child dis= patch + functions for this SMI source. + @retval EFI_INVALID_PARAMETER The handle is invalid. + +**/ +typedef +EFI_STATUS +(EFIAPI *EFI_SMM_ICHN_UNREGISTER)( + IN EFI_SMM_ICHN_DISPATCH_PROTOCOL *This, + IN EFI_HANDLE DispatchHandle + ); + +// +// Interface structure for the SMM ICHN specific SMI Dispatch Protocol +// +/** + Provides the parent dispatch service for a given SMI source generator. +**/ +struct _EFI_SMM_ICHN_DISPATCH_PROTOCOL { + EFI_SMM_ICHN_REGISTER Register; ///< Installs a child service to b= e dispatched by this protocol. + EFI_SMM_ICHN_UNREGISTER UnRegister; ///< Removes a child service dispa= tched by this protocol. +}; + +extern EFI_GUID gEfiSmmIchnDispatchProtocolGuid; + +#endif diff --git a/Silicon/Intel/Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec b/= Silicon/Intel/Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec index 6117f179ba..1af1ed757c 100644 --- a/Silicon/Intel/Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec +++ b/Silicon/Intel/Vlv2DeviceRefCodePkg/Vlv2DeviceRefCodePkg.dec @@ -1,6 +1,6 @@ ## @file Vlv2DeviceRefCodePkg.dec # -# Copyright (c) 2012 - 2015, Intel Corporation. All rights reserved +# Copyright (c) 2012 - 2019, Intel Corporation. All rights reserved # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -32,7 +32,7 @@ [Ppis] gEfiPeiReadOnlyVariable2PpiGuid =3D { 0x2ab86ef5, 0xecb5, 0x4134, = {0xb5, 0x56, 0x38, 0x54, 0xca, 0x1f, 0xe1, 0xb4}} gPchPeiInitPpiGuid =3D { 0xACB93B08, 0x5CDC, 0x4A8F, = {0x93, 0xD4, 0x6, 0xE3, 0x42, 0xDF, 0x18, 0x2E}} gPttPassThruPpiGuid =3D { 0xc5068bac, 0xa7dc, 0x42f1, = {0xae, 0x80, 0xca, 0xa2, 0x4b, 0xb4, 0x90, 0x4b}} - =20 + [Protocols] gEfiGlobalNvsAreaProtocolGuid =3D { 0x074e1e48, 0x8132, 0x47a1, = {0x8c, 0x2c, 0x3f, 0x14, 0xad, 0x9a, 0x66, 0xdc}} gPpmPlatformPolicyProtocolGuid =3D { 0xddabfeac, 0xef63, 0x452c, = {0x8f, 0x39, 0xed, 0x7f, 0xae, 0xd8, 0x26, 0x5e}} @@ -41,6 +41,7 @@ [Protocols] gEfiSdHostIoProtocolGuid =3D { 0xb63f8ec7, 0xa9c9, 0x4472, = {0xa4, 0xc0, 0x4d, 0x8b, 0xf3, 0x65, 0xcc, 0x51}} gEfiSpiProtocolGuid =3D { 0x1156efc6, 0xea32, 0x4396, = {0xb5, 0xd5, 0x26, 0x93, 0x2e, 0x83, 0xc3, 0x13}} gEfiSmmSpiProtocolGuid =3D { 0xD9072C35, 0xEB8F, 0x43AD, = {0xA2, 0x20, 0x34, 0xD4, 0x0E, 0x2A, 0x82, 0x85}} + gEfiSmmIchnDispatchProtocolGuid =3D { 0xc50b323e, 0x9075, 0x4f2a, = { 0xac, 0x8e, 0xd2, 0x59, 0x6a, 0x10, 0x85, 0xcc}} gEfiSmmIchnDispatchExProtocolGuid =3D { 0x3920405B, 0xC897, 0x44DA, = {0x88, 0xF3, 0x4C, 0x49, 0x8A, 0x6F, 0xF7, 0x36}} gEfiPchS3SupportProtocolGuid =3D { 0xE287D20B, 0xD897, 0x4E1E, = {0xA5, 0xD9, 0x97, 0x77, 0x63, 0x93, 0x6A, 0x04}} gPchResetProtocolGuid =3D { 0xDB63592C, 0xB8CC, 0x44C8, = {0x91, 0x8C, 0x51, 0xF5, 0x34, 0x59, 0x8A, 0x5A}} --=20 2.21.0.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 (#43061): https://edk2.groups.io/g/devel/message/43061 Mute This Topic: https://groups.io/mt/32267617/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-