From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: jiewen.yao@intel.com) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by groups.io with SMTP; Thu, 23 May 2019 22:39:05 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 May 2019 22:39:05 -0700 X-ExtLoop1: 1 Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga002.jf.intel.com with ESMTP; 23 May 2019 22:39:04 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 23 May 2019 22:39:00 -0700 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 23 May 2019 22:38:58 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.249]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.10]) with mapi id 14.03.0415.000; Fri, 24 May 2019 13:38:53 +0800 From: "Yao, Jiewen" To: "devel@edk2.groups.io" , "Gao, Zhichao" , "Gao, Liming" CC: Sean Brogan , "Kinney, Michael D" , Michael Turner , Bret Barkelew Subject: Re: [edk2-devel] [PATCH 4/6] MdePkg: Add gEfiCpu2ProtocolGuid and header file Thread-Topic: [edk2-devel] [PATCH 4/6] MdePkg: Add gEfiCpu2ProtocolGuid and header file Thread-Index: AQHVEe478QbNC5P9H0KKpZMFTlOm3KZ5NrsAgAACKoCAAIex0IAAAQJA Date: Fri, 24 May 2019 05:38:53 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503F6607DF@shsmsx102.ccr.corp.intel.com> References: <20190524050437.38616-1-zhichao.gao@intel.com> <20190524050437.38616-5-zhichao.gao@intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E450A9D@SHSMSX104.ccr.corp.intel.com> <3CE959C139B4C44DBEA1810E3AA6F9000B7D4EB7@SHSMSX101.ccr.corp.intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZDUxNjY1NjMtZmI3My00YjFjLWJlYzMtOGFhMWY5NzNjZmFkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNzZzcUNweDNzSng1cXVVRUZXYlExdTRvUWN0UVhXZFZjTGZPc09JVFZVWjZ2ckZsQzJLMDNcL1NvdlZtRWZkNHgifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: jiewen.yao@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Sorry, it is CPU2 not CPU_IO2. Right, I did not find CPU2 protocol in PI spec today. > -----Original Message----- > From: Yao, Jiewen > Sent: Thursday, May 23, 2019 10:35 PM > To: devel@edk2.groups.io; Gao, Zhichao ; Gao, > Liming > Cc: Sean Brogan ; Kinney, Michael D > ; Michael Turner > ; Bret Barkelew > > Subject: RE: [edk2-devel] [PATCH 4/6] MdePkg: Add gEfiCpu2ProtocolGuid > and header file >=20 > EFI_CPU_IO2_PROCOL is defined in PI spec Volume 5 Chapter 15 CPU I/O > Protocol. >=20 > Thank you > Yao jiewen >=20 > > -----Original Message----- > > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > > Gao, Zhichao > > Sent: Thursday, May 23, 2019 10:28 PM > > To: Gao, Liming ; devel@edk2.groups.io > > Cc: Sean Brogan ; Kinney, Michael D > > ; Michael Turner > > ; Bret Barkelew > > > > Subject: Re: [edk2-devel] [PATCH 4/6] MdePkg: Add gEfiCpu2ProtocolGuid > > and header file > > > > I have found it in UEFP spec and PI spec. It is not defined in these s= pecs. > > So I think maybe no spec has already defined it. > > > > Thanks, > > Zhichao > > > > > -----Original Message----- > > > From: Gao, Liming > > > Sent: Friday, May 24, 2019 1:20 PM > > > To: Gao, Zhichao ; devel@edk2.groups.io > > > Cc: Sean Brogan ; Kinney, Michael D > > > ; Michael Turner > > > ; Bret Barkelew > > > > > > Subject: RE: [PATCH 4/6] MdePkg: Add gEfiCpu2ProtocolGuid and header > > file > > > > > > Zhichao: > > > Which spec defines Cpu2 protocol? > > > > > > Thanks > > > Liming > > > >-----Original Message----- > > > >From: Gao, Zhichao > > > >Sent: Friday, May 24, 2019 1:05 PM > > > >To: devel@edk2.groups.io > > > >Cc: Sean Brogan ; Kinney, Michael D > > > >; Gao, Liming ; > > > >Michael Turner ; Bret Barkelew > > > > > > > >Subject: [PATCH 4/6] MdePkg: Add gEfiCpu2ProtocolGuid and header > file > > > > > > > >From: Sean Brogan > > > > > > > >REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1400 > > > > > > > >Add gEfiCpu2ProtocolGuid to MdePkg.dec. > > > >Add the header file of Cpu2 protocol: it has one interface to enabl= e > > > >interrupt and put cpu to sleep to wait for an interrupt. > > > > > > > >Cc: Michael D Kinney > > > >Cc: Liming Gao > > > >Cc: Sean Brogan > > > >Cc: Michael Turner > > > >Cc: Bret Barkelew > > > >Signed-off-by: Zhichao Gao > > > >--- > > > > MdePkg/Include/Protocol/Cpu2.h | 43 > > > >++++++++++++++++++++++++++++++++++ > > > > MdePkg/MdePkg.dec | 3 +++ > > > > 2 files changed, 46 insertions(+) > > > > create mode 100644 MdePkg/Include/Protocol/Cpu2.h > > > > > > > >diff --git a/MdePkg/Include/Protocol/Cpu2.h > > > >b/MdePkg/Include/Protocol/Cpu2.h new file mode 100644 index > > > >0000000000..cacd948140 > > > >--- /dev/null > > > >+++ b/MdePkg/Include/Protocol/Cpu2.h > > > >@@ -0,0 +1,43 @@ > > > >+/** @file > > > >+ CPU2 Protocol > > > >+ > > > >+ This code abstracts the DXE core from processor implementation > > details. > > > >+ > > > >+ Copyright (c) 2006 - 2018, Microsoft Corporation. All rights > > > >+ reserved.
> > > >+ > > > >+ SPDX-License-Identifier: BSD-2-Clause-Patent > > > >+ > > > >+**/ > > > >+ > > > >+#ifndef __PROTOCOL_CPU2_H__ > > > >+#define __PROTOCOL_CPU2_H__ > > > >+ > > > >+#include > > > >+ > > > >+typedef struct _EFI_CPU2_PROTOCOL EFI_CPU2_PROTOCOL; > > > >+ > > > >+ > > > >+/** > > > >+ This function enables CPU interrupts and then waits for an inter= rupt > > > >+to > > > >arrive. > > > >+ > > > >+ @param This The EFI_CPU2_PROTOCOL > > instance. > > > >+ > > > >+ @retval EFI_SUCCESS Interrupts are enabled on the > > processor. > > > >+ @retval EFI_DEVICE_ERROR Interrupts could not be enabled > > on the > > > >processor. > > > >+ > > > >+**/ > > > >+typedef > > > >+EFI_STATUS > > > >+(EFIAPI *EFI_CPU_ENABLE_AND_WAIT_FOR_INTERRUPT)( > > > >+ IN EFI_CPU2_PROTOCOL *This > > > >+ ); > > > >+ > > > >+// > > > >+// The EFI_CPU2_PROTOCOL is used to abstract processor-specific > > > >+functions > > > >from the DXE > > > >+// Foundation. > > > >+// > > > >+struct _EFI_CPU2_PROTOCOL { > > > >+ EFI_CPU_ENABLE_AND_WAIT_FOR_INTERRUPT > > > >EnableAndWaitForInterrupt; > > > >+}; > > > >+ > > > >+#endif > > > >diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index > > > >6c563375ee..e8c6939849 100644 > > > >--- a/MdePkg/MdePkg.dec > > > >+++ b/MdePkg/MdePkg.dec > > > >@@ -1803,6 +1803,9 @@ > > > > ## Include/Protocol/ShellDynamicCommand.h > > > > gEfiShellDynamicCommandProtocolGuid =3D { 0x3c7200e9, 0x005f, > > 0x4ea4, > > > >{0x87, 0xde, 0xa3, 0xdf, 0xac, 0x8a, 0x27, 0xc3 }} > > > > > > > >+ ## Include/Protocol/Cpu2.h > > > >+ gEfiCpu2ProtocolGuid =3D { 0x55198405, 0x26C0, > > 0x4765, {0x8B, > > > 0x7D, > > > >0xBE, 0x1D, 0xF5, 0xF9, 0x97, 0x12 }} > > > >+ > > > > # > > > > # [Error.gEfiMdePkgTokenSpaceGuid] > > > > # 0x80000001 | Invalid value provided. > > > >-- > > > >2.21.0.windows.1 > > > > > >=20