From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3101D1A1E57 for ; Tue, 25 Oct 2016 09:57:19 -0700 (PDT) Received: by mail-wm0-x233.google.com with SMTP id d128so37923070wmf.1 for ; Tue, 25 Oct 2016 09:57:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dULkZNjOJP0Jsu7UkTT1KYkBg7srQj68wrhCL6P5wtE=; b=FOKXy96gJvNHMPSmF5nsKQbrVypJZGM88MeANAVzJ2e9Gp7TRj8sovHDAIJXG0sd/w ekCdZN/3v9HdwagW6/JxEidqt8YrnuKJ6o6Rj9bShVB1tV9YO7RUBNwDbWxaEdBnIEdg bOSB/kh1v69D47uAr5byNHfecU0qu74kypMPF0GQqZX2zcnzhYIGuEn4gCgqIichUAfB fcBPiaLEGZa4LV8D08hKpr0LwICAB20GvMkxugpMHV9vz/vRt1A7qjPIQ/Sfw7+vcIY3 N+Ql0GzTn4SXtUB3IHT4NxRFHr0N0DPyDgoqqNHl798Xk/sIU+kH7y8WlSQjyAnmGezG IaRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dULkZNjOJP0Jsu7UkTT1KYkBg7srQj68wrhCL6P5wtE=; b=QxyYl/onqs3Jt2NYjuOxHqSAiHGj3Vs10cB8jfeZzKgFWPh//kvQt0CN3QWZOIGkHO ceURA5DYcf5X2XJFRrKbY/CVDQx0GYH9r/Klg6KbMVr/+VFhNaQzUQdB37hKfMBkyQgo Zg91Nz1xpFmKa4YFG3y3AZAXDmRckWo67ee9pfsAB75Kt6JhtnGkzt2cT9tmtS8fyEjd Py3/LwlJCxX+qyvaEr0s0PpBpeF5gIWiKTJ70ehZTu5lcZDASzGKXJrIwZrzjWfI50+j asYkZnKldMuTA/AoGygeSCjB6rxYp+TrA6gXKdHEv7+3ub6r1yTvwTDoGHzbbAgWQr6o aWSw== X-Gm-Message-State: ABUngvdvQtOS7cW5o+G5dLVeNplJU+6/0vN4EUWKWf+yO0k+V6saVwXyq35ONWD5APifqG8d3xxrqbMDMT98bg== X-Received: by 10.28.63.6 with SMTP id m6mr4615825wma.22.1477414637478; Tue, 25 Oct 2016 09:57:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.230.150 with HTTP; Tue, 25 Oct 2016 09:57:16 -0700 (PDT) In-Reply-To: References: From: Michael Zimmermann Date: Tue, 25 Oct 2016 18:57:16 +0200 Message-ID: To: Andrew Fish Cc: GN Keshava , "edk2-devel@lists.01.org" 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:57:19 -0000 Content-Type: text/plain; charset=UTF-8 COM ports may have had a naming scheme in past but in recent windows versions you are allowed to assign any COM name to any device - even USB. So he should really just obtain a handle to the correct protocol and try to choose/configure the correct port if there is more than one. Thanks Michael On Tue, Oct 25, 2016 at 6:50 PM, Andrew Fish wrote: > > > 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 < > 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 > > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel >