From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BF8A3818BD for ; Sun, 25 Dec 2016 17:25:34 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 25 Dec 2016 17:25:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,404,1477983600"; d="scan'208";a="1104184300" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 25 Dec 2016 17:25:33 -0800 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 25 Dec 2016 17:25:33 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 25 Dec 2016 17:25:33 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.59]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.177]) with mapi id 14.03.0248.002; Mon, 26 Dec 2016 09:25:30 +0800 From: "Ni, Ruiyu" To: "Zeng, Star" , "edk2-devel@lists.01.org" CC: "Kinney, Michael D" , "Tian, Feng" Thread-Topic: [edk2] [PATCH] MdeModulePkg ConSplitterDxe: Support toggle state sync Thread-Index: AQHSXFlo671p3LsUfkqOikFIzZFy4KEVS65ggAFPhQCAAtfF4A== Date: Mon, 26 Dec 2016 01:25:30 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5B863DCB@SHSMSX104.ccr.corp.intel.com> References: <1482414197-32744-1-git-send-email-star.zeng@intel.com> <734D49CCEBEEF84792F5B80ED585239D5B8627D9@SHSMSX104.ccr.corp.intel.com> <3e491451-8534-1665-232a-7e4512bc30fe@intel.com> In-Reply-To: <3e491451-8534-1665-232a-7e4512bc30fe@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdeModulePkg ConSplitterDxe: Support toggle state sync X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Dec 2016 01:25:34 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Star, Why do you need "code can still work as before if the Toggle State Sync rel= ated functions and calling lines are removed"? Do you have a plan to remove the Toggle State Sync feature? If no, as long as Toggle State Sync feature cannot be separated very clearl= y (like VariableAuth), we can embed the feature In the ConSplitter driver, after all, the two functions I asked to be inlin= e are very simple, containing only one line of code. We could put comment above the inline code to say it's related to Toggle St= ate Sync. For #4 comment, I was wrong. Your change is correct.=20 Thanks/Ray From: Zeng, Star=20 Sent: Saturday, December 24, 2016 9:53 PM To: Ni, Ruiyu ; edk2-devel@lists.01.org Cc: Kinney, Michael D ; Tian, Feng ; Zeng, Star Subject: Re: [edk2] [PATCH] MdeModulePkg ConSplitterDxe: Support toggle sta= te sync Ray, On=A02016/12/23=A019:53,=A0Ni,=A0Ruiyu=A0wrote: >=A0Star, >=A01.=A0ConSplitterTextInPrivateReadKeyStroke():=A0How=A0about=A0using=A0b= elow=A0loop=A0to=A0eliminate=A0the=A0"Index--"? > >=A0=A0=A0for=A0(Index=A0=3D=A00;=A0Index=A0<=A0Private->CurrentNumberOfCon= soles;)=A0{ >=A0=A0=A0=A0=A0Status=A0=3D=A0Private->TextInList[Index]->ReadKeyStroke=A0= ( >=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0Private->TextInLis= t[Index], >=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0&CurrentKey >=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0); >=A0=A0=A0=A0=A0if=A0(!EFI_ERROR=A0(Status))=A0{ >=A0=A0=A0=A0=A0=A0=A0// >=A0=A0=A0=A0=A0=A0=A0//=A0Skip=A0partial=A0keystrokes=A0until=A0read=A0out= =A0the=A0non-partial=A0one >=A0=A0=A0=A0=A0=A0=A0// >=A0=A0=A0=A0=A0=A0=A0if=A0((CurrentKey.ScanCode=A0!=3D=A0CHAR_NULL)=A0||= =A0(CurrentKey.UnicodeChar=A0!=3D=A0SCAN_NULL))=A0{ >=A0=A0=A0=A0=A0=A0=A0=A0=A0*Key=A0=3D=A0CurrentKey; >=A0=A0=A0=A0=A0=A0=A0=A0=A0return=A0Status; >=A0=A0=A0=A0=A0=A0=A0} >=A0=A0=A0=A0=A0}=A0else=A0{ >=A0=A0=A0=A0=A0=A0=A0Index++; >=A0=A0=A0=A0=A0} >=A0=A0=A0} I=A0do=A0not=A0object. > >=A02.=A0Similar=A0logic=A0exists=A0in=A0ConSplitterTextInReadKeyStrokeEx() Same=A0to=A01. > >=A03.=A0How=A0about=A0remove=A0ToggleStateSyncHookSetState()=A0and=A0inlin= e=A0the=A0code?=A0It=A0might=A0make=A0the=A0code=A0more=A0readable. In=A0fact,=A0I=A0did=A0it=A0by=A0purpose=A0that=A0is=A0the=A0code=A0can=A0s= till=A0work=A0as=A0before=A0 if=A0the=A0Toggle=A0State=A0Sync=A0related=A0functions=A0and=A0calling=A0li= nes=A0are=A0removed. > >=A04.=A0How=A0about=A0directly=A0set=A0Private->VirtualKeyStateExported=A0= to=A0TRUE=A0in=A0ConSplitterTextInSetState()?=A0It=A0might=A0make=A0the=A0c= ode=A0more=A0readable. I=A0could=A0not=A0get=A0it.=A0Directly=A0set=A0Private->VirtualKeyStateExpo= rted=A0to=A0 TRUE=A0even=A0no=A0EFI_KEY_STATE_EXPOSED=A0in=A0the=A0input=A0Key=A0Toggle= =A0State? > >=A05.=A0How=A0about=A0remove=A0ToggleStateSyncToNewConInDev()=A0and=A0inli= ne=A0the=A0code?=A0Use=A0Private=A0instead=A0of=A0mConIn.=A0It=A0might=A0ma= ke=A0the=A0code=A0more=A0readable. Same=A0to=A03.=A0And=A0oh,=A0the=A0function=A0can=A0have=A0one=A0more=A0inp= ut=A0parameter=A0to=A0 eliminate=A0the=A0using=A0to=A0mConIn=A0directly,=A0I=A0did=A0that=A0for=A0= other=A0functions=A0 and=A0forgot=A0this=A0one,=A0my=A0god. > >=A06.=A0I=A0agree=A0ToggleStateSyncKeyNotify()=A0has=A0to=A0use=A0mConIn.= =A0Seems=A0like=A0a=A0gap=A0of=A0UEFI=A0spec=A0that=A0doesn't=A0have=A0VOID= =A0*=A0Context=A0as=A0the=A02nd=A0parameter=A0of=A0the=A0hot=A0key=A0notifi= cation=A0function. Yes Thanks=A0for=A0the=A0comments. Star > >=A0Regards, >=A0Ray > >>=A0-----Original=A0Message----- >>=A0From:=A0Zeng,=A0Star >>=A0Sent:=A0Thursday,=A0December=A022,=A02016=A09:43=A0PM >>=A0To:=A0mailto:edk2-devel@lists.01.org >>=A0Cc:=A0Zeng,=A0Star=A0;=A0Ni,=A0Ruiyu=A0;=A0Kinney,=A0Michael=A0D=A0; >>=A0Tian,=A0Feng=A0 >>=A0Subject:=A0[PATCH]=A0MdeModulePkg=A0ConSplitterDxe:=A0Support=A0toggle= =A0state=A0sync >> >>=A0Register=A0key=A0notify=A0for=A0toggle=A0state=A0(CapsLock,=A0NumLock= =A0and=A0ScrollLock) >>=A0sync=A0between=A0multiple=A0keyboards. >>=A0The=A0implementation=A0for=A0this=A0feature=A0requires=A0keyboard=A0dr= iver=A0supports >>=A0EFI_KEY_STATE_EXPOSED,=A0and=A0turns=A0on=A0physical=A0TextInEx=A0part= ial=A0key >>=A0report=A0for=A0toggle=A0state=A0sync. >>=A0The=A0virtual=A0TextInEx=A0will=A0report=A0the=A0partial=A0key=A0after= =A0it=A0is=A0required >>=A0by=A0calling=A0SetState(X=A0|=A0KEY_STATE_VALID_EXPOSED)=A0explicitly. >> >>=A0Cc:=A0Ruiyu=A0Ni=A0 >>=A0Cc:=A0Michael=A0Kinney=A0 >>=A0Cc:=A0Feng=A0Tian=A0 >>=A0Contributed-under:=A0TianoCore=A0Contribution=A0Agreement=A01.0 >>=A0Signed-off-by:=A0Star=A0Zeng=A0 >>=A0--- >>=A0.../Universal/Console/ConSplitterDxe/ConSplitter.c=A0|=A0208=A0+++++++= +++++++++++++- >>=A0.../Universal/Console/ConSplitterDxe/ConSplitter.h=A0|=A0=A0=A05=A0+- >>=A02=A0files=A0changed,=A0206=A0insertions(+),=A07=A0deletions(-) >> >>=A0diff=A0--git=A0a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSpli= tter.c >>=A0b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c >>=A0index=A0493bcbafdf39..203ad7b06e20=A0100644 >>=A0---=A0a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c >>=A0+++=A0b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c >>=A0@@=A0-67,6=A0+67,8=A0@@=A0GLOBAL_REMOVE_IF_UNREFERENCED=A0TEXT_IN_SPLI= TTER_PRIVATE_DATA=A0=A0mConIn=A0=3D=A0{ >>=A0=A0=A0=A0=A0(LIST_ENTRY=A0*)=A0NULL, >>=A0=A0=A0=A0=A0(LIST_ENTRY=A0*)=A0NULL >>=A0=A0=A0}, >>=A0+=A0=A00, >>=A0+=A0=A0FALSE, >> >>=A0=A0=A0{ >>=A0=A0=A0=A0=A0ConSplitterSimplePointerReset, >>=A0@@=A0-301,6=A0+303,157=A0@@=A0EFI_DRIVER_BINDING_PROTOCOL=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0gConSplitterAbsolutePointerDriverBinding=A0=3D >>=A0}; >> >>=A0/** >>=A0+=A0=A0Sync=A0current=A0toggle=A0state=A0to=A0new=A0console=A0input=A0= device. >>=A0+ >>=A0+=A0=A0@param=A0TextInEx=A0=A0=A0=A0=A0=A0=A0Simple=A0Text=A0Input=A0E= x=A0Input=A0protocol=A0pointer. >>=A0+ >>=A0+**/ >>=A0+VOID >>=A0+ToggleStateSyncToNewConInDev=A0( >>=A0+=A0=A0IN=A0EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL=A0=A0*TextInEx >>=A0+=A0=A0) >>=A0+{ >>=A0+=A0=A0// >>=A0+=A0=A0//=A0Sync=A0current=A0toggle=A0state=A0to=A0this=A0new=A0consol= e=A0input=A0device. >>=A0+=A0=A0// >>=A0+=A0=A0TextInEx->SetState=A0(TextInEx,=A0&mConIn.PhysicalKeyToggleStat= e); >>=A0+} >>=A0+ >>=A0+/** >>=A0+=A0=A0Key=A0notify=A0for=A0toggle=A0state=A0sync. >>=A0+ >>=A0+=A0=A0@param=A0KeyData=A0=A0=A0=A0=A0=A0=A0=A0A=A0pointer=A0to=A0a=A0= buffer=A0that=A0is=A0filled=A0in=A0with >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0the=A0keystroke=A0information=A0for=A0the=A0key=A0that=A0was >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0pressed. >>=A0+ >>=A0+=A0=A0@retval=A0EFI_SUCCESS=A0=A0=A0Toggle=A0state=A0sync=A0successfu= lly. >>=A0+ >>=A0+**/ >>=A0+EFI_STATUS >>=A0+EFIAPI >>=A0+ToggleStateSyncKeyNotify=A0( >>=A0+=A0=A0IN=A0EFI_KEY_DATA=A0=A0=A0*KeyData >>=A0+=A0=A0) >>=A0+{ >>=A0+=A0=A0UINTN=A0=A0=A0=A0=A0Index; >>=A0+ >>=A0+=A0=A0if=A0(((KeyData->KeyState.KeyToggleState=A0&=A0KEY_STATE_VALID_= EXPOSED)=A0=3D=3D=A0KEY_STATE_VALID_EXPOSED)=A0&& >>=A0+=A0=A0=A0=A0=A0=A0(KeyData->KeyState.KeyToggleState=A0!=3D=A0mConIn.P= hysicalKeyToggleState))=A0{ >>=A0+=A0=A0=A0=A0// >>=A0+=A0=A0=A0=A0//=A0There=A0is=A0toggle=A0state=A0change,=A0sync=A0to=A0= other=A0console=A0input=A0devices. >>=A0+=A0=A0=A0=A0// >>=A0+=A0=A0=A0=A0for=A0(Index=A0=3D=A00;=A0Index=A0<=A0mConIn.CurrentNumbe= rOfExConsoles;=A0Index++)=A0{ >>=A0+=A0=A0=A0=A0=A0=A0mConIn.TextInExList[Index]->SetState=A0( >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0mConIn.TextInExList[Index], >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0&KeyData->KeyState.KeyToggleState >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0); >>=A0+=A0=A0=A0=A0} >>=A0+=A0=A0=A0=A0mConIn.PhysicalKeyToggleState=A0=3D=A0KeyData->KeyState.K= eyToggleState; >>=A0+=A0=A0=A0=A0DEBUG=A0((EFI_D_INFO,=A0"Current=A0toggle=A0state=A0is=A0= 0x%02x\n",=A0mConIn.PhysicalKeyToggleState)); >>=A0+=A0=A0} >>=A0+ >>=A0+=A0=A0return=A0EFI_SUCCESS; >>=A0+} >>=A0+ >>=A0+/** >>=A0+=A0=A0Initialization=A0for=A0toggle=A0state=A0sync. >>=A0+ >>=A0+=A0=A0@param=A0Private=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0Text=A0In=A0Splitter=A0pointer. >>=A0+ >>=A0+**/ >>=A0+VOID >>=A0+ToggleStateSyncInitialization=A0( >>=A0+=A0=A0IN=A0TEXT_IN_SPLITTER_PRIVATE_DATA=A0=A0*Private >>=A0+=A0=A0) >>=A0+{ >>=A0+=A0=A0EFI_KEY_DATA=A0=A0=A0=A0=A0=A0KeyData; >>=A0+=A0=A0VOID=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0*NotifyHandle; >>=A0+ >>=A0+=A0=A0// >>=A0+=A0=A0//=A0Initialize=A0PhysicalKeyToggleState=A0that=A0will=A0be=A0s= ynced=A0to=A0new=A0console >>=A0+=A0=A0//=A0input=A0device=A0to=A0turn=A0on=A0physical=A0TextInEx=A0pa= rtial=A0key=A0report=A0for >>=A0+=A0=A0//=A0toggle=A0state=A0sync. >>=A0+=A0=A0// >>=A0+=A0=A0Private->PhysicalKeyToggleState=A0=3D=A0KEY_STATE_VALID_EXPOSED= ; >>=A0+ >>=A0+=A0=A0// >>=A0+=A0=A0//=A0Initialize=A0VirtualKeyStateExported=A0to=A0let=A0the=A0vi= rtual=A0TextInEx=A0not=A0report >>=A0+=A0=A0//=A0the=A0partial=A0key=A0even=A0though=A0the=A0physical=A0Tex= tInEx=A0turns=A0on=A0the=A0partial >>=A0+=A0=A0//=A0key=A0report.=A0The=A0virtual=A0TextInEx=A0will=A0report= =A0the=A0partial=A0key=A0after=A0it=A0is >>=A0+=A0=A0//=A0required=A0by=A0calling=A0SetState(X=A0|=A0KEY_STATE_VALID= _EXPOSED)=A0explicitly. >>=A0+=A0=A0// >>=A0+=A0=A0Private->VirtualKeyStateExported=A0=3D=A0FALSE; >>=A0+ >>=A0+=A0=A0// >>=A0+=A0=A0//=A0Register=A0key=A0notify=A0for=A0toggle=A0state=A0sync. >>=A0+=A0=A0// >>=A0+=A0=A0KeyData.Key.ScanCode=A0=3D=A0SCAN_NULL; >>=A0+=A0=A0KeyData.Key.UnicodeChar=A0=3D=A0CHAR_NULL; >>=A0+=A0=A0KeyData.KeyState.KeyShiftState=A0=3D=A00; >>=A0+=A0=A0KeyData.KeyState.KeyToggleState=A0=3D=A00; >>=A0+=A0=A0Private->TextInEx.RegisterKeyNotify=A0( >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0&Pr= ivate->TextInEx, >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0&Ke= yData, >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0Tog= gleStateSyncKeyNotify, >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0&No= tifyHandle >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0); >>=A0+} >>=A0+ >>=A0+/** >>=A0+=A0=A0Reinitialization=A0for=A0toggle=A0state=A0sync. >>=A0+ >>=A0+=A0=A0@param=A0Private=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0Text=A0In=A0Splitter=A0pointer. >>=A0+ >>=A0+**/ >>=A0+VOID >>=A0+ToggleStateSyncReInitialization=A0( >>=A0+=A0=A0IN=A0TEXT_IN_SPLITTER_PRIVATE_DATA=A0=A0*Private >>=A0+=A0=A0) >>=A0+{ >>=A0+=A0=A0UINTN=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0Index; >>=A0+ >>=A0+=A0=A0// >>=A0+=A0=A0//=A0Reinitialize=A0PhysicalKeyToggleState=A0that=A0will=A0be= =A0synced=A0to=A0new=A0console >>=A0+=A0=A0//=A0input=A0device=A0to=A0turn=A0on=A0physical=A0TextInEx=A0pa= rtial=A0key=A0report=A0for >>=A0+=A0=A0//=A0toggle=A0state=A0sync. >>=A0+=A0=A0// >>=A0+=A0=A0Private->PhysicalKeyToggleState=A0=3D=A0KEY_STATE_VALID_EXPOSED= ; >>=A0+ >>=A0+=A0=A0// >>=A0+=A0=A0//=A0Reinitialize=A0VirtualKeyStateExported=A0to=A0let=A0the=A0= virtual=A0TextInEx=A0not=A0report >>=A0+=A0=A0//=A0the=A0partial=A0key=A0even=A0though=A0the=A0physical=A0Tex= tInEx=A0turns=A0on=A0the=A0partial >>=A0+=A0=A0//=A0key=A0report.=A0The=A0virtual=A0TextInEx=A0will=A0report= =A0the=A0partial=A0key=A0after=A0it=A0is >>=A0+=A0=A0//=A0required=A0by=A0calling=A0SetState(X=A0|=A0KEY_STATE_VALID= _EXPOSED)=A0explicitly. >>=A0+=A0=A0// >>=A0+=A0=A0Private->VirtualKeyStateExported=A0=3D=A0FALSE; >>=A0+ >>=A0+=A0=A0for=A0(Index=A0=3D=A00;=A0Index=A0<=A0Private->CurrentNumberOfE= xConsoles;=A0Index++)=A0{ >>=A0+=A0=A0=A0=A0Private->TextInExList[Index]->SetState=A0( >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0Private->TextInExList[Index], >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0&Private->PhysicalKeyToggleState >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0); >>=A0+=A0=A0} >>=A0+} >>=A0+ >>=A0+/** >>=A0+=A0=A0Toggle=A0state=A0sync=A0hook=A0SetState. >>=A0+ >>=A0+=A0=A0@param=A0KeyToggleState=A0=A0=A0=A0=A0Pointer=A0to=A0key=A0togg= le=A0state. >>=A0+ >>=A0+**/ >>=A0+VOID >>=A0+ToggleStateSyncHookSetState=A0( >>=A0+=A0=A0IN=A0OUT=A0EFI_KEY_TOGGLE_STATE=A0=A0=A0*KeyToggleState >>=A0+=A0=A0) >>=A0+{ >>=A0+=A0=A0// >>=A0+=A0=A0//=A0Always=A0turn=A0on=A0physical=A0TextInEx=A0partial=A0key= =A0report=A0for >>=A0+=A0=A0//=A0toggle=A0state=A0sync. >>=A0+=A0=A0// >>=A0+=A0=A0*KeyToggleState=A0|=3D=A0EFI_KEY_STATE_EXPOSED; >>=A0+} >>=A0+ >>=A0+/** >>=A0=A0=A0The=A0Entry=A0Point=A0for=A0module=A0ConSplitter.=A0The=A0user= =A0code=A0starts=A0with=A0this=A0function. >> >>=A0=A0=A0Installs=A0driver=A0module=A0protocols=A0and.=A0Creates=A0virtua= l=A0device=A0handles=A0for=A0ConIn, >>=A0@@=A0-538,6=A0+691,8=A0@@=A0ConSplitterTextInConstructor=A0( >> >>=A0=A0=A0InitializeListHead=A0(&ConInPrivate->NotifyList); >> >>=A0+=A0=A0ToggleStateSyncInitialization=A0(ConInPrivate); >>=A0+ >>=A0=A0=A0ConInPrivate->AbsolutePointer.Mode=A0=3D=A0&ConInPrivate->Absolu= tePointerMode; >>=A0=A0=A0// >>=A0=A0=A0//=A0Allocate=A0buffer=A0for=A0Absolute=A0Pointer=A0device >>=A0@@=A0-1890,6=A0+2045,8=A0@@=A0ConSplitterTextInExAddDevice=A0( >>=A0=A0=A0Private->TextInExList[Private->CurrentNumberOfExConsoles]=A0=3D= =A0TextInEx; >>=A0=A0=A0Private->CurrentNumberOfExConsoles++; >> >>=A0+=A0=A0ToggleStateSyncToNewConInDev=A0(TextInEx); >>=A0+ >>=A0=A0=A0// >>=A0=A0=A0//=A0Extra=A0CheckEvent=A0added=A0to=A0reduce=A0the=A0double=A0C= heckEvent(). >>=A0=A0=A0// >>=A0@@=A0-3321,6=A0+3478,10=A0@@=A0ConSplitterTextInReset=A0( >>=A0=A0=A0=A0=A0} >>=A0=A0=A0} >> >>=A0+=A0=A0if=A0(!EFI_ERROR=A0(ReturnStatus))=A0{ >>=A0+=A0=A0=A0=A0ToggleStateSyncReInitialization=A0(Private); >>=A0+=A0=A0} >>=A0+ >>=A0=A0=A0return=A0ReturnStatus; >>=A0} >> >>=A0@@=A0-3363,8=A0+3524,18=A0@@=A0ConSplitterTextInPrivateReadKeyStroke= =A0( >>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0&CurrentKey >>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0); >>=A0=A0=A0=A0=A0if=A0(!EFI_ERROR=A0(Status))=A0{ >>=A0-=A0=A0=A0=A0=A0=A0*Key=A0=3D=A0CurrentKey; >>=A0-=A0=A0=A0=A0=A0=A0return=A0Status; >>=A0+=A0=A0=A0=A0=A0=A0// >>=A0+=A0=A0=A0=A0=A0=A0//=A0If=A0it=A0is=A0partial=A0keystroke,=A0skip=A0i= t. >>=A0+=A0=A0=A0=A0=A0=A0// >>=A0+=A0=A0=A0=A0=A0=A0if=A0((CurrentKey.ScanCode=A0=3D=3D=A0CHAR_NULL)=A0= &&=A0(CurrentKey.UnicodeChar=A0=3D=3D=A0SCAN_NULL))=A0{ >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0// >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0//=A0Try=A0to=A0read=A0key=A0from=A0this=A0ph= ysical=A0console=A0input=A0device=A0again. >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0// >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0Index--; >>=A0+=A0=A0=A0=A0=A0=A0}=A0else=A0{ >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0*Key=A0=3D=A0CurrentKey; >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0return=A0Status; >>=A0+=A0=A0=A0=A0=A0=A0} >>=A0=A0=A0=A0=A0} >>=A0=A0=A0} >> >>=A0@@=A0-3542,6=A0+3713,10=A0@@=A0ConSplitterTextInResetEx=A0( >>=A0=A0=A0=A0=A0} >>=A0=A0=A0} >> >>=A0+=A0=A0if=A0(!EFI_ERROR=A0(ReturnStatus))=A0{ >>=A0+=A0=A0=A0=A0ToggleStateSyncReInitialization=A0(Private); >>=A0+=A0=A0} >>=A0+ >>=A0=A0=A0return=A0ReturnStatus; >> >>=A0} >>=A0@@=A0-3607,8=A0+3782,22=A0@@=A0ConSplitterTextInReadKeyStrokeEx=A0( >>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0&CurrentKeyData >>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0); >>=A0=A0=A0=A0=A0if=A0(!EFI_ERROR=A0(Status))=A0{ >>=A0-=A0=A0=A0=A0=A0=A0CopyMem=A0(KeyData,=A0&CurrentKeyData,=A0sizeof=A0(= CurrentKeyData)); >>=A0-=A0=A0=A0=A0=A0=A0return=A0Status; >>=A0+=A0=A0=A0=A0=A0=A0// >>=A0+=A0=A0=A0=A0=A0=A0//=A0If=A0it=A0is=A0partial=A0keystroke,=A0check=A0= if=A0virtual=A0KeyState=A0has=A0been=A0required=A0to=A0be=A0exposed. >>=A0+=A0=A0=A0=A0=A0=A0// >>=A0+=A0=A0=A0=A0=A0=A0if=A0((CurrentKeyData.Key.ScanCode=A0=3D=3D=A0CHAR_= NULL)=A0&&=A0(CurrentKeyData.Key.UnicodeChar=A0=3D=3D=A0SCAN_NULL))=A0{ >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0if=A0(Private->VirtualKeyStateExported)=A0{ >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0CopyMem=A0(KeyData,=A0&CurrentKeyData,= =A0sizeof=A0(CurrentKeyData)); >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0return=A0Status; >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0} >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0// >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0//=A0Try=A0to=A0read=A0key=A0from=A0this=A0ph= ysical=A0console=A0input=A0device=A0again. >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0// >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0Index--; >>=A0+=A0=A0=A0=A0=A0=A0}=A0else=A0{ >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0CopyMem=A0(KeyData,=A0&CurrentKeyData,=A0size= of=A0(CurrentKeyData)); >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0return=A0Status; >>=A0+=A0=A0=A0=A0=A0=A0} >>=A0=A0=A0=A0=A0} >>=A0=A0=A0} >> >>=A0@@=A0-3641,6=A0+3830,7=A0@@=A0ConSplitterTextInSetState=A0( >>=A0=A0=A0TEXT_IN_SPLITTER_PRIVATE_DATA=A0*Private; >>=A0=A0=A0EFI_STATUS=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0Status; >>=A0=A0=A0UINTN=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0Index; >>=A0+=A0=A0EFI_KEY_TOGGLE_STATE=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0PhysicalKeyTo= ggleState; >> >>=A0=A0=A0if=A0(KeyToggleState=A0=3D=3D=A0NULL)=A0{ >>=A0=A0=A0=A0=A0return=A0EFI_INVALID_PARAMETER; >>=A0@@=A0-3648,6=A0+3838,9=A0@@=A0ConSplitterTextInSetState=A0( >> >>=A0=A0=A0Private=A0=3D=A0TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS=A0(Th= is); >> >>=A0+=A0=A0PhysicalKeyToggleState=A0=3D=A0*KeyToggleState; >>=A0+=A0=A0ToggleStateSyncHookSetState=A0(&PhysicalKeyToggleState); >>=A0+ >>=A0=A0=A0// >>=A0=A0=A0//=A0if=A0no=A0physical=A0console=A0input=A0device=A0exists,=A0r= eturn=A0EFI_SUCCESS; >>=A0=A0=A0//=A0otherwise=A0return=A0the=A0status=A0of=A0setting=A0state=A0= of=A0physical=A0console=A0input=A0device >>=A0@@=A0-3655,13=A0+3848,16=A0@@=A0ConSplitterTextInSetState=A0( >>=A0=A0=A0for=A0(Index=A0=3D=A00;=A0Index=A0<=A0Private->CurrentNumberOfEx= Consoles;=A0Index++)=A0{ >>=A0=A0=A0=A0=A0Status=A0=3D=A0Private->TextInExList[Index]->SetState=A0( >>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0Private->= TextInExList[Index], >>=A0-=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0KeyToggle= State >>=A0+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0&Physical= KeyToggleState >>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0); >>=A0=A0=A0=A0=A0if=A0(EFI_ERROR=A0(Status))=A0{ >>=A0=A0=A0=A0=A0=A0=A0return=A0Status; >>=A0=A0=A0=A0=A0} >>=A0=A0=A0} >> >>=A0+=A0=A0Private->PhysicalKeyToggleState=A0=3D=A0PhysicalKeyToggleState; >>=A0+=A0=A0Private->VirtualKeyStateExported=A0=3D=A0(((*KeyToggleState)=A0= &=A0EFI_KEY_STATE_EXPOSED)=A0!=3D=A00); >>=A0+ >>=A0=A0=A0return=A0EFI_SUCCESS; >> >>=A0} >>=A0@@=A0-3765,7=A0+3961,7=A0@@=A0ConSplitterTextInRegisterKeyNotify=A0( >>=A0=A0=A0=A0=A0} >>=A0=A0=A0} >> >>=A0-=A0=A0InsertTailList=A0(&mConIn.NotifyList,=A0&NewNotify->NotifyEntry= ); >>=A0+=A0=A0InsertTailList=A0(&Private->NotifyList,=A0&NewNotify->NotifyEnt= ry); >> >>=A0=A0=A0*NotifyHandle=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=3D= =A0NewNotify; >> >>=A0diff=A0--git=A0a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSpli= tter.h >>=A0b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h >>=A0index=A0e32abbaea133..99ac5b55d302=A0100644 >>=A0---=A0a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h >>=A0+++=A0b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h >>=A0@@=A0-1,7=A0+1,7=A0@@ >>=A0/**=A0@file >>=A0=A0=A0Private=A0data=A0structures=A0for=A0the=A0Console=A0Splitter=A0d= river >> >>=A0-Copyright=A0(c)=A02006=A0-=A02012,=A0Intel=A0Corporation.=A0All=A0rig= hts=A0reserved.
>>=A0+Copyright=A0(c)=A02006=A0-=A02016,=A0Intel=A0Corporation.=A0All=A0rig= hts=A0reserved.
>>=A0This=A0program=A0and=A0the=A0accompanying=A0materials >>=A0are=A0licensed=A0and=A0made=A0available=A0under=A0the=A0terms=A0and=A0= conditions=A0of=A0the=A0BSD=A0License >>=A0which=A0accompanies=A0this=A0distribution.=A0=A0The=A0full=A0text=A0of= =A0the=A0license=A0may=A0be=A0found=A0at >>=A0@@=A0-88,6=A0+88,7=A0@@=A0typedef=A0struct=A0{ >>=A0=A0=A0UINTN=A0=A0=A0Rows; >>=A0}=A0TEXT_OUT_SPLITTER_QUERY_DATA; >> >>=A0+#define=A0KEY_STATE_VALID_EXPOSED=A0(EFI_TOGGLE_STATE_VALID=A0|=A0EFI= _KEY_STATE_EXPOSED) >> >>=A0#define=A0TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE=A0=A0=A0=A0SIGNATURE_32= =A0('T',=A0'i',=A0'S',=A0'n') >> >>=A0@@=A0-128,6=A0+129,8=A0@@=A0typedef=A0struct=A0{ >>=A0=A0=A0EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL=A0=A0**TextInExList; >>=A0=A0=A0UINTN=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0TextInExListCount; >>=A0=A0=A0LIST_ENTRY=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0NotifyList; >>=A0+=A0=A0EFI_KEY_TOGGLE_STATE=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0PhysicalKeyToggleState; >>=A0+=A0=A0BOOLEAN=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0VirtualKeyStateExported; >> >> >>=A0=A0=A0EFI_SIMPLE_POINTER_PROTOCOL=A0=A0=A0=A0=A0=A0=A0=A0SimplePointer= ; >>=A0-- >>=A02.7.0.windows.1