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 <af...@apple.com> wrote: > > > On Oct 25, 2016, at 2:30 AM, GN Keshava <keshava...@gmail.com> 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 > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel