From: Michael Zimmermann <sigmaepsilon92@gmail.com>
To: Andrew Fish <afish@apple.com>
Cc: GN Keshava <keshava.gn@gmail.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: COM port usage in UEFI
Date: Tue, 25 Oct 2016 18:57:16 +0200 [thread overview]
Message-ID: <CAN9vWDKn9G6NPY9KMjBX23LoFq+-4Bq7k08PaWXJ3yBLuX610Q@mail.gmail.com> (raw)
In-Reply-To: <C036EB6D-9901-4A07-A118-B9A6BA5EBFC2@apple.com>
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 <afish@apple.com> wrote:
>
> > On Oct 25, 2016, at 2:30 AM, GN Keshava <keshava.gn@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
>
prev parent reply other threads:[~2016-10-25 16:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-25 9:30 COM port usage in UEFI GN Keshava
2016-10-25 16:50 ` Andrew Fish
2016-10-25 16:57 ` Michael Zimmermann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAN9vWDKn9G6NPY9KMjBX23LoFq+-4Bq7k08PaWXJ3yBLuX610Q@mail.gmail.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox