From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-in6.apple.com (mail-out6.apple.com [17.151.62.28]) (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 81A571A1E43 for ; Tue, 25 Oct 2016 09:50:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; d=apple.com; s=mailout2048s; c=relaxed/simple; q=dns/txt; i=@apple.com; t=1477414211; h=From:Sender:Reply-To:Subject:Date:Message-id:To:Cc:MIME-version:Content-type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-reply-to:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Cv44wgFSpcdF7sNdUMq0E72elztx2mEQsyAG2XrXd3U=; b=a1O3JUQf/cB0QvnkR9Qw66SfGzSbWgzI2PNzX/ONHxKI61XpzL9uvBaYffW+LjWZ 7IVCc1JvlgJa/HgYXkVdFlXFMW34L8UsBCUYl/WPwg4lm/5ZKCt6xBpejKKTOUYd 8Xnh2cLzzPTlXDeRIRdBlCZFt0lK4q6nF3mdaLIKLI2LCT8+u0i7SfEjYnLkbkxk pEJT+68O+QPDC3NXQj6eaXqt69kHL5dKg3nittk7GP3mek+yCpEXj27fXWsLI6SG zdujRXVbZtIkYqA/4MRxTS1M28TcSvyv8ylfpRT8W9+2Xh6WQ+pHNCL5x7JZjNoG FWtX8cdPn+9VdYSgFyoQbg==; Received: from relay2.apple.com (relay2.apple.com [17.128.113.67]) by mail-in6.apple.com (Apple Secure Mail Relay) with SMTP id 2E.82.06862.34D8F085; Tue, 25 Oct 2016 09:50:11 -0700 (PDT) X-AuditID: 11973e15-945b79a000001ace-a6-580f8d4390b7 Received: from nwk-mmpp-sz12.apple.com (nwk-mmpp-sz12.apple.com [17.128.115.204]) by relay2.apple.com (Apple SCV relay) with SMTP id FA.CC.09148.34D8F085; Tue, 25 Oct 2016 09:50:11 -0700 (PDT) MIME-version: 1.0 Received: from [17.153.69.177] by nwk-mmpp-sz12.apple.com (Oracle Communications Messaging Server 8.0.1.1.0 64bit (built Jun 15 2016)) with ESMTPSA id <0OFM00C3Q43M2010@nwk-mmpp-sz12.apple.com>; Tue, 25 Oct 2016 09:50:11 -0700 (PDT) Sender: afish@apple.com From: Andrew Fish Message-id: Date: Tue, 25 Oct 2016 09:50:10 -0700 In-reply-to: Cc: "edk2-devel@lists.01.org" To: GN Keshava References: X-Mailer: Apple Mail (2.3226) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrALMWRmVeSWpSXmKPExsUi2FDorOvcyx9hsLrDwGLPoaPMFu1fWlgd mDx2zrrL7tE9+x9LAFMUl01Kak5mWWqRvl0CV8b7gwvYC35pVlydl9HAeFm5i5GTQ0LAROLB wQ1sXYxcHEICexklDr3fzAqTWLv5AyNE4hCjxK+FE8ASvAKCEj8m32MBsZkFwiS2frvEBFH0 jlFi5fm9YAlhAXGJd2c2MYPYbALKEivmf2DvYmQHaraROOUOUaElcf7KJ3YQm0VAVWJPxxk2 EJtTIFji/P7DrBDjzSVmXPjCBGKLANW8/7kBzBYSCJC42jYFqIYD6E5Zidm/vEAukBA4wybx dOt0xgmMQrOQXDoLyaUQtpbE90etQHEOIFte4uB5WYiwpsSze5/YIWxtiSfvLrAuYGRbxSiU m5iZo5uZZ6aXWFCQk6qXnJ+7iREUBdPtRHcwnllldYhRgINRiYdXIIs/Qog1say4MvcQozQH i5I4bz4PUEggPbEkNTs1tSC1KL6oNCe1+BAjEwenVAMjd0Xu493WW/Wf+XF+umXyy9U+ufV5 zPxjUme3cOz7u6N+V1fYj98XLnMeLDBxeWjsof+KWc/B61XfFeU/xy5ff/7KMfpz5TXN8x/4 967KcIxkOdu0dsO2HRu/5exTqn7N/DnjJlPIkq6rj26cMupdubbSOk9txx5zPskil1hONmav E9p7/LK3KLEUZyQaajEXFScCAMfCxvdjAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrGIsWRmVeSWpSXmKPExsUi2FB8Rte5lz/C4FejtMWeQ0eZLdq/tLA6 MHnsnHWX3aN79j+WAKYoLpuU1JzMstQifbsEroz3BxewF/zSrLg6L6OB8bJyFyMnh4SAicTa zR8YIWwxiQv31rN1MXJxCAkcYpT4tXACK0iCV0BQ4sfkeywgNrNAmMTWb5eYIIreMUqsPL8X LCEsIC7x7swmZhCbTUBZYsX8D+xdjOxAzTYSp9whKrQkzl/5xA5iswioSuzpOMMGYnMKBEuc 33+YFWK8ucSMC1+YQGwRoJr3PzeA2UICARJX26YA1XAA3SkrMfuX1wRGgVlIjpuF5DgIW0vi +6NWoDgHkC0vcfC8LERYU+LZvU/sELa2xJN3F1gXMLKtYhQoSs1JrDTSSywoyEnVS87P3cQI DuZC5x2Mx5ZZHWIU4GBU4uHdkc4fIcSaWFZcmQsMIQ5mJRFe3U6gEG9KYmVValF+fFFpTmrx IcaJjEA/TmSWEk3OB8ZaXkm8oYmJgYmxsZmxsbmJOS2FlcR5N93ijBASSE8sSc1OTS1ILYI5 iomDU6qBUTP5IUuG7GHdrjYDt7s1DN5bJi6oms0VLHH62yWvZ6ck3uSU6Apo9U5R6CxIXZ9z dsN0WTH1m5/uXnyUnBs0593lY9Minz1TMLllpLVa/lfhpKKKirSZvRMv7LoVV3iSQ0XAVvBb mquZvWWMAv9ct2nPZkvcmxakVmga0vVHJkL+5Yz2uenPlFiKMxINtZiLihMBFZQg9dkCAAA= X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: COM port usage in UEFI 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: Tue, 25 Oct 2016 16:50:12 -0000 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT > On Oct 25, 2016, at 2:30 AM, GN Keshava wrote: > > Hi all, > > In my UEFI application, I'm using Serial protocol to access COM port. I'm > able to access COM port successfully. > > But I'm confused on how we can get user input regarding which COM port the > user wants to access. > > *Example, I have already a Windows application for the same, where user > selects the COM port number he wants to access, such as COM1: , COM30: etc.* > > In UEFI, I'm using COM port Handle Index (which user gets/uses in > *sermod *command, > like , *myapp.efi 31F* , where 31F is com port handle index). > > Is this best way possible in UEFI? Or is it better to use HANDLE itself? Or > is there any way to get input as COM port number same as Windows app? > Keshava, COM ports are kind of an early PC and DOS concept. I think the naming convention for COM1 - COM4 is based on I/O port and after that I'm not clear how it works, I guess that is made up by the OS? The ISA base (PC) Serial Driver is here: https://github.com/tianocore/edk2/tree/master/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe Looks like it produces a Component Name protocol that produces human readable strings for the port. That is probably the best thing to use in EFI. The other alternative is to use the device path on the handle, and attempt to decode that, but in doing that you are making assumptions about how the hardware works, so that could fail. For an ISA Bus there should be an ACPI Device Path node that has the HID and UID for the device. Thanks, Andrew Fish > Thanks! > Regards, > Keshava > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel