All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] serial: Add MMIO & SPCR support for AWS EC2 metal instances
@ 2021-03-18 22:07 Benjamin Herrenschmidt
  2021-03-18 22:07 ` [PATCH 1/5] acpi: Export a generic grub_acpi_find_table Benjamin Herrenschmidt
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Benjamin Herrenschmidt @ 2021-03-18 22:07 UTC (permalink / raw)
  To: grub-devel; +Cc: Matthias Lange

(Apologies if that got sent twice, there was an issue with my setup
yesterday causing it to be sent with the wrong From: line)

This series adds support for the serial console of AWS EC2 "metal" x86
instances to grub. This requires two improvements:

- Support for MMIO accesses to the 8250 serial port. This adds the basic
plumbing, a function to register an MMIO based port, and support for
configuring an MMIO port by using the string "mmio" followed by a hex
address for the --port directive. [Q: Should we instead add a --mmio
directive ? Can we make two such options mutually exclusive with the
current infrastructure ?]

- Support for setting up a default port using the ACPI SPCR table if
present. This series will make this happen if the command "serial" is
used without arguments. In that case, SPCR will be used if present,
otherwise grub will revert to com0 with default settings as before.

This work started originally from Matthias Lange series
https://marc.info/?l=grub-devel&m=148775823217022&w=2

However, I ended up rewriting most of it using a different approach
which I felt was less invasive and simpler, as I don't expect we will
be collecting more 'backends' for ns8250.c among other things.

I did not keep Matthias original support for OXSEMI PCI uart. This can
be fairly easily added on top, however, I believe a better approach
would be to define a syntax to the "serial" command to define a PCI UART
by seg/bus/dev/fn with options to set the base clock.

We could also add a table of "known" ones as we go based in vid/did
similar to what Linux does. None of this was necessary for my purpose
and I lack the ability/time to test this setup, but it would be easy
to add it on top of this series.

This was tested using SPCR on an actual c5.metal instance, and using
explicit instanciation via serial -p mmioXXXXXXXX on a modified qemu
hacked to create MMIO PCI serial ports.




^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2022-09-02  4:01 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-18 22:07 [PATCH 0/5] serial: Add MMIO & SPCR support for AWS EC2 metal instances Benjamin Herrenschmidt
2021-03-18 22:07 ` [PATCH 1/5] acpi: Export a generic grub_acpi_find_table Benjamin Herrenschmidt
2021-03-18 22:07 ` [PATCH 2/5] acpi: Add SPCR and generic address definitions Benjamin Herrenschmidt
2021-03-18 22:07 ` [PATCH 3/5] ns8250: Add base support for MMIO UARTs Benjamin Herrenschmidt
2021-03-19 17:16   ` Glenn Washburn
2021-03-19 23:30     ` Benjamin Herrenschmidt
2022-05-23 17:11   ` Sven Anderson
2022-05-25  3:13     ` Benjamin Herrenschmidt
2022-08-31  5:56     ` Benjamin Herrenschmidt
2022-08-31  8:26       ` Benjamin Herrenschmidt
2022-09-02  3:58         ` Benjamin Herrenschmidt
2021-03-18 22:07 ` [PATCH 4/5] ns8250: Add configuration parameter when adding ports Benjamin Herrenschmidt
2021-03-18 22:07 ` [PATCH 5/5] ns8250: Use ACPI SPCR table when available to configure serial Benjamin Herrenschmidt
2021-03-19  0:03 ` [PATCH 0/5] serial: Add MMIO & SPCR support for AWS EC2 metal instances Glenn Washburn
2021-03-19  1:27   ` Benjamin Herrenschmidt
2021-03-19 16:25     ` Glenn Washburn
2021-03-23 18:04 ` Daniel Kiper
2021-03-23 22:23   ` Benjamin Herrenschmidt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.